cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Arun.N" <aru...@eximsoft.com>
Subject Re: newbie Question abt number of xsls
Date Mon, 19 Nov 2001 09:25:53 GMT
Hi,
            Thankx Adam !!! for your reply.
      I checked what you said .. sounds good.
but all the examples i found with the cocoon 1.8.2 .... was using a separate
stylesheet.

in the code snippet you have shown here, is the to-chtml.xsl and to-html.xsl
enough for all the pages. if i am going to support two MLs HTML and CHTML
.... is a single generic xsl for each ML sufficient??

If so . building  that generic xsl depends on the XML tags i define in my
application......  or is there any stylesheets which are freely available so
that i will follow the protocol defined for the XML tags decided by the
provider of the xsl.
I feel if there are any predefined xsl i would prefer and follow the tags
defined by that ... because as i am not too good in writing xsls, following
the protocol will save lot of my development time.

if there are any links for stylesheets to convert from XML to any ML in a
generic way, please can you give me some links. It will be very helpful for
me

Thankz in advance,
regards,
Arun.N


----- Original Message -----
From: "Adam A R" <aadam@sybase.co.jp>
To: <cocoon-users@xml.apache.org>
Sent: Monday, November 19, 2001 11:48 AM
Subject: Re: newbie Question abt number of xsls


> Hi Arun,
>
> Yes. It is possible to use one .xsl for each ML
>
> If you are using Cocoon 1.8 then use the media="xxx" parameter in the
> processing instruction to specify the useragent for the xsl.
>
> eg.
>
> <?cocoon-process type="xslt"?>
> <?xml-stylesheet href="xsl/to-hdml.xsl" type="text/xsl" media="up"?>
> <?xml-stylesheet href="xsl/to-chtml.xsl" type="text/xsl" media="imode"?>
> ...
> ...
> ...
> <?xml-stylesheet href="xsl/to-html.xsl" type="text/xsl"?>  <!--  This is
the
> default. -->
>
>
> But for this to work, you should configure User-Agents(Browsers) in the
> cocoon.properties file.
>
> part of my cocoon.properties looks like this.
> ##########################################################################
> ##########################################
> # User Agents (Browsers)                 #
> ##########################################
>
> # NOTE: numbers indicate the search order. This is very important since
> # some words may be found in more than one browser description. (MSIE is
> # presented as "Mozilla/4.0 (Compatible; MSIE 4.01; ...")
> #
> # for example, the "explorer=MSIE" tag indicates that the XSL stylesheet
> # associated to the media type "explorer" should be mapped to those
browsers
> # that have the string "MSIE" in their "user-Agent" HTTP header.
>
> browser.0 = up=UP.Browser/
> browser.1 = explorer=MSIE
> browser.2 = pocketexplorer=MSPIE
> browser.3 = handweb=HandHTTP
> browser.4 = avantgo=AvantGo
> browser.5 = imode=DoCoMo
> browser.6 = opera=Opera
> browser.7 = lynx=Lynx
> browser.8 = java=Java
> browser.9 = wap=Nokia
> browser.10 = wap=UP
> browser.11 = wap=Wapalizer
> browser.12 = mozilla5=Mozilla/5
> browser.13 = mozilla5=Netscape6/
> browser.14 = netscape=Mozilla
> ##########################################################################
>
>
> I dont know much of C2. Though I have installed it... lately I am running
> short of time.
> Someone on the list might be able to explain it for C2.
>
> But, as far as I know.... you will have to use Matchers for using each
> stylesheet depending on the user-agent.
> Can anybody shed light on how to do this in C2??
>
>
> cheers
> Adam
>
>
> ----- Original Message -----
> From: Arun.N
> To: cocoon-users@xml.apache.org
> Sent: Saturday, November 17, 2001 9:06 PM
> Subject: newbie Question abt number of xsls
>
>
> Hi,
>         Is it possible to have only one xsl for each type ML ie one for
WAP
> one for and one for HTML generation and etc.
> And all the xml page should use the same stylesheet. according to the
> useragent it should pick one of the xsl in all the pages.
> I have a senario where there are 200 pages in the application. As far as
my
> understanding for each page we should write an xsl and one for each type o
f
> ML. Is there any generic approach ? because the application will have lots
> of pages if there is one to one.
> ie, as of now i have to support html wap and chtml ... that becomes 200
xmls
> + 600 xsl !!!
>
> Please suggest me what to do ??
> I also welcome someother sort of implementaion also.
> Thankx in advance,
> Arun.N
>
>
> ---------------------------------------------------------------------
> 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