DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Tonny Guest

    How to generate hyperlinks and image-references in XSLT from XML data?


    How can one generate hyperlinks and image-references in XSLT from XML data?
    The XML/XSLT syntax is giving me major problems with this. Straight data
    from XML is not a problem.
    I need the equivalent of the HTML code for <A HREF> and <IMG SRC>.

    Thanks.

  2. #2
    Craig Clearman Guest

    Re: How to generate hyperlinks and image-references in XSLT from XML data?

    >How can one generate hyperlinks and image-references in XSLT from XML data?

    Here's some code that I have embedded inside a template match that
    fills a table cell with a hyperlink:

    <TD align="right">
    <FONT SIZE="-1">
    <a target="contents">
    <xsl:attribute name="href">
    ne.asp?a=o&n=Data/Customer/Data/SalesOrder/OrderNo/
    <xsl:value-of select="OrderNo" />
    &r=
    <xsl:value-of select="//@r" />
    #Data/Customer/Data/SalesOrder/OrderNo/
    <xsl:value-of select="OrderNo" />
    </xsl:attribute>
    <xsl:value-of select="OrderNo" />
    </a>
    </FONT>
    </TD>

    Ciao, Craig


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links