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