Subject: Re: [xsl] WordML Question and normalize-space() question|
From: Nigel Whitaker <nigel.whitaker@xxxxxxxxxxxx>
Date: Fri, 19 May 2006 16:10:44 +0100
First my normalize-space() question... I'm wondering if it's possible to normalize all the space without removing the leading and trailing whitespace?
One technique is to compare the normalized and unnormalized strings and see if the first and last characters differ. This can be used to detect leading and trailing whitespace.
The following is part of our space normalization filter. It works well (in conjunction with an identity like transform) for xhtml in general and for the inline bold-italic case you mention:
<b> bold text <i> bold and italic </i> just bold again </b>
There are more efficient ways of doing this in Java with an org.xml.sax.XMLFilter and probably with XSLT2.0.
Nigel -- Nigel Whitaker, DeltaXML: "Change control for XML, in XML" nigel.whitaker@xxxxxxxxxxxx http://www.deltaxml.com
|<- Previous||Index||Next ->|
|RE: [xsl] WordML Question and norma, Michael Kay||Thread||Re: [xsl] WordML Question and norma, David Carlisle|
|RE: [xsl] WordML Question and norma, Michael Kay||Date||Re: [xsl] WordML Question and norma, David Carlisle|