This is the mail archive of the xsl-list@mulberrytech.com mailing list .
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Michael Hanisch, in..
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..<xsl:attribute name="href" select="@target"/>
From: Michael Hanisch <mhanisch@redhat.com>
Reply-To: xsl-list@lists.mulberrytech.com
To: xsl-list@lists.mulberrytech.com
Subject: Re: [xsl] 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@redhat.com
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
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |