[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Converting XML <link> to HTML anchor

Subject: RE: Converting XML <link> to HTML anchor
From: Kay Michael <Michael.Kay@xxxxxxx>
Date: Thu, 9 Dec 1999 10:03:37 -0000
xml anchors
Like this:

<xsl:template match="*">
<xsl:copy>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>

<xsl:template match="text">
<xsl:apply-templates/>
</xsl:template>

<xsl:template match="link">
<a href="{@href}">
<xsl:apply-templates/>
</a>
</xsl:template>

Mike Kay

> -----Original Message-----
> From: Michael Teigman [mailto:michael.teigman@xxxxxxxxxxx]
> Sent: 08 December 1999 22:49
> To: xsl-list@xxxxxxxxxxxxxxxx
> Subject: Converting XML <link> to HTML anchor
> 
> 
> I have an xml like this:
> 
> <text>
>     <p>Text1</p>
>     <p>Text2 <link href="link1">label1</link></p>
>     <p><link href="link2">label2</link></p>
>     <p>Text3 <link href="link3">label3</link> text4 <link
> href="link4">label4</link> text 5</p>
> </text>
> 
> You get the idea ... there might be any of the possible 
> variations of these -
> including an unlimited(!!??) number of links within a paragraph.
> 
> I want to output an HTML which will replace all the <link> 
> elements with
> anchors.
> For example I want from the above:
> 
> <p>
>     <p>Text1</p>
>     <p>Text2 <a href="link1">label1</a></p>
>     <p><a href="link2">label2</a></p>
>     <p>Text3 <a href="link3">label3</a> text4 <a 
> href="link4">label4</a> text
> 5</p>
> </p>
> 
> I am using XT. How do I write an XSL Transform to handle all 
> the variations?
> 
>      mike
> 
> 
> -----------------------------------------------------------------
>         Visit our Internet site at http://www.reuters.com
> 
> Any views expressed in this message are those of  the  individual
> sender,  except  where  the sender specifically states them to be
> the views of Reuters Ltd.
> 
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.