Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="UTF-8" ?>
- <ab:nationalTeam xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:ab="http://teste2.org"
- xsi:schemaLocation="http://teste2.org PT.xsd">
- <ab:player id="1">
- <ab:number>1</ab:number>
- <ab:name>Eduardo</ab:name>
- </ab:player>
- <ab:player id="11">
- <ab:number>11</ab:number>
- <ab:name>Eder</ab:name>
- </ab:player>
- <ab:player id="2">
- <ab:number>10</ab:number>
- <ab:name>Vieirinha</ab:name>
- </ab:player>
- <ab:games>
- <ab:game>
- <ab:adversary>
- France
- </ab:adversary>
- <ab:goals >
- <ab:player id="11" minute="109"/>
- </ab:goals>
- </ab:game>
- </ab:games>
- </ab:nationalTeam>
- <?xml version="1.0" encoding="UTF-8"?>
- <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
- xmlns:ab="http://teste2.org"
- targetNamespace="http://teste2.org"
- elementFormDefault="qualified"
- attributeFormDefault="unqualified">
- <xs:complexType name="gameType">
- <xs:sequence>
- <xs:element name="adversary" type="xs:string"/>
- <xs:element name="goals" type="ab:goalsType"/>
- </xs:sequence>
- </xs:complexType>
- <xs:complexType name="goalsType">
- <xs:sequence>
- <xs:element ref="ab:player"/>
- </xs:sequence>
- </xs:complexType>
- <xs:element name="games">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="game" type="ab:gameType"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="player">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="number" type="xs:integer" minOccurs="0" maxOccurs="1"/>
- <xs:element name="name" type="xs:string" minOccurs="0" maxOccurs="1"/>
- </xs:sequence>
- <xs:attribute name="id">
- <xs:simpleType>
- <xs:restriction base="xs:integer">
- <xs:minInclusive value="1"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- <xs:attribute name="minute" type="xs:string" use="optional"/>
- </xs:complexType>
- </xs:element>
- <xs:element name="nationalTeam">
- <xs:complexType>
- <xs:sequence>
- <xs:element ref="ab:player" minOccurs="22" maxOccurs="25"/>
- <xs:element ref="ab:games"/>
- </xs:sequence>
- </xs:complexType>
- <xs:key name="pk_id">
- <xs:selector xpath="ab:nationalTeam/ab:player"/>
- <xs:field xpath="@id"/>
- </xs:key>
- <xs:keyref name="fk_id" refer="ab:pk_id">
- <xs:selector xpath="ab:nationalTeam/ab:games/ab:game/ab:goals/ab:player"/>
- <xs:field xpath="@id"/>
- </xs:keyref>
- </xs:element>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement