[Telepathy-commits] [telepathy-doc/master] Fix to support XInclude

Davyd Madeley davyd at madeley.id.au
Sun Mar 1 21:48:11 PST 2009


---
 docs/book/insert-links.py |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/docs/book/insert-links.py b/docs/book/insert-links.py
index 3e2501d..5dbd6fd 100755
--- a/docs/book/insert-links.py
+++ b/docs/book/insert-links.py
@@ -29,9 +29,15 @@ MAPPINGS = {
 }
 
 import sys
+import os.path
 from lxml import etree
 
-doc = etree.parse (sys.stdin)
+try:
+    filename = sys.argv[1]
+    doc = etree.parse (filename)
+    doc.xinclude ()
+except IndexError:
+    doc = etree.parse (sys.stdin)
 
 xpathexpr = '(%s)[not(ancestor::ulink)]' % \
 		' | '.join (map (lambda s: '//%s' % s, MAPPINGS.keys ()))
-- 
1.5.6.5



More information about the telepathy-commits mailing list