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

Re: Trimming (formatting-only) leading tabs/spaces fro

Subject: Re: Trimming (formatting-only) leading tabs/spaces from XSLT - issues?
From: Philip Fearon <pgfearo@xxxxxxxxxxxxxx>
Date: Wed, 8 Jun 2011 10:27:36 +0100
Re:  Trimming (formatting-only) leading tabs/spaces fro
On Wed, Jun 8, 2011 at 9:15 AM, Abel Braaksma <abel.online@xxxxxxxxx> wrote:
> Hi Philip,
>
> Not sure whether this makes sense for your use case, but when considering
> white space in XSLT, you should also consider that the XSLT can be used as
> input document for the same or other XSLT as well. This is not uncommon.
> And, of course, any XSLT can contain XML segments not related to XSLT which
> may fall under the same rules as normal XML when it comes to white space
> significance.

There's certainly some complexity here that I need to consider/test
fully. Michael Kay's XSLT Programmers Reference (4th edition) has 9
pages dedicated to whitespace handling, beginning with:

    "Whitespace handling can be a source of considerable confusion."

So there are challenges to say the least. On XML Segments: The concept
provides generic XML editing capabilties, there's just special
consideration when trimming XSLT instructions.

> Keeping into consideration that the XSLT file should be treated as if it
> were any ordinary input XML (or worse, input text document, heaven forbid!)
> with all its quirks might make whitespace handling harder than it first
> seems when just looking at the XSLT itself.
>
Seen as an input text document (perhaps by a diff tool) there are
issues that have workarounds (such as reinserted trimmed formatting at
a later stage), but they're issues nonetheless. For XML-aware handling
I'm hopeful that things will be more manageable, because whitespace
issues are anticipated by XML systems and they have more context when
they encounter whitespace.

Phil fearon
http://qutoric.com

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-2011 All Rights Reserved.