W3C home > Mailing lists > Public > xmlschema-dev@w3.org > March 2003

Re: block-attribute and XSV

From: Rainer Becker <w3cschema@rbecker.de>
Date: Tue, 18 Mar 2003 12:32:13 +0100
Message-ID: <3E7703BD.11D8FD57@rbecker.de>
To: xmlschema-dev@w3.org

"Henry S. Thompson" schrieb:

> XSV non-feature, sorry.  Will try to fix some time soon.
>
> ht

Hallo,

thank you for your answer at first.

I know that similar questions have been asked,
but I would appreciate an answer...

Please consider the following schema...

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">

   <xs:complexType name="ct_base" block="">
      <xs:sequence>
         <xs:element name="A" type="xs:string" />
         <xs:element name="B" type="xs:string" minOccurs="0" />
      </xs:sequence>
   </xs:complexType>

   <xs:complexType name="ct_extension">
      <xs:complexContent>
         <xs:extension base="ct_base">
            <xs:sequence>
               <xs:element name="C" type="xs:string" />
            </xs:sequence>
         </xs:extension>
      </xs:complexContent>
   </xs:complexType>

   <xs:element name="Test" type="ct_base" block="" />

</xs:schema>

and this instance

<?xml version="1.0"?>
<Test xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                 xsi:type="ct_extension">
   <A>bla</A>
   <B>bla</B>
   <C>bla</C>
</Test>

Please note the empty value of the block-attribute in the complex type
definition "ct_base" and in the element declaration of "Test".

Question: No matter if I use block="extension" in "ct_base" or
block="extension" in "Test". The behaviour is the same error message.
(I do not change anything in the instance)
As I thought, block="extension" on an element declaration would prevent
me from using an element derived by (a chain involving) extension (in a
substitution group), I donīt think, that MSXML is ok, could you please
clarify??

Thank you

Rainer
Received on Tuesday, 18 March 2003 06:32:46 GMT

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