cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Todd Haverstock <Todd.Haverst...@apropos.com>
Subject Sitemap and multiple stylesheets
Date Wed, 18 Apr 2001 16:42:43 GMT
I would like to have Cocoon transform using the correct stylesheet based on
the user agent as defined in the Sitemap -for a single URL-.  Here's an
example of what I'd like to do:

<map:match pattern="agentData">
  <map:generate src="http://thaverstock:8080/cocoon/servlet/AgentData"/>
  <map:when test="explorer">
    <map:transform src="portaldemo/agentList-html.xsl"/>
    <map:serialize type="html"/>
  </map:when>
  <map:when test="wap">
    <map:transform src="portaldemo/agentList-wap.xsl"/>
    <map:serialize type="wap"/>
  </map:when>
</map:match>

Obviously that example does not actually work.  Can I do something like the
above and what is the syntax?  This works but I'd like to not do things this
way:

<map:match pattern="agentData.html">
  <map:generate src="http://thaverstock:8080/cocoon/servlet/AgentData"/>
  <map:transform src="portaldemo/agentList-html.xsl"/>
  <map:serialize type="html" />
</map:match>

<map:match pattern="agentData.wml">
  <map:generate src="http://thaverstock:8080/cocoon/servlet/AgentData"/>
  <map:transform src="portaldemo/agentList-wap.xsl"/>
  <map:serialize type="wap" />
</map:match>


-Todd

---------------------------------------------------------------------
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