Login | Register   
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: XML, HTML
Expertise: Beginner
Nov 14, 2003

Simplifying the Creation of Links when Transforming XML with XSLT

When transforming XML to HTML you often have to create links on your page. Use this syntax to simply this task.

<xml>
  <contact name="Kris" url="kris@somewhere.com"/>
</xml>
Long way:

<a><attribute name="href"><xsl:value-of
select="@url"/></attribute><xsl:value-of select="@name"/></a>
Short way:

<a href="{@url}"><xsl:value-of select="@name"></a>
DevX Staff
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap