W3C home > Mailing lists > Public > xmlschema-dev@w3.org > September 2002

Question - Extending attribute values

From: Yves Savourel <ysavourel@translate.com>
Date: Thu, 19 Sep 2002 07:09:21 -0600
Message-ID: <PCEIJMPLBANPKDPOPEMLOEKBCPAA.ysavourel@translate.com>
To: xmlschema-dev@w3.org

Hello,

I'm working with the group developing XLIFF (<http://www.xliff.org>). The
schema for the next version of this document type should be open in the
sense that users of the schema should be able to validate instance documents
which deviate from the schema in certain predefined ways:

a) inclusion of additional elements at well-defined extension points
b) inclusion of additional attributes at well-defined extension points
c) modification of predefined data types most notably
	1) replacement of enumeration
	2) addition to enumeration

Our aim is that any deviation has to be public in the sense that the
inclusions and modifications are captured in a user-defined XSD schema that
can be accessed for validation purposes.

Our XSD schema should initially work with the Microsoft XML Core Services
(MSXML) 4.0 Release.

We have the feeling that the 'any' element and the 'anyAttribute' of XSD
provide support for the deviations of type 'inclusion' (see above). We are
unsure, however, how to cope with the deviation of type 'modification' since
we are thinking along the following lines:

Our XSD contains something like:

<xsd:simpleType name="extensibleTypeA">
 <xsd:restriction base="xsd:NMTOKEN">
  <xsd:enumeration value="v1"/>
  <xsd:enumeration value="v2"/>
...

<xsd:complexType name="ElemType_T">
 <xsd:sequence>
  <xsd:element name="source" type="ElemType_S"/>
 </xsd:sequence>
 <xsd:attribute name="a" type="extensibleTypeA"/>
 ...

<xsd:element name="trans-unit" type="ElemType_T"/>

Users, however, may want to create instances documents such as:

<trans-unit a="userNamespace:v3">...</trans-unit>

Is there a mechanism in XSD that allows this? We are looking at using unions
or derivations, but either techniques seems to require to modify or inherit
from the original format. Is there a way to use values of a user namespace
the same way we can use elements and attributes?

Thanks in advance for any pointers or suggestions.
-yves
Received on Thursday, 19 September 2002 09:09:23 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:34 GMT