This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
String match within block of text
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: [xsl] String match within block of text
- From: "Tanzila Mohammad" <tmohammad at entier-solutions dot com>
- Date: Thu, 19 Apr 2001 12:25:13 +0100
- Reply-To: xsl-list at lists dot mulberrytech dot com
The xml is as follows:
<Genus>
<Species>
<Specie href="Pf000362.htm">A. ampliceps</Specie>
<Specie href="Pf000363.htm">A. bivenosa</Specie>
</Species>
<Synonyms> A. ampliceps makes with A. bivenosa a
complex which also includes A. ligulata, A. salicina and A.
sclerosperma although the latter three are morphologically quite
different from the former two and also quite distinct from one
another.
</Synonyms>
</Genus>
-----------------------------------------------------
The output would be:
Synonyms
A. ampliceps (as a link) makes with A. bivenosa (as a link) a
complex which also includes A. ligulata, A. salicina and A.
sclerosperma although the latter three are morphologically quite
different from the former two and also quite distinct from one another.
-----------------------------------------------------------------
The xsl is:
<xsl:template match="Grasslands/Synonyms" priority="1">
<h3><font color="#00007F">
<i><xsl:value-of select="name()" /></i>
</font></h3>
<p><font color="#008000"><xsl:value-of select="." /></font></p>
<!-- the aim is to match the species string within synonyms and if they
match create a url link"
<!--<xsl:if test="??">
<xsl:for-each match="Grasslands/Species/Specie">
<font color="#008000">
<i> <a href="{@href}"> <xsl:value-of select="." />
</a></i>
</font>
</xsl:for-each>
</xsl:if> -->
</xsl:template>
Tanz
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list