Web Analytics Made Easy -
StatCounter using xml to create both html and wml - CodingForum

Announcement

Collapse
No announcement yet.

using xml to create both html and wml

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • using xml to create both html and wml

    How would I use XML to create a html doc if the request comes from an internet browser, and a wml doc if the request comes from a cell phone browser. I know how to write the xsl sheet, but don't I need to assign a different sheet depending on the request type? Wouldn't that need 2 style sheet calls in one xml doc? Or is this done on the server, in php/perl/asp where the server determines the request and then associates the correct stylesheet for output?

    tia
    Create accessible online surveys -::- Koobten.com - compare netbook prices and reviews -::- Affordable, reliable hosting for less than $20 per year
    Zend Certified Engineer


  • #2
    What I did for a mini-project was use some PHP:

    <?xml version="1.0"?>
    <?xml-stylesheet type="text/xml" href="<?php echo appropriate stylesheet depending on user-agent?>"?>
    <!-- bla -->


    I believe DevShed may have an article about doing exactly the same.
    jasonkarldavis.com

    Comment

    Working...
    X