
Freek/All; On 11/8/10 10:45 AM, Freek Dijkstra wrote:
Question 2. What attributes to use for references in XML? a) existing id and idref in NM-WG namespace b) redefine id and idref in NML namespace c) create dedicated namespace for just id and idref
Jeroen van der Ham:
I thought we decided on B?
Jason Zurawski:
I think b) makes the most sense; we do this in NM/NMC now.
Freek Dijkstra:
No big prefence. In order: a, c, or b
Talking in private to Jeroen (today) and Jason (at OGF), my question seems ambigious. Let me try again.
Let's assume we will make a derived Ethernet schema, http://schemas.ogf.org/nml/ethernet/2015/05/
Question 2b. What attribute to use for references in XML? a) id and idref in NM-WG namespace b) id and idref in NML base namespace c) id and idref in NML Ethernet namespace d) id and idref in OGF namespace (created for just these attribs) e) about and resource in RDF namespace
Am I correct that our preferences is: Jeroen: b Jason: c Freek: a, d or e
To me it seems very weird to reuse NM-WG namespace for something trivial as this and for that reason almost ridiculous to create a dedicated namespace for that.
At the risk of making flamebait:
Redefining the same thing over and over and over again (option c), seem to nullify the use of namespaces.
For one thing, the power of XML or RDF comes from using libraries that understand some part of the XML, for example about ordering, namespaces, and identifiers. (To me that was the compelling reason to like RDF; the semantic stuff is only a side-effect for me). By defining this once, it is easy to augment a library to treat this as special. If we decided to redefine this over and over again, each time in a new namespace, the implementor must write the same code again and again (especially if a good XML library is used, where equal name in different namespaces are considered something different). I dislike that.
It is uncommon to see [namespace prefixes for attributes]:
<ns:element ns2:attribute="something" />
But it is possible.
Yes, it is indeed uncommon for XML. It is common for RDF/XML.
If it matters that much for your use cases and you can't rationalize not re-using attribute definitions, do what you think make sense. As denoted in my first response, attributes are almost always associated with the element because there is never a need to see them re-used or sourced from alternate namesapces. Remember that we are just talking about a simple name and value pair (string datatype, nothing complex). The semantic meaning behind id and idRef would remain the same no matter what namespace you are referring to. I doubt there would ever be a case where an NML-base idRef pointing to an Ethernet id would be treated any differently than other id/idRef situations. If you forsee the relationship between ids and refs of different namespaces being meaningful, please give some examples. The added complexity to simply reuse the following text:
Identifier = attribute id { xsd:string }
IdReference = attribute idRef { xsd:string }
Hardly seems worth the trouble. -jason