From 0a2c8abd392eb07028de14b7a35bcc48270392af Mon Sep 17 00:00:00 2001 From: Martin Goik <goik@hdm-stuttgart.de> Date: Wed, 21 Jan 2015 19:25:05 +0100 Subject: [PATCH] Restoring previous error --- Sda1/P/rdbms2catalog/Schema/catalog.xsd | 27 +++++++++++++++++++++++++ Sda1/P/rdbms2catalog/products.xml | 17 ++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 Sda1/P/rdbms2catalog/Schema/catalog.xsd create mode 100644 Sda1/P/rdbms2catalog/products.xml diff --git a/Sda1/P/rdbms2catalog/Schema/catalog.xsd b/Sda1/P/rdbms2catalog/Schema/catalog.xsd new file mode 100644 index 000000000..9df8b8626 --- /dev/null +++ b/Sda1/P/rdbms2catalog/Schema/catalog.xsd @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> + + <xs:element name="catalog"> + <xs:complexType> + <xs:sequence> + <xs:element ref="product" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + <xs:key name="uniqueProductId"> + <xs:selector xpath="product"/> + <xs:field xpath="@id"/> + </xs:key> + </xs:element> + + <xs:element name="product"> + <xs:complexType> + <xs:sequence> + <xs:element name="name" type="xs:string"/> + <xs:element name="description" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="age" type="xs:int" minOccurs="0" maxOccurs="1"/> + </xs:sequence> + <xs:attribute name="id" type="xs:int" use="required"/> + </xs:complexType> + </xs:element> + +</xs:schema> diff --git a/Sda1/P/rdbms2catalog/products.xml b/Sda1/P/rdbms2catalog/products.xml new file mode 100644 index 000000000..15000ab5d --- /dev/null +++ b/Sda1/P/rdbms2catalog/products.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<catalog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="Schema/catalog.xsd"> + <product id="17"> + <name>Monkey Picked Tea</name> + <description>Rare wild Chinese tea</description> + <description>Picked only by specially trained monkeys</description> + </product> + <product id="42"> + <name>4-Person Instant Tent</name> + <description>4-person, 1-room tent</description> + <description>Pre-attached tent poles</description> + <description>Exclusive WeatherTec system.</description> + <age>15</age> + </product> +</catalog> \ No newline at end of file -- GitLab