Witam.

Zasłużmy że mój program akceptuje np takiego xml'a:

  1. <Block>
  2.        <Block>
  3.                <PrintMessage/>
  4.                <Block>
  5.                        <PrintMessage />
  6.                        <PrintMessage />
  7.                </Blok>
  8.        </Block>
  9.        <Block>
  10.                <PrintMessage />
  11.                <PrintMessage />
  12.        </Block>
  13. </Block>


I teraz próbuje dla tego typu xml'ków ułożyć XML Schema:

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <schema xmlns="http://www.w3.org/2001/XMLSchema">
  3.  
  4.      <complexType name="Statement">
  5.            <choice>
  6.  
  7.                  <element name="Block">
  8.                        <complexType mixed="true">
  9.                              <sequence>
  10.                                    <element type="Statement" maxOccurs="unbounded" />
  11.                              </sequence>
  12.                        </complexType>
  13.                  </element>
  14.  
  15.                  <element name="PrintMessage" />
  16.                  
  17.            </choice>
  18.      </complexType>
  19.  
  20. </schema>


Ale tu pojawia mi się błąd w schemie typu:

src-resolve.4.2: Error resolving component 'Statement'. It was detected that 'Statement' is in
namespace 'http://www.w3.org/2001/XMLSchema', but components from this namespace are
not referenceable from schema document 'file:///home/awalczak/workspace/xmlstacks/src/
info/adamwalczak/xmlstacks/res/lang.xsd'. If this is the incorrect namespace, perhaps the
prefix of 'Statement' needs to be changed. If this is the correct namespace, then an
appropriate 'import' tag should be added to 'file:///home/awalczak/workspace/xmlstacks/src/
info/adamwalczak/xmlstacks/res/lang.xsd'.

I tu że tak powiem treść tego błędu kompletnie do mnie nie przemawia sad.gif
Jakieś sugestie co mogę robić nie tak ?

PS. XML z pojedynczym tagiem <PrintMessage /> jest także akceptowalny
przez mój program.