OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xml-dev] Understanding the ID


I thought it might be useful to post a rolling summary of the
current ID discussion, to avoid creating a "cauldron of seething
expectations" [1] :)

I've tried to pick out relevant postings. Attributions are to the
current discussion threads only, some proposals might have been
raised and discussed in other forums previously (cf: [8]). If anyone
can provide links to prior discussion then I'd be grateful if you could
distribute them. I've also produced a short list of issues that have
been mentioned.

Any corrections, omissions, issues should be circulated back through
the list. Any mistakes are likely to be own, not those of the people

Problem Statement

To be able to identify that an attribute contains a unique identifier
for its element without the need for a DTD or schema. [3, 4]

This would allow reliable linking in the face of alterations to the
document [27]. There are also some side benefits for the DOM [28]


A. ProcessingInstruction

Proposers: Tim Bray [9]

Use a processing instruction to declare identifier

For: Carr [14, low impact], Lugt [24, variant of E]
Against: Bray [9]

B. Internal Subset

Proposers: Tim Bray [9], Paul Grosso [8].

Use the existing facility to declare an internal subset
to define ID attributes.


<!DOCTYPE rootType [
 <!ATTLIST element1 name ID #IMPLIED>
<!ATTLIST element2 name ID #IMPLIED>
... etc...
<element1 name="abc"/>
<element2 name="hij"/>

Against: Clark [15], English [25, SOAP forbids DOCTYPEs]

C. Reserved Attribute (xml:id)

Proposer: Bray [9]

Define an id attribute, associated with the already reserved 'xml'
namespace [10]. This namespace does not have to be declared [11].
Seems unlikely to break any existing software (but see issues)

Can be layered above XML 1.0


<foo xml:id="label1">
<bar xml:id="label2">

For: Veillard [12]
Against: Clark [15, intrusive, not flexible enough]

D. Reserved Namespace (xmlid:xx)

Proposer: Tim Bray [7, 9]

Variant of C. Define a new namespace 'xmlid'. No two attributes
in this namespace can have the same value in the same instance.
The xmlid namespace may not need declaring, as the prefix
is reserved

Any attribute associated with the reserved namespace
(e.g. http://w3.org/xmlid) would be considered to be an


<foo xmlns:xmlid="http://w3.org/xmlid">
  <bar xmlid:x="abc" />
  <baz xmlid:z="hij" />

Against: Bray [9, unnecessarily complex]

E. xml:idatts

Proposer: James Clark [15]

Define an attribute in the xml namespace, that declares the
name of the attribute that is the ID attribute. Can be layered above XML
This definition would be inherited, allowing a single declaration in the
where all elements use a commonly named attribute
(Disabling the declaration would use xml:idatts="")


<foo xml:idatts="x">
  <bar x="abc"/>
  <baz x="hij" />

For: Cowan [16], Brownell [17], Park [19], Hutchison [20],
Dodds [21]


[ID-Type] Is the attribute really of type ID [2]? Or would they
occupy "a second space of unique element identifiers" [6].
If they are of type ID then this requires a change to the XML 1.0
specification [5].

[ExistingDefinitions] Some languages (e.g. XHTML, SVG) already
have ID attributes declared as part of the language. How do
these proposals deal with conflicts? [9,12, 13]. Should one take
precedence over the other, or are conflicts an error? [26]

[MultipleIdentifiersPerElement] Should multiple ID or identifier
attributes be allowed for each element? Each identifer might
have a different purpose [17, 18, 19].

[Namespaces] How are identifiers from multiple namespaces
handled? [20, 22]

[Validity] (related to ExistingDefinitions) Does these proposals
affect the definitions of validity or well-formedness? Is non-uniqueness
a validity or well-formedness error? [23, 24, 29, 30] It may
be a third alternative [31]

[1]. http://www.lvc.edu/psychology/courses/personality.html
[2]. http://www.w3.org/TR/REC-xml#sec-attribute-types
[3]. http://lists.xml.org/archives/xml-dev/200110/msg00884.html
[4]. http://lists.xml.org/archives/xml-dev/200110/msg00899.html
[5]. http://lists.xml.org/archives/xml-dev/200110/msg01023.html
[6]. http://lists.xml.org/archives/xml-dev/200110/msg01024.html
[7]. http://lists.xml.org/archives/xml-dev/200110/msg00899.html
[8]. http://www.imc.org/ietf-xml-mime/mail-archive/msg00717.html
[9]. http://lists.xml.org/archives/xml-dev/200110/msg01028.html
[10]. http://www.w3.org/TR/REC-xml-names/#xmlReserved
[11]. http://www.w3.org/TR/REC-xml-names/#nsc-NSDeclared
[12]. http://lists.xml.org/archives/xml-dev/200110/msg01040.html
[13]. http://lists.xml.org/archives/xml-dev/200110/msg01054.html
[14]. http://lists.xml.org/archives/xml-dev/200110/msg01042.html
[15]. http://lists.xml.org/archives/xml-dev/200110/msg01051.html
[16]. http://lists.xml.org/archives/xml-dev/200110/msg01057.html
[17]. http://lists.xml.org/archives/xml-dev/200110/msg01058.html
[18]. http://lists.xml.org/archives/xml-dev/200110/msg01068.html
[19]. http://lists.xml.org/archives/xml-dev/200110/msg01070.html
[20]. http://lists.xml.org/archives/xml-dev/200110/msg01072.html
[21]. http://lists.xml.org/archives/xml-dev/200110/msg01080.html
[22]. http://lists.xml.org/archives/xml-dev/200110/msg01083.html
[23]. http://lists.xml.org/archives/xml-dev/200110/msg01102.html
[24]. http://lists.xml.org/archives/xml-dev/200110/msg01104.html
[25]. http://lists.xml.org/archives/xml-dev/200110/msg01056.html
[26]. http://lists.xml.org/archives/xml-dev/200110/msg01032.html
[27]. http://lists.xml.org/archives/xml-dev/200110/msg01050.html
[28]. http://lists.xml.org/archives/xml-dev/200110/msg01048.html
[29]. http://lists.xml.org/archives/xml-dev/200110/msg01107.html
[30]. http://lists.xml.org/archives/xml-dev/200110/msg01108.html
[31]. http://lists.xml.org/archives/xml-dev/200110/msg01109.html



Leigh Dodds, Research Group, Ingenta | "Pluralitas non est ponenda
http://weblogs.userland.com/eclectic |    sine necessitate"
http://www.xml.com/pub/xmldeviant    |     -- William of Ockham