[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] complex "insert" rules; generalized insert


Subject: Re: [xsl] complex "insert" rules; generalized insert
From: Anton Triest <anton@xxxxxxxx>
Date: Wed, 13 Oct 2004 22:21:21 +0200

Hi Eric,

   <xsl:template match="parent">
       <xsl:apply-templates select="child_a | child_b"/>
       <xsl:apply-templates select="child_c"/>
       <xsl:if test="not(child_c)">
           <child_c/><xsl:comment>added</xsl:comment>
       </xsl:if>
       <xsl:apply-templates select="child_d | child_e"/>
   </xsl:template>

This in combination with the identity template should give the desired output

HTH
Anton


Current Thread