...

View Full Version : using xml to create both html and wml



bcarl314
06-18-2002, 01:07 PM
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

jkd
06-18-2002, 05:46 PM
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. :)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum