I am developing an application using ubiquity-xforms. I used to serve pages as text / html with the doctrine of XHTML 1.0.
If I switched the mime type to application / xhtml + xml, I would see a pretty big performance improvement, because javascript could use the get ____ NS () functions instead of what it does now (slowly repeating the whole DOM tree every time he needs to select an item).
But when I tried this, a bunch of my CSS stopped working. I noticed that when I checked the elements, either in Firebug or in the WebKit Nightly Web Inspector, the ".classname" and "#id" css selectors for the elements in the XFORMS namespace were the point of failure. I also noticed that in the listed DOM properties for these elements they lacked the attributes "id" and "className".
My question is: is there a way to make UA recognize them as classes and identifiers?
Things I tried to no avail:
- specifying id attributes as an identifier in the built-in ATTLIST doctype
- try to use every type of doctrine, or not have any type of doctype at all
- defining id and class name attributes in the xhtml namespace (i.e. xhtml: id)
Here is an xhtml example. Doesn't work in Firefox 3.5 or Safari 4 / WebKit Nightly
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:xf="http://www.w3.org/2002/xforms">
<head>
<style type="text/css">
#test {
background-color: red;
}
.testing {
color: blue;
}
</style>
</head>
<body>
<xf:group id="test" class="testing">Test</xf:group>
</body>