[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xml-cocoon-users
Subject:    Re: Different Stylesheets depending on requestParameters
From:       King Ben <beatle () arches ! uga ! edu>
Date:       2000-04-30 19:33:33
[Download RAW message or body]


I'm a bit new to XML and have a question that may be related to this. What
I want to do is be able to dynamically produce files in varying formats
(WML, HTML, perhaps PDF) using cocoon. What I don't understand is how can
I let cocoon know which if these formats I need? Obviously if a user is
accessing via a palm device, they want the wml version of the xml content
and a regular broswer wants the HTML version. I guess the gst of it how
can I select XSL stylesheets based on the viewing client? Sorry if this is
a really stupid question but I haven't found anything about it anywhere
I've looked. Perhaps I'm missing the point? Any links and advice would be
of great help. Thanks.

Ben

On Sun, 30 Apr 2000, Donald Ball wrote:

> On Sat, 29 Apr 2000, Stefano Mazzocchi wrote:
> 
> > > Anyhow. Any help on the subject above would be appreciated.
> > 
> > You don't need multiple stylesheets for this, but just one that reacts
> > on the request parameters.
> > 
> > BTW, the requests parameters are automatically sent to the XSLT
> > processor in Cocoon so it's just a matter of doing
> > 
> >  <xsl:choose>
> >   <xsl:when test="$book=1">
> >    <xsl:call-template name="show-titleauthor"/>
> >   </xsl:when>
> >   <xsl:when text="$book=2">
> >    <xsl:call-template name="show-everything"/>
> >   </xsl:when>
> >  </xsl:choose>
> >  
> > hope this helps.
> 
> Actually, I've been meaning to write in a bug report regarding this for a
> little while and kept forgetting. The problem is that xalan barfs when you
> try to pass in some valid http request parameters as xslt processor
> parameters - namely, those that contain colons. I've been patching my
> production cocoon to ignore request parameters whose names contain colons.
> Should I roll that patch into the main cocoon branch? Should we turn
> colons into some other characters as part of the import process? Does
> anyone else know if there are other valid httpd request parameters that
> xalan won't accept as is?
> 
> - donald
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
> 

Today's Random Quote--------------------------------------

 "Dont critisize a man till you've walked a mile in his shoes, 
 that way when you critisize him you're a mile away and have his
shoes."

    - unknown
-----------------------------------------------------------

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic