[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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/
|
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
|