[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Wrapping two different elements in parent element.
Hi Bruno,
That is very easy with XSLT 2.0: <?xml version="1.0"?> <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output indent="yes"/> <xsl:template match="something"> <something-else> <usg> <xsl:for-each-group select="*" group-ending-with="word_form"> <form><xsl:apply-templates select="current-group()"/></form> </xsl:for-each-group> </usg> </something-else> </xsl:template> <xsl:template match="word_case"> <case><xsl:value-of select="."/></case> </xsl:template> <xsl:template match="word_form"> <form><xsl:value-of select="."/></form> </xsl:template> </xsl:stylesheet> Best Regards, George --------------------------------------------------------------------- George Cristian Bina - http://aboutxml.blogspot.com/ <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com Bruno Nahod wrote: Hello,
|
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
|