|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Whitespace problem
>Richard Lander said: > I am having quiet a bit of trouble with whitespace.> > My question: How do I force XSL to strip out the carriage > returns in the > text of an element? I am using the 1998-12-16 draft, as I want to stay > compatible with IE5. First note that strip-space doesn't do anything to newlines adjacent to text (it took me a long time to grasp this). It only affects spaces and newlines that are surrounded by tags on both sides. It will remove the newline between the tags here: <atag/> <btag/> but will leave two newlines here: <atag/> Some text with a newline before and after <btag/> If you want to remove the newlines in the latter, use normalize(). But that's not in the Dec 16 draft nor, as far as I know, in IE5. As James Clark clarified to me in response to a query, (the spec is not entirely clear on the point), "stripping a node" means removing the node from the tree, not removing spaces from the node. Mike Kay XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








