Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [XML Schema] Rekurencyjne deklaracje
walec51
post
Post #1





Grupa: Zarejestrowani
Postów: 1
Pomógł: 0
Dołączył: 15.05.2009

Ostrzeżenie: (0%)
-----


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 (IMG:http://forum.php.pl/style_emoticons/default/sad.gif)
Jakieś sugestie co mogę robić nie tak ?

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

Ten post edytował walec51 15.05.2009, 10:22:50
Go to the top of the page
+Quote Post

Posty w temacie
- walec51   [XML Schema] Rekurencyjne deklaracje   15.05.2009, 10:22:11


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 23.08.2025 - 04:35