Print

Print


Hi there,

Processing of actual whitespace can be a bit flaky in various XSLT 
processors, and it can be difficult to get the right balance of 
xsl:strip-space and xsl:preserve-space to get the results you want in 
a way that is reliably portable between systems. Where spaces are 
important (as they may often be when you're encoding below the word 
level), I'd suggest encoding the actual spaces, using perhaps a space 
tag or a seg tag. That way you can always ensure they're properly 
described, and properly processed in any output system. It does make 
the code hard to read, but when you're encoding at this level the 
text is usually pretty hard to read anyway.

Cheers,
Martin

At 08:32 AM 23-09-05, Martin Mueller wrote:
>Is there a set of rules or best practices about what to do with space
>between words when you encode down to the word level? We have in one
>project used space between <w> elements, and the parser respects
>this, although it seems theoretically wrong. One could also deal with
>the space at the processing level and have a rule to the effect that
>a word element is followed by a space unless the content of the next
>element begins with a punctuation mark, etc.
>
>I'll be grateful for advice.

Martin Holmes
University of Victoria Humanities Computing and Media Centre
http://web.uvic.ca/hcmc/
http://www.halfbakedsoftware.com/
http://www.mholmes.com/