|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] [no subject]<p>Some text and more text <cite/>. Some <em>more</em> text. Some text
and more text <cite/>.</p>
And this XSLT:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:bib="http://www.example.org" version="2.0"
exclude-result-prefixes="bib">
<xsl:strip-space elements="*"/>
<xsl:template match="/">
<div>
<xsl:apply-templates/>
</div>
</xsl:template>
<xsl:template match="cite" mode="clean">[XXX]</xsl:template>
<xsl:template match="em">
<EM>
<xsl:apply-templates/>
</EM>
</xsl:template>
<xsl:template
match="text()[preceding-sibling::node()[1][self::cite]]">
<xsl:choose>
<xsl:when test="substring(.,1,1) = '.'">
<xsl:text>.</xsl:text>
<xsl:apply-templates select="preceding-sibling::cite[1]"
mode="clean"/>
<xsl:copy-of select="substring(.,2)"/>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="."/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
Cheers
andrew
|
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
|

Cart


![[no subject]](/images/get_stylus.gif)





