Subject: Re: Element ID's versus namespaces From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Wed, 24 Nov 1999 21:24:51 -0500 |
Sec. 5.2.1 of the XPath spec says that an element may have a unique identifier (ID), which is the value of the attribute that is declared in the DTD as type `ID'. That implies that a document using IDs must have a corresponding DTD.
- an element is considered to have unique identifier if it has an attribute node that is considered an attribute of XML type ID only when the source file has a document model whose declaration for the attribute is of type ID - in a well-formed document without a complete DTD it is sufficient to add only an attribute list declaration for the attribute in question as in these examples:
<!DOCTYPE prodsummary [ <!ATTLIST prod id ID #REQUIRED> ]>
<!DOCTYPE custsummary [ <!ATTLIST cust custNbr ID #REQUIRED> ]>
- note that there is no special meaning conferred on attributes named "id", only on attributes of type "ID"
However, namespaces are tightly integrated into XPath also, and it seems to be almost impossible in any practical sense to compose a DTD for a document that derives its names from multiple namespaces.
That seems to be the gist of a lot of discussion in xmldev not long ago.
So how is this conflict being resolved in the real world?
-- G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (Fax:-0995) Web site: XSL/XML/DSSSL/SGML services, training, libraries, products. Practical Transformation Using XSLT and XPath ISBN 1-894049-03-9 Next instructor-led training: 1999-12-05/06, 1999-12-07, - 2000-02-27/28, 2000-05-11/12, 2000-05-15
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Element ID's versus namespaces, Paul W. Abrahams | Thread | Can you help with this?, Darren Shilson |
Element ID's versus namespaces, Paul W. Abrahams | Date | Re: Is there a public W3C Specifica, James Clark |
Month |