You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by te...@free.fr on 2004/01/02 23:39:11 UTC
[Jelly] How to know the Tag type inside tag class ?
Hello.
My stupid question of the new year :0)
I want to use one tag class processing for several xml tag.
For exemple the registring TagLibrary contains:
this.registerTag("declaration",DeclarationTag.class);
this.registerTag("referential-source",DomainTag.class);
this.registerTag("entity-source",ObjectTag.class);
this.registerTag("data-source",AttributeTag.class);
this.registerTag("referential-target",DomainTag.class);
this.registerTag("entity-target",ObjectTag.class);
this.registerTag("Data-target",AttributeTag.class);
And I can have this
<declaration>
<referential-source name="shared" version="1.2">
<entity-source name="person">
<data-source name="name"/>
<data-source name="forname"/>
</entity-source>
</referential-source>
<referential-target name="specific-my-application" version="1.3">
<entity-target name="inetorgperson">
<data-target name="givenname"/>
<data-target name="surname"/>
</entity-target>
</referential-target>
</declaration>
But how can I know which XML tag fire the DoTag of AttributeTag.class for
example, data-source or data-target ?
I had scanned the XMLoutput object, but it's not visible ?
Do I have to examin the registry of TagLibrary ?
Thanks
Marc DeXeT
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
Re: [Jelly] How to know the Tag type inside tag class ?
Posted by te...@free.fr.
Selon peter royal <pr...@apache.org>:
> On Jan 2, 2004, at 5:39 PM, texed75@free.fr wrote:
> > But how can I know which XML tag fire the DoTag of AttributeTag.class
> > for
> > example, data-source or data-target ?
>
> Have your tag implement LocationAware and then you will receive the
> element name via 'setElementName'
> -pete
Thank Peter.
I will try today or tomorrow.
Marc DeXeT
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
Re: [Jelly] How to know the Tag type inside tag class ?
Posted by peter royal <pr...@apache.org>.
On Jan 2, 2004, at 5:39 PM, texed75@free.fr wrote:
> But how can I know which XML tag fire the DoTag of AttributeTag.class
> for
> example, data-source or data-target ?
Have your tag implement LocationAware and then you will receive the
element name via 'setElementName'
-pete
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org