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

Re: Dillemma when creating an XSL template ... how do

Subject: Re: Dillemma when creating an XSL template ... how do I do this?
From: Chris Gow <cgow@xxxxxxxxxxxxxxxxxx>
Date: Tue, 13 Feb 2001 17:16:37 -0500
chris gow
Try this:

<xsl:template match="email">
<xsl:element name="a">
<xsl:attribute name="href"><xsl:value-of select="."/></xsl:attribute>
<xsl:value-of select="." />
</xsl:element>
</xsl:template>


Same for url.

Hope this helps

Chris

At 04:45 PM 2/13/01 -0800, you wrote:
In the code snippet below, the <email> and <url> elements are inside the
<contact> element, and I want to display these as HTML links, any ideas how
I can accomplish this? The way it is below doesn't work.


<xsl:template match="contact"> <p> <xsl:value-of select="name"/><br/> <xsl:value-of select="address"/> <xsl:value-of select="city"/>, <xsl:value-of select="state"/> <xsl:value-of select="zip"/><br/> ph.<xsl:value-of select="phone"/><br/> fax.<xsl:value-of select="fax"/><br/>

   <xsl:template match="email">
        <a>
           <xsl:attribute name="href"><xsl:value-of select="."
/></xsl:attribute>
           <xsl:text><xsl:value-of select="." /></xsl:text>
        </a>
   </xsl:template>

   <xsl:template match="url">
        <a>
           <xsl:attribute name="href"><xsl:value-of select="."
/></xsl:attribute>
           <xsl:text><xsl:value-of select="." /></xsl:text>
        </a>
   </xsl:template>

  </p>
 </xsl:template>



Joshua Miller
Web Development
Eagle Technologies Group, Inc.
Business Solutions for the Next Generation
www.eagletgi.com
josh.miller@xxxxxxxxxxxx


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

===============================================================================


"It is inhumane, in my opinion, to force people who have a genuine
 medical need for coffee to wait in line behind people who apparently
 view it as some kind of recreational activity."
                -- Dave Barry

-------------------------------------------------------------------------------
Chris Gow                                           Digital Fairway Corporation
Software Engineer                                   180 Attwell Drive Suite 360
cgow@xxxxxxxxxxxxxxxxxx                             Etobicoke, ON M9W 6A9
http://www.digitalfairway.com                       416.628.7534
===============================================================================


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.