[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Indentation question

Subject: Indentation question
From: knocte <knocte@xxxxxxxxx>
Date: Fri, 2 Sep 2005 09:06:47 +0200
xml indent
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.