[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

Current Thread