[AWS] XSLT processing with AWS

Pascal Obry p.obry@wanadoo.fr
Sat, 20 Dec 2003 15:19:21 +0100


Jacob,

 > Pascal Obry wrote:
 > > Yes. See AWS.Status.User_Agent.
 > 
 > But the transmitted name of the "user agent" can _not_ be
 > trusted.  My browsers are for example all configured to
 > return "Any Browser" as the user agent.  And I am almost
 > certain that MSIE by default claims that it is a Mozilla
 > clone while Opera by default claims that it is a MSIE clone.

Agreed, but this is user's responsability.

 > If you want to know if the clients know XSL, you should
 > check the "accept content" header for that information.

Indeed, this is certainly a better approach. The header to check
is "Accept:". You need 2 steps, first get the header list
from the callback status, then get the Accept header, something like:

   Accept : constant String 
     := Headers.Get_Values (Status.Header (Request), Messages.Accept_Token);

Pascal.

-- 

--|------------------------------------------------------
--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--|         http://perso.wanadoo.fr/pascal.obry
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595