[XSL-LIST Mailing List Archive Home]
[Reply To This Message]
Re: accessing different nodes when comparing two xml
Subject: Re: accessing different nodes when comparing two xml files|
From: RahilQ <qamar_rahil@xxxxxxxxxxx>
Date: Mon, 25 Apr 2005 15:37:45 +0100
I corrected the <xsl:for-each> condition such that its now
But it still returns null.
For testing purpose I changed the condition to
and it returned the right value.
I have a feeling its got something to do with the way Ive written the
David Carlisle wrote:
I have declared two variables that will contain the two document trees.
<xsl:variable name="second" select="document('Second.xml')/Top"/>
That $first does not contain a document it contains a result tree
fragment that corresponds to a document node that has (just) a text node
with value the string "First.xml".
presulamably you intended that to be
<xsl:variable name="first" select="document('First.xml')/Top"/>
Thus will give you a compile time error as $first is a result tree
fragment not a node set.
However your xpaths are not going to work I expect.
If Second.xml is a well formed XML file it has only one top level
element, presumably called Top. $second is bound to that element node
and so will have no following siblings, so this will be th eempty set.
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format