wiki:NamespaceTagsForAttributeNames

Version 5 (modified by edavis, 10 years ago) (diff)

--

DRAFT Namespace Tagging of Attribute Names DRAFT

This is a proposed change to the CF specification for ticket #27.

Requirement

Allow attribute names to be qualified as a member of a given namespace.

Summary of Change

  • Describe basic namespace concept (URI and prefix/tag).
  • Add mechanism for declaring/encoding the namespaces used in a dataset.
  • Describe how an attribute name is tagged with a namespace.
  • Provide recommendations for maintaining backward compatibility.

Benefit

This change will allow data providers to use multiple attribute conventions without having to worry about attribute name clashes. It will also allow CF to use other attribute conventions without duplicating them directly in CF.

Status Quo

Proposed Changes to CF specification

Add the following definition to section "1.2 Terminology"

  '''namespace'''::
  A namespace provides a context for names. Namespaces allow the same name
  from two different namespaces to be differentiated. A namespace is
  identified by a URI and associated, in a dataset, with a tag/prefix.

Add a paragraph to section "1.3 Overview"

Insert the following as paragraph 7 (between "The long_name ..." and "Four types of ..."):

Namespaces can be declared in a dataset and then used in that dataset to add context to attribute names. This is useful when multiple attribute conventions are being used in one dataset. By associating each convention with a different namespace and placing the attributes into the corresponding namespace, it makes explicit the relationship between the attributes and the convention to which they below. It also ensures that similar attributes from different conventions can be differentiated.

Modify section "2.3 Naming Conventions"

Add second paragraph to section "2.6 Attributes"

Attribute names can be tagged to place the names in a namespace ...

Add new section on namespaces, section 2.7 "Namespaces"

Section 2.7 "Namespaces"

A namespace is identified by a URI. That URI must identify an attribute convention and provide access to the specification(s) that describe the attributes used by that convention and the meaning of those attributes. In a given dataset, a namespace URI is associated with a prefix/tag.

Namespace basics:

  1. A namespace is identified by a URI.
  2. A namespace prefix/tag is associated with a namespace.
  3. Prefixing an attribute name with a namespace prefix/tag and a colon (':') places that attribute name in the associated namespace.
  4. Not prefixing an attribute name with a namespace prefix/tag places that attribute name in the empty/default namespace.

If no namespaces are declared, ...

Section 2.7.1 "Declaring Namespaces in a Dataset"
Section 2.7.2 "Qualifying Attributes with a Namespace" or "Placing an Attribute in a Namspace"