This is the mail archive of the docbook@lists.oasis-open.org mailing list for the DocBook project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [docbook] biblio database duplicate id in sets


Daniel Veillard wrote:


XSLT processing does not require validation.


Yep.

A validity constraint
is something raised by a validating processor.


Yep, (currently) uniqueness of IDs it's not a well-formedness constraint (probably because they are currently defined in DTDs).

XPath (and hence XSLT)
does not require this, it just requires to load the external subset to
provide attribute defaulting, ID ness property (not validation !),


Absolutely true. I'm not sure if you think that any of those things contradict what I said.

and
access to entities properties for external unparsed ones...
  An XSLT processor does not have to raise the ID validity constraints
error.


Yep.

Actually if you look closely at the XPath spec for the semantic of
id() you will find some interesting prose about which element to return
when multiple attribute of type ID with the same name are present in the
document :-)
  http://www.w3.org/TR/xpath#unique-id


"No two elements in a document may have the same unique ID."

... seems to express what Bob, you, and me say: that it's never a good idea to have duplicate IDs.

"If an XML processor reports two elements in a document as having the same unique ID (which is possible only if the document is invalid) then the second element in document order must be treated as not having a unique ID."

... is interesting indeed. (IMHO, "pick the first" is nothing but a quirk. Uniqueness of IDs should be a well-formedness constraint IMHO.)

Something else:

"An element node may have a unique identifier (ID). This is the value of the attribute that is declared in the DTD as type ID.
[...]
NOTE: If a document does not have a DTD, then no element in the document will have a unique ID."


Both statements are currently true, but the current circumstances are a problem:

http://www.w3.org/2001/tag/doc/xmlIDsemantics-32-20030512.html
"How should the problem of identifying ID semantics in XML languages be addressed in the absence of a DTD?
Draft TAG finding, 12 May 2003"


Abstract

The architecture of the Web benefits from being able to label or point to information at a granularity finer than a complete resource. For XML Media Types, the identifier mechanism has to date been the declaration of identifiers (IDs) using DTD or Schema mechanisms which are, however, optional for conformant XML processors. There is thus an issue when it is desired to have ID-like functionality for parsers which do not fetch an external DTD or Schema, or in the complete absence of a DTD or Schema. This document is a rough draft TAG finding for the issue xmlIDSemantics-32, How should the problem of identifying ID semantics in XML languages be addressed in the absence of a DTD?."


  To avoid problems it's better to validate documents before processing them
with XSLT,


I think (and do) so too.

but it's clearly a separate step.


Obviously.


Tobi



-- http://www.pinkjuice.com/


--------------------------------------------------------------------- To unsubscribe, e-mail: docbook-unsubscribe@lists.oasis-open.org For additional commands, e-mail: docbook-help@lists.oasis-open.org


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]