Re: [xsl] Paths and apos in xsltproc

Subject: Re: [xsl] Paths and apos in xsltproc
From: Michael Kay <mike@xxxxxxxxxxxx>
Date: Wed, 04 Aug 2010 04:51:28 +0100
/@link selects an attribute of a document node. Document nodes don't have attributes, so I can't see why you would expect this expression to return anything.

Michael Kay
Saxonica

On 04/08/2010 04:23, Nicholas Orr wrote:
G'day all,

I've found an issue in my testing for the command line xsltproc on mac os when the path contains apostrophes. I'm using the following version (from xsltproc -V) :

Using libxml 20703, libxslt 10124 and libexslt 813
xsltproc was compiled against libxml 20703, libxslt 10124 and libexslt 813
libxslt 10124 was compiled against libxml 20703
libexslt 813 was compiled against libxml 20703

And when I run my command as :

xsltproc -v /path/nick\'s/stylesheet.xsl /path/nick\'s/input.xml

I get an error :

xsltForEach: select document(/@link)
warning: failed to load external entity "TPO.xml"

The @link attribute is just a filename, no path, and I get the same error when using :

<xsl:for-each select="document(/@link,/)">
or
<xsl:for-each select="document(/@link)">

The command line is actually just testing ground for an implementation of Libxslt and libxml2, but I get the same error in both xsltproc and our implementation. I'm not sure if it's related but I also have the same or a similar problem with windows unc paths, but that may be another email...

Thanks,
Nick

Current Thread