[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: [xsl] Reading external XML file XSLT2.0


Subject: RE: [xsl] Reading external XML file XSLT2.0
From: "Pankaj Chaturvedi" <Pankaj.Chaturvedi@xxxxxxxxxxxxxx>
Date: Wed, 8 May 2013 16:03:17 +0530

>It's because $extNode is actually a string (or sequence of strings by
the looks of it).  You probably want

>doc($extNode)/book-meta/.......

>...with a tweak to $extNode to create a single string.


Which is correct. Thanks Andrew. But it seems that something still wrong
with my code as I cannot access the file and getting wrong results.

<xsl:variable name="extNode" select="tokenize(document-uri(.),
'\.')[last()-2],'book_meta.xml'"/>

I know that
    <xsl:variable name="extNode"
select="document('file:/c:/book-type/book_meta.xml')"/>
Will not work in Windows so decided to use document-uri(). Can somebody
share their views  how this can be done.

Best,
Pankaj


--
Andrew Welch
http://andrewjwelch.com


Current Thread