|
Subject: [xsl] How does one go about extracting HTML anchors from an XML file? From: "Liat Jacob" <jacob_liat@xxxxxxxxxxx> Date: Mon, 17 Sep 2001 19:15:28 +0000 |
<article>
<summary>
<p>blah blah blah blah blah blah
blah <href link='www.yahoo.com'> some link text here</href>
blah blah <a mailto="jacob_liat@xxxxxxxxxxx>some text here</a>
blah blah.</p>
<p>second paragraph with additional anchors embedded throughout
the paragraph text.</p>
</summary>
</article><xsl:template match="p">
<P>
<xsl:choose>
<xsl:when test="href">
<xsl:for-each select="href">
<xsl:call-template name="href">
<xsl:with-param name="word">
<xsl:value-of select="."/></xsl:with-param>
</xsl:call-template>
</xsl:for-each>
</xsl:when>
<xsl:when test="a">
<xsl:for-each select="a">
<xsl:call-template name="a">
<xsl:with-param name="addr">
<xsl:value-of select="."/></xsl:with-param>
</xsl:call-template>
</xsl:for-each>
</xsl:when>
</xsl:choose>
</P>
<xsl:value-of select="."/>
</xsl:template>
<xsl:template name="href"> <xsl:param name="word"/> <A HREF="http://{@link}"><xsl:value-of select="$word"/></A> </xsl:template>
<xsl:template name="a"> <xsl:param name="addr"/> <A HREF="mailto:{@mailto}"><xsl:value-of select="$addr"/></A> </xsl:template>
Thanks in advance for any help, Liat
_________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [xsl] Re: preserve-space and strip-, Dimitre Novatchev | Thread | Re: [xsl] How does one go about ext, Thomas B. Passin |
| [xsl] xsl text problem, thomas george | Date | Re: [xsl] How do you get the non-tr, David Carlisle |
| Month |