Chodzi o to, że w moim pliku xsd mam 2 elementy:
-rachunek
-wysyłka
o tym samym typie złożonym "adres_typ"
i teraz wszystko w nich ma być tak samo, ale do wysyłki chciałbym dodać jeden element dodatkowy.
Czy muszę dodać osobny typ? Czy mogę jakoś zmodyfikować ten, czy da się to zrobić inaczej?
i minOcures raczej nie wchodzi w grę, bo ma być tak(to takie ćwiczenia).
Z góry dzięki
<xsd:element name="zamowienie" type="zamowienie_typ"/> <xsd:element name="komentarz" type="xsd:string"/> <xsd:complexType name="zamowienie_typ"> <xsd:sequence> <xsd:element name="wyslac_do" type="adres_typ"/> <xsd:element name="rachunek" type="adres_typ"/> <xsd:element ref="komentarz" minOccurs="0"/> <xsd:element name="towary" type="towary_typ"/> </xsd:sequence> <xsd:attribute name="data_zamowienia" type="xsd:date"/> </xsd:complexType> <xsd:complexType name="adres_typ"> <xsd:sequence> <xsd:element name="osoba" type="xsd:string"/> <xsd:element name="ulica" type="xsd:string"/> <xsd:element name="numer" type="xsd:string"/> <xsd:element name="kod_pocztowy" type="kod_pocztowy_typ"/> <xsd:element name="miasto" type="xsd:string"/> </xsd:sequence> <xsd:attribute name="kraj" type="xsd:NMTOKEN" fixed="PL"/> </xsd:complexType>
Dobra, już sam sobie odpowiedziałem, szperałem w internecie, aż znalazłem

poprzez extension