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

HFS page 501 Sharpen your Pencil 3

 
pallavi utukuri
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HFS page 501 Sharpen your Pencil 3

Fill in what would you must put into a Tag file to declare that the Tag must NOT have a body.

Given Answer:
<%@ tag body-content="tagdependent" %>

I thought the answer is
<%@ tag body-content=�empty� %>

Reasons:

body-content has three favours:
i.scriptless: which means body can�t have scriptlets, expressions and declarations. Where as it can have EL, tags or the body can be left empty.
ii.tagdependent: which means EL, tags and scripts will not be evaluated i.e. the body is treated as plain text, the body can be left empty also.
iii.empty: nothing in the Tag body[B]

the given answer is <%@ tag body-content="tagdependent" %>
which means either the body can be left [B]empty or
body can have plain text.
So in the given scenario , the correct way to declare that the Tag must NOT have a body is <%@ tag body-content="empty" %>

Am I thinking right or did I miss some thing here???
sure i think i did miss something or it would be caught by ranchers way ago!
 
Kathy Sierra
Cowgirl and Author
Rancher
Posts: 1589
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Um, yeah, that looks like you found one Pallavi!! You are absolutely right. I have no idea what we were doing there. I'm pretty sure I'm the one who made that exercise too, so I obviously was thinking one thing and typing another. You're the first to find that, I think!!

So, congratulations

You're definitely correct.

thanks,
Kathy
 
pallavi utukuri
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Kathy U R THE BEST!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic