Nic Miloslav Example 60 | KEYWORDS EXAMPLES AUTHORS |
---|
In the absence of xml:output element the default output method is xml (Stylesheet 1), but if document element of the output has value html (case insensitive) , then html method is used (Stylesheet 2).
XML | HOME XSL 1 XSL 2 |
---|
<xslTutorial > |
<H1> XML output </H1> |
<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:template match="/"> |
<xsl:copy-of select="/xslTutorial/*"/> |
</xsl:template> |
</xsl:stylesheet> |
HTML 1 | HOME XML XSL 1 OUTPUT 1 |
---|
<H1> XML output </H1> |
<HR/> |
OUTPUT 1 | HOME XML XSL 1 HTML 1 |
---|
XSL 2 | HOME XML HTML 2 OUTPUT 2 |
---|
<xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'> |
<xsl:template match="/"> |
<html> |
<xsl:copy-of select="/xslTutorial/*"/> |
</html> |
</xsl:template> |
</xsl:stylesheet> |
HTML 2 | HOME XML XSL 2 OUTPUT 2 |
---|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
<html> |
<H1> XML output </H1> |
<HR> </html> |
OUTPUT 2 | HOME XML XSL 2 HTML 2 |
---|