Advertisement
Guest User

Untitled

a guest
Oct 20th, 2014
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 5.75 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <zamowienie data_przyjecia="2014-10-20">
  3.   <wyslac_do kraj="PL">
  4.     <osoba>
  5.       Krzysztof Nowak
  6.     </osoba>
  7.     <ulica>
  8.       Niepodleglosci
  9.     </ulica>
  10.     <numer>
  11.       799A
  12.     </numer>
  13.     <kod_pocztowy>81-100</kod_pocztowy>
  14.     <miasto>
  15.       Sopot
  16.     </miasto>
  17.     <wojewodztwo>pomorskie</wojewodztwo>
  18.   </wyslac_do>
  19.   <rachunek kraj="PL">
  20.     <osoba>
  21.       Krzysztof Nowak
  22.     </osoba>
  23.     <ulica>
  24.       Niepodleglosci
  25.     </ulica>
  26.     <numer>
  27.       799A
  28.     </numer>
  29.     <kod_pocztowy>81-100</kod_pocztowy>
  30.     <miasto>
  31.       Sopot
  32.     </miasto>
  33.   </rachunek>
  34.   <komentarz>Pilnie potrzebne</komentarz>
  35.   <towary>
  36.     <towar kod_produktu="XYZ-123-345">
  37.       <nazwa_towaru>Silnik iFlight 2216</nazwa_towaru>
  38.       <ilosc>
  39.         6
  40.       </ilosc>
  41.       <cena_jednostkowa>
  42.         58.50
  43.       </cena_jednostkowa>
  44.       <producent_towaru>
  45.         Boening Company
  46.       </producent_towaru>
  47.     </towar>
  48.     <towar kod_produktu="ABX-691-696">
  49.       <nazwa_towaru>Kontroler ESC 30A iFlight</nazwa_towaru>
  50.       <ilosc>
  51.         24
  52.       </ilosc>
  53.       <cena_jednostkowa>
  54.         62.00
  55.       </cena_jednostkowa>
  56.       <producent_towaru>
  57.         Airbus
  58.       </producent_towaru>
  59.     </towar>
  60.     <towar kod_produktu="SEG-321-231">
  61.       <nazwa_towaru>
  62.         Śrubka 25mm
  63.       </nazwa_towaru>
  64.       <ilosc>
  65.         10
  66.       </ilosc>
  67.       <cena_jednostkowa>
  68.         0.20
  69.       </cena_jednostkowa>
  70.       <producent_towaru>
  71.         PSB
  72.       </producent_towaru>
  73.       <data_realizacji>
  74.         2014-10-21
  75.       </data_realizacji>
  76.     </towar>
  77.   </towary>
  78. </zamowienie>
  79.  
  80. SCHEMA
  81.  
  82. <?xml version="1.0" encoding="utf-8"?>
  83. <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  84.  
  85.    <xsd:annotation>
  86.       <xsd:documentation xml:lang="pl">
  87.          XML Schema do pliku zamowienia.
  88.       </xsd:documentation>
  89.    </xsd:annotation>
  90.  
  91.    <xsd:element name="zamowienie" type="zamowienie_typ"/>
  92.  
  93.    <xsd:element name="komentarz" type="xsd:string"/>
  94.  
  95.    <xsd:complexType name="zamowienie_typ">
  96.       <xsd:sequence>
  97.          <xsd:element name="wyslac_do" type="wysylka_typ"/>
  98.          <xsd:element name="rachunek" type="adres_typ"/>
  99.          <xsd:element ref="komentarz" minOccurs="0"/>
  100.          <xsd:element name="towary" type="towary_typ"/>
  101.       </xsd:sequence>
  102.      <xsd:attribute name="data_przyjecia" type="xsd:date"/>
  103.    </xsd:complexType>
  104.  
  105.   <xsd:complexType name="wysylka_typ">
  106.     <xsd:sequence>
  107.       <xsd:element name="osoba" type="xsd:string"/>
  108.       <xsd:element name="ulica" type="xsd:string"/>
  109.       <xsd:element name="numer" type="xsd:string"/>
  110.       <xsd:element name="kod_pocztowy" type="kod_pocztowy_typ"/>
  111.       <xsd:element name="miasto" type="xsd:string"/>
  112.       <xsd:element name="wojewodztwo" type="wojewodztwo_typ"/>
  113.     </xsd:sequence>
  114.     <xsd:attribute name="kraj" type="xsd:NMTOKEN" fixed="PL"/>
  115.   </xsd:complexType>
  116.  
  117.    <xsd:complexType name="adres_typ">
  118.       <xsd:sequence>
  119.          <xsd:element name="osoba" type="xsd:string"/>
  120.          <xsd:element name="ulica" type="xsd:string"/>
  121.          <xsd:element name="numer" type="xsd:string"/>
  122.          <xsd:element name="kod_pocztowy" type="kod_pocztowy_typ"/>
  123.          <xsd:element name="miasto" type="xsd:string"/>
  124.       </xsd:sequence>
  125.       <xsd:attribute name="kraj" type="xsd:NMTOKEN" fixed="PL"/>
  126.    </xsd:complexType>
  127.  
  128.    <xsd:complexType name="towary_typ">
  129.       <xsd:sequence>
  130.          <xsd:element name="towar" minOccurs="0" maxOccurs="unbounded">
  131.          <xsd:complexType>
  132.             <xsd:sequence>
  133.                <xsd:element name="nazwa_towaru" type="nazwa_typ"/>
  134.                <xsd:element name="ilosc" type="xsd:decimal"/>
  135.                <xsd:element name="cena_jednostkowa" type="cena_typ"/>
  136.               <xsd:element name="producent_towaru" type="xsd:string"/>
  137.               <xsd:element name="data_realizacji" type="xsd:date" minOccurs="0"/>
  138.             </xsd:sequence>
  139.            <xsd:attribute name="kod_produktu" type="kod_produktu_typ"/>
  140.          </xsd:complexType>
  141.          </xsd:element>
  142.       </xsd:sequence>
  143.    </xsd:complexType>
  144.  
  145.    <xsd:simpleType name="kod_pocztowy_typ">
  146.       <xsd:restriction base="xsd:string">
  147.          <xsd:pattern value="\d{2}-\d{3}"/>
  148.       </xsd:restriction>
  149.    </xsd:simpleType>
  150.  
  151.   <xsd:simpleType name="cena_typ">
  152.     <xsd:restriction base="xsd:double">
  153.       <xsd:minExclusive value="0"/>
  154.       <xsd:maxExclusive value="10000"/>
  155.     </xsd:restriction>
  156.   </xsd:simpleType>
  157.  
  158.   <xsd:simpleType name="nazwa_typ">
  159.     <xsd:restriction base="xsd:string">
  160.       <xsd:minLength value="3"/>
  161.       <xsd:maxLength value="30"/>
  162.     </xsd:restriction>
  163.   </xsd:simpleType>
  164.  
  165.   <xsd:simpleType name="kod_produktu_typ">
  166.     <xsd:restriction base="xsd:string">
  167.       <xsd:pattern value="[A-Z]{3}-\d{3}-\d{3}"/>
  168.     </xsd:restriction>
  169.   </xsd:simpleType>
  170.  
  171.   <xsd:simpleType name="wojewodztwo_typ">
  172.     <xsd:restriction base="xsd:string">
  173.       <xsd:enumeration value="dolnośląskie"/>
  174.       <xsd:enumeration value="kujawsko-pomorskie"/>
  175.       <xsd:enumeration value="lubelskie"/>
  176.       <xsd:enumeration value="lubuskie"/>
  177.       <xsd:enumeration value="łódzkie"/>
  178.       <xsd:enumeration value="małopolskie"/>
  179.       <xsd:enumeration value="mazowieckie"/>
  180.       <xsd:enumeration value="opolskie"/>
  181.       <xsd:enumeration value="podkarpackie"/>
  182.       <xsd:enumeration value="podlaskie"/>
  183.       <xsd:enumeration value="pomorskie"/>
  184.       <xsd:enumeration value="śląskie"/>
  185.       <xsd:enumeration value="świętokrzyskie"/>
  186.       <xsd:enumeration value="warmińsko-mazurskie"/>
  187.       <xsd:enumeration value="wielkopolskie"/>
  188.       <xsd:enumeration value="zachodniopomorskie"/>
  189.      
  190.     </xsd:restriction>
  191.   </xsd:simpleType>
  192. </xsd:schema>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement