![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >xmlschema-dev Archive Home >Recent entries >Thread Prev - RE: overriding a datatype of an attribute [Thread Next] RE: overriding a datatype of an attributeTo: Michael Kay <mike@--------.---> Date: 7/24/2008 3:10:00 AM Thanks for the reply Michael, Sorry the @name was an oversight on my part as I was hand coding it. I don't believe it will be confusing in the end but probably at first. Also the users won't see the XSD only html forms in a CMS. Marijan (Mario) Madunic Quoting Michael Kay <mike@s...>: > > 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 info@m... Fri Jul 25 19:13:25 2008 Received: from [128.30.52.63] (helo=bart.w3.org) by | ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
