Xsd-complex-anyattribute
提供:Dev Guides
XSD-<anyAttribute>
<xs:anyAttribute>要素は、XSD機能を拡張するために使用されます。 スキーマで定義されていない属性によって1つのxsdで定義されているcomplexType要素を拡張するために使用されます。
例について考えてみましょう-person.xsdは person complexType要素を定義しています。 attributes.xsdは age 属性を定義しています。
XMLで年齢を持つ人を定義する場合、次の宣言は無効になります。
<xs:anyAttribute>を使用
上記の person.xml を検証するには、person.xsdの person 要素に<xs:anyAttribute>を追加します。
これで、 person.xml は person.xsd および attributes.xsd に対して検証されます。