In designing Verbosio, I made an assumption that said ID attributes were going to be troublesome. Simply put, every ID attribute must be unique to the document. But when you include fifty or more overlays, somewhere an ID attribute being not-so-unique is a distinct possibility.
To solve this, I introduced a concept of scope and local id combinations. But this alone was not enough. What about XUL's command and key attributes, which are inherently tied to ID? These were IDREF-type attributes for all intents and purposes, and I could not support them.
Until today.
I conducted an experiment where I set ID attributes after the XUL document had finished loading. I also set command attributes. This mimics how Verbosio would work to a great deal. Surprisingly, it worked perfectly. One of my biggest fears about Verbosio development has evaporated.
A demonstration of scope and local id, with local id refs, combining for ID and IDREF attributes. It apparently doesn't work in Firefox 1.0.7, but does work in a SeaMonkey trunk and 1.8 branch SeaMonkey. So Firefox 1.5 users should see it too.
Posted by WeirdAl at October 20, 2005 12:36 AM