cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <>
Subject JXTG limitations
Date Mon, 26 Sep 2005 16:31:33 GMT
Hi all,

While working on some new CForms stuff (Ajax suggest lists and 
fi:styling as attributes), I felt more and more limited by the reduced 
enviromnent that JXTG offers to macros.

Put it clearly, here's what I need to be accessible in macros:
- the service manager: I need to get a continuations knowing its ID
- knowing and changing the XMLConsumer to which the template is sending 
SAX events. I need this to cleanly implement fi:styling as attributes 
and ensure no fi:styling element exists if attributes are used.

Since this opens the door to many things, and therefore potential abuse, 
this should not be generally accessible to template expressions, but 
only accessible from within macros through additional properties of the 
"macro" object.

Also, attributes that exist on macro elements are passed as 
"macro.arguments" which is a Map associating the _local_ name of 
attributes to their value. This means that a macro cannot distinguish 
between @type and @fi:type. I therefore would like to add a 
"macro.attributes" that will be a SAX Attributes object.

Finally, I'm a bit fed up with maintaining the historical JXTG in the 
2.1 branch. I think it's time to make the template block available in 
2.1 as well. We may want to keep the old generator in 
o.a.c.generation.JXTemplateGenerator and use the new version only 
through o.a.c.template.JXTemplateGenerator. Macros that make use of the 
new features will have a means to know which one they're using to be 
able to throw meaningful exceptions if needed.



Sylvain Wallez                        Anyware Technologies
Apache Software Foundation Member     Research & Technology Director

View raw message