This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Whitespace question
- To: xsl-list at lists dot mulberrytech dot com
- Subject: Re: [xsl] Whitespace question
- From: "Ragulf Pickaxe" <jawxml at hotmail dot com>
- Date: Tue, 18 Sep 2001 11:56:52 +0000
- Reply-To: xsl-list at lists dot mulberrytech dot com
Christopher R. Madsen wrote:
...
(What you need to do is insert the space unless there's a text node already
there, which means that there was something other than just space.)
How do you check wether there is a textnode allready? I am not very good at
figuring things out at the moment, sorry.
I am in the situation where I have lots of different kinds of parrent nodes
before the <code1> node, so I can't use the <xsl:perseve-space="code"/>
unless I wish to write this line sixty times with different elements.
I need the program to add a space if there is a new node right after, only
if there is a space between them:
(I): <One>bla</One> <Two>bla</Two> should keep the space, but
(II): <One>bla</One><Two>bla</Two> should not, and
(III): <One>bla</One>more bla<Two>bla</Two> should not either.
With my approach, I get a space in the last two examples, and I suspect that
even if I get your code to work (by checking wether there is already a text,
which I would like to be able to do), then (II) would still get a space
inserted - am I wrong in this?
More help for this newbie is clearly needed...
Ragulf Pickaxe
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list