GeeCON Prague 2014*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Custom Tag tld declaration Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Custom Tag tld declaration" Watch "Custom Tag tld declaration" New topic
Author

Custom Tag tld declaration

Sundar Murthi
Ranch Hand

Joined: Mar 05, 2004
Posts: 209
Hi ranchers,

How can i declare the custom tag tld declaration for attribute.
Condition like follow

consider a tag test its has 2 attributes key and dependent.
if key is precent dependent should not precent, same like if dependent attribute is precent key shound not precent. and either one must be precent.

example

<pref:test key="mykey"> -->correct
<pref:test dependent ="mydependent"> -->correct


<pref:test key="mykey" dependent ="mydependent"> --> in correct
<pref:test> -->incorrect

How can i define a tld for this.

Thanks in advance
Sundar
MI Mohammed
Ranch Hand

Joined: Feb 16, 2005
Posts: 146
Sundar,
I can't really get your question right, but i tried to quess.
To declare more than one attribute for for a tag in TLD.

the whole stuff about the name, uri and so follows. But the you need to take care are;

<attribute>
<name>
<require>
<rtexprvalue>
</attribute>

You should have this for each attribute.
I hope it helps.

SCJA SCJP 1.4 SCWCD Pro.....


SCJA(Beta) SCJP 1.4 SCWCD 1.4 SCBCD 1.3 SCBCD 5.0 beta <br />The more practice we get, the better we are at the exams and in life in general. Pls join me at My DEN.
 
GeeCON Prague 2014
 
subject: Custom Tag tld declaration