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

Re: Identity Transform

Subject: Re: Identity Transform
From: David Carlisle <davidc@xxxxxxxxx>
Date: Mon, 7 Nov 2005 11:35:51 GMT
Re:  Identity Transform
> Doesn't Form 2 first append child nodes
> and then attributes, which should either result in an error or silently
> discard the attributes?

No. 

The | operator forms the set union of two node sets, and sets never
imply any ordering (or have duplicates) so a|b always means the same
thing as b|a.

XPath2 moves away from set semantics to having ordered lists as the
primitive datatype. In Xpath2 the | operator is defined to append lists,
and then re-rorder to document order, and remove duplicates. this is
equivalent (just less elegant).

This is nothing to do with attributes, consider 

<x>
  <a/>
  <b/>
</x>

You can do

<xsl:copy-of select="a|b"/>
 or select="b|a" and you get the same thing in
either case.

In XPath2 if you want to get b before a you can go
<xsl:copy-of select="(b,a)"/>
In XSLT1 to get that you'd have to do
<xsl:copy-of select="b"/>
<xsl:copy-of select="a"/>


David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

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.