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

RE: JAXP's ID Transform failing to include namespace declarati

  • To: "Jeni Tennison" <jeni@j...>
  • Subject: RE: JAXP's ID Transform failing to include namespace declaration attributes
  • From: "Evan Lenz" <elenz@x...>
  • Date: Fri, 4 Jan 2002 12:29:04 -0800
  • Cc: <xml-dev@l...>
  • Importance: Normal
  • In-reply-to: <16020606300.20020104201311@j...>

declarati
Jeni Tennison wrote:
> I take your other point about what happens if the attribute is false
> ID attribute. But id() only returns more than one node if the
> attribute has whitespace in the value, which can't happen if it's an
> ID attribute anyway, and you could (and should, I think) test for this
> separately. The expressions above are even more likely to give you
> false positives than the expression I suggested. I think you should
> use:
>
>   not(contains(., ' ')) and count(..|id(.)) = 1
>
> instead. Although, as you say, that doesn't solve the other source of
> false positives. If you were prepared to have false negatives, you
> could supplement the above with the test:
>
>   not(../@*[. = current()][2])
>
> which returns true if no other attributes have the same value as this
> one, but I admit it's not perfect.

All good points. Thanks, Jeni, for helping me perfectly refine this broken
solution ;-)

Evan


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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.