>> English << | Français | Deutsch | Magyar | 中文 | Polski ZVON > Tutorials > XSLT Tutorial
>> Page 59 << | Prev | Next | Contents | Element Index

In the absence of xml:output element the default output method is xml ( XSLT stylesheet 1 ), but if document element of the output has value html (case insensitive) and it doesn't have an 'xmlns' attribute, then html method is used ( XSLT stylesheet 2 ).

XSLT stylesheet 1

XML Source
<source>

<h1> XML output </h1>
<hr/>

</source>

Output
<h1> XML output </h1>
<hr/>

HTML view

XML output

XSLT stylesheet
<xsl:stylesheet version = '1.0'
     xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>

<xsl:template match="/">
     <xsl:copy-of select="/source/*"/>
</xsl:template>


</xsl:stylesheet>


XSLT stylesheet 2

XML Source
<source>

<h1> XML output </h1>
<hr/>

</source>

Output
<html>
  <h1> XML output </h1>
  <hr>
</html>

HTML view

XML output

XSLT stylesheet
<xsl:stylesheet version = '1.0'
     xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>

<xsl:template match="/">
     <html>
          <xsl:copy-of select="/source/*"/>
     </html>
</xsl:template>


</xsl:stylesheet>