ZVON > References > XSLT Reference
Example 4:2: 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 = "/" >
               <xsl:element name = "QQQ" >
                    <xsl:attribute name = "xxx" >111</xsl:attribute>
                    <xsl:attribute name = "{name(//*[1])}" >
                         <xsl:value-of select = "//BBB" />
                    </xsl:attribute>
               </xsl:element>
          </xsl:template>
     </xsl:stylesheet>