You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by on 2000/07/07 17:17:29 UTC

xsp:pi correct usage?

After reading http://xml.apache.org/cocoon/xsp.html, i tried:
<?xml version="1.0"?>
<?cocoon-process type="xsp"?>
<?cocoon-process type="xslt"?>
<?xml-stylesheet href="../samples/xsp/page-html.xsl" type="text/xsl"?>

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

<xsp:pi name="xml-stylesheet">
        href="../samples/xsp/page-xsp.xsl"
        type="text/xsl"
</xsp:pi>

<page>this is a test: <count /></page>

</xsp:page>

and <count /> doesn't get translated by page-xsp.xsl !
what am i doing wrong ? is there any documentation for using xsp:pi ?

please respond by email, since i'm not subscribed to the list yet.
thanks,
josh

Re: xsp:pi correct usage?

Posted by sudhi <su...@insage.com>.
Hi,
Even I had the same problem. Then I found out in the taglib about the
usage...
The difference is if u r using <xsp:pi> the attribute name is not name,
its target.
Here is a sample...

<xsp:pi target="cocoon-process">type="xslt"</xsp:pi>
<xsp:pi target="xml-stylesheet">href="<xsp:expr>myPi</xsp:expr>"
type="text/xsl"</xsp:pi>

HTH
Sudhi

Joshua Spoerri wrote:
> 
> After reading http://xml.apache.org/cocoon/xsp.html, i tried:
> <?xml version="1.0"?>
> <?cocoon-process type="xsp"?>
> <?cocoon-process type="xslt"?>
> <?xml-stylesheet href="../samples/xsp/page-html.xsl" type="text/xsl"?>
> 
> <xsp:page language="java" xmlns:xsp="http://www.apache.org/1999/XSP/Core">
> 
> <xsp:pi name="xml-stylesheet">
>         href="../samples/xsp/page-xsp.xsl"
>         type="text/xsl"
> </xsp:pi>
> 
> <page>this is a test: <count /></page>
> 
> </xsp:page>
> 
> and <count /> doesn't get translated by page-xsp.xsl !
> what am i doing wrong ? is there any documentation for using xsp:pi ?
> 
> please respond by email, since i'm not subscribed to the list yet.
> thanks,
> josh
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org