xsd - Problem with develop of XML Schema based on an existent XML -


After

I have a problem with the verification of this piece of XML:

  & lt; ? XML version = "1.0" encoding = "UTF-8"? & Gt; & Lt; I-ching xmlns = "http://www.oracolo.it/i-ching" & gt; & Lt; Predizione & gt; & Lt; Esagramma nome = "speed" & gt; & Lt; Trigramma & gt; & Lt; Yang / & gt; & Lt; Yang / & gt; & Lt; Yang / & gt; & Lt; / Trigrumma & gt; & Lt; Trigramma & gt; & Lt; Yin / & gt; & Lt; Yin / & gt; & Lt; Yin / & gt; & Lt; / Trigrumma & gt; & Lt; / Esagramma & gt; & Lt; Importantto & gt; Questa combinatorial preening & LT; Enfasi & gt; Wow & lt; / Enfasi>, e forse anche & lt; Enfasi & gt; MAh, chissa & lt; / Enfasi>. & Lt; / Significato & gt; & Lt; / Predizione & gt; & Lt; Predizione & gt; & Lt; Esagramma nome = "rightorno" & gt; & Lt; Trigramma & gt; & Lt; Yang / & gt; & Lt; Yin / & gt; & Lt; Yin / & gt; & Lt; / Trigrumma & gt; & Lt; Trigramma & gt; & Lt; Yin / & gt; & Lt; Yin / & gt; & Lt; Yin / & gt; & Lt; / Trigrumma & gt; & Lt; / Esagramma & gt; & Lt; Importantto & gt; C prevede thief certezza & lt; Enfasi & gt; Qualcosa & lt; / Enfasi>, & lt; Enfasi & gt; Ma anche & lt; Enfasi & gt; No & lt; / Enfasi & gt; & Lt; / Enfasi>. & Lt; / Significato & gt; & Lt; / Predizione & gt; & Lt; / I-ching & gt;  

This XML schema was developed with Russian Dolls technology:

   & Lt; Xsd: element name = "yin" /> & lt; / XSD: Options & gt; & Lt; / XSD: Sequence & gt; & Lt; / XSD: complexType & gt; & Lt; / XSD: element & gt; & Lt; / XSD: Sequence & gt; & Lt; Xsd: attribute name = "noam" type = "xsd: string" /> & Lt; / XSD: complexType & gt; & Lt; / XSD: element & gt; & Lt ;! - Importance: Reference model misto - & gt; & Lt; Xsd: element name = "importance" & gt; & Lt; Xsd: complex type blended = "true" & gt; & Lt; XSD: Sequence & gt; & Lt; Xsd: element name = "affix" type = "xsd: string" minOccurs = "0" maxOccurs = "unbounded" /> & Lt; / XSD: Sequence & gt; & Lt; / XSD: complexType & gt; & Lt; / XSD: element & gt; & Lt; / XSD: Sequence & gt; & Lt; / XSD: complexType & gt; & Lt; / XSD: element & gt; & Lt; / XSD: Sequence & gt; & Lt; / XSD: complexType & gt; & Lt; / XSD: element & gt; & Lt; / XSD: Schema & gt;  

For practice, I have to develop an XML schema to validate the previous XML. The problem is that oxygen tells me this:

  cvc- Complex-type.2.4.a: Invalid content started with element 'predizione' '{Predizione}' is expected to be one of the starting positions: 3: 6 ending place: 3:16 url: http: // www. W3.org/TR/xmlschema-1/#cvc-complex-type  

Why? Is this something wrong with my XML schema? Thank you very much

looking for predizione with an empty name space But it is because you do not need, only predizione can find http://www.oracolo.it/i-ching in the default namespace Set up elementFormDefault = "Qualified" in the xsd: schema element.

Basically the simplest solution is to use the following:

   

Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -