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

string-replace AND apply-templates

Subject: string-replace AND apply-templates
From: Florian Grammel <grammel@xxxxxxx>
Date: Mon, 19 Mar 2007 11:46:25 +0100
 string-replace AND apply-templates
I don't have much experience with xsl, so there's a good chance that this question is trivial, but I'm just not getting it:

In TEI-ish xml we use <unclear> to tag insecure readings.
The tradition for printed editions says, that every unclear letter is rendered with a dot below.

Using XSLT 2 I can use RegEx to do this:

<xsl:template match="tei:unclear">
select="replace(., &quot;()&quot;,&quot; $1&combdotbl;&quot;)"/>

This works fine, but results in, that all possible markup inside the <unclear>-tags is lost. I guess it would be a solution to call this little template inside every other processing instruction, but as <unclear> is allowed on virtually every level of the xml, this is going to be a mess...

So I'm looking for a way to do the search-replace and get the code inside processed by the rest of the stylesheet nevertheless.
A sort of replace-instruction, that leaves tagging untouched and passes the result on to <xsl:apply-templates/>

Thanks in advance for your help!

Florian Grammel.

Current Thread


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.
First Name
Last Name
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.