Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   XML (http://www.velocityreviews.com/forums/f32-xml.html)
-   -   HTML Hyperlink into an XML page? (http://www.velocityreviews.com/forums/t167058-html-hyperlink-into-an-xml-page.html)

Randi 05-07-2004 02:48 AM

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



Martin Honnen 05-07-2004 12:33 PM

Re: HTML Hyperlink into an XML page?
 
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/


All times are GMT. The time now is 01:13 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.