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

Re: formatting xml output: inserting newlines between

Subject: Re: formatting xml output: inserting newlines between generated attributes
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Tue, 09 Sep 2003 12:50:02 -0400
formatting xml output
Abie,

At 10:15 AM 9/9/2003, you wrote:
Alternatively, there are ways to cheat -- for example, you could write a transformation that would >output plain text that would "happen to be" XML -- and that would contain the line breaks you >wanted.

It would, however, be a nightmare to combine this strategy with a regular every-day transformation, >though I can see it being done as a post-process.

wendell,
this is exactly what I was going to do in case the answer to my original question was in the negative. I would use <xsl:output method="text"> and just format the xml by hand, as it were. why do you say it would be a nightmare? (granted it's not as elegant).

If you kept it in its own box, completely separate from other transformation logic, it would be fine. The nightmare would be if you tried to combine this with ordinary transformation logic, which typically would perform a mapping of source elements to result elements, do grouping, conditional generated text, etc. Both things happening in a single stylesheet would be a lot to try to keep under control and a pain to maintain. Also, writing output to text locks you into a particular processing model (can't chain the transform as easily, can't use it in display engines that don't support the 'text' output method, and so forth).


Writing a transform to do such reformatting on arbitrary input, and having it be the final step of a two- (or multi-) step process, is more thinkable. Three or four templates would do everything you would need. Is there any reason you can't do it that way? (Or maybe you're saying that's what you want to do.)

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 ======================================================================


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



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.