tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rickard Öberg <>
Subject Re: Jasper Bug 652 (do*Body not called): not a bug?
Date Fri, 19 Jan 2001 09:03:28 GMT

(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 (,
> <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
> (
> "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/>
> 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

The first represent the view you have provided, and the latter is mine.
View raw message