[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Whitespace 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
|
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
|