|
Re: [xmlc] <br clear="none"></br>: msg#00018java.enhydra.xmlc
At 03:48 AM 4/18/2007, you wrote: >Jacob Kjome wrote: >> Comparisons of lower-case tags to the upper-case special handling >> categories never match, which is why <br> is not recognized as a tag >> with an empty content model. "br" is being matched against "BR" (in a >> Map or a Set, so no opportunity for equalsIgnoreCase() unless code is >> modified), which clearly doesn't match. > >> I'm not 100% sure this is worth it? If one has chosen to use the XHTML >> DOM and taken care to write valid XHTML documents, why would they want >> to output it as HTML? One answer might be "so that developers can write >> markup that validates in their editors, but be able to output basic HTML >> to less capable user-agents that only understand HTML and foul up on >> XHTML". This is certainly a legitimate use-case. I'm still not sure >> whether it's worth the effort, especially when I put so much effort into >> allowing HTML to be formatted as XHTML in the XMLFormatter. >> >> Comments? > >I can imagine that someone created all the pages of their project in >nice clean XHTML and then realized that the user-agent used by majority >of their users still unfortunately doesn't handle xhtml correctly. It >actually happened to me some years ago. Internet Exploder is now better >by two-three major versions but the xhtml is still a bit questionable. >How about W3C starting work on HTML5? > >The power of xmlc allows us to output in HTML by turning one simple >switch so if only the IgnoreCase is missing for correct <br> and <hr> >then I'd be for adding it there. > >Obviously my comment is worthless if I don't attach a patch implementing >it so feel free to ignore it/me :-) > I decided not to ignore you :-) I've checked in the code. If you (or anyone else) cares to check it out and test, that would be great. I haven't tested it extensively, but in my limited testing it seems to work. Honestly, I'm much less worried about bugs in XHTML to HTML than I am with XML, XHTML, HTML, or HTML to XHTML output. Note that I force the tags upper-case for XHTML to HTML. I thought about allowing for changing to lower-case but it not only seems a bit unnecessary, it's actually much harder to implement since there are tag name comparisons for HTML, specifically, that expect upper-case tag names. Plus I didn't want to add a new option to OutputOptions. BTW, can anyone think of any other XML/XHTML attributes that should be stripped when outputting as HTML other than "xmlns", "xml:lang", and "xml:space"? I've taken care of those as well as replaced the XHTML DTDs with the HTML equivalents (with the option to override via OutputOptions, of course). Anything else I'm forgetting? BTW, while I'm talking about new stuff in XMLC-2.3, does anyone strongly object to using Xerces2 in the normal org.apache namespace rather than wrapped in the org.enhydra.apache namespace? Same goes for NekoHTML. This will make XMLC much smaller and allow use of the global instance of Xerces which is almost always part of any application server these days. The only issue is that any version earlier than 2.8.0 is totally incompatible with XMLC. However, since 2.8.1 and 2.9.0 have been released since then (2.9.0 is the recommended version), this is probably not too much of a problem. Oh, and I'll probably wrap ASM into the org.enhydra namespace, since it is so small and to avoid clashes with incompatible versions on the classpath. If Xerces were as small as ASM, I'd keep it wrapped. Unfortunately, Xerces is just a smidgen larger :-) Thoughts? Jake >Petr > > > > >-- >You receive this message as a subscriber of the xmlc@xxxxxxxxxxxxx >mailing list. >To unsubscribe: mailto:xmlc-unsubscribe@xxxxxxxxxxxxx >For general help: mailto:sympa@xxxxxxxxxxxxx?subject=help >ObjectWeb mailing lists service home page: http://www.objectweb.org/wws -- You receive this message as a subscriber of the xmlc@xxxxxxxxxxxxx mailing list. To unsubscribe: mailto:xmlc-unsubscribe@xxxxxxxxxxxxx For general help: mailto:sympa@xxxxxxxxxxxxx?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: [xmlc] <br clear="none"></br>, Petr Stehlik |
|---|---|
| Next by Date: | Re: [xmlc] <br clear="none"></br>, Erik Rasmussen |
| Previous by Thread: | Re: [xmlc] <br clear="none"></br>, Petr Stehlik |
| Next by Thread: | Re: [xmlc] <br clear="none"></br>, Erik Rasmussen |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |