是否可以将两个xml列表的长度定义为要求相等? [英] can the length of two xml lists be defined as being required to be equal?

查看:73
本文介绍了是否可以将两个xml列表的长度定义为要求相等?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设您在xml模式中定义了两个列表,分别称为A和B,是否有办法说A必须是一个或多个项目,而B必须与A长度相同?

Assuming you have two lists defined in an xml schema, call them A and B, is there a way to say A must be one or more items and B must be the same length as A?

推荐答案

作为存储的替代方法

A = (a, a, a)
B = (b, b, b)

并采用相同的长度,您可以尝试存储:

and enforcing the same length, you could try storing:

AB = ([a,b], [a,b], [a,b])

这样,您需要强制执行的约束是AB中的每个元素的长度均为2,并且由类型A和B组成-在正常模式下应该可以实现.

This way the constraint you need to enforce would be that each element from AB is of length two and consists of the types A and B - this should be possible in a normal schema.

这篇关于是否可以将两个xml列表的长度定义为要求相等?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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