XSL and XML in querystring

Posted on 2005-04-15
Last Modified: 2008-03-04
I need to loop and take <xsl:value-of select="@NAME"/>
then insert it into hyperlink like below, how do I do that?

<a href="remove.asp?value=INSERT_XSLVARIABLE_HERE">

below is a simplified version from my problem:

-- myASP ---
  set kk_xmlDoc = CreateObject("Microsoft.XMLDOM")
  if (kk_xmlDoc.load("myXML.xml")) then

  'Load the XSL
  set myxsl = CreateObject("Microsoft.XMLDOM")
  myxsl.async = false
  set myXML1 = kk_xmlDoc.selectSingleNode("/DATA/BODY")

 response.write myXML1.transformNode(myxsl)

--- myXML ---
<?xml version="1.0"?>
            <ITEM VALUE="moron"/>
            <ITEM VALUE="stupid"/>
            <ITEM VALUE="idiot"/>

--- myXSL ---
<?xml version='1.0'?>
<xsl:stylesheet version="1.0" xmlns:xsl="">
<xsl:template match="/DATA/BODY">
    <xsl:for-each select="ITEM">
        <tr class="MessageCell0">
          <td><a href="remove.asp?value="><xsl:value-of select="@NAME"/></a></td>
Question by:calvinfoo
    1 Comment
    LVL 23

    Accepted Solution


    Try changing this:
    <td><a href="remove.asp?value="><xsl:value-of select="@NAME"/></a></td>

    to this:
        <xsl:attribute name="href">remove.asp?value=<xsl:value-of select="@NAME"/></xsl:attribute>

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Join & Write a Comment

    Suggested Solutions

    Introduction In my previous article ( I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
    Browsing the questions asked to the Experts of this forum, you will be amazed to see how many times people are headaching about monster regular expressions (regex) to select that specific part of some HTML or XML file they want to extract. The examp…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    732 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now