W3C home > Mailing lists > Public > xmlschema-dev@w3.org > October 2001

Re: clarification/errata: circular attributeGroup, ur-type & include

From: <sandygao@ca.ibm.com>
Date: Wed, 24 Oct 2001 17:29:14 -0400
To: www-xml-schema-comments@w3.org, xmlschema-dev@w3.org
Message-ID: <OF6403AC7F.6EF238F5-ON85256AEF.006B52A6@torolab.ibm.com>
Hi Henry,

Thanks for the reply.

Further on this topic:

1. If schema document A includes B, and B includes C. Does A have access to
components in C? And does C have access to A?

I think the answer is yes, according to your explanation below.

2. If schema document A includes B, and B *imports* C. Does A have access
to components in C?

From the spec [1], it seems A can't access C. But I want to be sure about
it. And if the above (1) is true, I would think (2) is true too.


[1] http://www.w3.org/TR/xmlschema-1/#src-resolve

Schema Representation Constraint: QName resolution (Schema Document)
...
4 its ·namespace name· is either the target namespace of the schema
document containing the ·QName· or that schema document contains an
<import> element information item the ·actual value· of whose namespace
[attribute] is identical to that ·namespace name·.

Thanks,
Sandy Gao
Software Developer, IBM Canada
(1-905) 413-3255
sandygao@ca.ibm.com



                                                                                                              
                    ht@cogsci.ed.a                                                                            
                    c.uk (Henry S.       To:     Sandy Gao/Toronto/IBM@IBMCA                                  
                    Thompson)            cc:     xmlschema-dev@w3.org, www-xml-schema-comments@w3.org         
                                         Subject:     Re: clarification/errata: circular attributeGroup,      
                    10/24/2001            ur-type & include                                                   
                    06:41 AM                                                                                  
                    Please respond                                                                            
                    to ht                                                                                     
                                                                                                              
                                                                                                              



sandygao@ca.ibm.com writes:

> [3] include
>
> Assume schema document A includes schema documents B and C, where B has
the
> same target namespace as A does, and C has no target namespace. Then from
> within a certain document, components from which document(s) can be
> referred to? That is, how to fill the following table? (R(A,B)=Y means
> components in A can refer to components in B.)
> R A B C
> A Y Y Y
> B ? Y ?
> C ? ? Y
>
> >From the spec, it seems that B can refer to A (bullet 4 of QName
resolution
> (Schema Document)). How about the other question marks?

The WG discussed your questions, and requested me to answer this one.

All three documents contribute components to and resolve their
references in the single target namespace, so all cells in the table
should be 'Y'.

This results from lazy resolution of references and the impact of
so-called 'chameleon' include (A, with a target namespace, includes C,
which does not, with the consequence that C's components are defined
in A's target namespace, and C's unqualified references are redirected
to that namespace as well).

If there are specific places in the text of the spec. which encourage
other conclusions, please let us know and we'll try to improve them.

ht
--
  Henry S. Thompson, HCRC Language Technology Group, University of
Edinburgh
          W3C Fellow 1999--2001, part-time member of W3C Team
     2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
               Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
                          URL: http://www.ltg.ed.ac.uk/~ht/
Received on Wednesday, 24 October 2001 17:30:25 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:24 GMT