Question

I tried to create C# object from PMML 3.0 Schema (PMML 3.0 Schema) using Xsd2Code (Xsd2Code), but all I got was following error:

Error: Multiple definition of element 'http://www.dmg.org/PMML-3_0:Array' causes the content model to become ambiguous. A content model must be formed such that during validation of an element information item sequence, the particle contained directly, indirectly or implicitly therein with which to attempt to validate each item in the sequence in turn can be uniquely determined without examining the content or attributes of that item, and without any information about the items in the remainder of the sequence.

I am pretty sure this specification is correct. I also tried xsd.exe from VS, but without success.

Is there any other way to do such conversion?

Thanks for any help!

Was it helpful?

Solution

I found this old question: XSD sequence shows as abiguous!, so I checked the xsd http://www.dmg.org/v3-0/pmml-3-0.xsd and I found this part:

<xs:element name="ContStats">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="Extension" minOccurs="0" maxOccurs="unbounded" />
        <xs:element minOccurs="0" maxOccurs="unbounded" ref="Interval" />
        <xs:group minOccurs="0" ref="INT-ARRAY" />
        <xs:group minOccurs="0" maxOccurs="2" ref="NUM-ARRAY" />
      </xs:sequence>
      <xs:attribute name="totalValuesSum" type="NUMBER" />
      <xs:attribute name="totalSquaresSum" type="NUMBER" />
    </xs:complexType>
  </xs:element>

Just like in the answer of the question I linked, if the validator finds an Array can't tell if it is an INT-ARRAY or one of the maximun 2 NUM-ARRAY.

I can't tell if there is a way to do this conversion without modifying the xsd.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top