xsl-list
[Top] [All Lists]

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

2013-05-08 06:13:44
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. ________________________________________________________________________

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--