Einzelnen Beitrag anzeigen

Benutzerbild von Khabarakh
Khabarakh

Registriert seit: 18. Aug 2004
Ort: Brackenheim VS08 Pro
2.876 Beiträge
 
#22

Re: Funktion und Sinn von XML Schemata

  Alt 22. Feb 2008, 13:12
Zitat von Luckie:
Zitat:
Encountered child was not expected
VS ist da ein _wenig_ ausführlicher :
Zitat:
Warning The element 'element' in namespace 'http://www.w3.org/2001/XMLSchema' has invalid child element 'sequence' in namespace 'http://www.w3.org/2001/XMLSchema'. List of possible elements expected: 'annotation, simpleType, complexType, unique, key, keyref' in namespace 'http://www.w3.org/2001/XMLSchema'.
So funktioniert es auch ohne benannten complexType:
XML-Code:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
   <xs:element name="verlag">
      <xs:complexType>
         <xs:sequence>
            <xs:element name="buch" maxOccurs="unbounded">
               <xs:complexType>
                  <xs:sequence>
                     <xs:element name="titel" type="xs:string"/>
                     <xs:element name="autor" type="xs:string"/>
                     <xs:element name="erschdat" type="xs:string"/>
                     <xs:element name="isbn" type="xs:string"/>
                  </xs:sequence>
               </xs:complexType>
            </xs:element>
         </xs:sequence>
      </xs:complexType>
   </xs:element>
</xs:schema>
Sebastian
Moderator in der EE
  Mit Zitat antworten Zitat