ZVON > References > XSLT Reference
Example 65:3: All | XML | >> XSLT << | Output |

XSLT


     <xsl:stylesheet xmlns:xsl = "http://www.w3.org/1999/XSL/Transform" version = "1.0" >
          <xsl:output method = "xml" indent = "yes" />

          <xsl:template match = "/" >
               <QQQ firstBBB = "{generate-id(//BBB[1])}" lastBBB = "{generate-id(//BBB[last()])}" >
                    <xsl:apply-templates />
               </QQQ>
          </xsl:template>

          <xsl:template match = "BBB" >
               <BBB myID = "{generate-id()}" >
                    <xsl:value-of select = "." />
               </BBB>
          </xsl:template>
     </xsl:stylesheet>