cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Enrico Brighi" <brig...@libero.it>
Subject Re: I'd like that Cocoon not process XSLT for MS Internet Explorer
Date Sat, 27 Jan 2001 16:54:21 GMT
>
> > "Enrico Brighi" <brighie@libero.it> wrote:
> > >     i'm using Cocoon and i've a question  about processing XML and
XSL.
> > >I'd like that, if the client that request a xml page is Explorer (5.0
or
> > >5.5), Cocoon not process the page and so Apache can send to the client
> the
> > >XML page and the Stylesheet associated. I know that the row in a XML
page
> > >"<?cocoon-process type="xslt"?>" is a command for make a "xslt"
process.
> is
> > >there a command to say:
> > >
> > >"if (userAgent == 'Explorer 5.0'){
> > >  not process XSLT, just send the pages
> > >}
> > >else <?cocoon-process type="xslt"?>"??
> >
> > Here is a hint:
> >
> > http://xml.apache.org/cocoon/faqs.html#faq-stylesheetreq
> >
> > But instead of using request:get-parameter, you'll need to check the
> > user-agent header.
> >
>
 Sorry, but i think that this is a way to specify only stylesheet to be
 processed by means of request parameter...i'd like that if Explorer is the
 browser, then i can only send the stylesheet and the xml. In this way,
 Explorer can process the xslt and it's no more a work of the server...sorry
 if i wrong...cosider thi FAQ


      <?cocoon-process type="xsp"?>

 /*
 ...i think that in this point Cocoon start the xsp process ...i'd like to
 insert here, out of the root tag <page>, a "script" for write or not the
row
 "<?cocoon-process type="xslt">" with conditional instruction...is it
 possible with <xsp:pi>?? sorry if this is a wrong way to solve this
 problem...there's another solution??
 */

      <?cocoon-process type="xslt"?>

      <xsp:page xmlns:xsp="http://www.apache.org/1999/XSP/Core"
        xmlns:request="http://www.apache.org/1999/XSP/Request">

        <page>
         <xsp:pi target="xml-stylesheet">
           href="<xsp:expr><request:get-parameter
 name="stylesheet"></xsp:expr>" type="text/xsl"
         </xsp:pi>
        </page>
      </xsp:page>



 Thank you
 Enrico







Mime
View raw message