This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: How does one go about extracting HTML anchors from an X ML file?
- To: xsl-list at lists dot mulberrytech dot com
- Subject: RE: [xsl] How does one go about extracting HTML anchors from an X ML file?
- From: "Liat Jacob" <jacob_liat at hotmail dot com>
- Date: Mon, 17 Sep 2001 20:13:35 +0000
- Cc: Doug dot Hewko at ccra-adrc dot gc dot ca
- Reply-To: xsl-list at lists dot mulberrytech dot com
Hi Doug,
Thanks for the quick response. When I tried it, I noticed that although the
text of the entire paragraph is displayed in the resulting HTML page (i.e.,
the 'blahs' between the <p></p> tags in the XML file), the links were not
active (i.e., the text between the <href></href> and <a></a> tags in the XML
file).
The previous XSL code did the opposite -- it displayed the link text
embedded within the <p></p> tags in the XML file, but not the remaining text
within the <p></p> (i.e., the blah's didn't show up).
Here's the XML file:
<article>
<summary>
<p>blah blah blah blah blah blah
blah <href link='www.yahoo.com'> some link text here</href>blah
blah blah <a mailto="jacob_liat@hotmail.com>some text here</a>
blah blah.</p>
<p>second paragraph with additional anchors embedded
throughout the paragraph text.</p>
</summary>
</article>
I want the HTML to look like this:
<P>blah blah blah blah blah blah blah <A HREF="http://www.yahoo.com"> some
link text here</A> blah blah blah <A HREF="mailto:jacob_liat@hotmail.com">
some text here</A> blah blah blah.</P>
<P>second paragraph with additional anchors embedded throughout the
paragraph text.</P>
Thanks,
Liat
>From: "Hewko, Doug" <Doug.Hewko@ccra-adrc.gc.ca>
>To: "'xsl-list@lists.mulberrytech.com'" <xsl-list@lists.mulberrytech.com>
>CC: "'jacob_liat@hotmail.com'" <jacob_liat@hotmail.com>
>Subject: RE: [xsl] How does one go about extracting HTML anchors from an X
>ML file?
>Date: Mon, 17 Sep 2001 15:25:10 -0400
>
>try:
><xsl:template name="href">
> <xsl:param name="word"/>
> <a>
> <xsl:attribute name="href">
> <xsl:value-of select="$word"/>
> </xsl:attribute>
> </a>
></xsl:template>
>
>and
>
><xsl:template name="a">
> <xsl:param name="addr"/>
> <a>
> <xsl:attribute name="href">
> <xsl:value-of select="$addr"/>
> </xsl:attribute>
> </a>
></xsl:template>>
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list