Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Mega-ultimate member
    Join Date
    Jun 2002
    Location
    Winona, MN - The land of 10,000 lakes
    Posts
    1,855
    Thanks
    1
    Thanked 45 Times in 42 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

  • #2
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •