media @ VU
[] readme course preface I 1 2 II 3 4 III 5 6 7 IV 8 9 10 V 11 12 afterthoughts appendix references examples resources

talk show tell print

vr-x3d-xhtml.xsl


  <?xml version="1.0" encoding="UTF-8"?>
  <!-- edited with XML Spy v4.0 NT beta 2 build Jul 24 2001 (www.xmlspy.com) by Don Brutzman (Naval Postgraduate School) -->
  <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:saxon="http://icl.com/saxon" saxon:trace="no">
          <xsl:strip-space elements="*"/>
          <xsl:output encoding="UTF-8" media-type="text/html" indent="yes" cdata-section-elements="Script" omit-xml-declaration="no" method="xml"/>
  
          <xsl:template match="/">
                  <html>
                          <head>
                                  <title>
                                          <xsl:variable name="fileName" select="//head/meta[@name='filename']/@content"/>
                                          <xsl:choose>
                                                  <xsl:when test="fileName and fileName!='*enter filename here*' ">
                                                          <xsl:value-of select="//head/meta[@name='filename']/@content"/>
                                                          <xsl:text> (X3dToXhtml)</xsl:text>
                                                  </xsl:when>
                                                  <xsl:otherwise>
                                                          <xsl:text> X3dToXhtml </xsl:text>
                                                  </xsl:otherwise>
                                          </xsl:choose>
                                  </title>
                                  <meta name="generator" content="http://www.web3D.org/TaskGroups/x3d/translation/X3dToXhtml.xsl"></meta>
                          </head>
                          <body>
                                  <xsl:apply-templates select="*" />
                          </body>
                  </html>
          </xsl:template>
          
          <xsl:template match="*" >
                  <p>
                          <xsl:text>element </xsl:text>
                          <xsl:value-of select="local-name(.)"></xsl:value-of>
                          <xsl:text> has name() 
  </xsl:text>
                          <xsl:value-of select="name()"></xsl:value-of>
                          <xsl:text> &#10;and parent </xsl:text>
                          <xsl:value-of select="local-name(..)"></xsl:value-of>
                  </p>
                  <xsl:apply-templates select="*" />
          </xsl:template>
  
  </xsl:stylesheet>
  

[] readme course preface I 1 2 II 3 4 III 5 6 7 IV 8 9 10 V 11 12 afterthoughts appendix references examples resources

(C) A. Eliëns 9/8/2006

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.