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

Re: xpath query question

Subject: Re: xpath query question
From: "andrew welch" <andrew.j.welch@xxxxxxxxx>
Date: Fri, 11 Aug 2006 11:07:53 +0100
Re:  xpath query question
On 8/11/06, Andrei Matei <AndreiMatei@xxxxxxxx> wrote:
Hello all,

I want to ask you if I can do something with xpath. I have an xml that
looks like this:

<a>
  <b>
   content 1
  </b>
  <b>
   content 2
  </b
  ..
</a>

I want an xpath expression that would tell me if all the contents of the b
nodes are the same. For the example above this wouldn't happen, because
"content 1" != "content 2". It doesn't matter what the expression would
output (the first b would be great). Is this possible with xpath?

If your content is exactly like that then you can just do:


<xsl:if test="b[1] = b[2]"> the contents match</xsl:if>

cheers
andrew

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.