Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Someone please comment and make this a flat catalog schema please <?xml version=

ID: 3838108 • Letter: S

Question

Someone please comment and make this a flat catalog schema please

<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<!--add more info here-->

<xs:element name="theme"> <!--A list that lets the person entering the information describe the theme of the resturant.-->
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="Sports" />
<xs:enumeration value="Fine Dining" />
<xs:enumeration value="Casual" />
</xs:restriction>
</xs:simpleType>
</xs:element>

<xs:element name="Country">
<xs:complexType mixed="true">
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="City"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="City">
<xs:complexType mixed="true">
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="Restaurants"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Restaurants">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="Restaurant"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Restaurant">
<xs:complexType>
<xs:sequence>
<xs:element ref="name"/>
<xs:element ref="location"/>
<xs:element ref="phone"/>
<xs:element ref="theme"/>
<xs:element ref="rating"/>
<xs:element ref="description"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="name" type="xs:string"/>
<xs:element name="location" type="xs:string"/>
<xs:element name="phone" type="xs:NMTOKEN"/>
<xs:element name="theme" type="xs:string"/>
<xs:element name="rating" type="xs:string"/>
<xs:element name="description" type="xs:string"/>
</xs:schema>

Explanation / Answer

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<!--
The following elements are globally defined - contained within the whole schema
-->
<xsd:element name="name" type="xsd:string"/>
<xsd:element name="location" type="xsd:string"/>
<xsd:element name="phone" type="xsd:NMTOKEN"/>
<xsd:element name="theme" type="xsd:string"/>
<xsd:element name="rating" type="xsd:string"/>
<xsd:element name="description" type="xsd:string"/>
<xsd:element name="theme">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="Sports" />
<xsd:enumeration value="Fine Dining" />
<xsd:enumeration value="Casual" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<!--
This is the end of the global elements. Below are local elements
-->
<xsd:element name="Country">
<xsd:complexType>
<xsd:sequence>
<xsd:element minOccurs="0" maxOccurs="unbounded" ref="City"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>

<xsd:element name="City">
<xsd:complexType>
<xsd:sequence>
<xsd:element minOccurs="0" maxOccurs="unbounded" ref="Restaurants"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="Restaurants">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="unbounded" ref="Restaurant"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="Restaurant">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="name"/>
<xsd:element ref="location"/>
<xsd:element ref="phone"/>
<xsd:element ref="theme"/>
<xsd:element ref="rating"/>
<xsd:element ref="description"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>

</xsd:schema>

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote