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


Help: OASIS Mailing Lists Help | MarkMail Help

relax-ng message

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

Subject: Issue: overriding attributes

I have been looking at translating W3C XML Schema into RELAX NG.  Almost
everything seems to translate quite straightfowardly.  However, there's one
capability that W3C XML Schema has which we don't have.

If you define a complex type with some attributes and then derive a new
complex type, the derived type by default picks up the attributes from the
base type, but the derived type can have additional attribute declarations
and these override any attribute declarations of the same name in the base
type.  So for example if you have some complex type that defines 20
attributes, and you want to make a new type that prohibits one of those
attributes or changes the type from being optional to required, then you can
do it very conveniently.

XML 1.0 provides a similar capability, in that you can have multiple ATTLIST
declarations for an element declaring the same attribute, and the first one

One could imagine ways to provide this capability in RELAX NG. For example,
by analogy with <define> in <include>, you could allow

  <ref name="foo">
    <attribute name="bar"/>

The effect would be the same as

  <ref name="foo"/>
  <attribute name="bar"/>

except that any occurrences of <attribute name="bar"/> in foo would be
changed to <notAllowed/> (and appropriate <except/> clauses would be added
to occurrences of nsName and anyName in foo).

Is this a capability we need for RELAX 1.0?


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

Powered by eList eXpress LLC