cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hoffmann Thomas <thomas.hoffm...@wwl.de>
Subject AW: Applying diferente stylesheets to diferent wap browsers
Date Thu, 22 Mar 2001 13:55:00 GMT

First, i must say you thats my english is actually to bad for help others.
But i'll attempt to help you.

"browser.15", i think isn't correct. I think you must replace the other
entrys.
If i read the helplines in the cocoon.properties right,
then i would say the follow:

thats the string you can type in the media-attribute
>> browser.10 = wap=Wapalizer
>> -------------^^^

thats the String that will be parsed from cocoon,
and it's a substring from the http-browser-request
>> browser.10 = wap=Wapalizer
>> -----------------^^^^^^^^^
You must know what the actual requested userAgent supply in the
http-request.
You has write "UP.Browser/3.1-ALCS".
I think thats wrong. Take a substring from this like "UP",
if that the user-Agent.

perhaps so:
<?xml-stylesheet href="mediaTest-Nokia-wml.xsl" type="text/xsl"
media="wapNokia"?>
-----------------------------------------------------------------------^^^^^
^^^
<?xml-stylesheet href="mediaTest-UP-wml.xsl" type="text/xsl" media="wapUP"?>
--------------------------------------------------------------------^^^^^

Know incoming an request and the XML would parsed:
If Cocoon comes to "media=wapNokia", cocoon will look in the
cocoon.properties.
If it found the lines
browser.8 = wapNokia=Nokia
browser.9 = wapUp=UP
It's in the http-header a substring like "Nokia", cocoon take the stylesheet
whats
reference with >>media="wapNokia"<<


Perhaps you can look in the documentation from Nokia, UP and so on.
Anywhere you'll find what the client supply for an user-Agent-substring.
You must test it with different simulators or real clients.
Then you can readout the http-request perhaps with WMLScript.

P.S.: I have an german site (www.coolwml.de) which is an documentation
for WML. And i'm very interest what the different clients supply
http-headers.
So can i implement this in my site.

Oh, my first name is 
Thomas :o)



> -----Ursprüngliche Nachricht-----
> Von: Oscar Trigueiros [mailto:Oscar.Trigueiros@lis2.siemens.pt]
> Gesendet: Donnerstag, 22. März 2001 13:41
> An: 'cocoon-users@xml.apache.org'
> Betreff: RE: Applying diferente stylesheets to diferent wap browsers
> Wichtigkeit: Hoch
> 
> 
> 	Dear, Hoffman:
> 	 I thank you most sincerely for taking the interest.
> 	 I followed the tip and built one simple example for testing, by
> taking the next steps
> 	  1) Added media type wapUP to the cocoon.properties
> 		browser.15 = wapUP=UP.Browser/3.1-ALCS
> 	  2) Then i created one xml and 3 xsl files
>    		mediaTest.xml - dummy xml file with references to the
> diferent media stylesheets
> 		mediaTest-Nokia-wap.xsl - xsl file for nokia
> 		mediaTest-UP-wap.xsl - xsl file for upbrouser
> 		mediaTest-Html-wap.xsl - xsl file for web
>          
>         But i've got the disappointing result
> 	   All wap browser are treteded as been Nokia wap browser
>    	
>         My thought is that the wap simulator i'm using is 
> sending some odd
> user-Agent http header.
> 	  Do you have any  suggestions.
>     	
> 	Best regards:
> 		Osk!	 
>  	 	
> -----Original Message-----
> From: Hoffmann Thomas [mailto:thomas.hoffmann@wwl.de]
> Sent: quinta-feira, 22 de Março de 2001 10:39
> To: cocoon-users@xml.apache.org
> Subject: AW: Applying diferente stylesheets to diferent wap browsers
> 
> 
> 
> I think it so,
> 
> here are 3 lines from cocoon.properties:
> 
> browser.8 = wap=Nokia
> browser.9 = wap=UP
> browser.10 = wap=Wapalizer
> 
> the last word in the line is the name which the browser identify.
> the word before is that what you can type in the "media"-attribute.
> So you can differentiate this with "wapNokia", "wapUP", and so on.
> 
> I haven't experience with this, because i've installed cocoon 
> this week :o)
> 
> Can you write me directly when it works? It's interesting for me.
> 
> Thomas
> 
> > -----Ursprüngliche Nachricht-----
> > Von: Oscar Trigueiros [mailto:Oscar.Trigueiros@lis2.siemens.pt]
> > Gesendet: Mittwoch, 21. März 2001 17:53
> > An: cocoon-users@xml.apache.org
> > Betreff: Applying diferente stylesheets to diferent wap browsers
> > 
> > 
> > 
> > 	Can some one give one tip on how to apply diferent 
> > stylesheets for
> > diferent
> >  	wap browsers, i'm developing one application using Cocoon, which
> > suports
> > 	UPbrowser and WapForum as is stated in the user agent 
> > propertie in
> > the
> > 	cocoon.properties file.
> > 	I know that to apply one stylesheet to up i must do 
> > someting like
> > 	 <?xml-stylesheet href="Xxx-wml.xsl" type="text/xsl" 
> > media="wap"?>
> > 	Where "Xxx-wml.xsl" is the stylesheet to generate wap, 
> > but if i want
> > to apply
> > 	different stylesheet for diferente browsers?
> > 
> > 
> ---------------------------------------------------------------------
> > Please check that your question has not already been answered in the
> > FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> > 
> > To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
> > For additional commands, e-mail: <cocoon-users-help@xml.apache.org>
> > 
> 
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> 
> To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail: <cocoon-users-help@xml.apache.org>
> 
> 

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message