|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Copy and group XML
On 26/01/2011 18:22, Jacobus Reyneke wrote:
Good day, could someone please tell me what I'm doing wrong here. I would guess that the scenes for a given act are adjacent, so using group-adjacent is preferable to using group-by. So use <xsl:for-each-group select="*" group-adjacent="(@act, '?')[1]"> <xsl:choose> <xsl:when test="@act"> <act> <xsl:apply-templates select="current-group()"/> </act> </xsl:when> <xsl:otherwise> <xsl:apply-templates select="current-group()"/> </xsl:otherwise> </xsl:choose> </xsl:for-each-group> The expression (@act, '?')[1] returns the value of @act if present, or "?" otherwise. Michael Kay Saxonica
|
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
|

Cart








