Solved

How to add XML data to a Hyperlink

Posted on 2001-07-10
12
244 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
  • 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
 
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
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

The Problem How to write an Xquery that works like a SQL outer join, providing placeholders for absent data on the outer side?  I give a bit more background at the end. The situation expressed as relational data Let’s work through this.  I’ve …
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

747 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

10 Experts available now in Live!

Get 1:1 Help Now