cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Kachanov" <>
Subject RE: use-browser-capabilities-db - detailed info
Date Wed, 16 Jan 2002 04:03:49 GMT
Firts to enable "use-browser-capabilities-db"
you have to change
which are false by default
after that the browser capabilities database becomes available
in your stylesheets
This browser capabilities database is stored deep in the code of
Cocoon.jar package
The name of the file is
org\apache\cocoon\components\browser\ is a file that is created automatically
from two files:
BrowserImpl.xml and BrowserImpl.xsl
That's it - you need to change BrowserImpl.xml and then compile
BrowserImpl.xml and BrowserImpl.xsl together into
and after that compile into BrowserImpl.class
The structure of BrowserImpl.xml is pretty obvious. It was easy to
add new browsers and add new properties of teh browsers such as: 
"screen-width" "screen-height" for certain mobile phones.
After that you need to restart Cocoon
the stylesheet that uses these browser properties will look like this:
<?xml version="1.0" encoding="Shift_JIS" ?>
<xsl:stylesheet xmlns:xsl="" version="1.0">
        <xsl:param name="ua-capabilities"/>
        <xsl:variable name="screen-width" select="$ua-capabilities//screen-width"/>
         <xsl:template match="/">
            <table width="{$screen-width}" border="1">
Hope this will help

Please check that your question has not already been answered in the
FAQ before posting. <>

To unsubscribe, e-mail: <>
For additional commands, e-mail: <>

View raw message