Drilsk XML-schema
Her er et udsnit af mit XML:<rnds>
<rnd rndNum="Round 1" courseNum="659">
<rndPos>1</rndPos>
<rndScr>63</rndScr>
<relParScr>-7</relParScr>
<cumParScr>-7</cumParScr>
</rnd>
<rnd rndNum="Round 2" courseNum="659">
<rndPos>1</rndPos>
<rndScr>67</rndScr>
<relParScr>-3</relParScr>
<cumParScr>-10</cumParScr>
</rnd>
<prevMoneyPos>
</prevMoneyPos>
<curMoneyPos>1</curMoneyPos>
</rnds>
Nedenfor ses den del af mit schema som driller:
<xsd:complexType name="rndsType">
<xsd:sequence maxOccurs="unbounded">
<xsd:element name="rnd" type="rndType"/>
<xsd:element name="prevMoneyPos" type="xsd:string"/>
<xsd:element name="curMoneyPos" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
Når jeg prøver at validere får jeg følgende fejl:
The element 'rnds' in namespace 'schema.xsd' has invalid child element 'rnd' in namespace 'schema.xsd'. List of possible elements expected: 'prevMoneyPos' in namespace 'schema.xsd'.
Håber i kan hjælpe...
