You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Ulrich Mayring <ul...@denic.de> on 2000/04/20 18:57:04 UTC

XSP Bug Report

Hi all,

apparently there is a bug in XSP, take a look at this reproducible
example:


file test.xml:
<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
 
<?cocoon-process type="xslt"?>
<?xml-stylesheet href="test.xsp" type="text/xsl"?>
 
<top>
 
<foo bar="baz"/>
 
</top>


file test.xsp:
<?xml version="1.0"?>
 
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xsp="http://www.apache.org/1999/XSP/Core" version="1.0">
 
<xsl:template match="top">
        <xsl:processing-instruction name="cocoon-process">
                type="xsp"
        </xsl:processing-instruction>
        <xsl:processing-instruction name="cocoon-process">
                type="xslt"
        </xsl:processing-instruction>
        <xsl:processing-instruction name="xml-stylesheet">
                href="test.xsl" type="text/xsl"
        </xsl:processing-instruction>
 
        <xsp:page language="java"
xmlns:xsp="http://www.apache.org/1999/XSP/Core">
 
        <xsl:apply-templates/>
 
        </xsp:page>
</xsl:template>
 
<xsl:template match="*">
        <xsl:copy>
                <xsl:apply-templates/>
        </xsl:copy>
</xsl:template>
 
</xsl:stylesheet>


file test.xsl:
<?xml version="1.0"?>
 
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0"
xmlns="http://www.w3.org/TR/REC-html40">
 
<xsl:template match="foo">
        <html><head></head><body>
        Attribute bar of element foo contains:
        <xsl:value-of select="@bar"/>
        </body></html>
</xsl:template>
 
</xsl:stylesheet>


As you will (hopefully) see, when you run this example, the value of the
attribute bar of element foo (which would be "baz") is not printed.
However, if you change the test.xml to point to test.xsl as its
stylesheet (instead of test.xsp as in the example above), then
everything works fine and "baz" is printed. This leads me to believe it
is an XSP issue, because without XSP it works.

xerces 1.0.3, xalan 1.0.1, cocoon 1.7.2, jdk1.2 (Sun/Solaris), JServ 1.1

cheers,

Ulrich

-- 
Ulrich Mayring
DENIC eG, Systementwicklung

Re: XSP Bug Report

