Derivation by restriction [message #52968] |
Thu, 16 September 2004 15:21  |
Eclipse User |
|
|
|
Originally posted by: NOpcooperSPAM.uk.ibm.com
I have a test case below that seems to be well formed but is failing XSD
validation and I was wondering if anyone can confirm whether is this is
user error or not?
The messages I'm seeing are:
The type of element '#item' must derive from
http://test.org/#item_._type' at line '58' and column '11' in
'file:/C:/test/WSDLLib/Def10783.wsdl'.
The restricted content type must accept a subset of the content accepted
by the base type at line '54' and column '3' in
'file:/C:/test/WSDLLib/Def10783.wsdl'.
(Note, the line numbers may not match the input data as I've edited it
slightly for display purposes)
Here is a copy of the schema:
<s:schema targetNamespace="http://test.org/"
xmlns:s0="http://test.org/"
xmlns:s="http://www.w3.org/2001/XMLSchema">
<s:complexType name="Address" final="restriction">
<s:sequence>
<s:element name="name" type="s:string"/>
<s:element name="street" type="s:string"/>
<s:element name="city" type="s:string"/>
</s:sequence>
</s:complexType>
<!-- type derived by extension -->
<s:complexType name="USAddress">
<s:complexContent>
<s:extension base="s0:Address">
<s:sequence>
<s:element name="state" type="s0:USState"/>
<s:element name="zip" type="s:positiveInteger"/>
</s:sequence>
</s:extension>
</s:complexContent>
</s:complexType>
<s:simpleType name="USState" final="restriction">
<s:restriction base="s:string">
<s:enumeration value="AK"/>
<s:enumeration value="AL"/>
<s:enumeration value="AR"/>
</s:restriction>
</s:simpleType>
<s:complexType name="Items" final="extension">
<s:sequence>
<s:element name="item" minOccurs="0" maxOccurs="unbounded">
<s:complexType>
<s:sequence>
<s:element name="productName" type="s:string"/>
<s:element name="quantity">
<s:simpleType>
<s:restriction base="s:positiveInteger">
<s:maxExclusive value="100"/>
</s:restriction>
</s:simpleType>
</s:element>
<s:element name="USPrice" type="s:decimal"/>
<s:element name="shipDate" type="s:date" minOccurs="0"/>
</s:sequence>
</s:complexType>
</s:element>
</s:sequence>
</s:complexType>
<!-- type derived by restriction -->
<s:complexType name="ConfirmedItems">
<s:complexContent>
<s:restriction base="s0:Items">
<s:sequence>
<s:element name="item" minOccurs="1" maxOccurs="unbounded">
<s:complexType>
<s:sequence>
<s:element name="productName" type="s:string"/>
<s:element name="quantity">
<s:simpleType>
<s:restriction base="s:positiveInteger">
<s:maxExclusive value="100"/>
</s:restriction>
</s:simpleType>
</s:element>
<s:element name="USPrice" type="s:decimal"/>
<s:element name="shipDate" type="s:date" minOccurs="0"/>
</s:sequence>
</s:complexType>
</s:element>
</s:sequence>
</s:restriction>
</s:complexContent>
</s:complexType>
</s:schema>
I think the sample input may have been taken from the XSD primer (or
somewhere similar) so it ought to be valid.
Any thoughts will be appreciated,
Thanks,
Paul Cooper.
|
|
|
Re: Derivation by restriction [message #52996 is a reply to message #52968] |
Thu, 16 September 2004 15:43   |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
This is a multi-part message in MIME format.
--------------000208010209040804010007
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Paul,
Have a look at
http://www.w3.org/TR/xmlschema-1/#rcase-NameAndTypeOK
If you think about this comment there:
*NOTE: *The above constraint on {type definition} <#type_definition>
means that in deriving a type by restriction, any contained type
definitions must themselves be explicitly derived by restriction
from the corresponding type definitions in the base definition.
Since you can't restrict (or extend for that matter) an anonymous type,
you can't restrict a complex type that has local elements with anonymous
types, because you would need to repeat the element declaration and that
element declaration either must reuse the same type as in the base or
must specify a more restricted type than in the base, and yet neither
can be expressed because the type in the base is anonymous.
Paul Cooper wrote:
> I have a test case below that seems to be well formed but is failing
> XSD validation and I was wondering if anyone can confirm whether is
> this is user error or not?
>
> The messages I'm seeing are:
> The type of element '#item' must derive from
> http://test.org/#item_._type' at line '58' and column '11' in
> 'file:/C:/test/WSDLLib/Def10783.wsdl'.
>
> The restricted content type must accept a subset of the content
> accepted by the base type at line '54' and column '3' in
> 'file:/C:/test/WSDLLib/Def10783.wsdl'.
>
> (Note, the line numbers may not match the input data as I've edited it
> slightly for display purposes)
>
>
> Here is a copy of the schema:
>
> <s:schema targetNamespace="http://test.org/"
> xmlns:s0="http://test.org/"
> xmlns:s="http://www.w3.org/2001/XMLSchema">
> <s:complexType name="Address" final="restriction">
> <s:sequence>
> <s:element name="name" type="s:string"/>
> <s:element name="street" type="s:string"/>
> <s:element name="city" type="s:string"/>
> </s:sequence>
> </s:complexType>
>
> <!-- type derived by extension -->
> <s:complexType name="USAddress">
> <s:complexContent>
> <s:extension base="s0:Address">
> <s:sequence>
> <s:element name="state" type="s0:USState"/>
> <s:element name="zip" type="s:positiveInteger"/>
> </s:sequence>
> </s:extension>
> </s:complexContent>
> </s:complexType>
>
> <s:simpleType name="USState" final="restriction">
> <s:restriction base="s:string">
> <s:enumeration value="AK"/>
> <s:enumeration value="AL"/>
> <s:enumeration value="AR"/>
> </s:restriction>
> </s:simpleType>
>
> <s:complexType name="Items" final="extension">
> <s:sequence>
> <s:element name="item" minOccurs="0" maxOccurs="unbounded">
> <s:complexType>
> <s:sequence>
> <s:element name="productName" type="s:string"/>
> <s:element name="quantity">
> <s:simpleType>
> <s:restriction base="s:positiveInteger">
> <s:maxExclusive value="100"/>
> </s:restriction>
> </s:simpleType>
> </s:element>
> <s:element name="USPrice" type="s:decimal"/>
> <s:element name="shipDate" type="s:date" minOccurs="0"/>
> </s:sequence>
> </s:complexType>
> </s:element>
> </s:sequence>
> </s:complexType>
>
> <!-- type derived by restriction -->
> <s:complexType name="ConfirmedItems">
> <s:complexContent>
> <s:restriction base="s0:Items">
> <s:sequence>
> <s:element name="item" minOccurs="1" maxOccurs="unbounded">
> <s:complexType>
> <s:sequence>
> <s:element name="productName" type="s:string"/>
> <s:element name="quantity">
> <s:simpleType>
> <s:restriction base="s:positiveInteger">
> <s:maxExclusive value="100"/>
> </s:restriction>
> </s:simpleType>
> </s:element>
> <s:element name="USPrice" type="s:decimal"/>
> <s:element name="shipDate" type="s:date" minOccurs="0"/>
> </s:sequence>
> </s:complexType>
> </s:element>
> </s:sequence>
> </s:restriction>
> </s:complexContent>
> </s:complexType>
> </s:schema>
>
> I think the sample input may have been taken from the XSD primer (or
> somewhere similar) so it ought to be valid.
>
> Any thoughts will be appreciated,
>
> Thanks,
> Paul Cooper.
--------------000208010209040804010007
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Paul,<br>
<br>
Have a look at <br>
<blockquote><a
href="http://www.w3.org/TR/xmlschema-1/#rcase-NameAndTypeOK">http://www.w3.org/TR/xmlschema-1/#rcase-NameAndTypeOK</a><br>
</blockquote>
If you think about this comment there:<br>
<blockquote><b>NOTE: </b>The above constraint on <a class="propref"
href="#type_definition">{type definition}</a> means that in deriving a
type by restriction, any contained type definitions must themselves be
explicitly derived by restriction from the corresponding type
definitions in the base definition. </blockquote>
Since you can't restrict (or extend for that matter) an anonymous type,
you can't restrict a complex type that has local elements with
anonymous types, because you would need to repeat the element
declaration and that element declaration either must reuse the same
type as in the base or must specify a more restricted type than in the
base, and yet neither can be expressed because the type in the base is
anonymous.<br>
<br>
<br>
Paul Cooper wrote:<br>
<blockquote cite="midcicosl$94r$1@eclipse.org" type="cite">I have a
test case below that seems to be well formed but is failing XSD
validation and I was wondering if anyone can confirm whether is this is
user error or not?
<br>
<br>
The messages I'm seeing are:
<br>
The type of element '#item' must derive from
<a class="moz-txt-link-freetext" href="http://test.org/#item_._type">http://test.org/#item_._type</a>' at line '58' and column '11' in
'<a class="moz-txt-link-freetext" href="file:/C:/test/WSDLLib/Def10783.wsdl">file:/C:/test/WSDLLib/Def10783.wsdl </a>'.
<br>
<br>
The restricted content type must accept a subset of the content
accepted by the base type at line '54' and column '3' in
'<a class="moz-txt-link-freetext" href="file:/C:/test/WSDLLib/Def10783.wsdl">file:/C:/test/WSDLLib/Def10783.wsdl </a>'.
<br>
<br>
(Note, the line numbers may not match the input data as I've edited it
slightly for display purposes)
<br>
<br>
<br>
Here is a copy of the schema:
<br>
<br>
<s:schema targetNamespace=<a class="moz-txt-link-rfc2396E" href="http://test.org/">"http://test.org/"</a>
<br>
xmlns:s0=<a class="moz-txt-link-rfc2396E" href="http://test.org/">"http://test.org/"</a>
<br>
xmlns:s=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema">"http://www.w3.org/2001/XMLSchema"</a>>
<br>
<s:complexType name="Address" final="restriction">
<br>
<s:sequence>
<br>
<s:element name="name" type="s:string"/>
<br>
<s:element name="street" type="s:string"/>
<br>
<s:element name="city" type="s:string"/>
<br>
</s:sequence>
<br>
</s:complexType> <br>
<br>
<!-- type derived by extension --> <br>
<s:complexType name="USAddress">
<br>
<s:complexContent>
<br>
<s:extension base="s0:Address">
<br>
<s:sequence>
<br>
<s:element name="state" type="s0:USState"/>
<br>
<s:element name="zip" type="s:positiveInteger"/>
<br>
</s:sequence>
<br>
</s:extension>
<br>
</s:complexContent>
<br>
</s:complexType> <br>
<br>
<s:simpleType name="USState" final="restriction">
<br>
<s:restriction base="s:string">
<br>
<s:enumeration value="AK"/>
<br>
<s:enumeration value="AL"/>
<br>
<s:enumeration value="AR"/>
<br>
</s:restriction>
<br>
</s:simpleType>
<br>
<br>
<s:complexType name="Items" final="extension">
<br>
<s:sequence>
<br>
<s:element name="item" minOccurs="0" maxOccurs="unbounded">
<br>
<s:complexType>
<br>
<s:sequence>
<br>
<s:element name="productName" type="s:string"/>
<br>
<s:element name="quantity">
<br>
<s:simpleType>
<br>
<s:restriction base="s:positiveInteger">
<br>
<s:maxExclusive value="100"/>
<br>
</s:restriction>
<br>
</s:simpleType>
<br>
</s:element>
<br>
<s:element name="USPrice" type="s:decimal"/>
<br>
<s:element name="shipDate" type="s:date"
minOccurs="0"/>
<br>
</s:sequence>
<br>
</s:complexType>
<br>
</s:element>
<br>
</s:sequence>
<br>
</s:complexType>
<br>
<br>
<!-- type derived by restriction --> <br>
<s:complexType name="ConfirmedItems">
<br>
<s:complexContent>
<br>
<s:restriction base="s0:Items">
<br>
<s:sequence>
<br>
<s:element name="item" minOccurs="1"
maxOccurs="unbounded">
<br>
<s:complexType>
<br>
<s:sequence>
<br>
<s:element name="productName" type="s:string"/>
<br>
<s:element name="quantity">
<br>
<s:simpleType>
<br>
<s:restriction base="s:positiveInteger">
<br>
<s:maxExclusive value="100"/>
<br>
</s:restriction>
<br>
</s:simpleType>
<br>
</s:element>
<br>
<s:element name="USPrice" type="s:decimal"/>
<br>
<s:element name="shipDate" type="s:date"
minOccurs="0"/>
<br>
</s:sequence>
<br>
</s:complexType>
<br>
</s:element>
<br>
</s:sequence>
<br>
</s:restriction>
<br>
</s:complexContent>
<br>
</s:complexType>
<br>
</s:schema>
<br>
<br>
I think the sample input may have been taken from the XSD primer (or
somewhere similar) so it ought to be valid.
<br>
<br>
Any thoughts will be appreciated,
<br>
<br>
Thanks,
<br>
Paul Cooper.
<br>
</blockquote>
<br>
</body>
</html>
--------------000208010209040804010007--
|
|
|
Re: Derivation by restriction [message #53022 is a reply to message #52996] |
Fri, 17 September 2004 04:05  |
Eclipse User |
|
|
|
Originally posted by: NOpcooperSPAM.uk.ibm.com
Ed Merks wrote:
> Paul,
>
> Have a look at
>
> http://www.w3.org/TR/xmlschema-1/#rcase-NameAndTypeOK
>
> If you think about this comment there:
>
> *NOTE: *The above constraint on {type definition} <#type_definition>
> means that in deriving a type by restriction, any contained type
> definitions must themselves be explicitly derived by restriction
> from the corresponding type definitions in the base definition.
>
> Since you can't restrict (or extend for that matter) an anonymous type,
> you can't restrict a complex type that has local elements with anonymous
> types, because you would need to repeat the element declaration and that
> element declaration either must reuse the same type as in the base or
> must specify a more restricted type than in the base, and yet neither
> can be expressed because the type in the base is anonymous.
>
>
Thanks, I thought there had to be an error in the test case, I just
couldn't find it.
Paul.
|
|
|
Re: Derivation by restriction [message #591606 is a reply to message #52968] |
Thu, 16 September 2004 15:43  |
Eclipse User |
|
|
|
This is a multi-part message in MIME format.
--------------000208010209040804010007
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Paul,
Have a look at
http://www.w3.org/TR/xmlschema-1/#rcase-NameAndTypeOK
If you think about this comment there:
*NOTE: *The above constraint on {type definition} <#type_definition>
means that in deriving a type by restriction, any contained type
definitions must themselves be explicitly derived by restriction
from the corresponding type definitions in the base definition.
Since you can't restrict (or extend for that matter) an anonymous type,
you can't restrict a complex type that has local elements with anonymous
types, because you would need to repeat the element declaration and that
element declaration either must reuse the same type as in the base or
must specify a more restricted type than in the base, and yet neither
can be expressed because the type in the base is anonymous.
Paul Cooper wrote:
> I have a test case below that seems to be well formed but is failing
> XSD validation and I was wondering if anyone can confirm whether is
> this is user error or not?
>
> The messages I'm seeing are:
> The type of element '#item' must derive from
> http://test.org/#item_._type' at line '58' and column '11' in
> 'file:/C:/test/WSDLLib/Def10783.wsdl'.
>
> The restricted content type must accept a subset of the content
> accepted by the base type at line '54' and column '3' in
> 'file:/C:/test/WSDLLib/Def10783.wsdl'.
>
> (Note, the line numbers may not match the input data as I've edited it
> slightly for display purposes)
>
>
> Here is a copy of the schema:
>
> <s:schema targetNamespace="http://test.org/"
> xmlns:s0="http://test.org/"
> xmlns:s="http://www.w3.org/2001/XMLSchema">
> <s:complexType name="Address" final="restriction">
> <s:sequence>
> <s:element name="name" type="s:string"/>
> <s:element name="street" type="s:string"/>
> <s:element name="city" type="s:string"/>
> </s:sequence>
> </s:complexType>
>
> <!-- type derived by extension -->
> <s:complexType name="USAddress">
> <s:complexContent>
> <s:extension base="s0:Address">
> <s:sequence>
> <s:element name="state" type="s0:USState"/>
> <s:element name="zip" type="s:positiveInteger"/>
> </s:sequence>
> </s:extension>
> </s:complexContent>
> </s:complexType>
>
> <s:simpleType name="USState" final="restriction">
> <s:restriction base="s:string">
> <s:enumeration value="AK"/>
> <s:enumeration value="AL"/>
> <s:enumeration value="AR"/>
> </s:restriction>
> </s:simpleType>
>
> <s:complexType name="Items" final="extension">
> <s:sequence>
> <s:element name="item" minOccurs="0" maxOccurs="unbounded">
> <s:complexType>
> <s:sequence>
> <s:element name="productName" type="s:string"/>
> <s:element name="quantity">
> <s:simpleType>
> <s:restriction base="s:positiveInteger">
> <s:maxExclusive value="100"/>
> </s:restriction>
> </s:simpleType>
> </s:element>
> <s:element name="USPrice" type="s:decimal"/>
> <s:element name="shipDate" type="s:date" minOccurs="0"/>
> </s:sequence>
> </s:complexType>
> </s:element>
> </s:sequence>
> </s:complexType>
>
> <!-- type derived by restriction -->
> <s:complexType name="ConfirmedItems">
> <s:complexContent>
> <s:restriction base="s0:Items">
> <s:sequence>
> <s:element name="item" minOccurs="1" maxOccurs="unbounded">
> <s:complexType>
> <s:sequence>
> <s:element name="productName" type="s:string"/>
> <s:element name="quantity">
> <s:simpleType>
> <s:restriction base="s:positiveInteger">
> <s:maxExclusive value="100"/>
> </s:restriction>
> </s:simpleType>
> </s:element>
> <s:element name="USPrice" type="s:decimal"/>
> <s:element name="shipDate" type="s:date" minOccurs="0"/>
> </s:sequence>
> </s:complexType>
> </s:element>
> </s:sequence>
> </s:restriction>
> </s:complexContent>
> </s:complexType>
> </s:schema>
>
> I think the sample input may have been taken from the XSD primer (or
> somewhere similar) so it ought to be valid.
>
> Any thoughts will be appreciated,
>
> Thanks,
> Paul Cooper.
--------------000208010209040804010007
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Paul,<br>
<br>
Have a look at <br>
<blockquote><a
href="http://www.w3.org/TR/xmlschema-1/#rcase-NameAndTypeOK">http://www.w3.org/TR/xmlschema-1/#rcase-NameAndTypeOK</a><br>
</blockquote>
If you think about this comment there:<br>
<blockquote><b>NOTE: </b>The above constraint on <a class="propref"
href="#type_definition">{type definition}</a> means that in deriving a
type by restriction, any contained type definitions must themselves be
explicitly derived by restriction from the corresponding type
definitions in the base definition. </blockquote>
Since you can't restrict (or extend for that matter) an anonymous type,
you can't restrict a complex type that has local elements with
anonymous types, because you would need to repeat the element
declaration and that element declaration either must reuse the same
type as in the base or must specify a more restricted type than in the
base, and yet neither can be expressed because the type in the base is
anonymous.<br>
<br>
<br>
Paul Cooper wrote:<br>
<blockquote cite="midcicosl$94r$1@eclipse.org" type="cite">I have a
test case below that seems to be well formed but is failing XSD
validation and I was wondering if anyone can confirm whether is this is
user error or not?
<br>
<br>
The messages I'm seeing are:
<br>
The type of element '#item' must derive from
<a class="moz-txt-link-freetext" href="http://test.org/#item_._type">http://test.org/#item_._type</a>' at line '58' and column '11' in
'<a class="moz-txt-link-freetext" href="file:/C:/test/WSDLLib/Def10783.wsdl">file:/C:/test/WSDLLib/Def10783.wsdl </a>'.
<br>
<br>
The restricted content type must accept a subset of the content
accepted by the base type at line '54' and column '3' in
'<a class="moz-txt-link-freetext" href="file:/C:/test/WSDLLib/Def10783.wsdl">file:/C:/test/WSDLLib/Def10783.wsdl </a>'.
<br>
<br>
(Note, the line numbers may not match the input data as I've edited it
slightly for display purposes)
<br>
<br>
<br>
Here is a copy of the schema:
<br>
<br>
<s:schema targetNamespace=<a class="moz-txt-link-rfc2396E" href="http://test.org/">"http://test.org/"</a>
<br>
xmlns:s0=<a class="moz-txt-link-rfc2396E" href="http://test.org/">"http://test.org/"</a>
<br>
xmlns:s=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema">"http://www.w3.org/2001/XMLSchema"</a>>
<br>
<s:complexType name="Address" final="restriction">
<br>
<s:sequence>
<br>
<s:element name="name" type="s:string"/>
<br>
<s:element name="street" type="s:string"/>
<br>
<s:element name="city" type="s:string"/>
<br>
</s:sequence>
<br>
</s:complexType> <br>
<br>
<!-- type derived by extension --> <br>
<s:complexType name="USAddress">
<br>
<s:complexContent>
<br>
<s:extension base="s0:Address">
<br>
<s:sequence>
<br>
<s:element name="state" type="s0:USState"/>
<br>
<s:element name="zip" type="s:positiveInteger"/>
<br>
</s:sequence>
<br>
</s:extension>
<br>
</s:complexContent>
<br>
</s:complexType> <br>
<br>
<s:simpleType name="USState" final="restriction">
<br>
<s:restriction base="s:string">
<br>
<s:enumeration value="AK"/>
<br>
<s:enumeration value="AL"/>
<br>
<s:enumeration value="AR"/>
<br>
</s:restriction>
<br>
</s:simpleType>
<br>
<br>
<s:complexType name="Items" final="extension">
<br>
<s:sequence>
<br>
<s:element name="item" minOccurs="0" maxOccurs="unbounded">
<br>
<s:complexType>
<br>
<s:sequence>
<br>
<s:element name="productName" type="s:string"/>
<br>
<s:element name="quantity">
<br>
<s:simpleType>
<br>
<s:restriction base="s:positiveInteger">
<br>
<s:maxExclusive value="100"/>
<br>
</s:restriction>
<br>
</s:simpleType>
<br>
</s:element>
<br>
<s:element name="USPrice" type="s:decimal"/>
<br>
<s:element name="shipDate" type="s:date"
minOccurs="0"/>
<br>
</s:sequence>
<br>
</s:complexType>
<br>
</s:element>
<br>
</s:sequence>
<br>
</s:complexType>
<br>
<br>
<!-- type derived by restriction --> <br>
<s:complexType name="ConfirmedItems">
<br>
<s:complexContent>
<br>
<s:restriction base="s0:Items">
<br>
<s:sequence>
<br>
<s:element name="item" minOccurs="1"
maxOccurs="unbounded">
<br>
<s:complexType>
<br>
<s:sequence>
<br>
<s:element name="productName" type="s:string"/>
<br>
<s:element name="quantity">
<br>
<s:simpleType>
<br>
<s:restriction base="s:positiveInteger">
<br>
<s:maxExclusive value="100"/>
<br>
</s:restriction>
<br>
</s:simpleType>
<br>
</s:element>
<br>
<s:element name="USPrice" type="s:decimal"/>
<br>
<s:element name="shipDate" type="s:date"
minOccurs="0"/>
<br>
</s:sequence>
<br>
</s:complexType>
<br>
</s:element>
<br>
</s:sequence>
<br>
</s:restriction>
<br>
</s:complexContent>
<br>
</s:complexType>
<br>
</s:schema>
<br>
<br>
I think the sample input may have been taken from the XSD primer (or
somewhere similar) so it ought to be valid.
<br>
<br>
Any thoughts will be appreciated,
<br>
<br>
Thanks,
<br>
Paul Cooper.
<br>
</blockquote>
<br>
</body>
</html>
--------------000208010209040804010007--
|
|
|
Re: Derivation by restriction [message #591615 is a reply to message #52996] |
Fri, 17 September 2004 04:05  |
Eclipse User |
|
|
|
Ed Merks wrote:
> Paul,
>
> Have a look at
>
> http://www.w3.org/TR/xmlschema-1/#rcase-NameAndTypeOK
>
> If you think about this comment there:
>
> *NOTE: *The above constraint on {type definition} <#type_definition>
> means that in deriving a type by restriction, any contained type
> definitions must themselves be explicitly derived by restriction
> from the corresponding type definitions in the base definition.
>
> Since you can't restrict (or extend for that matter) an anonymous type,
> you can't restrict a complex type that has local elements with anonymous
> types, because you would need to repeat the element declaration and that
> element declaration either must reuse the same type as in the base or
> must specify a more restricted type than in the base, and yet neither
> can be expressed because the type in the base is anonymous.
>
>
Thanks, I thought there had to be an error in the test case, I just
couldn't find it.
Paul.
|
|
|
Powered by
FUDForum. Page generated in 0.07032 seconds