You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Christian Sell <ch...@netcologne.de> on 2003/02/03 19:35:51 UTC

[Jelly] restrict use of tag libraries

Hello,

I would like to restrict the use of tag libraries to a certain context 
within my script. For example, I want to ensure that the following 
structure is maintained:

<element1 xmlns="com.yadda.Yadda"> <!-- no taglibs allowed here -->
	<element2 xmlns:j="jelly:core" xmlns:log="jelly:log">
		<j:something/>
		.....
	</mytags:element2>
</mytags:element1>

can this be done rightaway, without hacking the Jelly core classes?

thanks
Christian


Re: [Jelly] restrict use of tag libraries

Posted by Christian Sell <ch...@netcologne.de>.
James Strachan wrote:
> From: "Christian Sell" <ch...@netcologne.de>
> 
>>Hello,
>>
>>I would like to restrict the use of tag libraries to a certain context 
>>within my script. For example, I want to ensure that the following 
>>structure is maintained:
>>
>><element1 xmlns="com.yadda.Yadda"> <!-- no taglibs allowed here -->
>><element2 xmlns:j="jelly:core" xmlns:log="jelly:log">
>><j:something/>
>>.....
>></mytags:element2>
>></mytags:element1>
>>
>>can this be done rightaway, without hacking the Jelly core classes?
> 
> 
> You could use XML Schema to do this. How's that?

I dont really understand what you mean. I certainly would not want to 
run the script through an additional external parser/validator

> 
> James
> -------
> http://radio.weblogs.com/0112098/
> __________________________________________________
> Do You Yahoo!?
> Everything you'll ever need on one web page
> from News and Sport to Email and Music Charts
> http://uk.my.yahoo.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> 
> 



Re: [Jelly] restrict use of tag libraries

Posted by James Strachan <ja...@yahoo.co.uk>.
From: "Christian Sell" <ch...@netcologne.de>
> Hello,
> 
> I would like to restrict the use of tag libraries to a certain context 
> within my script. For example, I want to ensure that the following 
> structure is maintained:
> 
> <element1 xmlns="com.yadda.Yadda"> <!-- no taglibs allowed here -->
> <element2 xmlns:j="jelly:core" xmlns:log="jelly:log">
> <j:something/>
> .....
> </mytags:element2>
> </mytags:element1>
> 
> can this be done rightaway, without hacking the Jelly core classes?

You could use XML Schema to do this. How's that?

James
-------
http://radio.weblogs.com/0112098/
__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

Re: [Jelly] restrict use of tag libraries

Posted by Christian Sell <ch...@netcologne.de>.
James Strachan wrote:
> Agreed - though I can't help feeling we'd end up reinventing XML validation
> techniques where just reusing something like RelaxNG, XSD or Schematron
> might be easier.

but that was my point in another mail exchange - I doubt that Jelly will 
ever lend itself to "traditional" validation, because the structure is 
not statically defined. By declaring another namespace, and thus pulling 
in another tag library, I am dynamically extending my language with new 
elements.

How, for example, would I express the fact that it does not make sense 
to surround certain tags from my taglib with a <forEach/> element (e.g., 
because they are declarative in nature, and must appear only once, or 
dont allow parameterization)?

