Thanks, David. At least it's good to know that there's not some blindingly obvious better solution that I missed. :-P
Appreciate the help! Sean On 5/3/07 1:28 PM, "David Smith" <[email protected]> wrote: > There are two solutions -- pick your poison: > > 1. You're using the xml syntax jsps. You could put in a empty comment > tag to prevent tomcat from collapsing the tag, ie: > > <div class="myClass"><!-- non-render spacer --></div> > > 2. Don't use the xml syntax in your jsps. Then the emtpy tags won't be > collapsed. > > In my design I chose #1 for those rare, rare occasions when I need it > (script tags come to mind). Of course you could ask your designer why > he put in the empty divs and see if you can work out a different way of > handling it. If it's just a formatting hack there may be a better way > via css. > > --David > > Sean McMains wrote: > >> Hi folks, >> >> Our designer put together a beautiful HTML version of our new site design. >> I'm now sucking it into Magnolia, and found an odd quirk that I'm not sure >> the best way to work around. >> >> The designer's HTML is this: >> >> <div class="txst-banner-extra1"></div> >> <div class="txst-banner-extra2"></div> >> >> I've inculded this as-is in my template file. However, since JSP treats >> those pretty much like XML, what Magnolia emits is this: >> >> <div class="txst-banner-extra1"/> >> <div class="txst-banner-extra2"/> >> >> It seems perfectly legitimate if you're thinking in XML, but apparently even >> when using XHTML Strict, Firefox doesn't seem to think the two are >> equivalent. Specifically, with the latter case, txst-banner-extra2 is >> treated as a *child* of txst-banner-extra1, even though extra1 has already >> been closed. >> >> As a workaround, I can change the template code to this: >> >> <div class="txst-banner-extra1"><jsp:text/></div> >> <div class="txst-banner-extra2"><jsp:text/></div> >> >> >> But that seems a terribly clumsy way to keep the divs from collapsing. Is >> there any better way to approach this? Some sort of JSP processing directive >> seems in order, but I haven't found anything appropriate. >> >> Thanks in advance for any help. >> >> Sean >> >> >> ---------------------------------------------------------------- >> for list details see >> http://documentation.magnolia.info/docs/en/editor/stayupdated.html >> ---------------------------------------------------------------- >> >> > > > ---------------------------------------------------------------- > for list details see > http://documentation.magnolia.info/docs/en/editor/stayupdated.html > ---------------------------------------------------------------- ---------------------------------------------------------------- for list details see http://documentation.magnolia.info/docs/en/editor/stayupdated.html ----------------------------------------------------------------
