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(_at_)nag(_dot_)co(_dot_)uk>
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Cc: tom a <tasmito(_at_)yahoo(_dot_)com>
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>
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--