Subject: RE: [xsl] grouping adjacent siblings From: "Michael Kay" <mhkay@xxxxxxxxxxxx> Date: Thu, 3 May 2001 17:31:06 +0100 |
> I am trying to transform the following... > > <frag> > <b>house</b> > <a>door</a> > <a>wall</a> > <a>room</a> > <b>barn</b> > <a>hay</a> > <a>cow</a> > <a>poo</a> > </frag> > You can do this with something like <xsl:for-each select="b"> <xsl:variable name="id" select="generate-id()"/> <xsl:apply-templates/> <xsl:for-each select="following-sibling::a[generate-id(preceding-sibling::b[1])=$id]"> <xsl:apply-templates/> </xsl:for-each> </xsl:for-each> Mike Kay Software AG XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] grouping adjacent siblings, utah | Thread | RE: [xsl] grouping adjacent sibling, utah |
RE: [xsl] How can i transform outpu, Meltem Kogelbauer | Date | Re: [xsl] nesting xml, Wendell Piez |
Month |