|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Indentation question
Hello. Sometimes when I deal with XSLT, if I use this indent method:
<xsl:output method="xml" indent="no" />
Then I obtain all the results in one line, no EOL's.
But I have found a case where this is not true, why?
XML:
<?xml version="1.0"?>
<PreLogin xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Errors />
<LoginName>fernando_martinez</LoginName>
</PreLogin>
XSLT:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="no" />
<xsl:template match="/*">
<page>
<title>t</title>
<head />
<content>
<h2>
<xsl:choose>
<xsl:when test="LoginName">
1
</xsl:when>
<xsl:when test="AccessMode = 'admin'">
2
</xsl:when>
<xsl:otherwise>
3
</xsl:otherwise>
</xsl:choose>
</h2>
</content>
</page>
</xsl:template>
</xsl:stylesheet>
RESULT:
<page><title>t</title><head /><content><h2>
1
</h2></content></page>
Any ideas? Thanks in advance.
Regards,
Andrew
--
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








