The dangers of developing XML formats alone
by ZetaGecko | Add Your Comments | XML
Yesterday, I posted a proposal to the Atom wiki for a method of specifying details about a person (their name, URL, etc.) once, and referring to it from other places in a feed. The main point was to avoid duplicating data. The original declaration of a person was to have an attribute named "id" (eg. <person id="qwerty">), and that person could be referred to elsewhere using an attribute named "ref" (eg. <author ref="qwerty" />). It didn't take long for suggestions to come in for a few little changes.
The first suggestion was to use "xml:id" rather than just "id". xml:id is on it's way to becoming a standard attribute for specifying a locally unique id. The next suggestion was to use "xlink:href" instead of "ref". Why would it matter whether someone else's names were used or we made up our own? To a lot of people, it wouldn't make a lick of difference. But if you want to validate the document, which would include verifying that all ids are locally unique, then you need a way to tell the validator that ids are supposed to be unique. If xml:id is used, then validators that know about xml:id will know to do that validation without having to refer to an external document that explains it to them. I imagine xlink:href is similar--a validator that understands it will know to verify that the id being referred to exists.
I'm one of those people to whom the name change wouldn't make a lick of difference. If I were to develop an XML format in a vacuum, I'd never catch these little details that do matter to other people. Score a point for design by committee.