Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

A question about tag

 
avseq anthoy
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
onsider 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?



(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.

I think answer is B,but answer is B and D.Can somebody explain it ?
 
David Bridgewater
author
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

No, I don't see why answer D is correct. It might make sense for SmilyTag to implement the BodyTag interface, but it doesn't have to - it can legally implement (just) the Tag interface.

Furthermore, there's nothing in the question to indicate that SmilyTag couldn't be a simple tag - in which case it could not implement the BodyTag interface, and tagdependent would be the natural choice for <body-content>.

Don't take my word for it though... I may be missing something vital. Anybody else out there agree / disagree?

Best,

D.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic