Solved

How to add XML data to a Hyperlink

Posted on 2001-07-10
12
248 Views
Last Modified: 2008-03-06
All
I am trying to add XML data to the Hyperlink for query.

<DIV class="row"><A HREF="HOST.asp?HOSTNM="<xsl:value-of select="HOSTNAME"/>><xsl:value-of select="HOSTNAME"/></A></DIV>

How can I contancatate the data found in XML onto the link.

Tks in advance

Ivanc
0
Comment
Question by:ivanc
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 5
12 Comments
 
LVL 2

Expert Comment

by:djokov
ID: 6268981
Try this:

<DIV class="row">
<xsl:variable name="hostname" select="HOSTNAME"/>
<A HREF="HOST.asp?HOSTNM={$hostname}"><xsl:value-of select="$hostname"/></A>
</DIV>

Cheers.
0
 
LVL 3

Author Comment

by:ivanc
ID: 6271731
djokov

I have tried both methods but it doesn't work.  I don't know if this important is crucial but I am using MSXML parser.

Tks in advance
Ivanc
0
 
LVL 2

Expert Comment

by:MicOfLZ
ID: 6272275
what namespace are you using ?

MicOfLZ
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Author Comment

by:ivanc
ID: 6272286
MicOflZ
I am new in XML Is this the Namespace that you have mentioned.

<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">

Please advice
Tks in advance

Ivanc
0
 
LVL 2

Expert Comment

by:MicOfLZ
ID: 6272313
hi Ivanc

in this namespace you'll have to do it like this:

<DIV class="row">
     <A>
          <xsl:attribute name="href">
               HOST.asp?HOSTNM=<xsl:value-of select="link/hostname"/>
          </xsl:attribute>
          <xsl:value-of select="link/hostname"/>
     </A>
</DIV>

I'm sure this helps
MicOfLZ
0
 
LVL 2

Expert Comment

by:MicOfLZ
ID: 6272316
I used this xml:

<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="ee.xsl"?>

<link>
     <hostname>testhost</hostname>
</link>

that's why I have the "link/hostname"

Cheers
MicOfLZ
0
 
LVL 3

Author Comment

by:ivanc
ID: 6272351
MicOfLZ

The solution works great.  By the way is there anyway I can find any documentation on all the MSXML parsers.  I realise that each parser have different methods so it would be great to know if there is a complete one for MSXML parsers.  I would raise the points to 200 if you have any links.

Tks in advance
Ivanc
0
 
LVL 2

Expert Comment

by:MicOfLZ
ID: 6272353
yes I have - one moment
0
 
LVL 2

Accepted Solution

by:
MicOfLZ earned 200 total points
ID: 6272359
0
 
LVL 3

Author Comment

by:ivanc
ID: 6272383
MicOfLZ
Really Grateful for your help.
Ivanc
0
 
LVL 2

Expert Comment

by:MicOfLZ
ID: 6272389
Thanks for the A :-)
MicOfLZ
0
 
LVL 3

Author Comment

by:ivanc
ID: 6272401
MicOfLZ
This must sound stupid but when I have installed the SDK, I am not sure where I can get the files.

Hope U can just point it out to me
Tks in advance
Ivanc
0

Featured Post

Forrester Webinar: xMatters Delivers 261% ROI

Guest speaker Dean Davison, Forrester Principal Consultant, explains how a Fortune 500 communication company using xMatters found these results: Achieved a 261% ROI, Experienced $753,280 in net present value benefits over 3 years and Reduced MTTR by 91% for tier 1 incidents.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

The Client Need Led Us to RSS I recently had an investment company ask me how they might notify their constituents about their newsworthy publications.  Probably you would think "Facebook" or "Twitter" but this is an interesting client.  Their cons…
Many times as a report developer I've been asked to display normalized data such as three rows with values Jack, Joe, and Bob as a single comma-separated string such as 'Jack, Joe, Bob', and vice versa.  Here's how to do it. 
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

763 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