[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: whitespace at the beginning and the end of element content
The attached is my stylesheet I use to normalize whitespace before applying DocBook XSL stylesheets. The stylesheet does nothing but to text nodes. For text nodes, it concatnates series of whitespaces (including indentations and newlines) into one space and the leading & trailing whitespaces are stripped. It's not perfect and the code is ugly and requires some adjustments, but really useful for those like me (and you) who want to use indentations in <para>s. Some languages, like CJK, do not use spaces at all in a sentence (whichislikethis), so the default treatment of whitespace in the XML specification is quite troublesome. If your document is not in CJK, 'normalize-space()' might be enough to achieve this. -- Yoshihiro Toda mailto:yoshihiro_toda@mac.com
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]