OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

relax-ng-comment message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Subject: Re: [relax-ng-comment] Restriction of ID(REF(S)) compatibility featureto singleton element name classes




> The RELAX NG DTD Compatibility spec says that in DTD compatibility mode,
> the element ancestor of an attribute of type ID(REF(S)) must have a
> singleton name, disallowing patterns like this:
>
> element foo | bar | baz {
> attribute id {xsd:ID},
> text
> }
>
> But I don't understand why, and the issues list is not helpful.  This
> seems a perfectly legitimate way to say that any of these elements
> may have IDs named id.
>
> It can't be just because XML DTDs don't have name classes, surely?
> After all, DTD Compatibility allows multiple ID-type attributes on
> a single element, which is neither XML- nor SGML-DTD compatible.

I think the argument in favour of the restriction is that it simplifies the
DTD compatibility spec slightly, and this simplification won't impact RELAX
NG schemas
generated from DTDs (which is what the DTD compatibility spec is supposed to
be about).

However, I think you're probably right that this restriction should be
relaxed. One additional argument in favour of relaxing the restriction is
that an implementation might well want to represent both

 element foo | bar { x }

and

  element foo { x } | element bar { x }

internally by the same thing, but it can't at the moment if it wants to
support DTD compatibility since if x contains an ID attribute the former
will be an error whereas the latter won't.

James






[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Powered by eList eXpress LLC