首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >XML Schema Design - <xs:documentation>源属性值

XML Schema Design - <xs:documentation>源属性值
EN

Stack Overflow用户
提问于 2012-10-02 08:01:40
回答 1查看 639关注 0票数 1

我被要求记录一个XML Schema文件。我需要包括每个模式元素的业务和技术描述。看着我们的指南和W3C XML Schema建议,我想知道最好的实践到底是什么。

我们的指导方针规定注释标记应具有以下格式:

代码语言:javascript
复制
<xs:annotation>
    <xs:documentation source="BusinessDescription">This is the business description</xs:documentation>
    <xs:documentation source="TechnicalDescription">This is the business description</xs:documentation>
</xs:annotation>

XML建议源属性的类型应该是"xs:anyURI“。显然,"BuinessDescription“和"TechnicalDescription”不是URI,它们将在整个模式中重复出现。因此,使用源属性作为语义属性真的正确吗?

在XML Schema http://shop.oreilly.com/product/9780596002527.do中,Eric van der Vlist建议这是可以接受的,但也与这种观点相矛盾,因为它可能导致互操作性问题。

EN

回答 1

Stack Overflow用户

发布于 2012-10-02 08:16:57

您可以将格式良好的xml放在其中,而不仅仅是文本,这样就不需要对已知的标准属性进行杂乱处理。只要有<Business>This is the business...</Business><Technical>This is the technical....</Tecnhical>节点就行了。

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

https://stackoverflow.com/questions/12682777

复制
相关文章

相似问题

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