I am planning to receive that structure:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Document>
<property key="DocumentType" value="INV" />
<property key="InvInternalNumber" value="i-1651-84" />
<property key="OtherDynamicProperty" value="yes" />
</Document>
I identify document type and going to validate with "INV.xsd"
Oh, business say that Invoice must have "InvInternalNumber" property!
So, Is it possible to xsd validate "Is there a property "InvInternalNumber" " ?
UPDATE That XSD has been generated by JaxbContext.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<xs:schema version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="Document" type="Document"/>
<xs:complexType name="Document">
<xs:sequence>
<xs:element name="property" type="property" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="property">
<xs:sequence/>
<xs:attribute name="key" type="xs:string"/>
<xs:attribute name="value" type="xs:string"/>
</xs:complexType>
</xs:schema>