[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: accessing different nodes when comparing two xml

Subject: Re: accessing different nodes when comparing two xml files
From: "Aron Bock" <aronbock@xxxxxxxxxxx>
Date: Mon, 25 Apr 2005 16:09:24 +0000
xsl different
Rahil, as a prior respondent alluded to, document('foo.xml') returns the root node, "/". See the following diagram:

/  (root node)
|
+--Top
     |
     +--SubConcepts
     |       |
     |       +-- SubConcept
     |
     +--SubConcepts


As you can see, the root node, "/" does not have any siblings.


By the way, if you're looking for tree comparision routines, you may want to see Sal Mangano's "XSLT Cookbook" from O'Reilly. It's XSL templates are available for download on the web, and can be used for constrained comparisions. Search this NG's archives.

Regards,

--A


From: RahilQ <qamar_rahil@xxxxxxxxxxx> Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Re: accessing different nodes when comparing two xml files Date: Mon, 25 Apr 2005 15:37:45 +0100

I corrected the <xsl:for-each> condition such that its now
<xsl:for-each select="document($first)/following-sibling::Top/SubConcepts/SubConcept[@name=$firstName]/Value>


But it still returns null.

For testing purpose I changed the condition to

<xsl:value-of select="document($arch)/Top/SubConcepts/SubConcept[1]">

and it returned the right value.

I have a feeling its got something to do with the way Ive written the following-sibling statement.

Any suggestions?

Thanks
Rahil

_________________________________________________________________
Is your PC infected? Get a FREE online computer virus scan from McAfee. Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.