生成类抽象复杂类型的架构

编程入门 行业动态 更新时间:2024-10-12 08:21:54
本文介绍了生成类抽象复杂类型的架构的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在与一些架构定义了一个抽象的复杂类型,如:

I'm working with some schema which defines an abstract complex type, eg.

<xs:complexType name="MyComplexType" abstract="true">

这类型的,然后由另一个复杂类型的架构中引用:

This type is then referenced by another complex type in the schema:

<xs:complexType name="AnotherType"> <xs:sequence> <xs:element name="Data" type="MyComplexType" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType>

当我运行XSD.EXE / D / L:CS MySchema.xsd我得到这个错误:

When I run "xsd.exe /d /l:CS MySchema.xsd" I get this error:

错误:有一个错误处理MySchema.xsd。      - 错误发生code为数据集'。      - 无法输入xml文件内容转换为数据集。数据集不能实例化一个抽象的ComplexType该节点的数据。      - 数据集不能实例化一个抽象的ComplexType为节点的数据。

Error: There was an error processing MySchema.xsd'. - Error generating code for DataSet ''. - Unable to convert input xml file content to a DataSet. DataSet cannot instantiate an abstract ComplexType for the node Data. - DataSet cannot instantiate an abstract ComplexType for the node Data.

这似乎并不为无效模式。有没有其他人遇到这个问题?

It doesn't seem to be invalid schema. Has anyone else run into this issue?

感谢

尼克

推荐答案

评估几种不同的模式,于─code工具,我们发现,能够处理我们的模式是唯一一个后(非常大,非常复杂)是液体的XML( www.liquid-technologies/ )。

After evaluating several different schema-to-code tools the only one we found that was able to deal with our schema (very large and extremely complicated) was Liquid XML (www.liquid-technologies/).

更多推荐

生成类抽象复杂类型的架构

本文发布于:2023-11-16 15:25:23,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1605500.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:抽象   架构   类型

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!