Antwort: Re: named local complexType definitions?

Hi Eddie,
thanks for the answer. I didn´t really find it in the complexType
explanations but
had a look in the normative schema for schemas, and I guess there it is:

--snip-----------------------------------------------------------------
<xs:complexType name="localComplexType">
  <xs:complexContent>
   <xs:restriction base="xs:complexType">
    <xs:sequence>
     <xs:element ref="xs:annotation" minOccurs="0"/>
     <xs:group ref="xs:complexTypeModel"/>
    </xs:sequence>
    <xs:attribute name="name" use="prohibited"/>
    <xs:attribute name="abstract" use="prohibited"/>
    <xs:attribute name="final" use="prohibited"/>
    <xs:attribute name="block" use="prohibited"/>
   </xs:restriction>
  </xs:complexContent>
 </xs:complexType>
--/snip----------------------------------------------------------------

Best regards
  Holger
_________________________

Holger Joukl
LBBW
2342 Z - IT/Org II Handel
Tel. +49 (711) 124 - 7078
_________________________


                                                                                                                                             
                    Eddie Robertsson                                                                                                         
                    <eddie@allette.com        An:     Holger.Joukl@LBBW.de                                                                   
                    .au>                      Kopie:  xmlschema-dev@w3.org                                                                   
                    Gesendet von:             Thema:  Re: named local complexType definitions?                                               
                    xmlschema-dev-requ                                                                                                       
                    est@w3.org                                                                                                               
                                                                                                                                             
                                                                                                                                             
                    11.07.01 01:28                                                                                                           
                                                                                                                                             
                                                                                                                                             






Holger.Joukl@LBBW.de wrote:

> Hi there,
> somewhere in the mail archive I read that this is not allowed:
> ...
> <element name="bla">
>   <complexType name="localName">
>   ...
> </element>
>
> I. e. you cannot give a name to a complexType definition that is not
> top-level.
> I just tried to find out where exactly the Rec says this is not possible,
> but
> haven´t been able to.

I think the relevant section is [1] which says:

"Complex types definitions are identified by their {name} and {target
namespace}. Except for
anonymous complex type definitions (those with no {name}), since type
definitions..."

> Could someone please give me a hint?

You're correct. Anonymous types cannot carry name attribtues.

> If this is correct, referencing either by 'ref=..' or by 'type=...' can
only point
> to top-level element declarations/type definitions, never to local ones.

Yes.

Cheers,
/Eddie

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

>
>
> Thanks
>   Holger
> _________________________
>
> Holger Joukl
> LBBW
> 2342 Z - IT/Org II Handel
> Tel. +49 (711) 124 - 7078
> _________________________
>
> ______________________________________________________________________
>
>
--------------------------------------------------------------------------------------------

>



______________________________________________________________________


--------------------------------------------------------------------------------------------
Bitte beachten Sie, dass der Inhalt dieser E-Mail einschließlich eventuell
angehängter Dokumente vertraulich ist. Falls Sie nicht der angegebene
Empfänger sind oder falls diese E-Mail irrtümlich an Sie adressiert wurde,
dürfen Sie die E-Mail und eventuell angehängte Dokumente weder öffnen,
lesen, kopieren, verbreiten noch ihren Inhalt in irgendeiner Weise nutzen.
Bitte verständigen Sie den Absender sofort und löschen Sie Die E-Mail
sodann.

Die Sicherheit von Übermittlungen per E-Mail kann nicht garantiert werden.
Per E-Mail übermittelte Informationen können abgefangen oder geändert
werden, verloren gehen oder zerstört werden, verspätet oder unvollständig
ankommen, oder Viren enthalten. Der Absender übernimmt daher keine Gewähr
für Irrtümer oder Auslassungen jeder Art im Inhalt sowie sonstige Risiken,
die auf die Übermittlung per E-Mail zurückzuführen sind. Falls Sie eine
Bestätigung wünschen, fordern Sie bitte den Inhalt der E-Mail als Hardcopy
an.


This e-mail and any attached files are confidential. If you are not the
named addressee or if this transmission has been addressed to you in error,
any disclosure, reproduction, copying, distrubtion, or other dissemination
or use of this communication is prohibited. If you have received this
transmission in error please notify the sender immediately and then delete
this e-mail.

E-mail transmission cannot be guaranteed to be secure or free from error as
information could be intercepted, corrupted, lost, destroyed, arrive late
or incomplete, or contain viruses. The sender therefore does not accept
liability for any errors or omissions in the contents of this message or
any other of such risks which arise as a result of e-mail transmission. If
verification is required, please request a hard copy version.
---------------------------------------------------------------------------------------------

Received on Wednesday, 11 July 2001 06:06:32 UTC