Subject: Re: [xsl] Paths and apos in xsltproc From: Nicholas Orr <nick@xxxxxxxxxxx> Date: Wed, 4 Aug 2010 13:59:08 +1000 |
Michael, It's actually : <xsl:for-each select="document(/Report/File/@link)/Report/File"> I just cut it down for brevity, and it works just fine in most situations. Basically there is one main xml document with a list of File nodes, and every file node has a link attribute with the filename. Each referenced file is in the same folder as the main file. The foreach works fine every time except if there is an apostrophe in the path. Thanks, Nick On 04/08/2010, at 1:51 PM, Michael Kay wrote: > /@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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Paths and apos in xsltpro, Michael Kay | Thread | [xsl] ePub XSLT out there?, Jacobus Reyneke |
Re: [xsl] Paths and apos in xsltpro, Michael Kay | Date | [xsl] ePub XSLT out there?, Jacobus Reyneke |
Month |