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


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

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

  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


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


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center