Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: AW: Attributes from different namespaces

From: "C. M. Sperberg-McQueen" <cmsmcq@---.--->
To: Gregor Zeitlinger <gregor.zeitlinger@-----------.-->
Date: 12/14/2005 2:21:00 PM
On Wed, 2005-12-14 at 14:55, Gregor Zeitlinger wrote:
> Hi Pete,
>  
> thanks for the help. This solved my problem.
> But thinking about it, what would I have to do, when I had two elements that both have attribute b:bAtt, but with different types.
>  
> In my first example, I would do:
> <xsd:attribute name="bAtt" type="b:bAttType" />
> ..
> <xsd:attribute name="bAtt" type="b:bAttType2" />

How many different global attributes named 'bAtt' do
you want the b namespace to have?  XML Schema follows
the lead of XML Namespaces in allowing for one, but
only one.  One attribute, one type, so there is no
provision in XML Schema for assigning different types
to a global attribute depending on which element it
appears on.  

If you want attributes of the same name to take 
different types on different elements, it sounds like
what you want are two different attributes.  That
can easily be done by making the attributes local
to those elements -- but that means declaring them
that way, which means they are either unqualified
or qualified with the target namespace of the element
to which they are local.

I hope this helps.

-C. M. Sperberg-McQueen
 World Wide Web Consortium



From webmaster@i... Sat Dec 17 06:52:06 2005
Received: from wigg


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