[XMLSCHEMA-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Reg. Attribute declaration

From: Bharath Kumar Reddy T <bharathkr@huawei.com>
Date: Mon, 05 Jan 2009 15:51:49 +0530
To: xmlschema-dev@w3.org
Message-id: <000001c96f1f$6bdd14d0$3a12120a@china.huawei.com>
Reg. Attribute declaration
Hi.. 

According to schema spec. the attribute declaration is 

 

<attribute
  default = string
<http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#string> 
  fixed = string
<http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#string> 
  form = (qualified | unqualified)
  id = ID
<http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#ID> 
  name = NCName
<http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#NCName> 
  ref = QName
<http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#QName> 
  type = QName
<http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#QName> 
  use = (optional | prohibited | required) : optional
  {any attributes with non-schema namespace . . .}>
  Content: (
<http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/#element-annotation>
annotation?,
<http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/#element-simpleType>
simpleType?)
</attribute>

 

(i.e) attribute declaration content can be "annotation" and "simpleType".
When I give a complexType as follows, 

 

<xs:attribute name="Second_Attribute" use="prohibited">

                                   <xs:simpleType>

                                          <xs:restriction base="xs:string">

                                                 <xs:enumeration value="A"
/>

                                          </xs:restriction>

                                   </xs:simpleType>

 

                                   <xs:annotation>

<xs:documentation>

Adkssan

</xs:documentation>

</xs:annotation>

</xs:attribute>

 

Where I have given both annotation and SimpleType. 

Altova spy is giving error that "annotation element is not allowed". But
according to schema spec, I think this is correct.

Can anybody tell me whether this is an error or not an error.

 

Thanks and Regards,

Bharath.

 
Received on Monday, 5 January 2009 10:22:42 GMT

Subscribe to the Stylus Scoop newsletter for helpful XML tips and tutorials.
Email
First Name
Last Name
Company

Download Stylus Studio 6 XML Enterprise Edition

Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.