Subject: Re: [xsl] Removing unwanted space From: "Wendell Piez wapiez@xxxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Fri, 4 Jun 2021 19:07:42 -0000 |
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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Removing unwanted space, Charles O'Connor coc | Thread | Re: [xsl] Removing unwanted space, Liam R. E. Quin liam |
Re: [xsl] Removing unwanted space, Charles O'Connor coc | Date | Re: [xsl] Removing unwanted space, Liam R. E. Quin liam |
Month |