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

RE: Collapsing run-on tag chains not working in saxon

Subject: RE: Collapsing run-on tag chains not working in saxon or xa lan
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Tue, 02 Nov 2004 12:50:20 -0500
saxon extra carriage returns
Pieter,

At 11:45 AM 11/2/2004, you wrote:
There is a utility called msxsl.exe that can be used to strip or preserve
whitespace (it's not a new tool, and works as a wrapper for MSXML 3 and 4):

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnxml/html/
msxsl.asp

Check for the -xw option:

"White Space Stripping (-xw Option)
The -xw option instructs MSXSL to strip non-significant white space from the
input XML document during the load phase (preserveWhitespace set to False).
Enabling this option can lower memory usage and improve transformation
performance while, in most cases, creating equivalent output."

Thanks for posting the reminder: it's nice to be able to run MSXSL and get proper results.


Do you know of any way of disabling the option when just opening XML natively in IE, with an xml-stylesheet PI?

Personally, in some cases, I don't see a problem in stripping the white
space; in fact, in the HTML world, stripping white space can even optimize
the way browsers renders a given page. Extra whitespace between elements
(and carriage returns) can introduce differences at the pixel render
position level.

It's the "in some cases" that bites. It's really terrible to see HTML come out like


<p>Here's my <b>extra</b><i>special</i> HTML page</p>

... because the space that was there (between the elements rendered as b and i) happens to be treated like a case where we wouldn't see a problem.

 That's why we prefer to use long one-liners without
whitespace and CRs - ugly, but necessary.

Whitespace control in the stylesheet, as Mike just reminded us, is an entirely different thing. Providing you use <xsl:text> and <xsl:output> properly, you can use all the whitespace you like, in the stylesheet, without getting any extra space in the output.


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.