Subject: Re: [xsl] grouping problem...kinda? From: tom a <tasmito@xxxxxxxxx> Date: Sat, 22 Jan 2011 10:50:18 -0800 (PST) |
That's awesome. Thanks very much. I'm afraid I don't understand why it works, though. preceding-sibling::*/@class can return a sequence of values. Why does the copy-of select the correct(/first?) one? Similarly, the copy-of selects the correct item in the sequence when it also contains the result of @*. It does so even when the OR is reversed, ie: @*|preceding-sibling::*/@class. Why does it prefer to select the value of ./@* over the values in preceding-sibling::*/@class ? ----- Original Message ---- From: David Carlisle <davidc@xxxxxxxxx> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Cc: tom a <tasmito@xxxxxxxxx> Sent: Fri, January 21, 2011 7:00:19 PM Subject: Re: [xsl] grouping problem...kinda? <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="*"> <xsl:copy> <xsl:copy-of select="preceding-sibling::*/@class|@*"/> <xsl:apply-templates/> </xsl:copy> </xsl:template> </xsl:stylesheet>
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] grouping problem...kinda?, David Carlisle | Thread | Re: [xsl] grouping problem...kinda?, Florent Georges |
Re: [xsl] Applied attribute error, Imsieke, Gerrit, le- | Date | Re: [xsl] grouping problem...kinda?, Florent Georges |
Month |