-
-
Save uncoded-ro/4cd05452a48ff8a6b6459f3a97f3a846 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<!-- produse.xsd --> | |
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | |
<xsd:element name="produse" type="categorie" /> | |
<xsd:complexType name="categorie"> | |
<xsd:choice minOccurs="0" maxOccurs="unbounded"> | |
<xsd:element name="monitor" type="produs" /> | |
<xsd:element name="laptop" type="produs" /> | |
</xsd:choice> | |
</xsd:complexType> | |
<xsd:complexType name="produs"> | |
<xsd:sequence> | |
<xsd:element name="id_produs" type="xsd:decimal" /> | |
<xsd:element name="denumire" type="xsd:string" /> | |
<xsd:element name="marca" type="xsd:string" /> | |
<xsd:choice minOccurs="0" maxOccurs="unbounded"> | |
<xsd:element name="pret" type="pret" /> | |
<xsd:element name="culoare" type="culoare"/> | |
<xsd:element name="descriere" type="descriere" /> | |
</xsd:choice> | |
</xsd:sequence> | |
<xsd:attribute name="status" use="optional" default="in stoc"> | |
<xsd:simpleType> | |
<xsd:restriction base="xsd:string"> | |
<xsd:enumeration value="in stoc" /> | |
<xsd:enumeration value="la comanda" /> | |
</xsd:restriction> | |
</xsd:simpleType> | |
</xsd:attribute> | |
</xsd:complexType> | |
<xsd:complexType name="pret"> | |
<xsd:simpleContent> | |
<xsd:extension base="xsd:positiveInteger"> | |
<xsd:attribute name="valuta" type="valute" default="ron" /> | |
</xsd:extension> | |
</xsd:simpleContent> | |
</xsd:complexType> | |
<xsd:simpleType name="valute"> | |
<xsd:restriction base="xsd:string"> | |
<xsd:enumeration value="eur" /> | |
<xsd:enumeration value="ron" /> | |
<xsd:enumeration value="usd" /> | |
</xsd:restriction> | |
</xsd:simpleType> | |
<xsd:complexType name="culoare"> | |
<xsd:attribute name="valoare" type="xsd:string" /> | |
</xsd:complexType> | |
<xsd:complexType name="descriere" mixed="true"> | |
<xsd:choice minOccurs="0" maxOccurs="unbounded"> | |
<xsd:element name="bold" type="xsd:string" /> | |
<xsd:element name="italic" type="xsd:string" /> | |
<xsd:element name="underline" type="xsd:string" /> | |
</xsd:choice> | |
</xsd:complexType> | |
</xsd:schema> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment