On Thu, 7 Feb 2002, Vishal Khatnani wrote:

> I would like to add a configuration on my sitemap that will match all
> xml files on my server and render using the appropriate stylesheet. I
> want it to look at the stylesheet specified in the xml file, and use
> that.

i'm not aware of any way to do that in c2, unfortunately. i suppose it's
possible that one could write a TraxTransformer variant that would queue
its incoming sax events, scan for the xml-stylesheet PI and only get a
Transformer instance after it found out what stylesheet to use... but it
would be a chore, and the general feeling in the c2 crowd is that the job
of associating xml resources with stylesheets is best handled in the
central sitemap.

> Before rendering, cocoon should look at the xml file, and see which one
> to use by figuring out what type of request it is. As far as I know, you
> specify in the xml file which xsl stylesheet to use according to the
> request. In this way, I can use different stylesheet names, (e.g.
> style-wap, style-web,etc.) and use the one which is appropriate.

see the browser selector example in the sample sitemap.

> Also, do you need <?cocoon-process type="xslt"?> in your xml file? I
> have migrated to cocoon 2 and you had to have this line in your xml
> files.... but do we need them in the latest version of cocoon?

you don't need them, they're ignored. doesn't hurt anything, but it may be
misleading for future developers on your team.

- donald


---------------------------------------------------------------------
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: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to