Make your own free website on

Home Page

Back to Papers

Introduction - Why WAP?



The Oracle XDK

An Example Application

Our first XSQL Page

Browser Sensitivity

A WML Stylesheet

WML Output

An HTML Stylesheet

Conclusion and Resources

Please note this page has moved to You will be redirected in 5 seconds but it would be better to update your bookmarks ;-)

Browser Sensitivity

We can do this by adding lines to our jobserve.xsql page that identify the stylesheets that we want the processor to use to format our data for presentation.

Example 4 - JOBSERVE.XSQL (Version 1.1)

1. <?xml version="1.0"?> 2. <?xml-stylesheet type="text/xsl" media="Mozilla/4.0 (compatible; MSIE" href="jobserve_html.xsl"?> 3. <?xml-stylesheet type="text/xsl" media="Mozilla/3.0 (compatible; HandHTTP 1.1)" href="jobserve_palm.xsl"?> 4. <?xml-stylesheet type="text/xsl" media="UPG1 UP" href="jobserve_wml.xsl"?> 5. <xsql:query mySearch="wap" 6. max-rows="5" 7. connection="Jobserve" 8. xmlns:xsql="urn:oracle-xsql"> 9. <xsql:include-request-params/> 10. SELECT substr(title,1,16) short_title, title, location, skills 11. FROM job 12. WHERE UPPER(title) LIKE UPPER('%{@mySearch}%') 13. ORDER BY first_posted DESC 14. </xsql:query>

The only lines that have been added to this version are lines 2, 3 and 4 and the only one that is of interest to us from a WAP point of view is line 4. It instructs the XSQL servlet to check the HTTP_USER_AGENT of the request (i.e. which browser is being used to request the page) and, if it contains UPG1 UP, then it will format the data using the jobserve_wml.xsl stylesheet. The XSL Transformation processor will then process our XML data file (example 3) and reformat it according to the instructions we include in the stylesheet file.

So what on earth is the 'UPG1 UP' browser?


Technical Papers Utilities and Scripts Book Reviews Links
My Resume Fun & Games Email Home