> > > > > I'm trying to change the PI at runtime
> > > > > or 'how to select a xsl in xsp'
> > > > >
> > > > > Right now I have the chain
> > > > >
> > > > > XML->XSP->XSL
> >
> > WORKS! ... I don't know why it didn't work
> > yesterday! But today Cocoon accepts my
> > xsp:pi instructions just fine!
> > Strange!
> > Maybe the evil god of caching got me again ;-)
> Hi Torsten,
> I am facing similar problem. Coccon doesn't accept xsp:pi instructions.
> Could you please send the exact code for writing xsp:pi instructions.
> regards
> Shweta
Hi, Shweta,
sorry for the delay! Here we go...
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsp="http://www.apache.org/1999/XSP/Core"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>
<xsl:template match="page">
<xsl:processing-instruction
name="cocoon-process">type="xsp"</xsl:processing-instruction>
<xsl:processing-instruction
name="cocoon-process">type="xslt"</xsl:processing-instruction>
<xsp:page language="java" xmlns:xsp="http://www.apache.org/1999/XSP/Core">
<page>
<xsp:logic>
String view = request.getParameter("view");
<xsp:pi target="xml-stylesheet">
href="<xsp:expr>view</xsp:expr>"
type="text/xsl"
</xsp:pi>
...
Hope this helps :)
--
Torsten
|