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

Re: grouping problem...kinda?

Subject: Re: grouping problem...kinda?
From: Florent Georges <lists@xxxxxxxxxxxx>
Date: Sat, 22 Jan 2011 19:04:22 +0000 (GMT)
Re:  grouping problem...kinda?
tom a wrote:

  Hi,

> preceding-sibling::*/@class can return a sequence of
values.
> Why does the copy-of select the correct(/first?) one? 

  The item 9
in the numbered list in "5.7.1 Constructing Complex
Content" in XSLT 2.0 says:
If an attribute A in the result sequence has the same name as
    another
attribute B that appears later in the result sequence,
    then attribute A is
discarded from the result sequence.

  Put another way, it means that if
several attributes with the
same name appear in the sequence, the latest is
picked.  And
because the result of X|Y is always ordered in document order as
per XPath 2.0 (meaning, more or less, in the same order "you see
in the
file"), when you have "preceding-sibling::*/@class|@*" it
will use the
attribute class on the current element, or the
"closest" class attribute on a
preceding sibling.

  Regards,

-- 
Florent Georges
http://fgeorges.org/

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.