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

Subject: Re: [xsl] Reading external XML file XSLT2.0
From: Andrew Welch <andrew.j.welch@xxxxxxxxx>
Date: Wed, 8 May 2013 12:11:21 +0100
On 8 May 2013 12:03, Pankaj Chaturvedi <Pankaj.Chaturvedi@xxxxxxxxxxxxxx> wrote:
>> 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.
>
>>try file:///   (3 slashes)
>
>
> No success Andrew. I am writing below codes just for review
>
>    <xsl:variable name="extNode"
> select="document('file:///C:/book-type/book_meta.xml')"/>
>
> Trying to print somewhere
>
> <xsl:value-of select="doc($extNode)/book-meta/book/@author"/>
>
> book_meta.xml looks something like:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <book-meta>
>     <book name="" chapter_label="" author="supress"/>
> </book-meta>
>
> Any suggestions what could be possibly wrong.


You've got document() and doc()....


-- 
Andrew Welch
http://andrewjwelch.com

Current Thread