Subject: Re: [xsl] preceding/following character? From: Bruce D'Arcus <bdarcus@xxxxxxxxx> Date: Mon, 20 Jun 2005 08:55:47 -0400 |
<xsl:template match="cite[not(following-sibling::node()[1][self::text()[starts- with(.,'.')]])]">
<xsl:apply-templates mode="clean" select="."/>
</xsl:template>
<xsl:template match="text()[preceding-sibling::node()[1][self::cite]][starts- with(.,'.')]">
<xsl:text>.</xsl:text>
<xsl:apply-templates select="preceding-sibling::cite[1]" mode="clean"/>
<xsl:copy-of select="substring(.,2)"/>
</xsl:template>
$ saxon cite.xml cite.xsl <?xml version="1.0" encoding="utf-8"?><div> Some text and more text .[XXX1] Some <EM>more</EM> text. Some text and more text .[XXX2]ffff[XXX3]
Some text and more text [XXX1]<EM>. Some more</EM> text. Some text and more text .[XXX2]ffff[XXX3] </div>
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] preceding/following chara, David Carlisle | Thread | Re: [xsl] preceding/following chara, David Carlisle |
Re: [xsl] join two files - plz help, Sam D. Chuparkoff | Date | [xsl] count hits/matches - INCREMEN, Dariusz Borowski |
Month |