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

Re: would like to simplify my XSLT

Subject: Re: would like to simplify my XSLT
From: Abel Braaksma <abel.online@xxxxxxxxx>
Date: Tue, 30 Jan 2007 15:43:38 +0100
Re:  would like to simplify my XSLT
David Carlisle wrote:
no even if the attribute had the same name, it would be a different node
with different identity.



Ah, thanks for correcting me. I did a test that I thought proofed my right. However, I made the wrong assumptions for the test resulting in wrong results resulting in wrong conclusions....


Which, makes me wonder in what scenario's 'intersect' can be useful. It appears to me that normal grouping is more flexible.

= allows you do do value-based intersection (of strings for example)
if $s1 and $s2 are sequences of strings then $s1[.=$s2] is the sequence of strings that are common to $s1 and $s2.

Yes. And that is basically what many of us showed in response to the OP. But don't you find '$1 intersect $2' much more readable than '$1[.=$2]'? (if automatic node-to-value were applied for intersect). Undoubtedly there are subtle reasons that the designers of XPath 2 have foreseen while disallowing union, intersect and except to operate on any type of sequences, incl. atomic types (even though there are other operators that yield the same result).



-- Abel


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-2011 All Rights Reserved.