topical media & game development

talk show tell print

basic-xml-07-xmmlBooks.xsl / xsl



  <xsl:stylesheet 
   version="1.0"
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
   xmlns:xmml="http://www.XMML.com/namespaces" >
   
  <xsl:template match="/">
   <html>
    <head>
     <title>This shows namespace nodes.</title>
    </head>
    <body>
     <h3>Namespace nodes of the xmml:Book element.</h3>
     <xsl:apply-templates select="/xmml:Book" />
    </body>
   </html> 
  </xsl:template>
  
  <xsl:template match="xmml:Book">
   <xsl:for-each select="namespace::node()">
   <p><xsl:value-of select="position()" />. The namespace prefix <b><xsl:value-of select="name(.)" /></b>
   has the namespace URI <b><xsl:value-of select="." /></b>. </p>
   </xsl:for-each>
  </xsl:template>
  
  </xsl:stylesheet>


(C) Æliens 20/2/2008

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.