问题
How would the element complexType look like if I want it to have variable attribute names, count and values ?
<mtd:attributes icon="remove" security="D" variable1="F" variable2="D"/>
I tried :
<xsd:element name="attributes">
<xsd:complexType>
<xsd:anyAttribute/>
</xsd:complexType>
</xsd:element>
but it doesn't do it.
回答1:
I finally made it with :
<xsd:anyAttribute processContents="skip"/>
回答2:
Try to add processContents=skip
来源:https://stackoverflow.com/questions/14872678/allow-variable-element-attributes-in-xml-schema