← Prev in month ← Prev in thread
Next in thread → Next in month →

text:id vs xml:id (ODF 1.2CD01)

From
Alex Brown <>
Date
2009-03-07T09:54:34+00:00
ID
Thread
text:id vs xml:id (ODF 1.2CD01)
Dear all,

The <text:p> element declares optional attributes @text:id and @xml:id.

We are told (18.814) that @text:id "specifies an ID or a name for an element". In what sense can this ever specify an "ID", since in the schema the attribute is declared to be of type NCName?

The @xml:id attribute *is*, however, declared to be of type ID. We are told (18.920) that xml:id "gives an element an unique identification in its XML file".

It is absurd to attempt to have conflicting identification systems declared on an element, and it is a fundamental precept of XML that elements have only one identifier.

Consider a document containing the following two <text:p> structures

<text:p xml:id="a" text:id="b"/> 

<text:p xml:id="b" text:id="a"/>

What is the result of applying the DOM GetElementsById() method to this document with a param of "a" ?

What is the result of resolving a URI to this document with a fragment identifier of "#a" ?

PROPOSAL. xml:id should be sole, standard, way of assigning (XML) identifiers to elements. All other mechanisms need to be removed.

- Alex.
← Prev in month ← Prev in thread
Next in thread → Next in month →