@@ -789,61 +789,63 @@ Poi ci sono due items:
789
789
790
790
PurchaseOrder.xsd:
791
791
792
+ ```XML
792
793
<?xml version="1.0"?>
793
794
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
794
- <xsd:element name="purchaseOrder" type="PurchaseOrderType"/>
795
- <xsd:element name="comment" type="xsd:string"/>
796
- <xsd:complexType name="PurchaseOrderType">
797
- <xsd:sequence>
798
- <xsd:element name="shipTo" type="USAddress"/>
799
- <xsd:element name="billTo" type="USAddress"/>
800
- <xsd:element ref="comment" minOccurs="0"/>
801
- <xsd:element name="items" type="Items"/>
802
- </xsd:sequence>
803
- <xsd:attribute name="orderDate" type="xsd:date"/> <—Collegato X1
804
- </xsd:complexType>
805
- <xsd:complexType name="USAddress">
806
-
807
- <xsd:sequence>
808
- <xsd:element name="name" type="xsd:string"/>
809
- <xsd:element name="street" type="xsd:string"/>
810
- <xsd:element name="city" type="xsd:string"/>
811
- <xsd:element name="state" type="xsd:string"/>
812
- <xsd:element name="zip" type="xsd:decimal"/>
813
- </xsd:sequence>
814
- <xsd:attribute name="country" type="xsd:NMTOKEN" fixed="US"/>
815
- </xsd:complexType>
816
- <xsd:complexType name="Items">
817
- <xsd:sequence>
818
- <xsd:element name="item" minOccurs="0" maxOccurs="unbounded">
819
-
820
- <xsd:complexType>
821
- <xsd:sequence>
822
- <xsd:element name="productName" type="xsd:string"/>
823
- <xsd:element name="quantity">
824
- <xsd:simpleType>
825
- <xsd:restriction base="xsd:positiveInteger">
826
- <xsd:maxExclusive value="100"/>
827
- </xsd:restriction>
828
- </xsd:simpleType>
829
- </xsd:element>
830
- <xsd:element name="USPrice" type="xsd:decimal"/>
795
+ <xsd:element name="purchaseOrder" type="PurchaseOrderType"/>
796
+ <xsd:element name="comment" type="xsd:string"/>
797
+ <xsd:complexType name="PurchaseOrderType">
798
+ <xsd:sequence>
799
+ <xsd:element name="shipTo" type="USAddress"/>
800
+ <xsd:element name="billTo" type="USAddress"/>
831
801
<xsd:element ref="comment" minOccurs="0"/>
832
- <xsd:element name="shipDate" type="xsd:date" minOccurs="0"/>
833
- </xsd:sequence>
834
- <xsd:attribute name="partNum" type="SKU" use="required"/>
835
- </xsd:complexType>
836
- </xsd:element>
837
- </xsd:sequence>
838
- </xsd:complexType>
839
- <!-- Stock Keeping Unit, a code for identifying products -->
840
- <xsd:simpleType name="SKU">
841
- <xsd:restriction base="xsd:string">
842
- <xsd:pattern value="\d{3}-[A-Z]{2}"/>
843
- </xsd:restriction>
844
- </xsd:simpleType>
802
+ <xsd:element name="items" type="Items"/>
803
+ </xsd:sequence>
804
+ <xsd:attribute name="orderDate" type="xsd:date"/> <!-- Collegato X1 -->
805
+ </xsd:complexType>
806
+ <xsd:complexType name="USAddress">
807
+ <xsd:sequence>
808
+ <xsd:element name="name" type="xsd:string"/>
809
+ <xsd:element name="street" type="xsd:string"/>
810
+ <xsd:element name="city" type="xsd:string"/>
811
+ <xsd:element name="state" type="xsd:string"/>
812
+ <xsd:element name="zip" type="xsd:decimal"/>
813
+ </xsd:sequence>
814
+ <xsd:attribute name="country" type="xsd:NMTOKEN" fixed="US"/>
815
+ </xsd:complexType>
816
+ <xsd:complexType name="Items">
817
+ <xsd:sequence>
818
+ <xsd:element name="item" minOccurs="0" maxOccurs="unbounded">
819
+ <xsd:complexType>
820
+ <xsd:sequence>
821
+ <xsd:element name="productName" type="xsd:string"/>
822
+ <xsd:element name="quantity">
823
+ <xsd:simpleType>
824
+ <xsd:restriction base="xsd:positiveInteger">
825
+ <xsd:maxExclusive value="100"/>
826
+ </xsd:restriction>
827
+ </xsd:simpleType>
828
+ </xsd:element>
829
+ <xsd:element name="USPrice" type="xsd:decimal"/>
830
+ <xsd:element ref="comment" minOccurs="0"/>
831
+ <xsd:element name="shipDate" type="xsd:date" minOccurs="0"/>
832
+ </xsd:sequence>
833
+ <xsd:attribute name="partNum" type="SKU" use="required"/>
834
+ </xsd:complexType>
835
+ </xsd:element>
836
+ </xsd:sequence>
837
+ </xsd:complexType>
838
+ <!-- Stock Keeping Unit, a code for identifying products -->
839
+ <xsd:simpleType name="SKU">
840
+ <xsd:restriction base="xsd:string">
841
+ <xsd:pattern value="\d{3}-[A-Z]{2}"/>
842
+ </xsd:restriction>
843
+ </xsd:simpleType>
845
844
</xsd:schema>
846
845
846
+ ```
847
+
848
+
847
849
848
850
849
851
C' è la radice che è: `purchaseOrder` :
@@ -858,10 +860,6 @@ Inseguito si vede come c'è `xsd:date` che è collegato al file precedente
858
860
859
861
860
862
861
-
862
-
863
-
864
-
865
863
#### Gruppi (`group`)
866
864
867
865
L' elemento `group` permette di creare un modello di contenuto che può essere referenziato con un semplice nome. Mentre l' elemento `attributeGroup` abilita un insieme di attributi confezionati in un `group` definito (avente un nome).
0 commit comments