Reinventing Fire


  1. In response to some feedback on IRC, I realize there is a potential problem with my scheme. My proposal would not make identical parse trees in HTML and XML (SVG). The “shape” of the tree would be the same, but that namespace URI on each would be different, and this would have to be reflected in the DOM. So, an additional difference between my underscore-delimited namespace prefix and Namespaces in XML is that you could use namespace-unaware methods like getAttribute and setAttribute on the underscored attributes, and it would function identically with the different languages; when using namespace-aware equivalents like setAttributeNS, you would supply the namespace keyword, like this: myEl.setAttributeNS( “aria”, “aria_checked”, true). The browser would resolve the namespaces URI internally. I’m not in love with this, but it seems workable to me on first glance.

    Comment by Schepers — October 18, 2007 @ 2:44 pm

  2. On further thought, in order to preserve isomorphism with the existing DOM parse tree, I have another option… such a prefix might not involve namespaces at all (including the namespace URI property on the attribute, nor the interface methods). Instead, it could be used as an NVDL switching trigger, telling the validator (or other processor) that if it knows about the schema indicated by the keyword token, it should validate according to that schema; if it doesn’t know it, it simply uses the language’s own error handling for dealing with unknown content (which in the case of SVG 1.2 is simply to ignore it). This is a more modest scheme, requires less buy-in from existing processors, doesn’t involve namespaces per se, and probably solves most of the same problems. Note that I’ve been up all night, though (working on other things), so this may not be that bright…

    Comment by Schepers — October 19, 2007 @ 5:10 am

  3. [...] Start with Doug’s excellent post on this topic. I don’t have any opinion on the aria-specific elements of the debate. I’m fine with either adding a namespace to these attributes when used in XML or letting those attributes attach themselves to the SVG language without a namespace if it simplifies things, I don’t see a need to update the SVG specification for this though. I also don’t see a need to reinvent or create a new namespacing mechanism using underscores or dashes, this seems silly and/or dangerous to me. [...]

    Pingback by Something Witty Goes Here » Yet More on SVG in text/html — December 14, 2007 @ 3:27 pm

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Powered by WordPress