xsd:include和xsd:import之间有什么区别?什么时候你会用一种而不是另一种,什么时候它可能无关紧要?
当前回答
include和import之间的基本区别在于,必须使用import引用位于不同目标名称空间中的声明或定义,而必须使用include引用位于(或将位于)同一目标名称空间中的声明或定义。
来源:https://web.archive.org/web/20070804031046/http: / / xsd.stylusstudio.com/2002Jun/post08016.htm
其他回答
直接引用MSDN: <xsd:import> Element,备注section
The difference between the include element and the import element is that import element allows references to schema components from schema documents with different target namespaces and the include element adds the schema components from other schema documents that have the same target namespace (or no specified target namespace) to the containing schema. In short, the import element allows you to use schema components from any schema; the include element allows you to add all the components of an included schema to the containing schema.
include和import之间的基本区别在于,必须使用import引用位于不同目标名称空间中的声明或定义,而必须使用include引用位于(或将位于)同一目标名称空间中的声明或定义。
来源:https://web.archive.org/web/20070804031046/http: / / xsd.stylusstudio.com/2002Jun/post08016.htm
使用xsd:include将外部模式文档的所有声明和定义带入当前模式。
使用xsd:import从不同的名称空间引入一个xsd,用于通过扩展现有模式文档来构建一个新模式。
使用xsd:include引入来自相同或不存在命名空间的xsd。
使用xsd:import从不同的名称空间引入xsd。
我对这个也很感兴趣。我找到的唯一解释是,xsd:include用于名称空间内的包含,而xsd:import用于名称空间间的包含。
推荐文章
- c# XML文档网站链接
- 如何从shell执行XPath一行程序?
- 没有为文档检测到语法约束(DTD或XML模式)
- 免费的XML格式工具
- xsd:include和xsd:import之间有什么区别?
- 用XPath按属性值选择Element
- 谷歌协议缓冲区vs json vs XML
- 如何在Android中获得一个RadioGroup的选定索引
- XML Schema minOccurs / maxOccurs默认值
- XPath根据子元素的值选择元素
- 用java解析DOM的规范化——它是如何工作的?
- c++最好的开放XML解析器是什么?
- XPath:从子节点获取父节点
- 如何在Python中使用XPath ?
- 错误:不允许匹配“[xX][mM][lL]”的处理指令目标