W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > October to December 2001

re: question about {attribute uses}

From: <lmartin@ca.ibm.com>
Date: Tue, 2 Oct 2001 14:25:26 -0400
To: www-xml-schema-comments@w3.org
Message-ID: <OFE441CF4A.49389AD7-ON85256AD9.0063FA9A@torolab.ibm.com>
Another example I'd like to ask about is the following:

<xsd:attributeGroup name="fred" >
      <xsd:attributeGroup ref="bas:bill"/>
      <xsd:attributeGroup ref="bas:bill"/>
</xsd:attributeGroup>

 <xsd:attributeGroup name="bill">
    <xsd:attribute name="bob" type="xsd:string"/>
 </xsd:attributeGroup>

When we compose the "set" of {attribute uses} for fred, should we only
include the attribute use for "bob" once?   Or does the final set of
{attribute uses} contain 2 duplicate attribute uses for "bob" and result in
an error according to constraint 2, section 3.6.6?

The question is really, should a processor attempt to construct an
{attribute uses} set which doesn't contain duplicate attribute uses, and if
so, what would be considered a duplicate attribute use?

Or, should each distinct attribute use be included in the "set", even if
there are members that are brought in to the set more than once, or have
the same properties as others in the set (which means we detect errors for
them as per constraint 2, section 3.6.6)?

Thx,
Lisa.

---------------------- Forwarded by Lisa Martin/Toronto/IBM on 10/02/2001
02:17 PM ---------------------------

Lisa Martin
10/01/2001 03:51 PM

To:   www-xml-schema-comments@w3.org
cc:
From: Lisa Martin/Toronto/IBM@IBMCA
Subject:  question about {attribute uses}


The {attribute uses} property of the attributeGroup schema definition
component is defined as:

"The union of the set of attribute uses corresponding to the <attribute>
[children], if any, with the {attribute uses} of the attribute groups ·
resolved· to by the ·actual value·s of the ref [attribute] of the
<attributeGroup> [children], if any."
                                                                                           
                                                                                           
 By definition, a "union" for a set has no duplicate members.     If the children of the   
 attribute group were the following:                                                       
                                                                                           
    <xs:attribute ref="bill"/>                                                             
    <xs:attribute ref="fred"/>                                                             
    <xs:attribute ref="bill"/>                                                             
                                                                                           
 does the {attribute uses} which results from the union contain 2 or 3 members?    (i.e.   
 does it contain 1 or 2 attribute uses for "bill")?                                        
                                                                                           
 I'm trying to determine whether the resulting set has duplicate attribute uses for        
 "bill", and whether we need to detect an error for this according to constraint 2 of      
 section 3.6.6 of Structures.                                                              
                                                                                           
                                                                                           
 Thx,                                                                                      
 Lisa.                                                                                     
                                                                                           
                                                                                           
                                                                                           
                                                                                           
                                                                                           
Received on Tuesday, 2 October 2001 14:25:44 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 6 December 2009 18:12:57 GMT