[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: Michael Müller-Hillebrand <mmh@xxxxxxxxxxxxx>
Date: Wed, 6 Jul 2011 22:22:21 +0200
Re:  compare two nodes (the child elements
Am 06.07.2011 um 20:54 schrieb Wolfhart Totschnig:

> I have a seemingly simple xslt problem to which I cannot find the solution.
I want to test whether the context node, which is an <author> element with the
form (first?, middle?, last), is equal to one of a set of <person> elements.
By "equal" I mean having the same child elements and values of these elements.
At first, I thought it would be as easy as
>
> test="path/person = ."
>
> But then I realized that the "=" operator compares the string values of the
nodes

Wolfhart,

How about this (not very cool):

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

- Michael M|ller-Hillebrand

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.