Community
Participate
Working Groups
When adding nodes to XHTML documents, the XMLGenerator is modifying the tag and attribute case forcing lowercase. This can be problematic for attributes that are camel-cased, often resulting in validation messages like "Attribute name () uses wrong case character."
Created attachment 193515 [details] patch For XHTML documents, we should be following the case suggestions of the XML version of the DocumentTypeAdapter instead of forcing lower for attribute values.
*Explain why you believe this is a stop-ship defect. Or, if it is a "hotbug" (requested by an adopter) please document it as such. Causes nodes inserted via the DOM to possibly fail validation against strict XML case requirements. * Is there a work-around? If so, why do you believe the work-around is insufficient? No * How has the fix been tested? Is there a test case attached to the bugzilla record? Has a JUnit Test been added? Existing unit tests run. Ad hoc testing. * Give a brief technical overview. Who has reviewed this fix? For XHTML documents, the code was incorrectly dictating that because it was an XML-type document, lowercase attribute names should be generated always. Instead, a strict adherence to the existing case should be used as dictated by the super class. Nitin has reviewed the fix. * What is the risk associated with this fix? Fairly low.
I think this is a fine fix, and appears simple and safe enough. But, you'd have a stronger case if you documented some examples; some cases where this causes problems. I think that the "HTML" variants of XHTML do use all lower case attributes, right? Or, am I missing some? I'd guess, and is what I'm asking you to document, that mixed case examples come from other families ... such as "XHTML plus Math 1.1 DTD"? I just want to make sure the likelyhood of hitting this problem is understood, and that you've seen this problem with "real life" cases. Thanks,
The problem comes from an adopter. They've contributed attributes through Model Query Extension that have mixed case. As such, when validating the XHTML document, the case is found to be different from what was contributed to the content model. This could be avoided by making sure that the case of attributes is not modified for XHTML documents when using the DOM to add nodes.
(In reply to comment #4) > The problem comes from an adopter. ... Well, you've got me curious now! :) ... but, does sound like "real life", so I'm fine with this.
Thanks, David. I'm glad your curiosity has been piqued.
Code checked in.