W3C home > Mailing lists > Public > www-xsl-fo@w3.org > December 2003

Re: To Remove White after the End of Element for Each CDATA element !!!

From: G. Ken Holman <gkholman@CraneSoftwrights.com>
Date: Thu, 18 Dec 2003 07:58:15 -0500
Message-Id: <5.2.0.9.0.20031218075646.01254db0@pop.storm.ca>
To: www-xsl-fo@w3.org

At 2003-12-18 07:55 +0000, guyin chennai wrote:
>i am having many cdata tags like below....
><WOOD>
>         <WORK>
>             <DONE><![CDATA[A B FL  3432
>                      ]]></DONE>
>         </WORK>
></WOOD>
><WOOD>
>         <WORK>
>             <DONE><![CDATA[C C FT  1111
>                      ]]></DONE>
>         </WORK>
></WOOD>
><WOOD>
>         <WORK>
>             <DONE><![CDATA[T T RT  2323
>                      ]]></DONE>
>         </WORK>
></WOOD>
>i want to remove all the spaces after the end of the last element.I have 
>to use white-space-collapse="false"
>as my element contains white-space between them
>Expected Output
>A B FL  3432
>C C FT  1111
>T T RT  2323

I recommend you preprocess your input stream with a SAX-based program to do 
the low-level character manipulation of removing the unwanted space, then 
use XSLT to rearrange the information for your target result.

I hope this helps.

....................... Ken


--
North America (Washington, DC): 3-day XSLT/2-day XSL-FO 2004-02-09
Instructor-led on-site corporate, government & user group training
for XSLT and XSL-FO world-wide:  please contact us for the details

G. Ken Holman                 mailto:gkholman@CraneSoftwrights.com
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/f/
Box 266, Kars, Ontario CANADA K0A-2E0    +1(613)489-0999 (F:-0995)
ISBN 0-13-065196-6                       Definitive XSLT and XPath
ISBN 0-13-140374-5                               Definitive XSL-FO
ISBN 1-894049-08-X   Practical Transformation Using XSLT and XPath
ISBN 1-894049-11-X               Practical Formatting Using XSL-FO
Member of the XML Guild of Practitioners:     http://XMLGuild.info
Male Breast Cancer Awareness  http://www.CraneSoftwrights.com/f/bc
Received on Thursday, 18 December 2003 08:03:31 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 3 October 2007 16:06:11 GMT