Take the 2-minute tour ×  I'm making an SCons file for building
Docbook documentation. In order to trace dependencies I would
like some way to resolve catalog file lookups to an absolute
path to a file.  So say I have a bit of Docbook XML :
<title>Docbook example document</title>      <xi:include
href="file:///common/logo.xml"    <xi:include
href="chap1/chap1.xml"/>   <xi:include href="chap2/chap2.xml"/>
<xi:include href="chap3/chap3.xml"/>   <xi:include
href="chap4/chap4.xml"/>   and a catalog.xml file :  <catalog
xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
rewritePrefix="file:///home/kst/svn/TOOLS/Docbook/stylesheet/"
/>
rewritePrefix="file:///home/kst/svn/TOOLS/Docbook/common/" />
<nextCatalog  catalog="/etc/xml/catalog" />   Getting the
xinclude href string is no problem using lxml but I'm stuck
there. What I need is some way to get the absolute filename that
file:///common/logo.xml resolves to (in this case
/home/kst/svn/TOOLS/Docbook/common/logo.xml) from the catalog
file.