<attribute default = string fixed = string form = (qualified | unqualified) id = ID name = NCName ref = QName type = QName use = (optional | prohibited | required ) optional {any attributes with non-schema namespace ...} > Content: (annotation?,(simpleType?)) |
Example
<xs:attribute name="age" type="xs:positiveInteger" use="required"/> |
Ref value is generated from ref or refString TaggedValue. One of ref or name must be present, but not both.
If ref is present, then all of <simpleType>, form and type must be absent. Type and <simpleType> must not both be present.
Example of attribute UML model (1).
<xs:schema xmlns:nm = "http://nomagic.com" xmlns:xs = "http://www.w3.org/2001/XMLSchema" targetNamespace = "http://nomagic.com"
<xs:attribute name = "name" type = "xs:string" default = "minde" fixed = "fixed_value" form = "qualified" use "optional" > <xs:annotation > <xs:documentation >name attribute </xs:annotation> </xs:attribute> <xs:attribute name = "address" fixed = "fixed_value" form = "qualified" use = "optional" > <xs:documentation >surname attribute documentation‹/xs:documentation> <xs:restriction base = "xs:string" /> ‹/xs:simpleType> <xs:attribute name = "surname" type "xs:string" /> <xs:attributeGroup name = "attr_group" > <xs:attribute ref "nm:name" > <xs:annotation > <xs:documentation >reference documentation</xs:documentation> </xs:annotation> </xs:attribute> <xs:attribute ref = "nm:surname" /> </xs:attributeGroup> |