Element XML Schema anyAttribute
Definicja i Wykorzystanie
anyAttribute elementem umożliwia twórcom przedłużyć dokument schematu XML przez nieruchomość nie została określona.
Element informacji
- Element nadrzędny: complexType, ograniczenia (zarówno simpleContent i complexContent), rozbudowa (zarówno simpleContent i complexContent) attributeGroup
gramatyka
<anyAttribute
id=ID
namespace=namespace
processContents=lax|skip|strict
any attributes
>
(annotation?)
</anyAttribute>
id=ID
namespace=namespace
processContents=lax|skip|strict
any attributes
>
(annotation?)
</anyAttribute>
(? Znak deklaruje, że element może wystąpić zero lub jeden raz w obrębie elementu anyAttribute).
属性 | 描述 |
---|---|
id | 可选。规定该元素的唯一的 ID。 |
namespace | 可选。规定包含可以使用的元素的命名空间。如果没有指定命名空间,则 ##any 为默认值。如果指定命名空间,则必须是以下值之一。
|
processContents | 可选。一个指示符,指示应用程序或 XML 处理器应如何根据由该 any 元素指定的元素处理 XML 文档的验证。 如果没有指定 processContents 属性,则默认为 strict。 如果指定了 processContents,必须是以下值之一。
|
any attributes | 可选。规定带有 non-schema 命名空间的任何其他属性。 |
Przykład 1
Poniższy przykład pokazuje deklarację dla "osoba" elementu. stosując
<xs:element name="person">
<xs:complexType>
<xs:sequence>
<xs:element name="firstname" type="xs:string"/>
<xs:element name="lastname" type="xs:string"/>
</xs:sequence>
<xs:anyAttribute/>
</xs:complexType>
</xs:element>
<xs:complexType>
<xs:sequence>
<xs:element name="firstname" type="xs:string"/>
<xs:element name="lastname" type="xs:string"/>
</xs:sequence>
<xs:anyAttribute/>
</xs:complexType>
</xs:element>
Kompletna XML Schema Reference