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

Re: Nested Tags

Subject: Re: Nested Tags
From: "Vasu Chakkera" <vasucv@xxxxxxxxxxx>
Date: Wed, 14 Aug 2002 13:00:02 +0000
xml nested tag
Michael Hanisch,
in..
<xsl:attribute name="href" select="@target"/>
the select attribute is a mistake.. The <xsl:attribute> doesnt have a select attribute. if you wanted to do what you intend to do,you should write xsl:attribute like..
<a>
<xsl:attribute name="href">
<xsl:value-of select="@target"/>
</xsl:attribute>
</a>


Another approach would be
<a href="{@target}"><xsl:value-of select="@text"/></a>

Vasu..

From: Michael Hanisch <mhanisch@xxxxxxxxxx>
Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re:  Nested Tags
Date: 14 Aug 2002 14:29:55 +0200

On Wed, 2002-08-14 at 13:38, Mark Micallef wrote:
> Hi All,

Hi.

> <description>This text describes the <link target="www.xyz.com"
> text="procedure"/> involced in doing something.</description>
>
> I need to display the text withing the <description> tags and also to add
> an html hyperlink whereever I encounter the <link> tag.


> Any ideas?

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

<xsl:template match="link">
  <a>
    <xsl:attribute name="href" select="@target"/>
    <xsl:value-of select="@text"/>
  </a>

Should do what you want...

--
--                                                                    --
Michael Hanisch                                      mhanisch@xxxxxxxxxx
Red Hat - RH Interchange Inc., Orleansstrasse 4,  D-81669 Munich/Germany
phone: +49 (0)89 206058-53                      fax: +49 (0)89 206058-88


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






_________________________________________________________________
Join the world?s largest e-mail service with MSN Hotmail. http://www.hotmail.com



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.