Defining a text template () node of a complex blended element
This question is related to that one. But somewhat advanced.
Let's assume we have xml:
<field name="test_field_0">
Some text that is texty text.
<subfield>Some text.</subfield>
</field>
Schematic for it from the linked 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 an additional requirement is that the element's text()
node field
must be governed by some pattern, for example:\p{Lu}(\p{Ll}\p{P}\p{Z})+
+1
a source to share