aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes SimpleTag vs BodyTag 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 "SimpleTag vs BodyTag" Watch "SimpleTag vs BodyTag" New topic
Author

SimpleTag vs BodyTag

Shiang Wang
Ranch Hand

Joined: Jun 20, 2003
Posts: 96
Another question in jdiscuss.com. I think the answer should be one : B.
The correct answers on the website are B and D. I don't think D is right, since you can also implement SimpleTag or IteratorTag. Can someone confirm my thought?


Consider the following description of a tag in a TLD:

<tag>
<name>SmilyTag</name>
<tag-class>com.enthuware.ctags.SmilyTag</tag-class>
<description>
Replaces emoticons such as , , and with images.
</description>
<body-content>tagdependent</body-content>
<attribute>
<name>name</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>

Which of the following statements regarding the above tag are correct?


Options

Select 2 correct options.

A. It is an empty tag.

B. It may be used as an empty tag.

C. It must have a body.

D. It must implement BodyTag interface.

E. It may take an attribute named 'name'. But if present, its value must be dynamic.



Thanks


SCBCD, SCWCD, SCJP
jack wu
Greenhorn

Joined: Sep 08, 2004
Posts: 10
If your custom tag must modify body content, extend the BodyTagSupport class. It implements BodyTag
Shiang Wang
Ranch Hand

Joined: Jun 20, 2003
Posts: 96
You can also implement SimpleTag or extend SimpleTagSupport to accomplish that, right ? It is the 'must' word in D that I am worrying about.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: SimpleTag vs BodyTag