Leszek Gawron wrote:
Vadim Gritsenko wrote:

jx:language="jxpath" on the root element can specify the default for a page. IIRC, default on generator level was deemed not granular enough.

and if there is:

<root param="{variable}" jx:language="jxpath">
</root>
would you first check if there is a jx:language attribute

Start element always comes with all attributes in an array, I do not see any issues quering for jx:language as a first step.


Additionally, it is consistent with approach in many other server page technologies, including ASP, JSP, XSP.


I'd prefer <jx:processing-instruction name="language" value="jxpath"/>

You can't have two root elements. Probably you meant:

  <?jx-language jxpath?>

That's the syntax for processing instructions. I'd be -0.5 on PIs on the grounds that nowhere else in Cocoon we make use of them, and there is no good reason for introducing PIs here.


Moreover:
if we use jx:import src="othertemplate.jx" that other template might have a different default language.

This is the case regardless of what syntax you choose. Included XML files can have PIs, and must have a root element.



We should also IMO remove the Java package mechanism from the environment in CTemplate, i.e. the possibillity to do:

${java.util.HashMap()}

Does it mean you'd remove support for Packages.java.util.HashMap as well?

Yes he does. This is the same mechanism used.

I'm with Ralph: we should leave a way to make calls to Java. This way does not have to be easy (I'm +1 on removing support for java, org, etc packages - so there is no syntactic sugar), but it should be possible (please leave support for Packages. in).



PS Caching directives probably should be allowed on the root element only - so no need for scanning in the whole document.


Vadim

Reply via email to