开发者

Key, KeyRef in different XSD documents

开发者 https://www.devze.com 2023-03-24 09:44 出处:网络
Is this possible? Say for example I have customers.xml <customers> <customer>1</customer>

Is this possible?

Say for example I have

customers.xml

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

orders.xml

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

How would the XSD 开发者_StackOverflow社区(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.

Can Keys and Keyrefs be spread across multiple XSD files?


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

0

精彩评论

暂无评论...
验证码 换一张
取 消