Nic Miloslav     Example 61    KEYWORDS      EXAMPLES      AUTHORS     

The html output method should not output an end-tag for empty elements specified in HTML specification.The html output method should not perform escaping for the content of the script and style elements (look at source of the lowest middle window in your browser) . Consult XSLT specification for more details.


     XML     HOME     XSL 1      
<xslTutorial >
<H1> HTML output </H1>
<AAA/>
<HR/>
<script>
<![CDATA[if (a < b) foo();]]>
if (cc < dd) foo()
</script>
<hr></hr>
<hr>        </hr>
<Hr/>
<hR/>
</xslTutorial>

     XSL 1     HOME     XML     HTML 1     OUTPUT 1     
<xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
<xsl:output method="html"/>
<xsl:template match="/">
<xsl:copy-of select="/xslTutorial/*"/>
</xsl:template>
</xsl:stylesheet>

     HTML 1     HOME     XML     XSL 1     OUTPUT 1     
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<H1> HTML output </H1>
<AAA></AAA>
<HR>
<script> if (a
< b) foo(); if (cc
< dd) foo() </script>
<hr>
<hr>
<Hr>
<hR>

     OUTPUT 1     HOME     XML     XSL 1     HTML 1     

HTML output