OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Multiply Defined Elements (was: Re: XML Schemas: ref'ing versusin-lining

[ Lists Home | Date Index | Thread Index ]
  • From: "Roger L. Costello" <costello@mitre.org>
  • To: "'xml-dev@lists.xml.org'" <xml-dev@lists.xml.org>
  • Date: Wed, 13 Sep 2000 15:20:17 -0400

"Arnold, Curt" wrote:
> 
>      <element name="foo">
>         <complexType>
>            <element name="bar" type="string"/>
>            <element name="bar" type="string"/>
>         </complexType>
>      </element>
> 
> illegal (regardless of the value of type) since you have duplicate 
> declarations of the same element name within the same symbol space.  

Hmm, yes I see your point Curt.  However, Henry responded differently:

> > May I conclude that it is legal to multiply declare an element 
> > provided they all have the same type?
> 
> Yes.

Curt, what about this:

    <element name="foo"> 
       <complexType>
          <element ref="a:bar"/>
          <element ref="a:bar"/>
       </complexType>
    </element>

Would you consider this to be legal or illegal?  It's not really
defining an element twice.  Rather, it's referring to the single
declaration twice.

On the other hand, Henry says that the 'ref' form is equivalent to the
in-lined form,

> > is this:
> >
> >     <element name="foo">
> >        <complexType>
> >           <element ref="a:bar"/>
> >           <element ref="a:bar"/>
> >        </complexType>
> >     </element>
> >
> >     <element name="bar" type="string"/>
> >
> > equivalent to this:
> >
> >     <element name="foo">
> >        <complexType>
> >           <element name="bar" type="string"/>
> >           <element name="bar" type="string"/>
> >        </complexType>
> >     </element>
> 
> Yes.

which would imply that we have "defined" the element twice (and thus
illegal by your thinking).

Henry, your thoughts?  Curt, any further comments?  /Roger





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS