Hi, thanks for your answer: I tried "Gecko" but still no luck:
<map:match pattern="**-redirect.html">
<map:select type="browser">
<map:when test="Gecko">
<map:redirect-to uri="../{1}-cadru.xul"/>
</map:when>
<map:otherwise>
<map:redirect-to uri="../{1}-cadru.html"/>
</map:otherwise>
</map:select>
</map:match>The result is that the <otherwise> branch (serving HTML) is always followed...
Regards, Adrian.
Joerg Heinicke wrote:
On 20.09.2004 11:53, Adrian Petru Dimulescu wrote:
Hello,
I am trying to detect if the visiting browser is capable of rendering XUL (that is, if it is one of Mozilla, Firefox, Galeon etc.).
In case it is capable of XUL rendering, I want to serve a XUL, otherwise HTML but I can't get the BrowserSelector to do that.
I'm using this construct:
<map:match pattern="**-redirect.html"> <map:select type="browser"> <map:when test="netscape"> <map:redirect-to uri="../{1}-cadru.xul"/> </map:when> <map:otherwise> <map:redirect-to uri="../{1}-cadru.html"/> </map:otherwise> </map:select> </map:match>
The effect of this code is that both Mozilla AND IE gets the XUL. If I
replace test="netscape" by test="mozilla", both Mozilla AND IE get the HTML.
Anybody could guide me, please?
The things that are matched here are called 'user agent strings'. You can find many lists in the web using Google. For the moment the examples at http://en.wikipedia.org/wiki/User_agent should do it (there is a link on the wiki page with a huge UA strings list). You will see, that IE includes also 'Mozilla' as substring. A good test is probably only 'Gecko'.
Joerg
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
