Subject: [xsl] Indentation question From: knocte <knocte@xxxxxxxxx> Date: Fri, 2 Sep 2005 09:06:47 +0200 |
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 --
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Re: Merging nodes to process , Russell Levy | Thread | Re: [xsl] Indentation question, Joris Gillis |
RE: [xsl] Extract First node, david_n_bertoni | Date | Re: [xsl] Indentation question, Joris Gillis |
Month |