[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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
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
|