commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Sell <>
Subject Re: [Jelly] restrict use of tag libraries
Date Mon, 03 Feb 2003 23:48:26 GMT
Paul Libbrecht wrote:
> Le Lundi, 3 févr 2003, à 22:51 Europe/Berlin, Christian Sell a écrit :
>> I mean that writing <element1 xmlns="com.yadda.Yadda">
>> *will* go through, but writing
>> <element1 xmlns="com.yadda.Yadda" xmlns:y="core">
>> will *not* go through. In fact, what I really want is to make sure 
>> that there is no scripting from other taglibs between my element1 and 
>> element2 - the namespaces are not really the problem.
> Huh ? I am not even sure there is a single way, within the XML 
> specification world to prevent this. Maybe SAX LexicalHandler can 
> provide you such information but I do not think Jelly does or makes use 
> of it (James?). Your second case is doing nothing but declaring a 
> namespace-prefix, I do not think there is a difference to element1 
> according to the XML specifications.
> If you use the prefix y in an element then the tag-library will use it.
>>> James mentionned, or some other (e.g. forcing a SAX filter between 
>>> the parser and the jelly document-handler).
>> I still dont see what role a "schema" would play here
> A Schema is like a DTD. Several parsers are validating in the sense that 
> they can have a switch activated that will stop parsing and complain 
> errors (at least they will call an "error handler") if the 
> tree-structure of elements does not match the Schema or DTD. You would 
> have to generate such a schema which is not that easy.

I know what schemas are - just dont see of what use they would be here. 
Since inside the inner element all the arbitrarily nested Jelly stuff is 
allowed, there is no way to validate that. I think schemas are useless 
in the context of Jelly, because there is no fixed nesting structure. 
Most tags call findAncestorWithClass(x), which means "somwhere above me 
in the nesting hierarchy must be a tag of class X". That cannot be 
expressed in XSD, nor DTD.

> Paul
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

View raw message