|
SQC does not allow xs:all in xs:extension, is that right?
|
Posts:
1
Registered:
Aug 09, 2005 11:30:24 AM
|
|
|
|
SQC does not allow xs:all in xs:extension, is that right?
Posted:
Aug 09, 2005 11:35:56 AM
|
|
|
|
The XMLSpy and the XSV
(ftp://ftp.cogsci.ed.ac.uk/pub/XSV/XSV210.EXE)
both allow this. For example, for the following schema, sqc will report an error. But I think it's valid.
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:element name="Address" type="Address" abstract="true"/>
<xs:complexType name="Address" abstract="true">
<xs:all>
<xs:element name="name" type="xs:string"/>
<xs:element name="street" type="xs:string"/>
<xs:element name="city" type="xs:string"/>
</xs:all>
</xs:complexType>
<xs:element name="USAddress" type="USAddress" substitutionGroup="Address"/>
<xs:complexType name="USAddress">
<xs:complexContent>
<xs:extension base="Address">
<xs:all>
<xs:element name="state" type="xs:string"/>
<xs:element name="zip" type="xs:positiveInteger"/>
</xs:all>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:schema>
|
|
Posts:
5
Registered:
Sep 16, 2005 05:43:03 PM
|
|
|
|
Re: SQC does not allow xs:all in xs:extension, is that right?
Posted:
Sep 16, 2005 05:46:18 PM
in response to: 's post
|
|
|
|
i could not see the schema you posted, but in general, you may not use all groups in extensions, because all groups may not be combined with other groups, and whenever you use an extension, this implicitly introduces a sequence (around the extended content and the new content), which makes the content model illegal.
|
|
|
|
|