470,811 Members | 1,313 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,811 developers. It's quick & easy.

HTML Hyperlink into an XML page?

Hi all,
I there any way of putting an html hyperlink into a .xml file, and still be
able to use the xml tags to format the page? Here is the code of the xml
file(real simple) and the .css file. I would like to use the .css as the
style sheet if possible.

Thanks,
Kelsey

<?xml version="1.0" encoding="iso-8859-1"?>
<?xml-stylesheet type="text/css" href="phone_catalog.css"?>
<requirement>
<page>index.htm</page>
<page>contact.htm</page>
<page>information.htm</page> <--like to put the hyperlinks here.
<page>NewPromo.htm</page>
</requirement>
CSS Below

requirement
{
background-color: #ffffff;
width: 100%;
color: red;
}

page
{
display: block;
margin-bottom: 3pt;
margin-left: 0;
}
element
{
color: #FF0000;
font-size: 20pt;
}
price
{
color: #0000FF;
font-size: 20pt;
}
Jul 20 '05 #1
1 3366
Randi wrote:
Hi all,
I there any way of putting an html hyperlink into a .xml file, and still be
able to use the xml tags to format the page? Here is the code of the xml
file(real simple) and the .css file. I would like to use the .css as the
style sheet if possible.

Thanks,
Kelsey

<?xml version="1.0" encoding="iso-8859-1"?>
<?xml-stylesheet type="text/css" href="phone_catalog.css"?>
<requirement>
<page>index.htm</page>
<page>contact.htm</page>
<page>information.htm</page> <--like to put the hyperlinks here.
<page>NewPromo.htm</page>
</requirement>


With Mozilla and Opera you should be able to use an XHTML link e.g.
<html:a xmlns:html="http://www.w3.org/1999/xhtml"
href="...">...</html:a>
as in

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="test20040507.css"?>
<requirement xmlns:html="http://www.w3.org/1999/xhtml">
<page><html:a href="index.htm">index</html:a></page>
<page><html:a href="contact.htm">contact</html:a></page>
<page><html:a href="information.htm">information</html:a></page>
<page><html:a href="NewPromo.htm">promotion</html:a></page>
</requirement>

Or with Mozilla you should be able use simple XLinks.

But in general you are better off with using XSLT to transform your XML
data to HTML and then serve that to the browsers.
--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by lbailor | last post: by
19 posts views Thread by Joe | last post: by
1 post views Thread by Agnes | last post: by
41 posts views Thread by deko | last post: by
17 posts views Thread by =?Utf-8?B?Y2F0aGFyaW51cyB2YW4gZGVyIHdlcmY=?= | last post: by
20 posts views Thread by tshad | last post: by
reply views Thread by mihailmihai484 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.