Subject: Re: Reading external XML file XSLT2.0
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 08 May 2013 12:13:25 +0100
|
On 08/05/2013 12:03, Pankaj Chaturvedi 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')"/>
after that $extNode is the document node.
so this:
Trying to print somewhere
<xsl:value-of select="doc($extNode)/book-meta/book/@author"/>
is wrong you want
<xsl:value-of select="$extNode/book-meta/book/@author"/>
David
________________________________________________________________________
The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.
This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs.
________________________________________________________________________
|