I agree with Martin that you can't ignore people using jsp:include. I prefer his option B because then it allows someone to use the xhtml support in the other tags without forcing them to use <html:html>. They would have to set the attribute themselves and assume the risks that go along with making assumptions about how the tag is working.
> -----Original Message----- > From: David Graham [mailto:dgraham1980@;hotmail.com] > Sent: Wednesday, November 13, 2002 9:51 AM > 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 :-). > > Thanks, > Dave > > > > > > > >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>