On tag uniqueness and versioning in Pie/Echo feeds
"feed" is not a very unique name, and if another format were to come along with the same top level element we would not be able to write a format driver for it. Our architecture keys off the top-level element. I suggest changing the top-level element to indicate the format, and also add a version number so that aggregators can have an idea of what spec the content provider is using. I imagine Radio is not the only aggregator that would like to key off the name of the top-level element.
Nope, "feed" seems like a pretty poor choice as a name if the goal was uniqueness in the tag name itself. But, since we have XML namespaces to ensure uniqueness between vocabularies, we can instead focus on a clear and simple name that only needs to be unique within the vocabulary. And as for versioning, why not consider different versions of a namespace to be entirely different vocabularies, each with different namespaces?
I did some quick Googling and found the following:
... documents, containing multiple markup vocabularies, pose problems of recognition and collision. Software modules need to be able to recognize the tags and attributes which they are designed to process, even in the face of "collisions" occurring when markup intended for some other software package uses the same element type or attribute name. These considerations require that document constructs should have universal names, whose scope extends beyond their containing document. This specification describes a mechanism, XML namespaces, which accomplishes this.
Source:Namespaces in XML
One of the core features of XML is its ability to deal with changes in the rules for data (hence the extensible in its name -- Extensible Markup Language). As changes are made to XML vocabularies, the creation of multiple versions is inevitable. This makes it necessary to mark the versions clearly, for human and machine information. The clear marking of versions can be used for driving validation, or for branch processing according to the requirements of each version.
You can mark the version of an XML vocabulary in many ways. This discussion focuses on the use of XML namespaces for marking versions.
I haven't looked into RadioUserLand feed handling architecture, but how difficult would it be to use the namespace and tag together as key, rather than the tag alone?
shortname=echo_unique_namespaces
Archived Comments