Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to add XML data to a Hyperlink

Posted on 2001-07-10
12
Medium Priority
?
257 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
Independent Software Vendors: 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 800 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

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…
The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

971 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