Reputation: 2596
This question is related to that one. But somewhat extended.
Let's assume we have an xml:
<field name="test_field_0">
Some text that is texty text.
<subfield>Some text.</subfield>
</field>
The Scheme for it from related question:
<xs:element name="field">
<xs:complexType mixed="true">
<xs:sequence>
<xs:element ref="subfield" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
<xs:attribute name="name" type="xs:string" />
</xs:complexType>
</xs:element>
Now the additional requirement is that text()
node of field
element should be regulated by some pattern, for example, this: \p{Lu}(\p{Ll}\p{P}\p{Z})+
Upvotes: 1
Views: 222
Reputation: 1161
XML Schema does not allow to put any constraints on the text of an element that contains mixed content.
Upvotes: 1