是否有“http://schemas.microsoft.com/2003/10/Serialization/”的 xsd 文件?命名空间?
我想为数据契约序列化类创建/推断架构。
当我使用 [DataContract(IsReference = true)]
属性时,序列化程序正在注入属性 z:Id="i2"
和 z:Ref="i2"< /code> 引用相同的对象实例。
这两个属性都来自 http://schemas.microsoft.com/2003/10/Serialization/
命名空间。
问题:
- 序列化程序使用的命名空间是否有一个 xsd 架构文件,我可以将其导入到我的架构中?
- 现在,我将这些属性定义为
xs:ID
/xs:IDREF
对。这是正确的吗?
提前致谢。
I want to create / infer schema for data-contract serialized classes.
When I use [DataContract(IsReference = true)]
attribute the serializer is injecting attributes z:Id="i2"
and z:Ref="i2"
to reference the same object instances.
Both attributes are from http://schemas.microsoft.com/2003/10/Serialization/
namespace.
Questions:
- Is there a xsd schema file for the namespace used by serializer which I could import into my schema?
- For now I am defining those attributes as a
xs:ID
/xs:IDREF
pair. Is that correct?
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
xsd 架构应该在此处进行描述 - 查找数据合同部分序列化架构。但是,如果您确实查找属性,您将不会在那里找到它们 - 文档错误!
要获取完整架构,请查看此 和此 -在 WSDL 类型内部,您将找到正确的架构。至于您对属性的假设,是的,您是正确的。
我在这里内联它,以防万一:
The xsd schema is supposed to described here - look for the section Data Contract Serialization Schema. However, if you do look for your attributes, you will not find them in there - documentation bug!
To get the full schema, take a look at this and this - inside the WSDL types, you'll find the correct schema. As for your assumption regarding the attributes, yes, you are correct.
I am inlining it here, just in case: