Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: overriding a datatype of an attribute

From: "Michael Kay" <mike@--------.--->
To: "'Mario Madunic'" <hajduk@----.--->, <xmlschema-dev@--.--->
Date: 7/24/2008 6:39:00 PM
> Declare an attribute
> 
> <xs:attribute name="type" type="xs:string" />
> 
> in which case it is used most often as.
> 
> Then when i include it
> 
> <xs:include schemaLocation="../attributes/type.xsd" />
> 
> and then reference it
> 
> <xs:attribute name="type" use="optional" />

That's declaring a different attribute, it's not referencing your original
declaration. To reference your original declaration, use ref="type".

> 
> can i change its type to dtReferenceType
> 
> <xs:attribute name="type" type="dtReferenceType" use="optional" />
> 
> The reason being I really do not want to create multiple 
> attributes that basically do the same thing but just require 
> a different datatype.

If they have different data types then I would have said they are
fundamentally different - the only thing they have in common is the name!

But yes, you are welcome to have multiple attributes with the same name and
different types. It might confuse your users, but that's up to you.

Michael Kay
http://www.saxonica.com/


From hajduk@i... Thu Jul 24 17:10:17 2008
Received: from maggie.w3.org 


transparent
Print
Mail
Digg
delicious
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