On Wed, 13 Nov 2002, David Graham wrote:
> Date: Wed, 13 Nov 2002 07:50:35 -0700 > From: David Graham <[EMAIL PROTECTED]> > Reply-To: Struts Developers List <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] > Subject: Re: [VOTE] How to implement XHMTL support > > I'm still unclear on the direction we should take here. I'd like to hear > from other committers :-). > I haven't voted on this yet -- but it's primarily because I don't really believe in the <jsp:include> use case being handled like this. The presumption of storing the "outer" xhtml setting (independent of *how* you do so) is to let the included page automatically adapt to the outer page's choice - presumably, that lets you use the same included page in an XHTML and non-XHTML environment with no changes. But, in reality, that's only true if 100% of the content of the included page is struts-html tags -- if the developer has any static HTML elements, for example, they *must* have selected one style or the other, and that style won't get affected. You're going to end up with a mishmash. Maybe what we really need is a way for the included page to tell its own Struts tags whether or not to be XHTML formatted or not. Perhaps a specialized version of <html:html xhtml="..."> that was searched for the same way that the standard version is, but does *not* actually emit an <html> element? > Thanks, > Dave Craig > > > > > > > >From: Martin Cooper <[EMAIL PROTECTED]> > >Reply-To: "Struts Developers List" <[EMAIL PROTECTED]> > >To: Struts Developers List <[EMAIL PROTECTED]> > >Subject: Re: [VOTE] How to implement XHMTL support > >Date: Tue, 12 Nov 2002 16:57:07 -0800 (PST) > > > >We need to ensure that HTML taglib tags in included JSP pages also heed > >the xhtml attribute. That isn't the case with what's there now, because > >findAncestorWithClass() will fail for the tags in the included pages. > > > >Note that this is why the form tag stores itself in a request attribute. > >Originally, it also used findAncestorWithClass(), but it was changed to > >allow forms to span pages. > > > >So I see two ways of handling this: > > > >A) Have the <html:html> tag store itself in a request attribute, and > >change BaseHandlerTag.isXhtml() to grab the tag from there before calling > >getXhtml(). > > > >B) Have the <html:html> tag store the value of its 'xhtml' attribute as a > >request attribute, and use that in BaseHandlerTag.isXhtml(). > > > >Of these, I prefer the first approach because it makes it harder for > >people to futz (technical term :) with the value in their pages. > > > >-- > >Martin Cooper > > > > > >On Tue, 12 Nov 2002, David Graham wrote: > > > > > I've updated that html taglib tags to output xhtml when they are nested > >in a > > > <html:html xhtml="true"> tag. This was very simple to do and resulted > >in > > > minor code changes. Users have suggested this approach: > > > > > > 1. Add Globals.XHTML_KEY which is a boolean request scoped attribute > > > 2. html tags check for that request attribute being true and output > > > accordingly. > > > 3. The html:html tag sets this request attribute when it's xhtml > >attribute > > > is true. > > > > > > The second approach allows the tags to output xhtml without relying on > >the > > > <html:html> tag. This allows people to construct pages with jsp > >includes. > > > The first approach is logically clearer (to me) and you can use tiles to > > > modularly construct the pages like includes. Approach 2 may be > >confusing > > > because you would have to remember all the places you may have set that > > > request attribute. > > > > > > So, do we go with 1, 2 or both? > > > > > > David > > > > > > > > > > > > > > > > > > _________________________________________________________________ > > > STOP MORE SPAM with the new MSN 8 and get 2 months FREE* > > > http://join.msn.com/?page=features/junkmail > > > > > > > > > -- > > > To unsubscribe, e-mail: > ><mailto:struts-dev-unsubscribe@;jakarta.apache.org> > > > For additional commands, e-mail: > ><mailto:struts-dev-help@;jakarta.apache.org> > > > > > > > > > > > >-- > >To unsubscribe, e-mail: > ><mailto:struts-dev-unsubscribe@;jakarta.apache.org> > >For additional commands, e-mail: > ><mailto:struts-dev-help@;jakarta.apache.org> > > > _________________________________________________________________ > MSN 8 with e-mail virus protection service: 2 months FREE* > http://join.msn.com/?page=features/virus > > > -- > To unsubscribe, e-mail: <mailto:struts-dev-unsubscribe@;jakarta.apache.org> > For additional commands, e-mail: <mailto:struts-dev-help@;jakarta.apache.org> > > -- To unsubscribe, e-mail: <mailto:struts-dev-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:struts-dev-help@;jakarta.apache.org>