I have gotten the browser-detection features to work with Cocoon 2, I
plan to serve
raw XML and XSL to users of Explorer 6, so they can do the
XSL-transformation client-side,
Cocoon will do the transformation for other browsers.

My sitemap looks like this, and it works nicely for static files:

   <map:match pattern="browsertest/">
    <map:generate src="reci-vba.xml"/>
    <map:select type="browser">
       <map:when test="explorer6">
          <map:serialize type="xml"/>
       </map:when>
       <map:otherwise>
          <map:transform src="stylesheets/reci2r.xsl"/>
          <map:serialize type="html"/>
       </map:otherwise>
    </map:select>
   </map:match>

(The string "explorer6" is defined further up in the sitemap, with
    <browser name="explorer6" useragent="MSIE 6"/>
i the <map:selector bane="browser"> section)

The start of the XML file in question looks like this:

  <?xml version="1.0" ?>
  <?xml:stylesheet type="text/xsl" href="/stylesheets/reci2r.xsl" ?>

The <?xml:stylesheet> part is ignored when Cocoon does the
transformation, the
transform specified in the sitemap takes preference.

My problem is that I don't want to serve static XML files, but generated
content
through XSP. When I try to do this operation with a generated XSP file I
can't 
seem to get the <?xml:stylesheet> instruction through to the client. It
just 
disappears, no matter where in the XSP file I put it.

Anyone know how to do this?


Thanks,
Rune,
Klapp Media,
Trondheim, Norway

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