|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] accessing different nodes when comparing two xml files
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[@name=$firstName]/Value | $first/preceding-sibling::SubConcepts/SubConcept[@name=$firstName]/Value"> <xsl:if test="$second/following-sibling::SubConcepts/SubConcept[@name=$secondName] | $second/preceding-sibling::SubConcepts/SubConcept[@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
|
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
|

Cart








