Hi all,
When reading the following ugly but valid (according to w3c XSV) xsd
into a DataSet I get "Duplicated declaration PossiblesValue" error.
Can anyone tell me why? This is a small part of a large xsd reverse
engineered from an existing xml output from an application so despite
the structure being crap it can't be changed.
Thanks,
Here's the XSD...
<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="XMLSchema1 " targetNamespace ="http://tempuri.org/
XMLSchema1.xsd" elementFormDefa ult="qualified" xmlns="http://
tempuri.org/XMLSchema1.xsd" xmlns:mstns="ht tp://tempuri.org/
XMLSchema1.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:complexTy pe name="Constrain t_CT">
<xs:sequence>
<xs:element name="Constrain tType" type="xs:string " />
<xs:group ref="Constraint sGroup" />
</xs:sequence>
</xs:complexType>
<xs:group name="DeltaOrSe tConstraintGrou p">
<xs:sequence>
<xs:element name="UseDelta" type="xs:boolea n" />
<xs:element name="Constrant 1" type="UniformCo nstraint_CT" />
<xs:element name="Constrain t2" type="ValueSet_ col" />
</xs:sequence>
</xs:group>
<xs:group name="Constrain tsGroup">
<xs:choice>
<xs:group ref="UniformCon straintGroup" />
<xs:group ref="SetConstra intGroup" />
<xs:group ref="DeltaOrSet ConstraintGroup " />
</xs:choice>
</xs:group>
<xs:group name="SetConstr aintGroup">
<xs:sequence>
<xs:element name="Possibles " type="ValueSet_ col" />
</xs:sequence>
</xs:group>
<xs:complexTy pe name="ValueSet_ CT">
<xs:sequence>
<xs:element name="Constrain tType" type="xs:string " />
<xs:element name="Possibles " type="ValueSet_ col" />
</xs:sequence>
</xs:complexType>
<xs:complexTy pe name="UniformCo nstraint_CT">
<xs:sequence>
<xs:element name="Constrain tType" type="xs:string " />
<xs:element name="Min" type="xs:string " />
<xs:element name="Max" type="xs:string " />
<xs:element name="Delta" type="xs:string " />
</xs:sequence>
</xs:complexType>
<xs:complexTy pe name="ValueSet_ col">
<xs:sequence>
<xs:element name="Possibles Value" type="xs:string "
maxOccurs="unbo unded" minOccurs="0" />
</xs:sequence>
</xs:complexType>
<xs:element name="root">
<xs:complexType >
<xs:sequence>
<xs:element name="id" type="xs:string " />
<xs:element name="constrain t" type="Constrain t_CT" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:group name="UniformCo nstraintGroup">
<xs:sequence>
<xs:element name="Min" type="xs:string " />
<xs:element name="Max" type="xs:string " />
<xs:element name="Delta" type="xs:string " />
</xs:sequence>
</xs:group>
</xs:schema>
When reading the following ugly but valid (according to w3c XSV) xsd
into a DataSet I get "Duplicated declaration PossiblesValue" error.
Can anyone tell me why? This is a small part of a large xsd reverse
engineered from an existing xml output from an application so despite
the structure being crap it can't be changed.
Thanks,
Here's the XSD...
<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="XMLSchema1 " targetNamespace ="http://tempuri.org/
XMLSchema1.xsd" elementFormDefa ult="qualified" xmlns="http://
tempuri.org/XMLSchema1.xsd" xmlns:mstns="ht tp://tempuri.org/
XMLSchema1.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:complexTy pe name="Constrain t_CT">
<xs:sequence>
<xs:element name="Constrain tType" type="xs:string " />
<xs:group ref="Constraint sGroup" />
</xs:sequence>
</xs:complexType>
<xs:group name="DeltaOrSe tConstraintGrou p">
<xs:sequence>
<xs:element name="UseDelta" type="xs:boolea n" />
<xs:element name="Constrant 1" type="UniformCo nstraint_CT" />
<xs:element name="Constrain t2" type="ValueSet_ col" />
</xs:sequence>
</xs:group>
<xs:group name="Constrain tsGroup">
<xs:choice>
<xs:group ref="UniformCon straintGroup" />
<xs:group ref="SetConstra intGroup" />
<xs:group ref="DeltaOrSet ConstraintGroup " />
</xs:choice>
</xs:group>
<xs:group name="SetConstr aintGroup">
<xs:sequence>
<xs:element name="Possibles " type="ValueSet_ col" />
</xs:sequence>
</xs:group>
<xs:complexTy pe name="ValueSet_ CT">
<xs:sequence>
<xs:element name="Constrain tType" type="xs:string " />
<xs:element name="Possibles " type="ValueSet_ col" />
</xs:sequence>
</xs:complexType>
<xs:complexTy pe name="UniformCo nstraint_CT">
<xs:sequence>
<xs:element name="Constrain tType" type="xs:string " />
<xs:element name="Min" type="xs:string " />
<xs:element name="Max" type="xs:string " />
<xs:element name="Delta" type="xs:string " />
</xs:sequence>
</xs:complexType>
<xs:complexTy pe name="ValueSet_ col">
<xs:sequence>
<xs:element name="Possibles Value" type="xs:string "
maxOccurs="unbo unded" minOccurs="0" />
</xs:sequence>
</xs:complexType>
<xs:element name="root">
<xs:complexType >
<xs:sequence>
<xs:element name="id" type="xs:string " />
<xs:element name="constrain t" type="Constrain t_CT" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:group name="UniformCo nstraintGroup">
<xs:sequence>
<xs:element name="Min" type="xs:string " />
<xs:element name="Max" type="xs:string " />
<xs:element name="Delta" type="xs:string " />
</xs:sequence>
</xs:group>
</xs:schema>
Comment