2012-07-30 76 views
0

我试图从PMML 3.0创建C#对象架构使用Xsd2Code(Xsd2Code)(PMML 3.0 Schema),但我得到的是以下错误:错误转换PMML的XML Schema(XSD)到C#对象使用Xsd2Code

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.

我很确定这个规范是正确的。我也试过VS的xsd.exe,但没有成功。

是否有任何其他方式来做这种转换?

感谢您的帮助!

回答

1

我发现这个老问题:XSD sequence shows as abiguous!,所以我检查了XSD http://www.dmg.org/v3-0/pmml-3-0.xsd,我发现这部分:

<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> 

就像在我联系的问题的答案,如果验证发现一个阵列”不知道它是INT-ARRAY还是最大的2个NUM-ARRAY之一。

我不知道是否有办法在不修改xsd的情况下执行此转换。

+0

谢谢!我将尝试修改.xsd并查看它是否有效。 – MattheW 2012-07-30 16:59:48