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

Re: Removing unwanted space

Subject: Re: Removing unwanted space
From: "Wendell Piez wapiez@xxxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 4 Jun 2021 19:07:42 -0000
Re:  Removing unwanted space
Hi,

Alas, schema awareness is actually not a help for this particular case or
any case where the errant whitespace turns up in places where whitespace is
supposed to be significant (and frequently is).

I suppose something like schema-awareness, or actual schema awareness (XSD
awareness), might be "simulated" in XSLT given appropriate type definitions
in a particular schema (albeit not a general case). And out of the box (for
example) XSD permits designating "collapse" behavior over strings. But this
is harder (respecting whitespace and whitespace-only text nodes within
mixed content at arbitrary depths) and may be more easily configured via an
abstract spec ("treat a p-like element this way, a pre-like element another
way", etc.) than in a schema.

In any case -- once requirements are fully clear -- a
whitespace-normalization filter can be a handy thing to have around.

Cheers, Wendell


On Fri, Jun 4, 2021 at 2:54 PM Charles O'Connor coconnor@xxxxxxxxxxxx <
xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:

> >If you use DTD parsing, you can declare specific elements as being
> element-only (by giving a list  of all  permitted element children without
> #PCDATA), and then >whitespace in such a context may be dropped by the
> parser or application (e.g. Saxon) automatically.
>
> Alas, we are limited to non-DTD-aware transforms for the present.
>
>
> 
>
>

-- 
...Wendell Piez... ...wendell -at- nist -dot- gov...
...wendellpiez.com... ...pellucidliterature.org... ...pausepress.org...
...github.com/wendellpiez... ...gitlab.coko.foundation/wendell...

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.