不同XSD文档中的Key、KeyRef [英] Key, KeyRef in different XSD documents

查看:26
本文介绍了不同XSD文档中的Key、KeyRef的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这可能吗?

比如说我有

customers.xml

customers.xml

<customers>
    <customer>1</customer>
    <customer>2</customer>
</customers>

订单.xml

<orders>
    <order>
        <customer>1</customer>
    </order>
    <order>
        <customer>3</customer> Invalid as Customer 3 doesn't exist
    </order>
</orders>

XSD(使用 key 和 keyref)如何查找(customer.xsd 和 orders.xsd 也将是具有不同命名空间的两个不同文件),是否可能.我见过的所有示例都处理单个文件.

How would the XSD (using key and keyref) look for this (customer.xsd and orders.xsd would also be two different files with different namespaces), is it even possible. All the examples I have seen deal with single files.

Keys 和 Keyrefs 可以跨多个 XSD 分布吗文件?

推荐答案

这是不可能的.没有 XML 架构构造或约束适用于多个文件.

It's not possible. No XML schema construct or constraint works across multiple files.

这篇关于不同XSD文档中的Key、KeyRef的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