introduction multimedia
[] readme course preface 1 2 3 4 5 6 7 appendix checklist research quotes resources director

talk show tell print

xml-html.xsl


  <?xml version="1.0"?>
  
  <!-- Generic stylesheet for viewing XML -->
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
  
    <!-- This template will always be executed, even if this stylesheet is not run on the document root -->
    <xsl:template>
      <DIV STYLE="font-family:Courier; font-size:10pt; margin-bottom:2em">
        <!-- Scoped templates are used so they don't interfere with the "kick-off" template. -->
        <xsl:apply-templates select=".">
          <xsl:template><xsl:apply-templates/></xsl:template>
  
          <xsl:template match="*">
            <DIV STYLE="margin-left:2em; color:#003366">
              &lt;<xsl:node-name/><xsl:apply-templates select="@*"/>/&gt;
            </DIV>
          </xsl:template>
  
          <xsl:template match="*[node()]">
            <DIV STYLE="margin-left:2em">
              <SPAN STYLE="color:#003366">&lt;<xsl:node-name/><xsl:apply-templates select="@*"/>>&lt;/<xsl:node-name/>&gt;</SPAN>
            </DIV>
          </xsl:template>
  
          <xsl:template match="@*">
            <SPAN STYLE="color:green"> <xsl:node-name/>="<SPAN STYLE="color:red"><xsl:value-of /></SPAN>"</SPAN>
          </xsl:template>
  
          <xsl:template match="pi()">
            <DIV STYLE="margin-left:2em; color:maroon">&lt;?<xsl:node-name/><xsl:apply-templates select="@*"/>?&gt;</DIV>
          </xsl:template>
  
          <xsl:template match="cdata()"><pre>&lt;![CDATA[<xsl:value-of />]]&gt;</pre></xsl:template>
  
          <xsl:template match="textNode()"><xsl:value-of /></xsl:template>
        </xsl:apply-templates>
      </DIV>
    </xsl:template>
  </xsl:stylesheet>
  


[] readme course preface 1 2 3 4 5 6 7 appendix checklist research quotes resources director
eliens@cs.vu.nl

draft version 0.9 (7/1/2002)