You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Eric SCHAEFFER <es...@posterconseil.com> on 2000/08/18 11:18:15 UTC

Re: need help with logic sheet - Cocoon BUG (?)

Haa, I've found why it doesn't work for me: the logicsheet are always
applied in the same order (I don't use PIs), whatever is the definition
order of the namespaces in the xsp:page element !

The XSPProcessor uses document.getAttributes() to know what are the
logicsheet to apply, and the Node.getAttributes() method doesn't have to
return them in a specific order.

Thus, if you use "namespaced" logicsheets (and no PIs), you can't specify
the order...

Eric.

----- Original Message -----
From: "Robin Green" <gr...@hotmail.com>
To: <co...@xml.apache.org>
Sent: Thursday, August 17, 2000 7:03 PM
Subject: Re: need help with logic sheet


> You need to declare all of these namespaces in your xsp:page in this order
>
> <xsp:page xmlns:mynamespace="http://mysite.com/mynamespace"
>   xmlns:sql="http://www.apache.org/..."
>   xmlns:xsp="..."/>
>
> Note: it doesn't actually matter where the xsp namespace is declared
because
> the xsp sheet, which actually generates Java source code, will always be
> applied last (it doesn't make sense any other way, because a Java source
> code file is not valid XML!). But the order of the other two DOES matter.
>
> "Wong Shin Neng" <ws...@sebasasia.com> wrote:
> >Nway, I'm trying to clearly separate my logic from my xml document by
using
> >something like this:
> >
> ><testing><mynamespace:order/></testing>
> >
> >and in my logicsheet, I define the template as such:
> ><xsl:template match="mynamespace:order">
> ><sql:execute-query>
> >  &dbdefns;
> ><sql:query>select * from mytable</sql:query>
> ></sql:execute-query>
>
>
> --
> 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
>


Re: need help with logic sheet - Cocoon BUG (?)

Posted by Ricardo Rocha <ri...@apache.org>.
Eric SCHAEFFER wrote:
> The problem is that if you want to specify the order, when using namespace
> declared logicsheets, you need to add something to give the order:
> attributes are unordered.
> Maybe it could be achieved specifying the order in the cocoon.properties
> file, or using another attribute for the order in the xsp:page element.

Another way to ensure proper order is using <?xml-logicsheet?> pi's
instead of <xsp:page> attributes. Top-level pi's are guaranteed to
be processed in document order:

<?cocoon-process type="xsp"?>
<?xml-logicsheet href="first-logicsheet.xsl"?>
<?xml-logicsheet href="second-logicsheet.xsl"?>
. . .

Re: need help with logic sheet - Cocoon BUG (?)

Posted by Eric SCHAEFFER <es...@posterconseil.com>.
Cocoon 1.7.4

The problem is that if you want to specify the order, when using namespace
declared logicsheets, you need to add something to give the order:
attributes are unordered.
Maybe it could be achieved specifying the order in the cocoon.properties
file, or using another attribute for the order in the xsp:page element.

Eric.

----- Original Message -----
From: "Jens Lorenz" <je...@interface-business.de>
To: <co...@xml.apache.org>
Sent: Friday, August 18, 2000 11:31 AM
Subject: Re: need help with logic sheet - Cocoon BUG (?)


>
> Hi,
>
> > Haa, I've found why it doesn't work for me: the logicsheet are always
> > applied in the same order (I don't use PIs), whatever is the definition
> > order of the namespaces in the xsp:page element !
> >
> > The XSPProcessor uses document.getAttributes() to know what are the
> > logicsheet to apply, and the Node.getAttributes() method doesn't have to
> > return them in a specific order.
> >
> > Thus, if you use "namespaced" logicsheets (and no PIs), you can't
specify
> > the order...
>
> Which Cocoon version do you use ? Maybe this has been already fixed in
> a newer (dev) version ?
>
>
> Regards,
>
> Jens
>
> --
>
> jens.lorenz@interface-business.de
>
> interface-business GmbH                             \\|//
> Tolkewitzer Strasse 49                              (o o)
> 01277 Dresden                               ~~~~oOOo~(_)~oOOo~~~~
> Germany
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
>


Re: need help with logic sheet - Cocoon BUG (?)

Posted by Jens Lorenz <je...@interface-business.de>.
Hi,

> Haa, I've found why it doesn't work for me: the logicsheet are always
> applied in the same order (I don't use PIs), whatever is the definition
> order of the namespaces in the xsp:page element !
> 
> The XSPProcessor uses document.getAttributes() to know what are the
> logicsheet to apply, and the Node.getAttributes() method doesn't have to
> return them in a specific order.
> 
> Thus, if you use "namespaced" logicsheets (and no PIs), you can't specify
> the order...

Which Cocoon version do you use ? Maybe this has been already fixed in 
a newer (dev) version ?


Regards,

Jens

-- 

jens.lorenz@interface-business.de

interface-business GmbH                             \\|//
Tolkewitzer Strasse 49                              (o o)
01277 Dresden                               ~~~~oOOo~(_)~oOOo~~~~
Germany