BizTalk Utilities CV ,   Jobs ,   Code library
 
Home Page


Add/Edit your code items
Search the code library
Browse for the code library


XSLT
Re: Creating a hyper link in XSL(T) - A slight variation
Creating a hyper link in XSL(T)
Re: For Next Loop in XSLT
For Next Loop in XSLT
Intersection and other set operations on node-sets
Grouping using xsl:key and the key() function -- the Muenchian method
Comparing Strings in XSLT for greater/less
How to do a search and replace in XSLT
How to work with more than one xml document in your XSLT transformation
Sorting (advanced) of dynamically constructed strings
In case you need a ""break"" from an xsl:for-each loop
Format XML/XSL for Documentation
Find all xsl:variables that are in scope?
Binary Search in XSLT
Get the newest 5 articles out of hundreds -- a super efficient sort in XSLT
Dynamically change the encoding of your XSLT stylesheet
Identifying an attribute or a namespace node
Build a XPath expression for a node
Avoiding an XSLT Processor crash due to deep recursive processing
Conditional generation of a string in a single XPath expression


 
 

<< XQuery.NET and XML >>


By Mark Wilson
I am the creator of TopXML. I am available for international and local (Australia) contracts. I am a Solution Architect/Business Analyst. I have worked in IT in several countries (NZ, Australia, South Africa, UK) building and training teams for government and very large non-governmental organizations. I am ex-Microsoft Consulting Services. I wrote the first book on Microsoft XML published in 2000 called XML Programming with VB and ASP. Most recently I have been building tools for the SEO industry. Ask me for a 37 point SEO health-checkup for your website.
First Posted 04/04/2001
Times viewed 407

Re: Creating a hyper link in XSL(T)


Summary This snippet demonstrates how to use the Attribute Value Template {curley brackets} to add an attribute value, such as a hyper link.

As you have read in Don's example the general way to add an attribute value, such as an 'href' to a link element () you use the element. Another shorter and more readable method is to use an Attribute Value Template. This is by the use of curley brackets around the value you want to insert. So using Don's example, you would replace it with: Attribute value templates can only be used with: - - - - - - all attributes (such as HTML attributes, img, etc) which do not belong to the XSL namespace. - and whichever extension functions allows one to use it. A few more examples are: Adding a name attribute to an element: Kingston Dynamically setting the sort order, which may have been passed into the XSLT via a parameter:

Additional information

Further additional information


Rate this article on a scale of 1 to 10 (0 votes, average 0)

Your vote :  

<< XQuery.NET and XML >>





Leave a comment for this article
Your name
Your email (optional)
Your comment
Optional: Upload an attachment
Enter the code shown:

 
 

    Email TopXML