> 
> James
> -------
> http://radio.weblogs.com/0112098/
> ----- Original Message -----
> From: "Christian Sell" <ch...@netcologne.de>
> To: "Jakarta Commons Users List" <co...@jakarta.apache.org>
> Sent: Tuesday, February 04, 2003 2:02 PM
> Subject: Re: [Jelly] restrict use of tag libraries
> 
> 
> James Strachan wrote:
> 
>>There's a few ways this could go. We could add a mechanism so that Tag
>>libraries could restrict the use of other libraries within themselves.
> 
> e.g.
> 
>>a specific TagLibrary could dsiable or enable some/all libraries from
> 
> being
> 
>>usable within one/all of its tags.
>>
>>Another option could be for an individual tag to validate its body inside
>>the doTag() method. By calling getBody() and then traversing the tree of
>>TagScripts, a specific Tag could validate that the body does not contain
>>dynamic expressions or Tags of certain kinds etc.
>>
>>The latter would be pretty easy to implement in your specific example I
>>think. We could maybe provide some kind of helper class (TagWalker?) to
> 
> aid
> 
>>Tag implementors wishing to traverse over their bodies, validating child
>>tags.
> 
> 
> both seem useful. However, in my case, where I dont want any scripting
> at all, I could also call getParent() from within my element2, and
> assert that the class is that of element1, right?
> 
> In general, I have the feeling that it would be nice if we could
> delegate more error checking and validation into the runtime, based on
> declarations provided by the taglib - instead of having to perform it in
> every tag implementation (or not at all).
> 
> 
>>James
>>-------
>>http://radio.weblogs.com/0112098/
>>----- Original Message -----
>>From: "Christian Sell" <ch...@netcologne.de>
>>To: "Jakarta Commons Users List" <co...@jakarta.apache.org>
>>Sent: Monday, February 03, 2003 9:51 PM
>>Subject: Re: [Jelly] restrict use of tag libraries
>>
>>
>>Paul Libbrecht wrote:
>>
>>
>>>Christian,
>>>
>>>What do you mean by "no taglibs allowed here" ?
>>
>>
>>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.
>>
>><
>>
>>>Do you mean no taglib-declaration ?
>>>Do you mean only the following taglibs' tags ?
>>>
>>>In both cases, this has to do with parsing. So a schema, as 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
>>
>>
>>
>>>Remember: jelly scripts are first parsed then executed (possibly several
>>>times).
>>>Hope it helps.
>>>
>>>Paul
>>>
>>>
>>>Le Lundi, 3 févr 2003, à 19:35 Europe/Berlin, Christian Sell a écrit :
>>>
>>>
>>>
>>>><element1 xmlns="com.yadda.Yadda"> <!-- no taglibs allowed here -->
>>>>   <element2 xmlns:j="jelly:core" xmlns:log="jelly:log">
>>>>       <j:something/>
>>>>       .....
>>>>   </mytags:element2>
>>>></mytags:element1>
>>>
>>>
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
>>>For additional commands, e-mail: commons-user-help@jakarta.apache.org
>>>
>>>
>>
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: commons-user-help@jakarta.apache.org
>>
>>__________________________________________________
>>Do You Yahoo!?
>>Everything you'll ever need on one web page
>>from News and Sport to Email and Music Charts
>>http://uk.my.yahoo.com
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: commons-user-help@jakarta.apache.org
>>
>>
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> 
> __________________________________________________
> Do You Yahoo!?
> Everything you'll ever need on one web page
> from News and Sport to Email and Music Charts
> http://uk.my.yahoo.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> 
> 



Re: [Jelly] restrict use of tag libraries

Posted by Morgan Delagrange <md...@yahoo.com>.
--- James Strachan <ja...@yahoo.co.uk> wrote:
> Agreed - though I can't help feeling we'd end up
> reinventing XML validation
> techniques where just reusing something like
> RelaxNG, XSD or Schematron
> might be easier.
> 
> James

Hey Christian,

That's my sentiment as well.  When designing an API,
you try to address the common usage and allow hooks
for specific implementations.  The kind of validation
you're trying to implement is pretty specific.

I have another suggestion for how you might implement
your validation.  You could use custom tags inside
your namespace to switch namespace restrictions on and
off, then enforce them with a custom JellyContext.  I
haven't checked the precise syntax, but something like
this might work.  It's not exactly elegant, but it's
simple to implement:

  <element1 xmlns="com.yadda.Yadda"> <!-- no taglibs
allowed here -->
    <allowNS/>
    <element2 xmlns:j="jelly:core"
