C
cawoodm
I have a simple xml file:
<document>
<header>
<title>Hello World!</title>
</header>
</document>
Which I want to transform into HTML. The following transform produces
indented XHTML:
<?xml version="1.0"?>
<xslout:stylesheet xmlns:xslout="http://www.w3.org/1999/XSL/Transform">
<xsloututput encoding="utf-8" method="html" indent="yes" />
<xslout:template match="/document">
<html><xslout:apply-templates /></html>
</xslout:template>
<xslout:template match="header">
<title><xslout:value-of select="title"/></title>
</xslout:template>
</xslout:stylesheet>
The following (IMO identical) transform will not indent:
<?xml version="1.0"?>
<xslout:stylesheet xmlns:xslout="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsloututput encoding="utf-8" method="html" indent="yes" />
<xslout:template match="/">
<html>
<title><xslout:value-of select="document/header/title"/></title>
</html>
</xslout:template>
</xslout:stylesheet>
Can anyone tell me why?
<document>
<header>
<title>Hello World!</title>
</header>
</document>
Which I want to transform into HTML. The following transform produces
indented XHTML:
<?xml version="1.0"?>
<xslout:stylesheet xmlns:xslout="http://www.w3.org/1999/XSL/Transform">
<xsloututput encoding="utf-8" method="html" indent="yes" />
<xslout:template match="/document">
<html><xslout:apply-templates /></html>
</xslout:template>
<xslout:template match="header">
<title><xslout:value-of select="title"/></title>
</xslout:template>
</xslout:stylesheet>
The following (IMO identical) transform will not indent:
<?xml version="1.0"?>
<xslout:stylesheet xmlns:xslout="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsloututput encoding="utf-8" method="html" indent="yes" />
<xslout:template match="/">
<html>
<title><xslout:value-of select="document/header/title"/></title>
</html>
</xslout:template>
</xslout:stylesheet>
Can anyone tell me why?