|
Re: SPAN CLASS ID, ID stripped: msg#00022java.enhydra.xmlc
On Tuesday 17 December 2002 14:00, Petr Stehlik wrote: > Hi, > > I got a piece of HTML looking as follows: > > <span class="areaheader" id="middle">WELCOME!</span> > > Both the class and the id are important for CSS formatting. However, > XMLC generated HTML does not contain the "id=middle" so the formatting > is incorrect. > > Any idea why XMLC strips out the "id" from "<span>"? Any way how to > preserve the "id" there? Or a workaround for this problem? Some (all? didn't test it recently) variants of MS Internet Explorer balk at ID attributes in <span> tags - that's why XMLC drops the ID from <span> tags by default. This behaviour is controlled by the OutputOptions.setDropHtmlSpanIds() setter method - set it to false, and HTML span IDs will be preserved. Example: HTTPServletRequest req = ...; HTTPServletResponse res = ...; XMLCObject page = ...; XMLCCoontext ctx = ...; OutputOptions oo = new OutputOptions(); oo.setDropHtmlSpanIds(false); ctx.writeDOM(req, res, oo, doc); Hope this helps, Richard -- Richard Kunze [ t]ivano Software, Bahnhofstr. 18, 63263 Neu-Isenburg Tel.: +49 6102 80 99 07 - 0, Fax.: +49 6102 80 99 07 - 1 http://www.tivano.de, kunze@xxxxxxxxx
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | SPAN CLASS ID, ID stripped, Petr Stehlik |
|---|---|
| Next by Date: | Re: SPAN CLASS ID, ID stripped, Jacob Kjome |
| Previous by Thread: | SPAN CLASS ID, ID stripped, Petr Stehlik |
| Next by Thread: | Re: SPAN CLASS ID, ID stripped, Petr Stehlik |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |