首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何从CCD模式生成类

如何从CCD模式生成类
EN

Stack Overflow用户
提问于 2013-02-19 14:31:22
回答 1查看 1.4K关注 0票数 1

我尝试使用以下步骤生成CCD.xsd到C#类文件:

  1. 这个例子复制整个模式,将其粘贴到记事本中,并将其保存为xsd文件。
  2. 从命令提示符(以管理员身份运行)执行xsd命令xsd D:\ccd.xsd /c /n:CCD
  3. 成功地创建了ccd.cs类文件,没有任何错误或警告。

但我得到了这个错误。

代码语言:javascript
复制
Microsoft (R) Xml Schemas/DataTypes support utility
[Microsoft (R) .NET Framework, Version 4.0.30319.17929]
Copyright (C) Microsoft Corporation. All rights reserved.
Schema validation warning: The 'urn:hl7-org:sdtc:patient' element is not declare
d. Line 5902, position 8.
Schema validation warning: The 'urn:hl7-org:sdtc:patient' element is not declare
d. Line 4868, position 8.
Schema validation warning: The 'urn:hl7-org:sdtc:patient' element is not declare
d. Line 4852, position 8.

Warning: Schema could not be validated. Class generation may fail or may produce
 incorrect results.

Error: Error generating classes for schema 'ccd'.
  - The element 'urn:hl7-org:sdtc:patient' is missing.

如果需要更多帮助,请键入"xsd /?“。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-02-19 17:22:46

要消除警告,您必须找到SDTC (targetNamespace='urn:hl7-org:sdtc'),它定义了patient元素。将新文件添加到xsd.exe命令行,并添加到ccd.xsd (确保列出了SDTC所需的任何文件)。

需要将SDTC文件添加到命令行的原因与ccd.xsd没有显式导入SDTC命名空间有关。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/14959951

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档