Chris Barajas wrote:
OK, that doesn't help. So... how would I place a link like <a
href="whatever.html"> in an XML document, as opposed to the XSL?
Well, there is XHTML, and XML allows elements with different namespaces
so you could have
<a xmlns="http://www.w3.org/1999/xhtml"
href="http://javascript.faqts.com/">JavaScript.FAQTs</a>
as an XHTML link in an XML document, for instance
<?xml version="1.0" encoding="UTF-8"?>
<para>
This is text followed by an XHTML link
<a xmlns="http://www.w3.org/1999/xhtml"
href="http://javascript.faqts.com/">JavaScript.FAQTs</a>
</para>
Save that .xml and browser like Opera 7 or Netscape 7 which have
XML/XHTML support will recognize the XHTML namespace on the <a> element
and render it as a clickable link, just like in an HTML document.
But IE5/6/Win doesn't support that.
Or make any element an XLink:
<mylink xmlns:xlink="http://www.w3.org/1999/xlink"
xlink:type="simple"
xlink:show="replace"
xlink:href="http://javascript.faqts.com/">JavaScript.FAQTs</mylink>
but only Mozilla based browsers like Netscape 7 then make that element a
clickable link, and you also need to apply some CSS to have the normal
underline look and the normal link color:
para {
display: block;
margin: 0.2em;
}
mylink {
text-decoration: underline;
color: blue;
}
XML example:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="test20031207.css"?>
<para>
This is text followed by a simple XLink
<mylink xmlns:xlink="http://www.w3.org/1999/xlink"
xlink:type="simple"
xlink:show="replace"
xlink:href="http://javascript.faqts.com/">JavaScript.FAQTs</mylink>
</para>
--
Martin Honnen
http://JavaScript.FAQTs.com/