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

Re: compare two nodes (the child elements, not the str

Subject: Re: compare two nodes (the child elements, not the string values) in XSLT 1.0
From: Wolfhart Totschnig <wolfhart@xxxxxxxxxxxxx>
Date: Wed, 06 Jul 2011 15:40:27 -0500
Re:  compare two nodes (the child elements
How about this (not very cool):

test="concat(path/person/first, '|', path/person/first, '|', path/person/first) = concat(first, '|', middle, '|', last)

This does not work. The concat() function transforms the node sets into strings, and so the expression "concat(path/person/first, '|', path/person/middle, '|', path/person/last)" takes the values of the <first>, <middle>, and <last> elements of the *first* <person> element (the string value of a node set is by definition the string value of the first node in the node set) and concatenates them. So the test you propose will always yield "false" unless the context node happens to be equal to the first <person> element.


Wolfhart

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.