Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] XOM 1.1 proposal: xml:id

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: John Cowan <jcowan AT reutershealth.com>
  • To: Elliotte Harold <elharo AT metalab.unc.edu>
  • Cc: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] XOM 1.1 proposal: xml:id
  • Date: Thu, 20 Jan 2005 09:32:52 -0500

Elliotte Harold scripsit:

> 1. xml:id attribute values must be normalized by XOMHandler, even if the
> parser doesn't do it.

Yes.

> 2. Should we also autonormalize when the attribute value is set?

Absolutely.

> 3. Should the type be reported as ID even if the schema declares a
> different type such as CDATA or NMTOKEN?

Yes. The CR draft (unfortunately not yet public) makes it clear that
ID assignment must be done even in the presence of errors.

> An xml:id error is a non-fatal error, but that conflicts with the *must*
> requirements.

Actually, it doesn't. MUST merely means that it is non-conformant for
an xml:id processor to act otherwise. It does not imply, as it does
in the XML recommendation, that the document must be rejected.

The current draft has the following, hopefully clearer, processing model:

# Each xml:id attribute is processed in the following way:
#
# 1. The attribute's value is normalized according to the rules for
# attribute-value normalization on attributes of type ID.
#
# The infoset [normalized value] property is updated with the
# normalized value.
#
# 2. ID assignment is performed with the normalized value.
#
# An xml:id processor must assure that the following constraints hold for all
# xml:id attributes:
#
# * The normalized value of the attribute is a valid NCName.
# * The declared type of the attribute, if it has one, is "ID". All
# declarations for xml:id attributes must specify "ID" as the type of
# the attribute.
#
# An xml:id processor should assure that the following constraints hold:
#
# * The values of all xml:id attributes and all attributes of type "ID"
# within a document are unique.
#
# An xml:id error occurs for any xml:id attribute that does not satisfy the
# constraints.
#
# The xml:id processor performs ID assignment on all xml:id attributes, even
# those that do not satisfy the enumerated constraints.
#
# An xml:id processor should update the [references] infoset property, and/or
# other appropriate referential properties to reflect the results of ID
# assignment.

> Do we really want to reject documents on parse that do not satisfy the
> first two constraints? Maybe.

You have to report. It's up to you whether you want to refuse as well.

> There's not a lot of legacy here to worry about,

The xml namespace is 0wnz0red by the Core WG, and people who use xml:*
names in unsanctified ways do so entirely at their own risk. So legacy
can be ignored.

--
Values of beeta will give rise to dom! John Cowan
(5th/6th edition 'mv' said this if you tried http://www.ccil.org/~cowan
to rename '.' or '..' entries; see jcowan AT reutershealth.com
http://cm.bell-labs.com/cm/cs/who/dmr/odd.html)




Archive powered by MHonArc 2.6.24.

Top of Page