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


On Fri, Jul 04, 2003 at 04:52:48PM +0200, Tobias Reif wrote:
> Bob Stayton wrote:
> 
>  > As you discovered, the XSL specification requires that
>  > each id value must be unique within a document.
> 
> It even is in the XML spec:
> 
> http://www.w3.org/TR/REC-xml.html#id
> 
> "Validity constraint: ID
> 
> Values of type ID must match the Name production. A name must not appear 
> more than once in an XML document as a value of this type; i.e., ID 
> values must uniquely identify the elements which bear them."

  XSLT processing does not require validation. A validity constraint
is something raised by a validating processor. 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 !), and
access to entities properties for external unparsed ones...
  An XSLT processor does not have to raise the ID validity constraints
error. 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

  To avoid problems it's better to validate documents before processing them
with XSLT, but it's clearly a separate step.

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard@redhat.com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/

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