You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Samuel ARNOD-PRIN <sa...@smile.ch> on 2001/06/11 15:31:33 UTC

[C2] : not really OK !!

It is maybe not a bug... but xsp:attribute are difficult to handle using
C2...

for example :

<mytag>
<xsp:logic>String text="here is my value";</xsp:logic>
<xsp:attribute
name="myattribute"><xsp:expr>text</xsp:expr></xsp:attribute>
</mytage>

is ... WRONG !

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: [C2] : not really OK !!

Posted by Berin Loritsch <bl...@apache.org>.
Samuel ARNOD-PRIN wrote:
> 
> It is maybe not a bug... but xsp:attribute are difficult to handle using
> C2...
> 
> for example :
> 
> <mytag>
> <xsp:logic>String text="here is my value";</xsp:logic>
> <xsp:attribute
> name="myattribute"><xsp:expr>text</xsp:expr></xsp:attribute>
> </mytage>
> 
> is ... WRONG !

what were you trying to do?

What you specified should be rendered:

<mytag myattribute="here is my value"/>

However, how you wrote it will not work in C2: the logic
part needs to come before <mytag/>.  This is due to the SAX
model, and all attributes are built _before_ the startElement
is called.  This makes conditional attributes difficult to
do.

If you were trying to simply include the text "here is my value"
I have to ask why you didn't do that anyway.  If you are
trying to use a dynamically dirived value--there should be nothing
stopping you.

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>