Hi
I am comparing two xml files in one xsl file for content equality.
I have declared two variables that will contain the two document trees.
<xsl:variable name="first">First.xml</xsl:variable>
<xsl:variable name="second" select="document('Second.xml')/Top"/>
When trying to run a for-loop (as below) I get a compile-time error that
'the result is a node() instead of a boolean' :
<xsl:for-each
select="$first/following-sibling::SubConcepts/SubConcept[(_at_)name=$firstName]/Value
| $first/preceding-sibling::SubConcepts/SubConcept[(_at_)name=$firstName]/Value">
<xsl:if
test="$second/following-sibling::SubConcepts/SubConcept[(_at_)name=$secondName]
|
$second/preceding-sibling::SubConcepts/SubConcept[(_at_)name=$secondName]">
.............</xsl:if>
.........</xsl:for-each>
Could someone please suggest the best way of writing a code for looping.
PS: I need to access the 'first' and 'second' variables at different
points in the same file, which is why I felt that using the $first/....
and $second/... when required will be most convenient.
Thanks in advance for any help
Rahil
--~------------------------------------------------------------------
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>
--~--