Posted by Ulrich Mayring <ul...@denic.de>.
Stefano Mazzocchi wrote:
> 
> > I removed it, but no result. Is this behavior not reproducible on your
> > machine?
> 
> no :(

Then it's probably because the bug is already fixed. I'm waiting for
1.7.3 and try again.

Ulrich

-- 
Ulrich Mayring
DENIC eG, Systementwicklung

Re: XSP Bug Report

Posted by Stefano Mazzocchi <st...@apache.org>.
Ulrich Mayring wrote:
> 
> Stefano Mazzocchi wrote:
> >
> > > <xsl:template match="top">
> > >         <xsl:processing-instruction name="cocoon-process">
> > >                 type="xsp"
> >                        ^^^^^  <--------- Why this?
> 
> Don't know, since there is no clear documentation for what the
> processing instructions actually do, I just copied that line from the
> XSP samples (page-xsp.xsl). I really don't know what this instruction
> does other than somehow "tell cocoon there's something with XSP
> following".
> 
> > Try to remove the second "xsp" processing PI.
> 
> I removed it, but no result. Is this behavior not reproducible on your
> machine?

no :(

-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<st...@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------
 Missed us in Orlando? Make it up with ApacheCON Europe in London!
------------------------- http://ApacheCon.Com ---------------------



Re: XSP Bug Report

Posted by Ulrich Mayring <ul...@denic.de>.
Stefano Mazzocchi wrote:
> 
> > <xsl:template match="top">
> >         <xsl:processing-instruction name="cocoon-process">
> >                 type="xsp"
>                        ^^^^^  <--------- Why this?

Don't know, since there is no clear documentation for what the
processing instructions actually do, I just copied that line from the
XSP samples (page-xsp.xsl). I really don't know what this instruction
does other than somehow "tell cocoon there's something with XSP
following".

> Try to remove the second "xsp" processing PI.

I removed it, but no result. Is this behavior not reproducible on your
machine?

Ulrich

-- 
Ulrich Mayring
DENIC eG, Systementwicklung

Re: XSP Bug Report

Posted by Stefano Mazzocchi <st...@apache.org>.
Ulrich Mayring wrote:
> 
> Hi all,
> 
> apparently there is a bug in XSP, take a look at this reproducible
> example:
> 
> file test.xml:
> <?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
> 
> <?cocoon-process type="xslt"?>
> <?xml-stylesheet href="test.xsp" type="text/xsl"?>
> 
> <top>
> 
> <foo bar="baz"/>
> 
> </top>
> 
> file test.xsp:
> <?xml version="1.0"?>
> 
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> xmlns:xsp="http://www.apache.org/1999/XSP/Core" version="1.0">
> 
> <xsl:template match="top">
>         <xsl:processing-instruction name="cocoon-process">
>                 type="xsp"
                       ^^^^^  <--------- Why this?

>         </xsl:processing-instruction>
>         <xsl:processing-instruction name="cocoon-process">
>                 type="xslt"
>         </xsl:processing-instruction>
>         <xsl:processing-instruction name="xml-stylesheet">
>                 href="test.xsl" type="text/xsl"
>         </xsl:processing-instruction>
> 
>         <xsp:page language="java"
> xmlns:xsp="http://www.apache.org/1999/XSP/Core">
> 
>         <xsl:apply-templates/>
> 
>         </xsp:page>
> </xsl:template>
> 
> <xsl:template match="*">
>         <xsl:copy>
>                 <xsl:apply-templates/>
>         </xsl:copy>
> </xsl:template>
> 
> </xsl:stylesheet>
> 
> file test.xsl:
> <?xml version="1.0"?>
> 
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> version="1.0"
> xmlns="http://www.w3.org/TR/REC-html40">
> 
> <xsl:template match="foo">
>         <html><head></head><body>
>         Attribute bar of element foo contains:
>         <xsl:value-of select="@bar"/>
>         </body></html>
> </xsl:template>
> 
> </xsl:stylesheet>
> 
> As you will (hopefully) see, when you run this example, the value of the
> attribute bar of element foo (which would be "baz") is not printed.
> However, if you change the test.xml to point to test.xsl as its
> stylesheet (instead of test.xsp as in the example above), then
> everything works fine and "baz" is printed. This leads me to believe it
> is an XSP issue, because without XSP it works.

Try to remove the second "xsp" processing PI.

-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<st...@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------
 Missed us in Orlando? Make it up with ApacheCON Europe in London!
------------------------- http://ApacheCon.Com ---------------------



Re: XSP Bug Report

Posted by Stefano Mazzocchi <st...@apache.org>.
Donald Ball wrote:
> 
> On Thu, 20 Apr 2000, Ulrich Mayring wrote:
> 
> > Hi all,
> >
> > apparently there is a bug in XSP, take a look at this reproducible
> > example:
> >
> >
> > file test.xml:
> > <?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
> >
> > <?cocoon-process type="xslt"?>
> > <?xml-stylesheet href="test.xsp" type="text/xsl"?>
> 
> XSLT stylesheets cannot be XSP pages.

right, but his °text.xsp° is a just stylesheet with another extention
which includes XSP tags... not a taglib, but it's another possibility
for separation (which I even described in the XSP samples that come with
Cocoon)

-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<st...@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------
 Missed us in Orlando? Make it up with ApacheCON Europe in London!
------------------------- http://ApacheCon.Com ---------------------



Re: XSP Bug Report

Posted by Donald Ball <ba...@webslingerZ.com>.
On Thu, 20 Apr 2000, Ulrich Mayring wrote:

> Hi all,
> 
> apparently there is a bug in XSP, take a look at this reproducible
> example:
> 
> 
> file test.xml:
> <?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
>  
> <?cocoon-process type="xslt"?>
> <?xml-stylesheet href="test.xsp" type="text/xsl"?>

XSLT stylesheets cannot be XSP pages.

- donald