[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Understanding the ID

  • From: Leigh Dodds <ldodds@i...>
  • To: xml-dev <xml-dev@l...>
  • Date: Wed, 31 Oct 2001 15:45:49 +0000

understanding the id
Hi,

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
cited.


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]

Proposals
------------------------------------------------------


A. ProcessingInstruction
-----------------------

Proposers: Tim Bray [9]

Use a processing instruction to declare identifier
attributes.

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.

Example:

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

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

Example:

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

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
identifier.

Example:

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

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
1.0.
This definition would be inherited, allowing a single declaration in the
case
where all elements use a commonly named attribute
(Disabling the declaration would use xml:idatts="")

Example:

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

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

Issues
------------------------------------------------------

[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

Cheers,

L.

--
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


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.