[lxml-dev] broken document('') in xslt ..

Brad Clements bkc at murkworks.com
Mon Dec 3 01:13:41 CET 2007


I am having trouble with a transform on 2.0alpha5 (and 2.0alpha3). It 
works on a system with a newer libxml2/libxslt,
but fails on a slightly older libxml2/libxslt. However when using 
xsltproc on the "older" system, the transform works.

So I think maybe there is an issue with custom resolvers.

basically the .xsl looks like this:

<xsl_:for-each select="document('')//const:css/const:file">
<xsl_:variable name="file" select="."/>
    <link rel="stylesheet" type="text/css">
    <xsl_:attribute name="href">
<xsl_:value-of select="concat('/css/', $file)"/>
</xsl_:attribute>
</link>
</xsl_:for-each>

And elsewhere in the xsl file is:

<const:css id="number_pad_css">
<const:file>manage_pending.css</const:file>
</const:css>


I am using a custom resolver.

I don't see any requests to resolve '' (and I wouldn't expect any either).

At first I thought this was a 2.0alpha5 issue, but I downgraded to 
2.0alpha3 and I still have the problem on one system, but it works on 
the other.

working system, centos 4, lxml 2.0alpha3 libxml2 (2, 6, 28) / libxslt 
(1, 1, 20)

non-working system, centos 4, lxml 2.0alpha3 (or 5), libxml2 (2, 6, 23)  
/ libxslt (1, 1, 15)

On the non-working system, if I use xsltproc, the transform works correctly.



[bkc at sch package_data]$ xsltproc -version
Using libxml 20623, libxslt 10115 and libexslt 812
xsltproc was compiled against libxml 20623, libxslt 10115 and libexslt 812
libxslt 10115 was compiled against libxml 20623
libexslt 812 was compiled against libxml 20623

output (in part)

<link rel="stylesheet" type="text/css" href="/css/manage_pending.css" />

I tried going through the libxslt changelog, but nothing appears obvious 
to me as being a candidate issue.

Can anyone suggest something? (upgrading libxslt on this system will be 
difficult)



-- 
Brad Clements,                bkc at murkworks.com    (315)268-1000
http://www.murkworks.com                          
AOL-IM: BKClements



More information about the lxml-dev mailing list