diff options
| author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-01-05 15:58:35 +0100 |
|---|---|---|
| committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-01-12 12:28:10 +0000 |
| commit | 9f2a9aba3aff73e31ea15eb4a7a04b0e50f4ee4e (patch) | |
| tree | 92dcb0c4f64df8a8375af2e1a9bb1170068c36b2 /examples/xmlpatterns/schema/files | |
| parent | 26c046e521c38bbfc3a263782a3bb74a7c1bf937 (diff) | |
Move examples from submodule to pyside-setup
Move PySide2 examples that are owned by the Qt Company
to a new examples directory.
Done-with: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
Task-number: PYSIDE-363
Change-Id: I14099764d9eef2bc35e067086121427955862e3a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'examples/xmlpatterns/schema/files')
| -rw-r--r-- | examples/xmlpatterns/schema/files/contact.xsd | 25 | ||||
| -rw-r--r-- | examples/xmlpatterns/schema/files/invalid_contact.xml | 11 | ||||
| -rw-r--r-- | examples/xmlpatterns/schema/files/invalid_order.xml | 13 | ||||
| -rw-r--r-- | examples/xmlpatterns/schema/files/invalid_recipe.xml | 14 | ||||
| -rw-r--r-- | examples/xmlpatterns/schema/files/order.xsd | 23 | ||||
| -rw-r--r-- | examples/xmlpatterns/schema/files/recipe.xsd | 40 | ||||
| -rw-r--r-- | examples/xmlpatterns/schema/files/valid_contact.xml | 11 | ||||
| -rw-r--r-- | examples/xmlpatterns/schema/files/valid_order.xml | 18 | ||||
| -rw-r--r-- | examples/xmlpatterns/schema/files/valid_recipe.xml | 13 |
9 files changed, 168 insertions, 0 deletions
diff --git a/examples/xmlpatterns/schema/files/contact.xsd b/examples/xmlpatterns/schema/files/contact.xsd new file mode 100644 index 000000000..3e1b5704c --- /dev/null +++ b/examples/xmlpatterns/schema/files/contact.xsd @@ -0,0 +1,25 @@ +<?xml version="1.0"?> +<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> + + <xsd:element name="contact"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="givenName" type="xsd:string"/> + <xsd:element name="familyName" type="xsd:string"/> + <xsd:element name="birthdate" type="xsd:date" minOccurs="0"/> + <xsd:element name="homeAddress" type="address"/> + <xsd:element name="workAddress" type="address" minOccurs="0"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + <xsd:complexType name="address"> + <xsd:sequence> + <xsd:element name="street" type="xsd:string"/> + <xsd:element name="zipCode" type="xsd:string"/> + <xsd:element name="city" type="xsd:string"/> + <xsd:element name="country" type="xsd:string"/> + </xsd:sequence> + </xsd:complexType> + +</xsd:schema> diff --git a/examples/xmlpatterns/schema/files/invalid_contact.xml b/examples/xmlpatterns/schema/files/invalid_contact.xml new file mode 100644 index 000000000..42f1edd67 --- /dev/null +++ b/examples/xmlpatterns/schema/files/invalid_contact.xml @@ -0,0 +1,11 @@ +<contact> + <givenName>John</givenName> + <familyName>Doe</familyName> + <title>Prof.</title> + <workAddress> + <street>Sandakerveien 116</street> + <zipCode>N-0550</zipCode> + <city>Oslo</city> + <country>Norway</country> + </workAddress> +</contact> diff --git a/examples/xmlpatterns/schema/files/invalid_order.xml b/examples/xmlpatterns/schema/files/invalid_order.xml new file mode 100644 index 000000000..8ffc5fda4 --- /dev/null +++ b/examples/xmlpatterns/schema/files/invalid_order.xml @@ -0,0 +1,13 @@ +<order> + <customerId>234219</customerId> + <article> + <articleId>21692</articleId> + <count>3</count> + </article> + <article> + <articleId>24749</articleId> + <count>9</count> + </article> + <deliveryDate>2009-01-23</deliveryDate> + <payed>yes</payed> +</order> diff --git a/examples/xmlpatterns/schema/files/invalid_recipe.xml b/examples/xmlpatterns/schema/files/invalid_recipe.xml new file mode 100644 index 000000000..4d75af6a1 --- /dev/null +++ b/examples/xmlpatterns/schema/files/invalid_recipe.xml @@ -0,0 +1,14 @@ +<recipe> + <title>Cheese on Toast</title> + <ingredient name="Bread" quantity="2" unit="slices"/> + <ingredient name="Cheese" quantity="2" unit="slices"/> + <time quantity="3" unit="days"/> + <method> + <step>1. Slice the bread and cheese.</step> + <step>2. Grill one side of each slice of bread.</step> + <step>3. Turn over the bread and place a slice of cheese on each piece.</step> + <step>4. Grill until the cheese has started to melt.</step> + <step>5. Serve and enjoy!</step> + </method> + <comment>Tell your friends about it!</comment> +</recipe> diff --git a/examples/xmlpatterns/schema/files/order.xsd b/examples/xmlpatterns/schema/files/order.xsd new file mode 100644 index 000000000..405cafe43 --- /dev/null +++ b/examples/xmlpatterns/schema/files/order.xsd @@ -0,0 +1,23 @@ +<?xml version="1.0"?> +<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> + + <xsd:element name="order"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="customerId" type="xsd:positiveInteger"/> + <xsd:element name="article" type="articleType" maxOccurs="unbounded"/> + <xsd:element name="deliveryDate" type="xsd:date"/> + <xsd:element name="payed" type="xsd:boolean"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + <xsd:complexType name="articleType"> + <xsd:sequence> + <xsd:element name="articleId" type="xsd:positiveInteger"/> + <xsd:element name="count" type="xsd:positiveInteger"/> + <xsd:element name="comment" type="xsd:string" minOccurs="0"/> + </xsd:sequence> + </xsd:complexType> + +</xsd:schema> diff --git a/examples/xmlpatterns/schema/files/recipe.xsd b/examples/xmlpatterns/schema/files/recipe.xsd new file mode 100644 index 000000000..bbbafd9a3 --- /dev/null +++ b/examples/xmlpatterns/schema/files/recipe.xsd @@ -0,0 +1,40 @@ +<?xml version="1.0"?> +<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> + + <xsd:element name="recipe"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="title" type="xsd:string"/> + <xsd:element name="ingredient" type="ingredientType" maxOccurs="unbounded"/> + <xsd:element name="time" type="timeType"/> + <xsd:element name="method"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="step" type="xsd:string" maxOccurs="unbounded"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + <xsd:complexType name="ingredientType"> + <xsd:attribute name="name" type="xsd:string"/> + <xsd:attribute name="quantity" type="xsd:positiveInteger"/> + <xsd:attribute name="unit" type="xsd:string"/> + </xsd:complexType> + + <xsd:complexType name="timeType"> + <xsd:attribute name="quantity" type="xsd:positiveInteger"/> + <xsd:attribute name="unit"> + <xsd:simpleType> + <xsd:restriction base="xsd:string"> + <xsd:enumeration value="seconds"/> + <xsd:enumeration value="minutes"/> + <xsd:enumeration value="hours"/> + </xsd:restriction> + </xsd:simpleType> + </xsd:attribute> + </xsd:complexType> + +</xsd:schema> diff --git a/examples/xmlpatterns/schema/files/valid_contact.xml b/examples/xmlpatterns/schema/files/valid_contact.xml new file mode 100644 index 000000000..53c04d4b5 --- /dev/null +++ b/examples/xmlpatterns/schema/files/valid_contact.xml @@ -0,0 +1,11 @@ +<contact> + <givenName>John</givenName> + <familyName>Doe</familyName> + <birthdate>1977-12-25</birthdate> + <homeAddress> + <street>Sandakerveien 116</street> + <zipCode>N-0550</zipCode> + <city>Oslo</city> + <country>Norway</country> + </homeAddress> +</contact> diff --git a/examples/xmlpatterns/schema/files/valid_order.xml b/examples/xmlpatterns/schema/files/valid_order.xml new file mode 100644 index 000000000..f83c36cb1 --- /dev/null +++ b/examples/xmlpatterns/schema/files/valid_order.xml @@ -0,0 +1,18 @@ +<order> + <customerId>194223</customerId> + <article> + <articleId>22242</articleId> + <count>5</count> + </article> + <article> + <articleId>32372</articleId> + <count>12</count> + <comment>without stripes</comment> + </article> + <article> + <articleId>23649</articleId> + <count>2</count> + </article> + <deliveryDate>2009-01-23</deliveryDate> + <payed>true</payed> +</order> diff --git a/examples/xmlpatterns/schema/files/valid_recipe.xml b/examples/xmlpatterns/schema/files/valid_recipe.xml new file mode 100644 index 000000000..f6499ba21 --- /dev/null +++ b/examples/xmlpatterns/schema/files/valid_recipe.xml @@ -0,0 +1,13 @@ +<recipe> + <title>Cheese on Toast</title> + <ingredient name="Bread" quantity="2" unit="slices"/> + <ingredient name="Cheese" quantity="2" unit="slices"/> + <time quantity="3" unit="minutes"/> + <method> + <step>1. Slice the bread and cheese.</step> + <step>2. Grill one side of each slice of bread.</step> + <step>3. Turn over the bread and place a slice of cheese on each piece.</step> + <step>4. Grill until the cheese has started to melt.</step> + <step>5. Serve and enjoy!</step> + </method> +</recipe> |
