W3C home > Mailing lists > Public > public-xsd-databinding@w3.org > September 2006

Re: ISSUE-69: Global Attributes

From: Pete Cordell <petexmldev@tech-know-ware.com>
Date: Tue, 5 Sep 2006 18:15:03 +0100
Message-ID: <002001c6d10e$dc6435a0$5000a8c0@RW>
To: "Databinding WG" <public-xsd-databinding@w3.org>

Hi Paul,

I think my understanding of global attributes is different to your.  I may 
well be guilty of reading the spec how I would like it to be rather than 
what it really is!

As you know, the spec says "...{global} identifies attribute declarations 
available for use in complex type definitions throughout the schema.  ..." 
My reading of that is that such global attributes are available for use, but 
not actually used unless there is an associated attribute use in the complex 
type definition.

Putting my understanding another way, to have an attribute in a complex type 
you need an attribute declaration and an attribute use.  The global 
attribute is just an attribute declaration.  You need an attribute use (i.e. 
an xs:attribute statement that allows a use attribute) in the complex type 
to actually use a global declaration.

On the other hand, local attribute definitions with either type= or 
xs:simpleType body are both an attribute use and an attribute declaration 
wrapped up in one!

I must admit that this has been perplexing me for a while, but my forensic 
analysis of the spec brings me to this conclusion!


Pete Cordell
Tech-Know-Ware Ltd
                         for XML to C++ data binding visit
                         (or http://www.xml2cpp.com)

----- Original Message ----- 
From: "Databinding Issue Tracker" <dean+cgi@w3.org>
To: <public-xsd-databinding@w3.org>
Sent: Tuesday, September 05, 2006 12:32 PM
Subject: ISSUE-69: Global Attributes

> ISSUE-69: Global Attributes
> http://www.w3.org/2005/06/tracker/databinding/issues/69
> Raised by: Paul Downey
> On product: Basic
> Our current editors' draft includes patterns for global attributes:
> http://www.w3.org/2002/ws/databinding/edcopy/basic/basic.html#pattern-GlobalAttribute
> Which may have crept in from generic patterns for predefined types of 
> attributes.
> Whilst local attributes appear to be reasonably well supported by 
> databinding
> tools, it seems that global attributes aren't, in particular those from 
> another
> namesapce. e.g. a schema which imports a global definition of xml:id is 
> unlikely
> to result in each generated class containing an explicit 'id' property 
> meaning
> it's not possible to access the xml:id values from generated code.
> In addition, we currently have no examples for global attributes as they 
> need a
> carrier global element, so we need to embark on generating a large number 
> of
> such examples to test our current global attribute patterns.
> Proposal: make global attributes an advanced Pattern and constrain Basic
> attributes to being local to other collection patterns specified such as 
> by
> ISSUE-47.
Received on Tuesday, 5 September 2006 17:15:37 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:42:56 UTC