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

Checking the text nodes just preceding the context

Subject: Checking the text nodes just preceding the context
From: Adam Van Den Hoven <Adam.Hoven@xxxxxxxxxxxx>
Date: Wed, 26 Sep 2001 20:13:17 -0700
intersting text
Hi, 

I have a series of prose documents that have some semantic markup that will
be replaced with a string. Since I need to maintain proper capitalization I
need to check the text that immediately precedes the context to see if it
ends in a period ( or a period and a space). 

So lets say I have the following:

<doc>
	<p> some interesting text here. Some <foo/> more intersting text</p>
	<p> some interesting text here. <foo/> some more intersting text</p>
	<p> some interesting <b>text here.</b> <foo/> Some more intersting
text</p>
	<p> some interesting text here. <b><foo /> some</b> more intersting
text</p>
</doc>

The output of this should be be (assuming an identity transform as the
basis):


<doc>
	<p> some interesting text here. Some foo more intersting text</p>
	<p> some interesting text here. Foo some more intersting text</p>
	<p> some interesting <b>text here.</b> Foo Some more intersting
text</p>
	<p> some interesting text here. <b>Foo some</b> more intersting
text</p>
</doc>

Now I can guarantee that <foo> will be child of <p> but nothing else. 

Any ideas how to do this?

Adam van den Hoven
Internet Software Developer
Blue Zone
tel. 604 685 4310 ext. 260
fax 604 685 4391

> Blue Zone makes you interactive. http://www.bluezone.net/
> 
> 
> 

 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.