[xsl] Help with grouping elements

Subject: [xsl] Help with grouping elements
From: Gustavo Luiz Duarte <gustavold@xxxxxxxxx>
Date: Tue, 13 Jan 2009 21:46:39 -0200

I have an input xml like:

I'd like to put the tags a-* into a new element <a></a>. How can I do it?
These tagnames are fictitious, I cannot use regexp to address them,
but there are few elements in the b-* group.

I'm using libxslt on linux. XLST version 1.0, but could use 2.0.

I tried the below with the identity transform, but didn't work.

     <xsl:template match="root">
                <xsl:element name="root">
                        <xsl:apply-templates select="b-1" />
                        <xsl:apply-templates select="b-n" />

                                <xsl:apply-templates />

Current Thread