Created
September 27, 2019 12:51
-
-
Save willianrschuck/7380a2f754415026ce7b55681a2ee9b9 to your computer and use it in GitHub Desktop.
This file contains hidden or 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" encoding="UTF-8"?> | |
| <pessoas | |
| xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" | |
| xs:noNamespaceSchemaLocation="Pessoas.xsd"> | |
| <pessoa codigo="1"> | |
| <nome>Willian Ricardo Schuck</nome> | |
| <endereco>R. Moema - São José</endereco> | |
| <salario>0</salario> | |
| <sexo>m</sexo> <!-- Pode ser apenas m ou f --> | |
| <email>[email protected]</email> | |
| <telefones> | |
| <numero>54984125076</numero> | |
| </telefones> | |
| </pessoa> | |
| <pessoa codigo="2"> | |
| <nome>Eliel Alves da Silva</nome> | |
| <endereco>São Crisóvao</endereco> | |
| <salario>1542.25</salario> | |
| <sexo>m</sexo> <!-- Pode ser apenas m ou f --> | |
| <email>[email protected]</email> | |
| <telefones> | |
| <numero>54984523674</numero> | |
| </telefones> | |
| </pessoa> | |
| </pessoas> |
This file contains hidden or 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" encoding="UTF-8"?> | |
| <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> | |
| <!-- Utilizando facetas, faça as restrições necessárias para os campos: pessoas | |
| (nome, salario, sexo e e-mail) e telefones(numero). --> | |
| <xs:element name="pessoas"> | |
| <xs:complexType> | |
| <xs:sequence> | |
| <xs:element ref="pessoa" minOccurs="0" maxOccurs="unbounded"/> | |
| </xs:sequence> | |
| </xs:complexType> | |
| </xs:element> | |
| <xs:element name="pessoa"> | |
| <xs:complexType> | |
| <xs:sequence> | |
| <xs:element name="nome"> | |
| <xs:simpleType> | |
| <xs:restriction base="xs:string"> | |
| <xs:maxLength value="50"/> | |
| </xs:restriction> | |
| </xs:simpleType> | |
| </xs:element> | |
| <xs:element name="endereco" type="xs:string"/> | |
| <xs:element name="salario"> | |
| <xs:simpleType> | |
| <xs:restriction base="xs:decimal"> | |
| <xs:fractionDigits value="2"/> | |
| <xs:totalDigits value="10"/> | |
| </xs:restriction> | |
| </xs:simpleType> | |
| </xs:element> | |
| <xs:element name="sexo"> | |
| <xs:simpleType> | |
| <xs:restriction base="xs:string"> | |
| <xs:enumeration value="m"/> | |
| <xs:enumeration value="f"/> | |
| </xs:restriction> | |
| </xs:simpleType> | |
| </xs:element> | |
| <xs:element name="email"> | |
| <xs:simpleType> | |
| <xs:restriction base="xs:string"> | |
| <xs:pattern value="[]"> | |
| </xs:restriction> | |
| </xs:simpleType> | |
| </xs:element> | |
| <xs:element ref="telefones" minOccurs="0"/> | |
| </xs:sequence> | |
| <xs:attribute name="codigo" type="xs:integer"/> | |
| </xs:complexType> | |
| </xs:element> | |
| <xs:element name="telefones"> | |
| <xs:complexType> | |
| <xs:sequence> | |
| <xs:element name="numero" minOccurs="0" maxOccurs="unbounded"/> | |
| </xs:sequence> | |
| </xs:complexType> | |
| </xs:element> | |
| </xs:schema> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment