HTML Hyperlink into an XML page?

R

Randi

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;
}
 
M

Martin Honnen

Randi said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,534
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top