cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylvain.wal...@anyware-tech.com>
Subject Re: [C2][Patch] XMLFragment (again)
Date Fri, 05 Jan 2001 13:23:53 GMT


Torsten Curdt a écrit :
> 
> > > Cool!! Just tried it out but didn't work as exspected...
> > > Shouldn't I be able to call the toSAX()/toDOM() now like this
> > >
> > >   <xsp:expr>object</xsp:expr>
> > >
> > > instead of
> > >
> > >   <xsp:logic>object.toSAX(contentHandler)</xsp:logic>
> > >
> > > ?
> > That's the way it works, but only in places of the XSP where produced
> > elements are allowed. In other places (such as inside <xsp:attribute>)
> > it's converted to text using String.valueOf().
> >
> > Have a look at the generated java code to see if it contains
> > "XSPObjectHelper.xspExpr(contentHandler, object)".
> 
> Aahh! The xsp:expr was inside a xsp:logic tag... now it works! :)
> Great job!
> --
> Torsten

Well, <xsp:logic> is a place where produced elements are allowed, as you
are allowed to place any other tag in it.

But in xsp.xsl, the content of <xsp:expr> is inserted 'as is' in the
source code if the parent element is an <xsp:xxx> tag other that
<xsp:content> and <xsp:element>. I cannot see the reason behind that.
Maybe Ricardo could explain.

If you, dear Cocooners, agree, I can submit a patch that removes this
restriction.

-- 
Sylvain Wallez
Anyware Technologies

Mime
View raw message