Solved

How to add XML data to a Hyperlink

Posted on 2001-07-10
12
245 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
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

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…
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.
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …
A simple description of email encryption using a secure portal service. This is one of the choices offered by The Email Laundry for email encryption. The other choices are pdf encryption which creates an encrypted pdf of your email and any attachmen…

911 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

19 Experts available now in Live!

Get 1:1 Help Now