Witam.
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

  1. <xsd:element name="zamowienie" type="zamowienie_typ"/>
  2.  
  3. <xsd:element name="komentarz" type="xsd:string"/>
  4.  
  5. <xsd:complexType name="zamowienie_typ">
  6. <xsd:sequence>
  7. <xsd:element name="wyslac_do" type="adres_typ"/>
  8. <xsd:element name="rachunek" type="adres_typ"/>
  9. <xsd:element ref="komentarz" minOccurs="0"/>
  10. <xsd:element name="towary" type="towary_typ"/>
  11. </xsd:sequence>
  12. <xsd:attribute name="data_zamowienia" type="xsd:date"/>
  13. </xsd:complexType>
  14.  
  15. <xsd:complexType name="adres_typ">
  16. <xsd:sequence>
  17. <xsd:element name="osoba" type="xsd:string"/>
  18. <xsd:element name="ulica" type="xsd:string"/>
  19. <xsd:element name="numer" type="xsd:string"/>
  20. <xsd:element name="kod_pocztowy" type="kod_pocztowy_typ"/>
  21. <xsd:element name="miasto" type="xsd:string"/>
  22. </xsd:sequence>
  23. <xsd:attribute name="kraj" type="xsd:NMTOKEN" fixed="PL"/>
  24. </xsd:complexType>


Dobra, już sam sobie odpowiedziałem, szperałem w internecie, aż znalazłem smile.gif

poprzez extension