Hi Rickard, Jeff: Apologies for the delay in replying; a number of other distractions. I will need to clarify with the 053 expert group and we will get back to you after that. JSP 1.2 PFD shoiuld have clarified the situation but unfortunately has not; we will fix this in the next draft. I am currently on a trip, but I am composing a message to the expert group and will send it to the expert group shortly after I send this one to you. Hopefully we will get this settled within this next week (that of Feb 12th). Thanks for being persistent! - eduard/o Eduardo Pelegri-Llopart wrote: > > Rickard Öberg wrote: > > > > Hi! > > > > (CC'ed to jsp-spec-comments again) > > > > Jeff Turner wrote: > > > > My interpretation of this is: > > > > * Tag "foo" may have body > > > > * <x:foo>Blah</x:foo> -> body methods called > > > > * <x:foo/> -> no body methods called > > > > > > This looks like the crux of the issue. Do you agree that according to the XML > > > spec (http://www.w3.org/TR/2000/REC-xml-20001006#sec-starttags), > > > <x:foo></x:foo> and <x:foo/> are exactly equivalent? > > > > Yes, agree. > > > > > Here is the spec's definition of an empty element: > > > > > > [Definition:] If an element is empty, it must be represented either by a > > > start-tag immediately followed by an end-tag or by an empty-element tag. > > > > Actually no (the text you quoted is not in the above spec text). The > > relevant quote from the spec you refer to above is: > > "[Definition: An element with no content is said to be empty.] The > > representation of an empty element is either a start-tag immediately > > followed by an end-tag, or an empty-element tag. [Definition: An > > empty-element tag takes a special form:]" > > > > So, <x:foo></x:foo> and <x:foo/> are both empty elements. > > > > > Further, here's Tim Bray's comment from the annotated XML spec > > > (http://www.xml.com/axml/target.html#sec-starttags): > > > > > > "So, is this: <img src='madonna.gif'></img> really exactly the same as <img > > > src='madonna.gif'/>? As far as XML is concerned, they are." > > > > > > So, if they mean exactly the same thing, why should the JSP engine > > > discriminate in which methods it calls? Below, you agree that with > > > <x:foo></x:foo>, the doBody() methods should be called. Since <x:foo/> means > > > exactly the same thing, for consistency the JSP engine should also call the > > > doBody() methods. > > > > Well, not really. Either <x:foo></x:foo> is the same thing as <x:foo/>, > > or <x:foo> is the same thing as <x:foo></x:foo>. Do you see the > > difference? > > > > The first represent the view you have provided, and the latter is mine. > > >From the XML spec point of view the latter is correct (see above spec > > quote for reference, and consider the consequences of it). > > > > > > > Note, "can have", not "if it does have". So an element without a body, > > > > > but that *could* have a body according to the TLD, still has do*Body > > > > > methods called. > > > > > > > > ... if it has a body *in the usage of it*, sure. Of course. But if it's > > > > not *used* with a body, then the body methods should not be called. > > > > > > Nowhere does it say "in the usage of it". It says "if an action element can > > > have a non-empty body". Now, the TLD declares that x:foo *can have* a > > > non-empty body if it wants to. In the usages <x:foo></x:foo> and <x:foo/>, it > > > just happens not to. > > > > Haha, you are twisting words I think :-) > > > > Let's try this, and see where we disagree: > > * x:foo is a tag that has TLD "bodycontent" set to "JSP" > > * According to XML 1.0 2nd ed, "Contents of Elements", <x:foo></x:foo> > > and <x:foo/> are both empty elements. > > * Thus, using "<x:foo></x:foo>" in a JSP page is the same as "<x:foo/>" > > * "<x:foo/>" means to "use x:foo tag without body content" > > * To "use x:foo without body content" is equal to "use x:foo as an > > empty tag", since <x:foo></x:foo> and <x:foo/> are both empty elements > > * According to JSP 1.1 p. 104: "setBodyContent..will not be invoked if > > there is no body evaluation" > > * According to JSP 1.1 p. 104: "doInitBody..[is] not invoked in empty > > tags.." > > * According to JSP 1.1 p. 104: "doAfterBody..[is] not invoked in empty > > tags.." > > * Thus, <x:foo/>(usage=="<x:foo></x:foo>"||"<x:foo/>") receives calls > > differently depending on if it is used as an empty tag or a tag with a > > body. > > > > Do you disagree with the above? > > If so, where do you think I'm wrong? > > > > > > > Eg, in JRun the following action breaks: > > > > > > > > > > <util:include url="foo.html"/> > > > > > > > > Why? How is this tag dependent on a body to be supplied? > > > > > > Um :) It does seem a bit pointless in the util taglib's case. I'll cc the > > > > Why? How is this tag dependent on a body to be supplied? > > > > > > Um :) It does seem a bit pointless in the util taglib's case. > > > > ;-) > > > > Thanks for the discussion. I hope you agree that the outcome is quite > > important. > > > > regards, > > Rickard > > > > -- > > Rickard Öberg > > > > Email: [EMAIL PROTECTED]