You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-dev@jakarta.apache.org by Eduardo Pelegri-Llopart <Ed...@Sun.COM> on 2001/05/23 23:09:31 UTC

re: AT_BEGIN and AT_END

Shawn started all this with... :-)

> This may not really be the best place to raise this question, but it's
> related to tag development and may affect the way tags should be designed.
> 
> The JSP (1.2 PFD2) spec calls for AT_BEGIN and AT_END to provide for
> availability of scripting variables from the appropriate point "until the
> end of the page."
> 
> I don't see any way of accomplishing that without also making the
> variables accessible earlier on the page as well.  A scripting-variable
> declaration approximately adjacent to the calls to doStartTag() and
> doEndTag() -- which is where Jasper locates the declaration in the last
> version I checked -- might be contained within a Java '{ ... }' block as
> the result either of a scriptlet or of a block that the translator adds
> because of a stack of tags.  Thus, the declaration would have only the
> narrow lexical "block" scope necessitated by the Java language, and it
> would not be available outside the containing block.

and then, in a later message:

> For instance, is the following JSP fragment illegal? --
> 
>         <% if (a == b) { %>
>         <x:tag>
>         <% } >
> 
>         ...
> 
>         <% if (a == b) { %>
>         </x:tag>
>         <% } %>
> 


As you saw, we all agree that the spec is unclear about these areas. 
After going back and forth, some of it in messages copied to this list
and some not, I have suggested we take the whole discussion into the
JSR-053 EG to try to hash it out without having to be too careful about
what we say and what we don't say in public.

The current thinking is along the lines of:

* Addressing Shawn's second question.  We all seem to agree the fragment
is illegal, but the spec may need new clarification text to explain
exactly why.  One thought is to talk about the Java language blocks (the
"{}") in the scripting code in Chapter 6, and to require for actions to
not cross those blocks (in the same way that they cannot be across
different files in include directives).

* Clarifying the semantics of AT_END/AT_BEGIN.  The plan is to expand on
Section 6.4, mostly on 4, by explaining how does a custom action set
scripting variables et al, and, thus, what happens in tricky cases.  In
particular, this would be the place where the itneraction of
AT_END/AT_BEGIN with scripting code would be explained.

We still have not hashed out the details of either of these and the
second point may take us a bit longer than expected to finalize.  I
would like to do it sometime next week, but we will see.

As soon as we have a reasonably complete proposal I'll ask the EG for
permission to share it with both jakarta-taglibs and with JSR-052, and,
if nobody objects, we will do so.

Thanks much for your help in improving the spec.

	- eduard/o