Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to insert a workable link in xml.

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
0
0
There are many syntaxes given to insert a link. I have used them all but none of them are working like that of HTML Hyperlinks. How to insert a hyperlink in xml page and how to display it using xsl?
 
Are you displaying your XML file in a browser by using XSL to convert the XML to HTML? (this only works in IE 5 or higher).

If this is what you mean then you should have a reference to the XSL sheet in your XML file:

XML file (test.xml)
------------------
[red]<?xml version=&quot;1.0&quot;?>
<?xml-stylesheet type=&quot;text/xsl&quot; href=&quot;test.xsl&quot;?>
<item>
<content>click here</content>
</item>[/red]


XSL file (test.xsl)
------------------
[red]<xsl:stylesheet xmlns:xsl=&quot;<xsl:template match=&quot;/&quot;>
[tab]Here's a link:
[tab]<a href=&quot; select=&quot;item/content&quot;/></a>
</xsl:template>[/red]


In this case, the content of the link (the phrase &quot;click here&quot;) is grabbed from the XML file and inserted. If you want to insert a value from your XML file as the href of the link, then you have to put the value in a separate xsl:attribute tag after the link.

Is this what you are referring to or did I misunderstand your question? [sig]<p>--Will Duty<br><a href=mailto:wduty@radicalfringe.com>wduty@radicalfringe.com</a><br><a href= > </a><br> [/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top