|
[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
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! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart








