我有这个代码:
<desc>
<paragraphe>bala bla bla</paragraphe>
<paragraphe>bala bla bla bla</paragraphe>
<paragraphe>bala bla bla</paragraphe>
</desc>
我想限制desc
元素的最大长度为 120 个字符,paragraphe
仅包括所有内容。
例如对于单个paragraphe
元素,我可以对 40 个字符的固定最大长度执行此操作:
<xs:element name="paragraphe">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="40"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
desc
但我想将(总paragraphe
字符)的长度限制为 120 个字符。