xmlns:log="jelly:log">
      <j:something/>
        .....
    </mytags:element2>
  </mytags:element1>


  private class YaddaContext extends JellyContext {

   /**
    * Only allow other namespaces when
    * specifically enabled.
    */
    public TagLibrary getTagLibrary(String
namespaceURI)  {
      if (namespaceURI.equals("com.yadda.Yadda") ==
false) {
        if (getVariable("allowNS") == false) {
          throw new NoClassDefFoundError("Unexpected
tag library uri: " + namespaceURI);
        }
      }
        
      return super.getTagLibrary(namespaceURI); 
    }
  }

=====
Morgan Delagrange
http://jakarta.apache.org/taglibs
http://jakarta.apache.org/commons
http://axion.tigris.org
http://jakarta.apache.org/watchdog

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

Re: [Jelly] restrict use of tag libraries

Posted by James Strachan <ja...@yahoo.co.uk>.
Agreed - though I can't help feeling we'd end up reinventing XML validation
techniques where just reusing something like RelaxNG, XSD or Schematron
might be easier.

James
-------
http://radio.weblogs.com/0112098/
----- Original Message -----
From: "Christian Sell" <ch...@netcologne.de>
To: "Jakarta Commons Users List" <co...@jakarta.apache.org>
Sent: Tuesday, February 04, 2003 2:02 PM
Subject: Re: [Jelly] restrict use of tag libraries


James Strachan wrote:
> There's a few ways this could go. We could add a mechanism so that Tag
> libraries could restrict the use of other libraries within themselves.
e.g.
> a specific TagLibrary could dsiable or enable some/all libraries from
being
> usable within one/all of its tags.
>
> Another option could be for an individual tag to validate its body inside
> the doTag() method. By calling getBody() and then traversing the tree of
> TagScripts, a specific Tag could validate that the body does not contain
> dynamic expressions or Tags of certain kinds etc.
>
> The latter would be pretty easy to implement in your specific example I
> think. We could maybe provide some kind of helper class (TagWalker?) to
aid
> Tag implementors wishing to traverse over their bodies, validating child
> tags.

both seem useful. However, in my case, where I dont want any scripting
at all, I could also call getParent() from within my element2, and
assert that the class is that of element1, right?

In general, I have the feeling that it would be nice if we could
delegate more error checking and validation into the runtime, based on
declarations provided by the taglib - instead of having to perform it in
every tag implementation (or not at all).

>
> James
> -------
> http://radio.weblogs.com/0112098/
> ----- Original Message -----
> From: "Christian Sell" <ch...@netcologne.de>
> To: "Jakarta Commons Users List" <co...@jakarta.apache.org>
> Sent: Monday, February 03, 2003 9:51 PM
> Subject: Re: [Jelly] restrict use of tag libraries
>
>
> Paul Libbrecht wrote:
>
>>Christian,
>>
>>What do you mean by "no taglibs allowed here" ?
>
>
> 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.
>
> <
>
>>Do you mean no taglib-declaration ?
>>Do you mean only the following taglibs' tags ?
>>
>>In both cases, this has to do with parsing. So a schema, as 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
>
>
>>Remember: jelly scripts are first parsed then executed (possibly several
>>times).
>>Hope it helps.
>>
>>Paul
>>
>>
>>Le Lundi, 3 févr 2003, à 19:35 Europe/Berlin, Christian Sell a écrit :
>>
>>
>>><element1 xmlns="com.yadda.Yadda"> <!-- no taglibs allowed here -->
>>>    <element2 xmlns:j="jelly:core" xmlns:log="jelly:log">
>>>        <j:something/>
>>>        .....
>>>    </mytags:element2>
>>></mytags:element1>
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: commons-user-help@jakarta.apache.org
>>
>>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
> __________________________________________________
> Do You Yahoo!?
> Everything you'll ever need on one web page
> from News and Sport to Email and Music Charts
> http://uk.my.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

Re: [Jelly] restrict use of tag libraries

Posted by Christian Sell <ch...@netcologne.de>.
James Strachan wrote:
> There's a few ways this could go. We could add a mechanism so that Tag
> libraries could restrict the use of other libraries within themselves. e.g.
> a specific TagLibrary could dsiable or enable some/all libraries from being
> usable within one/all of its tags.
> 
> Another option could be for an individual tag to validate its body inside
> the doTag() method. By calling getBody() and then traversing the tree of
> TagScripts, a specific Tag could validate that the body does not contain
> dynamic expressions or Tags of certain kinds etc.
> 
> The latter would be pretty easy to implement in your specific example I
> think. We could maybe provide some kind of helper class (TagWalker?) to aid
> Tag implementors wishing to traverse over their bodies, validating child
> tags.

both seem useful. However, in my case, where I dont want any scripting 
at all, I could also call getParent() from within my element2, and 
assert that the class is that of element1, right?

In general, I have the feeling that it would be nice if we could 
delegate more error checking and validation into the runtime, based on 
declarations provided by the taglib - instead of having to perform it in 
every tag implementation (or not at all).

> 
> James
> -------
> http://radio.weblogs.com/0112098/
> ----- Original Message -----
> From: "Christian Sell" <ch...@netcologne.de>
> To: "Jakarta Commons Users List" <co...@jakarta.apache.org>
> Sent: Monday, February 03, 2003 9:51 PM
> Subject: Re: [Jelly] restrict use of tag libraries
> 
> 
> Paul Libbrecht wrote:
> 
>>Christian,
>>
>>What do you mean by "no taglibs allowed here" ?
> 
> 
> 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.
> 
> <
> 
>>Do you mean no taglib-declaration ?
>>Do you mean only the following taglibs' tags ?
>>
>>In both cases, this has to do with parsing. So a schema, as 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
> 
> 
>>Remember: jelly scripts are first parsed then executed (possibly several
>>times).
>>Hope it helps.
>>
>>Paul
>>
>>
>>Le Lundi, 3 févr 2003, à 19:35 Europe/Berlin, Christian Sell a écrit :
>>
>>
>>><element1 xmlns="com.yadda.Yadda"> <!-- no taglibs allowed here -->
>>>    <element2 xmlns:j="jelly:core" xmlns:log="jelly:log">
>>>        <j:something/>
>>>        .....
>>>    </mytags:element2>
>>></mytags:element1>
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: commons-user-help@jakarta.apache.org
>>
>>
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> 
> __________________________________________________
> Do You Yahoo!?
> Everything you'll ever need on one web page
> from News and Sport to Email and Music Charts
> http://uk.my.yahoo.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> 
> 



Re: [Jelly] restrict use of tag libraries

Posted by James Strachan <ja...@yahoo.co.uk>.
There's a few ways this could go. We could add a mechanism so that Tag
libraries could restrict the use of other libraries within themselves. e.g.
a specific TagLibrary could dsiable or enable some/all libraries from being
usable within one/all of its tags.

Another option could be for an individual tag to validate its body inside
the doTag() method. By calling getBody() and then traversing the tree of
TagScripts, a specific Tag could validate that the body does not contain
dynamic expressions or Tags of certain kinds etc.

The latter would be pretty easy to implement in your specific example I
think. We could maybe provide some kind of helper class (TagWalker?) to aid
Tag implementors wishing to traverse over their bodies, validating child
tags.

James
-------
http://radio.weblogs.com/0112098/
----- Original Message -----
From: "Christian Sell" <ch...@netcologne.de>
To: "Jakarta Commons Users List" <co...@jakarta.apache.org>
Sent: Monday, February 03, 2003 9:51 PM
Subject: Re: [Jelly] restrict use of tag libraries


Paul Libbrecht wrote:
> Christian,
>
> What do you mean by "no taglibs allowed here" ?

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.

<
> Do you mean no taglib-declaration ?
> Do you mean only the following taglibs' tags ?
>
> In both cases, this has to do with parsing. So a schema, as 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

>
> Remember: jelly scripts are first parsed then executed (possibly several
> times).
> Hope it helps.
>
> Paul
>
>
> Le Lundi, 3 févr 2003, à 19:35 Europe/Berlin, Christian Sell a écrit :
>
>> <element1 xmlns="com.yadda.Yadda"> <!-- no taglibs allowed here -->
>>     <element2 xmlns:j="jelly:core" xmlns:log="jelly:log">
>>         <j:something/>
>>         .....
>>     </mytags:element2>
>> </mytags:element1>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

Re: [Jelly] restrict use of tag libraries

Posted by Christian Sell <ch...@netcologne.de>.
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: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> 
> 



Re: [Jelly] restrict use of tag libraries

Posted by Paul Libbrecht <pa...@activemath.org>.
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.


Paul

Re: [Jelly] restrict use of tag libraries

Posted by Christian Sell <ch...@netcologne.de>.
Paul Libbrecht wrote:
> Christian,
> 
> What do you mean by "no taglibs allowed here" ?

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.

<
> Do you mean no taglib-declaration ?
> Do you mean only the following taglibs' tags ?
> 
> In both cases, this has to do with parsing. So a schema, as 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

> 
> Remember: jelly scripts are first parsed then executed (possibly several 
> times).
> Hope it helps.
> 
> Paul
> 
> 
> Le Lundi, 3 févr 2003, à 19:35 Europe/Berlin, Christian Sell a écrit :
> 
>> <element1 xmlns="com.yadda.Yadda"> <!-- no taglibs allowed here -->
>>     <element2 xmlns:j="jelly:core" xmlns:log="jelly:log">
>>         <j:something/>
>>         .....
>>     </mytags:element2>
>> </mytags:element1>
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> 
> 



Re: [Jelly] restrict use of tag libraries

Posted by Paul Libbrecht <pa...@activemath.org>.
Christian,

What do you mean by "no taglibs allowed here" ?
Do you mean no taglib-declaration ?
Do you mean only the following taglibs' tags ?

In both cases, this has to do with parsing. So a schema, as James 
mentionned, or some other (e.g. forcing a SAX filter between the parser 
and the jelly document-handler).

Remember: jelly scripts are first parsed then executed (possibly 
several times).
Hope it helps.

Paul


Le Lundi, 3 févr 2003, à 19:35 Europe/Berlin, Christian Sell a écrit :

> <element1 xmlns="com.yadda.Yadda"> <!-- no taglibs allowed here -->
> 	<element2 xmlns:j="jelly:core" xmlns:log="jelly:log">
> 		<j:something/>
> 		.....
> 	</mytags:element2>
> </mytags:element1>