[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Whitespace question

Subject: Re: Whitespace question
From: "Ragulf Pickaxe" <jawxml@xxxxxxxxxxx>
Date: Tue, 18 Sep 2001 11:56:52 +0000
Re:  Whitespace question
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



Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.