[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Very simple? Text processing from document data
Hi all, I'm having a mental block today. As an example, I have: <p>Some body <b>text</b> some more</p> And I want to replace the word 'body' only in the text of <p> but ignore text in <b> so I've been looking at something like this: <xsl:template match="p"> <p> <xsl:value-of select="substring-before(./text(), 'body')"/> <xsl:value-of select="'replace_body'"/> <xsl:value-of select="substring-after(./text(), 'body')"/> </p> </xsl:template> How do I separately select #text before, between and after an arbitrary number of interruptions (could be tables, images etc) and process those interruptions in document order? Thanks, Richard
|
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
|