Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Attribute declaration when use="prohibited"

From: "Pete Cordell" <petexmldev@---------.--->
To: "Bharath Kumar Reddy T" <bharathkr@------.--->, <xmlschema-dev@--.--->
Date: 1/6/2009 2:10:00 PM
I think use="prohibited" and simpleType together are fine for an attribute 
that has a complexType as a parent.  use="prohibited" can't be used in a 
global attribute.

HTH,

Pete Cordell
Codalogic Ltd
Interface XML to C++ the easy way using XML C++
data binding to convert XSD schemas to C++ classes.
Visit http://codalogic.com/lmx/ for more info

----- Original Message ----- 
From: "Bharath Kumar Reddy T" <bharathkr@h...>
To: <xmlschema-dev@w...>
Sent: Tuesday, January 06, 2009 1:25 PM
Subject: Attribute declaration when use="prohibited"


> Hi all,
>
> If the attribute declaration has use="prohibited", Can we have simpleType 
> as
> child of attribute?
>
> EX:
>
> <xs:attribute name="Second_Attribute" use="prohibited">
>
>                                   <xs:simpleType>
>
>                                          <xs:restriction base="xs:string">
>
>                                                 <xs:enumeration value="A"
> />
>
>                                          </xs:restriction>
>
>                                   </xs:simpleType>
>
> </xs:attribute>
>
>
>
> Can anybody tell me whether the above attribute declaration is correct or
> not??
>
>
>
> Thanks and Regards,
>
> Bharath.
>
>
>
>
>
>  _____
>
> From: xmlschema-dev-request@w... [mailto:xmlschema-dev-request@w...] 
> On
> Behalf Of Bharath Kumar Reddy T
> Sent: Monday, January 05, 2009 3:52 PM
> To: xmlschema-dev@w...
> Subject: 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.
>
>
>
> 



From mike@s... Tue Jan 06 15:36:00 2009
Received: from bart.w3.org ([128.30.52.63])
	by frink.w3.org with esmtp (Exim 4.63)
	(envelope-from <mike@s...>)
	id 1LKDyK-00033X-3R
	for x


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent