HTML Hyperlink into an XML page?

Discussion in 'XML' started by Randi, May 7, 2004.

  1. Randi

    Randi Guest

    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;
    }
     
    Randi, May 7, 2004
    #1
    1. Advertising

  2. 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/
     
    Martin Honnen, May 7, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Xenia
    Replies:
    4
    Views:
    444
    Xenia
    Nov 25, 2003
  2. davetichenor
    Replies:
    1
    Views:
    856
    Eliyahu Goldin
    Oct 30, 2006
  3. Ken
    Replies:
    1
    Views:
    396
    Alvin Bruney
    Aug 16, 2003
  4. Dave
    Replies:
    0
    Views:
    970
  5. Duke
    Replies:
    1
    Views:
    173
    Tom de Neef
    Apr 18, 2008
Loading...

Share This Page