XML Source

Filename: testcase.xml

Highlighted Namespace: http://test.namespace.com

Language: en

Color codes

Language Element Attribute Assigned Value W3C Link
Any XML #000000 #008000 #800000 http://w3.org/TR/XML
http://test.namespace.com #8F006B #7A005C #FF66D9
XHTML #8F006B #7A005C #FF66D9 http://w3.org/TR/xhtml1
SVG #660099 #3D005C #CC66FF http://w3.org/TR/SVG
MathML #006B6B #005C5C #009999 http://w3.org/TR/MathML
SMIL #008F00 #007A00 #00CC00 http://w3.org/TR/SMIL
XSL-FO #990000 #B30000 #FF0000 http://w3.org/TR/xsl
XSLT #000080 #008000 #800000 http://w3.org/TR/xslt
Miscellaneous Comment (#808080) XPath (#008080) XML (#008080)

Important: This is not the literal source of the document rather than the semantic, in terms of XML, structure. Keep in mind, that especially whitespaces will not be expressed exactly.

<?xml-stylesheet type="text/xsl" href="view-source.xsl" filename="testcase.xml" highlight="http://test.namespace.com" ?>

<fo:root xml:lang="en" >

  <!-- a comment -->

  <xsl:template match="*" >
    <xhtml:script type="text/javascript" >

      
			//
      
function Some_JavaScript() { alert('has another color'); }
			//
    </xhtml:script>
    <svg:style type="text/css" >

      
.here {  
	background-image:url(highlighted_css.png);
}
		
    </svg:style>
    <xhtml:body id="htmlbody" >
      <!-- notice the difference between the 'select' and the 'name' attribute -->

      <xsl:value-of select="//some/xpath[@expression]" />
      <xsl:value-of select="//some/xpath[@expression = 'test' and @another = 'again']" />

      <xsl:call-template name="test-template" />
      <xhtml:p>
        <xhtml:span>
          This file uses the stylesheet

        </xhtml:span>
        <xhtml:a href="./view-source.xsl" >
          view-source.xsl
        </xhtml:a>

        <mml:math>
          <mml:o>
            x
          </mml:o>
        </mml:math>
        <test:element attribute="value" >

          Some highlighted elements in namespace http://test.namespace.com
        </test:element>
        <other attribute="value"  somelink="ftp://nasa.gov/aliens" >

          Other XML, that is not recognized. Links in attributes will be parsed.
        </other>
      </xhtml:p>
      <smil:body>
        <smil:par dur="28s" >

          <svg:svg>
            <!-- The following XLink should be clickable -->
            <svg:image xlink:href="http://www.example.com/helloworld.png" />
            <svg:path d="M0,0 L10,10" />

          </svg:svg>
          <smil:seq fillDefault="transition" >
            <smil:img region="Images"  src="thisimage.jpg"  dur="4s"  transIn="fadein-0"  transOut="fadeout-0" />

          </smil:seq>
        </smil:par>
      </smil:body>
    </xhtml:body>
    <svg:path d="{$xpathpath}" />

  </xsl:template>
</fo:root>

This document was automatically rendered using the xmlview Stylesheet by Manuel Strehl.