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

Re: Indent?

Subject: Re: Indent?
From: Joseph Kesselman <keshlam@xxxxxxxxxx>
Date: Fri, 23 Jul 2004 09:00:57 -0400
xsl indent
Accoding to the XSLT spec, indent is considered a hint to the serializer,
and the exact results are not specified. There are rules saying where you
can't introduce whitespace, but no requirement that you do so in all the
places it's allowed, nor how much. Implementation dependent.

Xalan *does* support indentation... but our default indentation-per-level
is 0; we generate only the line-breaks. To get actual structural
indentation, you need to say how much you want, using a Xalan-specific
directive; see http://xml.apache.org/xalan-j/usagepatterns.html#outputprops

Yes, this is nonportable (though it's harmless to other processors) -- but
as I said above, indent's behavior is nonportable. If you want predictable
whitespace, your stylesheet has to generate that itself, using xsl:text
directives. That's just the nature of the beast, I'm afraid.


(We can argue -- and have argued many times! -- about whether 0 is the
right default for per-level indentation. I've become completely agnostic on
that issue, since no matter what value you pick someone always screams.)

______________________________________
Joe Kesselman, IBM Next-Generation Web Technologies: XML, XSL and more.
"The world changed profoundly and unpredictably the day Tim Berners Lee
got bitten by a radioactive spider." -- Rafe Culpin, in r.m.filk

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.