Just wanted to check one more time to see if there was an XHTML expert in this dev group that might be able to help with the issue of extending XHTML to include NetUI attributes on a small subset of tags, but still validate correctly. JIRA bug... http://issues.apache.org/jira/browse/BEEHIVE-498
I'd like to avoid creating a custom DTD so I've been using an internal subset of the DOCTYPE declaration. For example, something like... <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" [ <!ATTLIST html xmlns:netui CDATA #FIXED "http://beehive.apache.org/netui/tags" > <!ATTLIST div netui:treename CDATA #IMPLIED> ] > <html xml:lang="en" lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:netui="http://beehive.apache.org/netui/tags" > <head><title>Example</title></head> <body> <div netui:treename="Tree101"> Stuff Here </div> </body> </html> ...where the div tag has the treename attribute from the XML namespace, "netui" and the html element has the attribute to declare the xmlns. This is a valid document. The unfortunate problem in creating documents like this is that they don't display correctly in IE. The browser displays a leading "] >" at the top of the document. The information I've found indicate that having a custom DTD that extends XHTML and defines the new attributes will render correctly in browsers using "Standards compliance mode." This solves the problem of the leading "] >" being displayed in the page when using an internal subset (described earlier in this bug), but requires that validation of the document use the custom DTD. I don't think that a custom DTD is desired for NetUI, correct? One different approach suggested to me was to use JavaScript to add the attributes to the elements rather than add them directly. Maybe based on the tag ID the additional attributes could be added. The JavaScript could be run on page load. The document would then validate as it would not contain these additional attributes for NetUI. Daryl has provided some good feedback about using JavaScript... "Each DOM element that needs to have an attribute set on it, will get a unique name. Then you write script that finds that element and you add the new attribute and last set the name (if necessary) to the tagID name. I'd probably drop the namespace qualification because that doesn't work well with the some of the browsers, instead I would name them something link netui_xxxx." Are there other alternatives for this solution, other than supporting and providing a custom DTD, such that the document will both validate and display correctly? Other thoughts or concerns about using JavaScript? Thanks for your help. Kind regards, Carlin