Solved

How to add XML data to a Hyperlink

Posted on 2001-07-10
12
249 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
Guide to Performance: Optimization & Monitoring

Nowadays, monitoring is a mixture of tools, systems, and codes—making it a very complex process. And with this complexity, comes variables for failure. Get DZone’s new Guide to Performance to learn how to proactively find these variables and solve them before a disruption occurs.

 
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

Why You Need a DevOps Toolchain

IT needs to deliver services with more agility and velocity. IT must roll out application features and innovations faster to keep up with customer demands, which is where a DevOps toolchain steps in. View the infographic to see why you need a DevOps toolchain.

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…
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. 
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

739 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