cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Morrison John <john.morri...@experian.com>
Subject RE: xsl question
Date Tue, 03 Oct 2000 09:51:33 GMT
<xsl:template match="link">
	<a>
		<xsl:attribute name="href"><xsl:value-of select="linkpath"/></xsl:attribute>
		<xsl:attribute name="target"><xsl:value-of select="linktarget"/></xsl:attribute>
		<xsl:value-of select="linkname"/>
	</a>
</xsl:template>

or

<xsl:template match="link">
	<a href="{linkpath} target="{linktarget}"><xsl:value-of select="linkname"/></a>
</xsl:template>

Theres a very good xsl group over at mulberrytech.com.  They will prob answer any more like
this.

To the group:  Maybe we should add this to a FAQ?  (Not that anybody reads them... :< )

> -----Original Message-----
> From: Gintautas Sasnauskas <GSasnauskas@alna.lt> 
> Sent: 03 October 2000 8:34
> To: cocoon-users@xml.apache.org; GSasnauskas@alna.lt
> Subject: xsl question
> 
> 
> hi,
> 
> imagine I have xml file:
> <link>
> <linkname>News</linkname>
> <linkpath>http://www.my_links.com/News</linkpath>
> <linktarget>_blank</linktarget>
> </link>
> 
> question: how can I cram all this stuff to the attributes?
> the output should look like this:
> <a href="http://www.my_links.com/News" target="_blank">News</a>
> 
> sorry, it' almost off topic, but it's very important and how 
> can I do this
> with xsl?
> TIA!
> 
> Gintautas Sasnauskas
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
> 
> 



=======================================================================
Information in this email and any attachments are confidential, and may
not be copied or used by anyone other than the addressee, nor disclosed
to any third party without our permission.  There is no intention to
create any legally binding contract or other commitment through the use
of this email.

Experian Limited (registration number 653331).  
Registered office: Talbot House, Talbot Street, Nottingham NG1 5HF

Mime
View raw message