Re: Questions about local refs

Bob:  the <element ref="..."/> construction always resolves to a global 
element declaration.  From [1] (4.3.1 XML Representation of Attribute Declaration Schema Components):

...otherwise (the element element information item has complexType or 
group as an ancestor and the ref [attribute] is present), the 
corresponding schema component is as follows (unless 
minOccurs=maxOccurs=0, in which case the item corresponds to no component 
at all):
 
Particle Schema Component
=========================
 
{min occurs} The numeric normalized value of the minOccurs [attribute], if 
present, otherwise 1 

{max occurs} unbounded, if the maxOccurs [attribute] equals unbounded, 
otherwise the numeric normalized value of the maxOccurs [attribute], if 
present, otherwise 1. 

{term} The >>>(global)<<< element declaration resolved to by the 
normalized value of the ref [attribute].


All of the above is easier to read in the formatted original, but note the 
"(global)" in the final sentence.  That's where you discover that a ref 
can never be to a local element.

[1] http://www.w3.org/TR/xmlschema-1/#declare-element
 

------------------------------------------------------------------------
Noah Mendelsohn                                    Voice: 1-617-693-4036
Lotus Development Corp.                            Fax: 1-617-693-8676
One Rogers Street
Cambridge, MA 02142
------------------------------------------------------------------------

Received on Tuesday, 28 November 2000 15:44:17 UTC