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

Re: Whitespace between nodes

Subject: Re: Whitespace between nodes
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Thu, 13 May 2004 12:16:40 -0400
xhtml spaces between nodes
Nick,

At 10:45 AM 5/13/2004, you wrote:
Again, apologies - it was not frustration at the respondents not giving me what I wanted, but that after a few replies came in I realised my question had been misunderstood, primarily because of lack of detail on my part (sorry!). So I responded to fill in the gaps and explain the question better.

There's no need at all to apologize.


Bottom line is you are in an area which is neither fully specified (XSLT is primarily concerned with tree-manipulation and tree-building, and how the output should be serialized for different output methods can be tricky; nor does XSLT 1.0 have an XHTML output method as you've seen) nor one that can be, perhaps, since it impinges on aesthetic as well as functional issues (people can get worked up about how many spaces should be indented, on the one hand; on the other, an algorithm to determine what's "significant" whitespace that should not be trimmed, or where whitespace may be added without affecting what is "significant", has to make assumptions that may not be warranted in the general case).

When writing XML output I've sometimes felt it necessary to resort to a pipelining approach, not dissimilar from what Andreas suggested. Have your transform write out XML with no indenting; then have a second transform to pretty up the output -- but not (quite) an identity transform with indent="yes", rather a near-identity transform that just adds whitespace where you want it (and only there).

Cheers,
Wendell


====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================

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.