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

Re: Compare attribute values (fwd)

Subject: Re: Compare attribute values (fwd)
From: Phil Lanch <phil@xxxxxxxxxxxxxxx>
Date: Wed, 16 Feb 2000 12:15:04 +0000
xml compare attribute values
Jany Quintard wrote:
> 
> It seems that my question with same subject was

... lost in transit?  well, i don't seem to have received it.

it's a fair question, anyway.

> When encountering an l element, I want to select an element nameloc
> somewhere in the tree, whose ID has the same value as attribute linkend of
> the current one (l).
> So, the tries I made failed and I don't see how to express the selection
> condition.

if you want a real ID attribute (so declared in the DTD), then-

  id(@linkend)/self::nameloc

-or, if you know that the element with the right ID will be a nameloc,
just-

  id(@linkend)

that only works if your XML parser actually reads the DTD, which only
validating parsers are obliged to do.  to just look for an attribute
named id-

  //nameloc[@id = current()/@linkend]

-- 

cheers

phil

"Who knows if a well-prepared soup was not responsible for
the pneumatic pump or a poor one for a war?"


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.