xsl-list
[Top] [All Lists]

Re: [xsl] White space strategies for mixed content

2019-11-05 17:00:38
Hi,

To emphasize what Gerrit has noted: it's not necessarily a trivial
exercise to do it correctly even when we have prior knowledge
regarding whitespace-related semantics of elements (element-only
content, mixed-content ... .'preformat'?). When we do, however, we
have a chance.

I usually think in terms of three categories: where whitespace-only
nodes may be discarded (or introduced) without doing damage; where
whitespace can (maybe should) be collapsed or munged, and where it
shouldn't be messed with. Of these, the last is easy to forget but
also easy to understand. Arguably, all three are different problems
with different solutions.

The example Gerrit gives is a nice illustration of how operations can
go wrong when these different problems are confused or treated as if
they were the same.

Cheers, Wendell
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--

<Prev in Thread] Current Thread [Next in Thread>