You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Robin Green <gr...@hotmail.com> on 2000/07/11 13:27:23 UTC

Documentation Mistake (was Re: xsp:pi correct usage?)

In docs/xsp.html the example is incorrect. The text above it says "xsp:pi 
requires a target attribute" but the example does not have a target 
attribute!

The example given there should be

<xsp:pi target="xml-stylesheet">
        href="<xsp:expr>request.getQueryString()</xsp:expr>"
                                                                             
    type="text/xsl"
                                                                        
</xsp:pi>

NOT <xsp:pi name="xml-stylesheet"> !

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

Unfortunately your email address did not appear in my Hotmail display. It 
said Joshua Spoerri <>. Very odd.



--
Robin Green
i-tao Ltd.
4 Skyline Village
Limeharbour
London E14 9TS
United Kingdom
Phone +44 20 7537 2233  Fax +44 70 8081 5118
http://www.i-tao.com


________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com


RE: changing PI at runtime

Posted by Torsten Curdt <tc...@dff.st>.
> Hi,
> here is a sample xsp page.if thats what ur looking for

Thanks! But my XSP page looks different than yours
(and Marks). My page is based on the clean page
example. Where I have

XML->XSP->XSL

Can someone with a little bit more insight please comment
on this thing? Why are my xsp:pi ignored while it works
for this guys? Because it's in a
<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:xsp="http://www.apache.org/1999/XSP/Core"
>
Why do I need this stylesheet and they don't?
--
Torsten

Re: changing PI at runtime

Posted by sudhi <su...@insage.com>.
Hi,
here is a sample xsp page.if thats what ur looking for

--------------------------------------------
<?xml version="1.0" standalone="no"?>
<?cocoon-process type="xsp"?>

<xsp:page language="java"
xmlns:xsp="http://www.apache.org/1999/XSP/Core">
<PAGE>
<xsp:logic>
String file = "dynamic.en.xsl";
String param = null;
param = (String)request.getParameter("file");
if (param != null &amp;&amp; !param.equals("")){
        if ( param.equals("cn"))
                file = "dynamic.cn.xsl";
}
</xsp:logic>
<xsp:pi target="cocoon-process">type="xslt"</xsp:pi>
<xsp:pi target="xml-stylesheet">href="<xsp:expr>file</xsp:expr>"
type="text/xsl"</xsp:pi>

<NEWS>
<TITLE>test</TITLE>
</NEWS>
<FILE><xsp:expr>file</xsp:expr>:<xsp:expr>param</xsp:expr></FILE>
</PAGE>
</xsp:page>
--------------------------------------------

HTH
Sudhi

Re: changing PI at runtime

Posted by Mark Washeim <31...@t-online.de>.
Below is Robin's previous message . .  . works for me . . .

-- 
Mark (Poetaster) Washeim

'On the linen wrappings of certain mummified remains
found near the Etrurian coast are invaluable writings
that await translation.

Quem colorem habet sapientia?'

Evan S. Connell

 


----------
From: "Robin Green" <gr...@hotmail.com>
Reply-To: cocoon-users@xml.apache.org
Date: Tue, 11 Jul 2000 11:27:23 BST
To: cocoon-users@xml.apache.org, cocoon-dev@xml.apache.org
Subject: Documentation Mistake (was Re: xsp:pi correct usage?)

In docs/xsp.html the example is incorrect. The text above it says "xsp:pi
requires a target attribute" but the example does not have a target
attribute!

The example given there should be

<xsp:pi target="xml-stylesheet">
        href="<xsp:expr>request.getQueryString()</xsp:expr>"
                   
    type="text/xsl"
                   
</xsp:pi>

NOT <xsp:pi name="xml-stylesheet"> !

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

Unfortunately your email address did not appear in my Hotmail display. It
said Joshua Spoerri <>. Very odd.



--
Robin Green
i-tao Ltd.
4 Skyline Village
Limeharbour
London E14 9TS
United Kingdom
Phone +44 20 7537 2233  Fax +44 70 8081 5118
http://www.i-tao.com


________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org