Schema Name: sportsml.xsd
Target Namespace: http://iptc.org/std/nar/2006-10-01/
Documentation:
SportsML is a global XML standard for the interchange of sports data. Designed to be as easy to understand and implement as possible, SportsML allows for the exchange of sports scores, schedules, standings, and statistics for a wide variety of competitions. Its extensibility allows for the easy accommodation of many sports from around the globe. It cooperates with current IPTC standards NewsML and NITF to enable publishers to package sports statistics alongside edited coverage of sports.
Collapse XSD Schema Code:

<!--
IPTC - International Press Telecommunications Council
25 Southampton Buildings, London WC2A 1AL, United Kingdom
www.iptc.org
This document is published under the Creative Commons Attribution 4.0 license - see the full license agreement at http://creativecommons.org/licenses/by/4.0/. 
By obtaining, using and/or copying this document, you (the licensee) agree that you have read, understood, and will comply with the terms and conditions of the license.

-->

<!-- xmlns="http://www.w3.org/2001/XMLSchema"-->

<xs:schema targetNamespace="http://iptc.org/std/nar/2006-10-01/" elementFormDefault="qualified"
    attributeFormDefault="unqualified" xml:lang="en" xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns="http://iptc.org/std/nar/2006-10-01/" version="3.0">

    <xs:annotation>
        <xs:appinfo>SportsML</xs:appinfo>
        <xs:documentation>SportsML is a global XML standard for the interchange of sports data.
            Designed to be as easy to understand and implement as possible, SportsML allows for the
            exchange of sports scores, schedules, standings, and statistics for a wide variety of
            competitions. Its extensibility allows for the easy accommodation of many sports from
            around the globe. It cooperates with current IPTC standards NewsML and NITF to enable
            publishers to package sports statistics alongside edited coverage of
            sports.</xs:documentation>
    </xs:annotation>
    
    <xs:include schemaLocation="NewsML-G2_2.22-spec-All-Power.xsd"/>    
    <!-- The NewsMLG2 schema contain the NAR building blocks used in G2-compliant SportsML -->
    
    <!-- Plug-In Schemas for Specific Sports -->
    <xs:include schemaLocation="sportsml-specific-american-football.xsd"/>
    <xs:include schemaLocation="sportsml-specific-baseball.xsd"/>
    <xs:include schemaLocation="sportsml-specific-basketball.xsd"/>
    <xs:include schemaLocation="sportsml-specific-golf.xsd"/>
    <xs:include schemaLocation="sportsml-specific-ice-hockey.xsd"/>
    <xs:include schemaLocation="sportsml-specific-soccer.xsd"/>
    <xs:include schemaLocation="sportsml-specific-tennis.xsd"/>
    <xs:include schemaLocation="sportsml-specific-motor-racing.xsd"/>
    <xs:include schemaLocation="sportsml-specific-curling.xsd"/>
    <xs:include schemaLocation="sportsml-specific-rugby.xsd"/>
    <xs:include schemaLocation="sportsml-specific-volleyball.xsd"/>
    
    <!-- ========================================================================================= -->
    <!-- Sports Content Element. The Root of the sports content either in standalone or as payload in NewsML -->
    <!-- ========================================================================================= -->
    <xs:element name="sports-content">
        <xs:annotation>
            <xs:documentation>Metadata and coverage of sporting news. | Good for scores, schedules, standings, statistics, etc.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:sequence>
                <xs:choice minOccurs="0" maxOccurs="unbounded">
                    <xs:element name="sports-metadata" type="sportsMetadataComplexType">
                        <xs:annotation>
                            <xs:documentation>Metadata that is common to everything in this sports-content</xs:documentation>
                        </xs:annotation>
                    </xs:element>
                    <xs:element name="sports-event" type="sportsEventComplexType"/>
                    <xs:element name="tournament" type="tournamentComplexType"/>
                    <xs:element name="schedule" type="scheduleComplexType"/>
                    <xs:element name="standing" type="standingComplexType"/>
                    <xs:element name="statistic" type="statisticComplexType"/>
                    <xs:element name="article" type="articleComplexType"/>
                </xs:choice>
            </xs:sequence>
            <xs:attributeGroup ref="commonAttributes"/>
        </xs:complexType>
    </xs:element>
    
    <!-- Complex Types. If you don't want to support the plugins you remove them but keep the extension base in order to keep the inheritance chains intact -->
    <!-- ========================================================================================= -->
    <!-- Event metadata and stats that include sports specific stuff -->
    <!-- ========================================================================================= -->
    <xs:complexType name="eventMetadataComplexType">
        <xs:annotation>
            <xs:documentation>Background information about a game. | Where, when, and what an event
                is.</xs:documentation>
        </xs:annotation>
        <xs:complexContent>
            <xs:extension base="baseEventMetadataComplexType">
                <xs:choice minOccurs="0">
                    <xs:element name="event-metadata-american-football" type="americanFootballEventMetadataComplexType"/>
                    <xs:element name="event-metadata-baseball" type="baseballEventMetadataComplexType"/>
                    <xs:element name="event-metadata-golf" type="golfEventMetadataComplexType"/>
                    <xs:element name="event-metadata-ice-hockey" type="iceHockeyEventMetadataComplexType"/>
                    <xs:element name="event-metadata-soccer" type="soccerEventMetadataComplexType"/>
                    <xs:element name="event-metadata-tennis" type="tennisEventMetadataComplexType"/>
                    <xs:element name="event-metadata-motor-racing" type="motorRacingEventMetadataComplexType"/>
                    <xs:element name="event-metadata-curling" type="curlingEventMetadataComplexType"/>
                    <xs:element name="event-metadata-rugby" type="rugbyEventMetadataComplexType"/>
                </xs:choice>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    
    <xs:complexType name="eventStatsComplexType">
        <xs:annotation>
            <xs:documentation>Stats applying to the game as a whole. Initially designed for motor-racing, but potentially applicable to many sports.</xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:element name="sports-property" type="sportsPropertyComplexType" minOccurs="0"  maxOccurs="unbounded"/>
            <xs:choice minOccurs="0">
                <xs:element name="event-stats-motor-racing" type="motorRacingEventStatsComplexType"/>
            </xs:choice>
        </xs:sequence>
        <xs:attributeGroup ref="commonAttributes"/>
        <xs:attributeGroup ref="coverageAttributes"/>
    </xs:complexType>

    <xs:complexType name="eventActionsComplexType">
        <xs:annotation>
            <xs:documentation>Complex type for sports events, both generic and sport specific.</xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:element name="action" type="baseActionComplexType" minOccurs="0" maxOccurs="unbounded">
                <xs:annotation>
                    <xs:documentation>Any number of action inside the actions holder.</xs:documentation>
                </xs:annotation>
            </xs:element>
        </xs:sequence>
        <xs:attributeGroup ref="commonAttributes">
            <xs:annotation>
                <xs:documentation>commonAttributes only hold an id attribute, presently</xs:documentation>
            </xs:annotation>
        </xs:attributeGroup>
    </xs:complexType>

    <!-- ========================================================================================= -->
    <!-- Tournament metadata and stats that include sports specific stuff -->
    <!-- ========================================================================================= -->
    
    <!-- ========================================================================================= -->
    <!-- Tournament metadata Complex type -->
    <!-- ========================================================================================= -->
    <xs:complexType name="tournamentMetadataComplexType">
        <xs:annotation>
            <xs:documentation>Background data about a tournament. | Where and when the this tournament took place.</xs:documentation>
        </xs:annotation>
        <xs:complexContent>
            <xs:extension base="baseTournamentMetadataComplexType">
                <xs:choice minOccurs="0">
                    <xs:element name="tournament-metadata-golf" type="golfTournamentMetadataComplexType"/>
                    <xs:element name="tournament-metadata-tennis" type="tennisTournamentMetadataComplexType"/>
                </xs:choice>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    
    <!-- ========================================================================================= -->
    <!-- Tournament division metadata Complex type -->
    <!-- ========================================================================================= -->
    <xs:complexType name="tournamentDivisionMetadataComplexType">
        <xs:annotation>
            <xs:documentation>General information about the division of this tournament. | Where and when this division is competing.</xs:documentation>
        </xs:annotation>
        <xs:complexContent>
            <xs:extension base="baseTournamentMetadataComplexType">
                <xs:choice minOccurs="0">
                    <xs:element name="tournament-division-metadata-golf" type="golfTournamentDivisionMetadataComplexType"/>
                </xs:choice>
                <xs:attribute name="division-number" type="xs:string" use="optional">
                    <xs:annotation>
                        <xs:documentation>The number of the division.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    
    <!-- ========================================================================================= -->
    <!-- Tournament part metadata Complex type -->
    <!-- ========================================================================================= -->
    <xs:complexType name="tournamentPartMetadataComplexType">
        <xs:annotation>
            <xs:documentation>General information about the division of this tournament. | Where and when this division is competing.</xs:documentation>
        </xs:annotation>
        <xs:complexContent>
            <xs:extension base="baseTournamentMetadataComplexType">
                <xs:attribute name="type" type="QCodeType" use="optional">
                    <xs:annotation>
                        <xs:documentation>The phase of the tournament: semi-final, quarter-final, etc. SportsML vocab uri: http://cv.iptc.org/newscodes/sptournamentphase/</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="format-type" type="QCodeType" use="optional">
                    <xs:annotation>
                        <xs:documentation>The format type of tournament or tournament phase: group, elimination, etc. SportsML vocab uri: http://cv.iptc.org/newscodes/sptournamentform/</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    
    <!-- ========================================================================================= -->
    <!-- Team stats that include sports specific stuff -->
    <!-- ========================================================================================= -->
    <xs:complexType name="teamMetadataComplexType">
        <xs:complexContent>
            <xs:extension base="baseTeamMetadataComplexType">
                <xs:choice minOccurs="0">
                    <xs:element name="team-metadata-baseball" type="baseballTeamMetadataComplexType"/>
                    <xs:element name="team-metadata-golf" type="golfTeamMetadataComplexType"/>
                    <xs:element name="team-metadata-motor-racing" type="motorRacingTeamMetadataComplexType"/>
                </xs:choice>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    
    <xs:complexType name="teamStatsComplexType">
        <xs:complexContent>
            <xs:extension base="baseTeamStatsComplexType">
                <xs:choice minOccurs="0">
                    <xs:element name="team-stats-american-football" type="americanFootballTeamStatsComplexType"/>
                    <xs:element name="team-stats-baseball" type="baseballTeamStatsComplexType"/>
                    <xs:element name="team-stats-basketball" type="basketballTeamStatsComplexType"/>
                    <xs:element name="team-stats-ice-hockey" type="iceHockeyTeamStatsComplexType"/>
                    <xs:element name="team-stats-soccer" type="soccerTeamStatsComplexType"/>
                    <xs:element name="team-stats-tennis" type="tennisTeamStatsComplexType"/>
                    <xs:element name="team-stats-motor-racing" type="motorRacingTeamStatsComplexType"/>
                    <xs:element name="team-stats-curling" type="curlingTeamStatsComplexType"/>
                    <xs:element name="team-stats-rugby" type="rugbyTeamStatsComplexType"/>
                </xs:choice>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    
    <!-- ========================================================================================= -->
    <!-- Player extensions that include sports specific stuff -->
    <!-- ========================================================================================= -->
    <xs:complexType name="playerMetadataComplexType">
        <xs:complexContent>
            <xs:extension base="basePlayerMetadataComplexType">
                <xs:choice minOccurs="0">
                    <xs:element name="player-metadata-baseball" type="baseballPlayerMetadataComplexType"/>
                    <xs:element name="player-metadata-golf" type="golfPlayerMetadataComplexType"/>
                    <xs:element name="player-metadata-ice-hockey" type="iceHockeyPlayerMetadataComplexType"/>
                    <xs:element name="player-metadata-soccer" type="soccerPlayerMetadataComplexType"/>
                    <xs:element name="player-metadata-motor-racing" type="motorRacingPlayerMetadataComplexType"/>
                    <xs:element name="player-metadata-curling" type="curlingPlayerMetadataComplexType"/>
                </xs:choice>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    
    <xs:complexType name="playerStatsComplexType">
        <xs:complexContent>
            <xs:extension base="basePlayerStatsComplexType">
                <xs:choice minOccurs="0">
                    <xs:element name="player-stats-american-football" type="americanFootballPlayerStatsComplexType"/>
                    <xs:element name="player-stats-baseball" type="baseballPlayerStatsComplexType"/>
                    <xs:element name="player-stats-basketball"  type="basketballPlayerStatsComplexType"/>
                    <xs:element name="player-stats-golf" type="golfPlayerStatsComplexType"/>
                    <xs:element name="player-stats-ice-hockey" type="iceHockeyPlayerStatsComplexType"/>
                    <xs:element name="player-stats-soccer" type="soccerPlayerStatsComplexType"/>
                    <xs:element name="player-stats-tennis" type="tennisPlayerStatsComplexType"/>
                    <xs:element name="player-stats-motor-racing" type="motorRacingPlayerStatsComplexType"/>
                    <xs:element name="player-stats-curling" type="curlingPlayerStatsComplexType"/>
                    <xs:element name="player-stats-rugby" type="rugbyPlayerStatsComplexType"/>
                    <!-- element ref="player-stats-alpineskiing" / -->
                </xs:choice>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    
    <!-- ========================================================================================= -->
    <!-- Officials -->
    <!-- ========================================================================================= -->
    <xs:complexType name="officialMetadataComplexType">
        <xs:complexContent>
            <xs:extension base="baseOfficialMetadataComplexType"/>
        </xs:complexContent>
    </xs:complexType>
    
    <xs:complexType name="officialStatsComplexType">
        <xs:complexContent>
            <xs:extension base="baseStatsComplexType"/>
        </xs:complexContent>
    </xs:complexType>
    
    <!-- ========================================================================================= -->
    <!-- Associate -->
    <!-- ========================================================================================= -->
    <xs:complexType name="associateStatsComplexType">
        <xs:complexContent>
            <xs:extension base="base2StatsComplexType"/>
        </xs:complexContent>
    </xs:complexType>
    
    <xs:complexType name="associateMetadataComplexType">
        <xs:complexContent>
            <xs:extension base="baseAssociateMetadataComplexType">
                <xs:choice minOccurs="0">
                    <xs:element name="associate-metadata-motor-racing"  type="motorRacingAssociateMetadataComplexType"/>
                </xs:choice>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    
    <!-- ========================================================================================= -->
    <!-- Named COMPLEX types -->
    <!-- ========================================================================================= -->
    
    <!-- ========================================================================================= -->
    <!-- Sports Metadata Complex type -->
    <!-- ========================================================================================= -->
    <xs:complexType name="sportsMetadataComplexType">
        <xs:complexContent>
            <xs:extension base="baseMetadataComplexType">
                <xs:sequence>
                    <xs:element ref="catalogRef" minOccurs="0" maxOccurs="unbounded">
                        <xs:annotation>
                            <xs:documentation>A reference to document(s) listing externally-supplied controlled vocabularies. | The catalog file can be in NewsML 1. </xs:documentation>
                        </xs:annotation>
                    </xs:element>
<!--                    <xs:element name="catalog" minOccurs="0">
                        <xs:annotation>
                            <xs:documentation>A reference to the document listing externally-supplied controlled vocabularies. | The catalog file can be in NewsML 1.</xs:documentation>
                        </xs:annotation>
                        <xs:complexType>
                            <xs:attributeGroup ref="commonAttributes"/>
                            <xs:attribute name="href" type="xs:anyURI" use="optional">
                                <xs:annotation>
                                    <xs:documentation>The URL for the catalog.</xs:documentation>
                                </xs:annotation>
                            </xs:attribute>
                        </xs:complexType>
                    </xs:element>
-->                    <xs:element name="sports-title" type="ConceptNameType" minOccurs="0" maxOccurs="unbounded">
                        <xs:annotation>
                            <xs:documentation>A short textual description of the document. | Can  show up in search results.</xs:documentation>
                        </xs:annotation>
                    </xs:element>
                    <xs:element name="advisory" minOccurs="0">
                        <xs:annotation>
                            <xs:documentation>A short textual message to editors receiving the document. | Not generally published through to
                                end-users.</xs:documentation>
                        </xs:annotation>
                        <xs:complexType mixed="true">
                            <xs:attributeGroup ref="commonAttributes"/>
                        </xs:complexType>
                    </xs:element>
                    <xs:element name="feature-name" type="ConceptNameType" minOccurs="0"
                        maxOccurs="unbounded">
                        <xs:annotation>
                            <xs:documentation>A displayable name for the resource identified by the fixture-key.</xs:documentation>
                        </xs:annotation>
                    </xs:element>
                </xs:sequence>
                <xs:attribute name="doc-id" type="xs:string" use="required">
                    <xs:annotation>
                        <xs:documentation>The often-unique ID of the document, tracked by publishers.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="publisher" type="xs:string" use="optional">
                    <xs:annotation>
                        <xs:documentation>Publisher of the data.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="date-time" type="DateOptTimeType" use="optional">
                    <xs:annotation>
                        <xs:documentation>Date-timestamp for the document, normalized to ISO 8601 extended format: YYYY-MM-DDTHH:MM:SS+HH:MM. Use YYYY-MM-DD when no time is available</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="language" type="xs:language" use="optional">
                    <xs:annotation>
                        <xs:documentation>The default language of the document. NAR-construction. Values must be valid BCP 47 language tags.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="slug" type="xs:string" use="optional">
                    <xs:annotation>
                        <xs:documentation>A keyword used by editors to refer to the document.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="document-class" type="QCodeType" use="optional">
                    <xs:annotation>
                        <xs:documentation>A category code for the document type (fixture-key). Recommended
                            categories contained in SportsML vocabulary uri: http://cv.iptc.org/newscodes/spct/
                        </xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="fixture-key" type="QCodeType" use="optional">
                    <xs:annotation>
                        <xs:documentation>A publisher-specific key for the type of regularly-published document (or genre) being transmitted. Eg. event-stats, roster, standings (table), etc. SportsML vocabulary uri: http://cv.iptc.org/newscodes/spfixt/</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    
    <!-- ========================================================================================= -->
    <!-- Sports Content Codes COMPLEX type, Grouping -->
    <!-- ========================================================================================= -->
    <xs:complexType name="sportsContentCodesComplexType">
        <xs:annotation>
            <xs:documentation>A container for content-codes. | Can hold as many codes as needed to describe all contents at this level and below.</xs:documentation>
        </xs:annotation>
        <xs:sequence minOccurs="0" maxOccurs="unbounded">
            <xs:element name="sports-content-code" type="sportsContentCodeComplexType"/>
        </xs:sequence>
        <xs:attributeGroup ref="commonAttributes"/>
    </xs:complexType>
    
    <!-- ========================================================================================= -->
    <!-- Sports Content Codes COMPLEX type, one code -->
    <!-- ========================================================================================= -->
    <xs:complexType name="sportsContentCodeComplexType">
        <xs:annotation>
            <xs:documentation>An individual code that describes an entity one may want to filter for. Describes what sports, what teams, etc., are covered.</xs:documentation>
        </xs:annotation>
        <xs:sequence minOccurs="0" maxOccurs="unbounded">
            <xs:element name="sports-content-qualifier" type="sportsContentQualifierComplexType"/>
        </xs:sequence>
        <xs:attributeGroup ref="commonAttributes"/>
        <xs:attribute name="code-type" type="QCodeType" use="required">
            <xs:annotation>
                <xs:documentation>What type of item is being described. SportsML vocabulary uri: http://cv.iptc.org/newscodes/spct/</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="code-key" type="QCodeType" use="optional">
            <xs:annotation>
                <xs:documentation>The symbol for the identified content.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="code-name" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>A displayable name for the code.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    
    <!-- ========================================================================================= -->
    <!-- Sports Content Codes COMPLEX type, qualifier -->
    <!-- ========================================================================================= -->
    <xs:complexType name="sportsContentQualifierComplexType">
        <xs:annotation>
            <xs:documentation>Further refinement/elaboration of a sports-content-code. | If the document covers more than one of these, additional sports-content-qualifier elements may be used.</xs:documentation>
        </xs:annotation>
        <xs:attributeGroup ref="commonAttributes"/>
        <xs:attribute name="gender" use="optional">
            <xs:annotation>
                <xs:documentation>One specific gender or mixed.</xs:documentation>
            </xs:annotation>
            <xs:simpleType>
                <xs:annotation>
                    <xs:documentation>One specific gender or mixed.</xs:documentation>
                </xs:annotation>
                <xs:restriction id="genderQual" base="xs:string">
                    <xs:enumeration id="genderQualMale" value="male"/>
                    <xs:enumeration id="genderQualFemale" value="female"/>
                    <xs:enumeration id="genderQualMixed" value="mixed"/>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
        <xs:attribute name="participant-count" type="QCodeType" use="optional">
            <xs:annotation>
                <xs:documentation>Number of participants playing on a team or side in the events covered. SportsML vocabulary uri: http://cv.iptc.org/newscodes/spparticipantcount/</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="professional-status" type="QCodeType" use="optional">
            <xs:annotation>
                <xs:documentation>The professional-status of the events covered. SportsML vocabulary uri: http://cv.iptc.org/newscodes/spprofessionalstatus/</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="special-group" type="QCodeType" use="optional">
            <xs:annotation>
                <xs:documentation>If the events covered are for special groups. Can be school-oriented, age-oriented, or group names, like Firefighters.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="minimum-age" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>Lowest age for participants, in years. Examples: 0, 14, 21.5.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="maximum-age" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>Highest age for participants, in years. Examples: 8, 65, 120.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="special-needs" type="QCodeType" use="optional">
            <xs:annotation>
                <xs:documentation>Events for persons with special-needs.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    
    <!-- ========================================================================================= -->
    <!-- Sports Property COMPLEX type, used in several places for special metadata -->
    <!-- ========================================================================================= -->
    <xs:complexType name="sportsPropertyComplexType">
        <xs:annotation>
            <xs:documentation>An extensible property, similar to structures in NewsML 1.</xs:documentation>
        </xs:annotation>
        <xs:attributeGroup ref="commonAttributes"/>
        <xs:attribute name="formal-name" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>The code or key for the property.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="vocabulary" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>Provides a pointer to a Topic Set which is the controlled vocabulary that can be used to resolve the meaning of the formal-name.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="scheme" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>Distinguishes which of possibly multiple naming schemes in the controlled vocabulary is the one that governs this formal-name.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="value" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>The value of the property. For example, if formal-name equals favorite-color, then value might equal blue.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="allowed-values" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>Points to a controlled vocabulary that delimits the set of allowed values for the property.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    
    <!-- ========================================================================================= -->
    <!-- Sports Event Complex type -->
    <!-- ========================================================================================= -->
    <xs:complexType name="sportsEventComplexType">
        <xs:annotation>
            <xs:documentation>A sporting competition. | A contest that generally ends with a winner.</xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:element name="event-metadata" type="eventMetadataComplexType" minOccurs="0"/>
            <xs:element name="event-stats" type="eventStatsComplexType" minOccurs="0"/>
            <xs:choice>
                <xs:element name="team" type="teamComplexType" minOccurs="0" maxOccurs="unbounded"/>
                <xs:element name="player" type="playerComplexType" minOccurs="0" maxOccurs="unbounded"/>
            </xs:choice>
            <xs:element name="wagering-stats" type="wagering-stats" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="officials" type="officialsComplexType" minOccurs="0"/>
            <xs:element name="actions" type="eventActionsComplexType" minOccurs="0" maxOccurs="1">
                <xs:annotation>
                    <xs:documentation>Single element that can hold multiple action elements</xs:documentation>
                </xs:annotation>
            </xs:element>

            <xs:element name="highlight" type="highlightComplexType" minOccurs="0"
                maxOccurs="unbounded"/>
            <xs:element name="award" type="awardComplexType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="sports-event" type="sportsEventComplexType" minOccurs="0"
                maxOccurs="unbounded">
                <xs:annotation>
                    <xs:documentation>For sports-events that are subevents of another event.</xs:documentation>
                </xs:annotation>
            </xs:element>
        </xs:sequence>
        <xs:attributeGroup ref="commonAttributes"/>
    </xs:complexType>
    
    <!-- ========================================================================================= -->
    <!-- Event Sponsor type -->
    <!-- ========================================================================================= -->
    <xs:complexType name="eventSponsorComplexType">
        <xs:annotation>
            <xs:documentation>A sponsor for an event. | Events can have more than one sponsor.</xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:element name="name" type="ConceptNameType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
        <xs:attributeGroup ref="commonAttributes"/>
        <xs:attribute name="type" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>Could be main, supporting, etc.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    
    <!-- ========================================================================================= -->
    <!-- Highlight Complex type -->
    <!-- ========================================================================================= -->
    <xs:complexType name="highlightComplexType" mixed="true">
        <xs:annotation>
            <xs:documentation>A textual highlight. | Can hold plain text, or could hold NITF.</xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
        <xs:attributeGroup ref="commonAttributes"/>
    </xs:complexType>
    
    <!-- ========================================================================================= -->
    <!-- Site Complex type -->
    <!-- ========================================================================================= -->
    <xs:complexType name="siteComplexType">
        <xs:annotation>
            <xs:documentation>An element housing data having to do with a venue, stadium, arena, field, etc.</xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:element name="site-metadata" type="siteMetadataComplexType"/>
            <xs:element name="site-stats" type="siteStatsComnplexType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
        <xs:attributeGroup ref="commonAttributes"/>
    </xs:complexType>
    
    <!-- ========================================================================================= -->
    <!-- Site Metadata Complex type -->
    <!-- ========================================================================================= -->
    <xs:complexType name="siteMetadataComplexType">
        <xs:annotation>
            <xs:documentation>Metadata about the site.</xs:documentation>
        </xs:annotation>
        <xs:complexContent>
            <xs:extension base="baseEntityMetadataComplexType">
                <xs:sequence>
                    <xs:element name="sports-content-codes" type="sportsContentCodesComplexType" minOccurs="0"/>
                </xs:sequence>
                <xs:attribute name="capacity" type="xs:string" use="optional">
                    <xs:annotation>
                        <xs:documentation>How many spectators can fill the site.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="site-style" type="QCodeType" use="optional">
                    <xs:annotation>
                        <xs:documentation>Whether it is an indoor or outdoor site.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="surface" type="QCodeType" use="optional">
                    <xs:annotation>
                        <xs:documentation>Describes the surface upon which events are played. For example, in tennis, could be hard-court or grass or clay.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="shape" type="QCodeType" use="optional">
                    <xs:annotation>
                        <xs:documentation>A controlled vocabulary for the site's shape. Example for motor-racing: oval.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="incline" type="xs:string" use="optional">
                    <xs:annotation>
                        <xs:documentation>The pitch or embankment of the field of play. Generally in degrees. Example for motor-racing: 13.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="length" type="xs:string" use="optional">
                    <xs:annotation>
                        <xs:documentation>The length of the arena or field of play.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="length-units" type="xs:string" use="optional">
                    <xs:annotation>
                        <xs:documentation>The units used for the length attribute.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="type" type="xs:string" use="optional">
                    <xs:annotation>
                        <xs:documentation>A controlled vocabulary for the type or class of arena.  Example for motor-racing: super-speedway.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="home-page-url" type="xs:anyURI" use="optional">
                    <xs:annotation>
                        <xs:documentation>The website for the venue or arena.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="created" type="TruncatedDateTimeType" use="optional">
                    <xs:annotation>
                        <xs:documentation>Date (and time) when a place was built, opened or so.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="ceasedToExist" type="TruncatedDateTimeType" use="optional">
                    <xs:annotation>
                        <xs:documentation>Date (and time) when a place ceased to exist.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    
    <!-- ========================================================================================= -->
    <!-- Site Stats Complex type -->
    <!-- ========================================================================================= -->
    <xs:complexType name="siteStatsComnplexType">
        <xs:annotation>
            <xs:documentation>Holder for statistics about the site.</xs:documentation>
        </xs:annotation>
        <xs:attributeGroup ref="commonAttributes"/>
        <xs:attributeGroup ref="coverageAttributes"/>
        <xs:attribute name="alignment" use="optional">
            <xs:annotation>
                <xs:documentation>Statistics about the site, accurate for a particular occasion. home means the site is home for one of the teams or players. neutral that it is neutral to all participants in the event.</xs:documentation>
            </xs:annotation>
            <xs:simpleType id="siteAlignment">
                <xs:restriction base="xs:string">
                    <xs:enumeration id="siteAlignmentHome" value="home"/>
                    <xs:enumeration id="siteAlignmentNeutral" value="neutral"/>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
        <xs:attribute name="attendance" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>How many spectators attended during the event.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="attendance-average" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>Average number of spectators that have attended.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="temperature" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>Temperature of the event recorded during the competition.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="temperature-units" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>Units of the temperature value.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="weather-code" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>A controlled-vocabulary description of the weather, such as sunny, partly-cloudy, etc.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="weather-label" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>Additional comment about the weather.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="weather-wind" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>Wind reading of the event recorded during the competition.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="weather-prediction" type="QCodeType" use="optional">
            <xs:annotation>
                <xs:documentation>Predicted weather conditions for the event.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="probability-of-precipitation" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>Percentage likelihood of precipitation.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    
    <!-- ========================================================================================= -->
    <!-- Team Complex type -->
    <!-- ========================================================================================= -->
    <xs:complexType name="teamComplexType">
        <xs:annotation>
            <xs:documentation>A team participating in a sporting event. | Holds metadata and
                statistical data for team.</xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:element name="team-metadata" type="teamMetadataComplexType"/>
            <xs:element name="team-stats" type="teamStatsComplexType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="player" type="playerComplexType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="wagering-stats" type="wagering-stats" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="associate" type="associateComplexType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="affiliation" type="affiliationComplexType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
        <xs:attributeGroup ref="commonAttributes"/>
    </xs:complexType>
    
    <!-- ========================================================================================= -->
    <!-- Sub score complex type -->
    <!-- ========================================================================================= -->
    <xs:complexType name="subScoreComplexType">
        <xs:annotation>
            <xs:documentation>Statistics that detail the score for a particular period or inning. Per-sport controlled vocabularies used for period- value.</xs:documentation>
        </xs:annotation>
        <xs:attribute name="period-value" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>Generally a natural number. Could also be quarter-1, period-2, inning-5, etc.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="score" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>The score for that period (or scoring unit).</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="sub-score-type" type="QCodeType" use="optional">
            <xs:annotation>
                <xs:documentation>The type of sub-score.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="sub-score-key" type="QCodeType" use="optional">
            <xs:annotation>
                <xs:documentation>The symbol for the sub-score unit.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="sub-score-name" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>The name of the sub-score unit.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="rank" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>The ranking result of the sub-score unit.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="total-score" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>The running total during the sub-score period or unit. Good for split scores.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="score-attempts" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>The attempts to score during the period (or scoring unit).</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    
    <!-- ========================================================================================= -->
    <!-- penalty stats complex type -->
    <!-- ========================================================================================= -->
    <xs:complexType name="penaltyStatsComplexType">
        <xs:annotation>
            <xs:documentation>Statistics that detail the number of each type of penalty. | Can be recorded for either a team or a player.</xs:documentation>
        </xs:annotation>
        <xs:attributeGroup ref="commonAttributes"/>
        <xs:attribute name="type" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>Could be a numeric value like 2, 5 or 10 for ice hockey, or yellow-card or red-card for soccer etc.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="count" type="xs:nonNegativeInteger" use="optional">
            <xs:annotation>
                <xs:documentation>The number of that type of penalities for this team or player.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="value" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>Amount penalized. Eg. total minutes (ice-hockey, lacrosse, etc.) or yards (american-football).</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    
    <!-- ========================================================================================= -->
    <!-- Outcome totals complex type -->
    <!-- ========================================================================================= -->
    <xs:complexType name="outcomeTotalsComplexType">
        <xs:annotation>
            <xs:documentation>A report on the number of wins, losses, etc., the team or player had during a particular time period. | Can also be scoped with various coverage qualifications, such as just events played at home.</xs:documentation>
        </xs:annotation>
        <xs:attributeGroup ref="commonAttributes"/>
        <xs:attributeGroup ref="coverageAttributes"/>
        <xs:attribute name="wins" type="xs:nonNegativeInteger" use="optional">
            <xs:annotation>
                <xs:documentation>Number of wins.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="losses" type="xs:nonNegativeInteger" use="optional">
            <xs:annotation>
                <xs:documentation>Number of losses.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="ties" type="xs:nonNegativeInteger" use="optional">
            <xs:annotation>
                <xs:documentation>Number of ties.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="undecideds" type="xs:nonNegativeInteger" use="optional">
            <xs:annotation>
                <xs:documentation>Number of events that were started, but ended up undecided.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="winning-percentage" type="xs:nonNegativeInteger" use="optional">
            <xs:annotation>
                <xs:documentation>The winning percentage. Generally, wins divided by total events completed.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="points-scored-for" type="xs:nonNegativeInteger" use="optional">
            <xs:annotation>
                <xs:documentation>The number of points a team has scored against its opponents during an extended time period.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="points-scored-against" type="xs:nonNegativeInteger" use="optional">
            <xs:annotation>
                <xs:documentation>The number of points scored against a team by its opponents during an extended time period.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="points-difference" type="xs:integer" use="optional">
            <xs:annotation>
                <xs:documentation>The final calculated difference between points-scored-for and points-scored-against. Possibly takes into account other scoring aspects, such as penalties and differences in score-values.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="standing-points" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>A quantity used to rank teams, usually within a division, in order to decide who comes in first at the end of a season. Localized to the coverage-attributes.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="standing-points-against" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>Points counted against a team in rankings. Used in European handball standings, for example.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="streak-type" type="QCodeType" use="optional">
            <xs:annotation>
                <xs:documentation>Whether this is a streak of wins, of losses, etc. SportsML vocabulary uri: http://cv.iptc.org/newscodes/spstreaktype/</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="streak-duration" type="xs:duration" use="optional">
            <xs:annotation>
                <xs:documentation>How long the streak lasted.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="streak-total" type="xs:nonNegativeInteger" use="optional">
            <xs:annotation>
                <xs:documentation>Holds the number of goals scored during a streak-type of score, for example.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="streak-start" type="TruncatedDateTimeType" use="optional">
            <xs:annotation>
                <xs:documentation>Date on which the streak began.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="streak-end" type="TruncatedDateTimeType" use="optional">
            <xs:annotation>
                <xs:documentation>Date on which the streak ended.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="events-played" type="xs:nonNegativeInteger" use="optional">
            <xs:annotation>
                <xs:documentation>Number of events played within the scope of  play.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="events-remaining" type="xs:nonNegativeInteger" use="optional">
            <xs:annotation>
                <xs:documentation>Number of events remaining within the scope of play.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="games-back" type="xs:integer" use="optional">
            <xs:annotation>
                <xs:documentation>A number used to measure how behind one team is from first place. The first place team is 0 games back.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="losses-overtime" type="xs:nonNegativeInteger" use="optional">
            <xs:annotation>
                <xs:documentation>Number of losses in events which went into overtime. For leagues that use this as a top-level outcome category (eg. NHL), as opposed to just a derivative of scoping.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
	    <xs:attribute name="relegation-average" type="xs:decimal" use="optional">
            <xs:annotation>
                <xs:documentation>The product of a relegation average formula used to determine which team is demoted to a lower league. The formula may vary by league but the average typically looks at team performance across multiple competitions. The team(s) with the lowest relegation averages is sent to the league below.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    
    <!-- ========================================================================================= -->
    <!-- Outcome result complex type -->
    <!-- ========================================================================================= -->
    <xs:complexType name="outcomeResultComplexType">
        <xs:annotation>
            <xs:documentation>A report on the result, if any, from the event etc.</xs:documentation>
        </xs:annotation>
        <xs:attributeGroup ref="commonAttributes"/>
        <xs:attributeGroup ref="coverageAttributes"/>
        <xs:attribute name="type" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>The type of outcome result. Can be things like relegation, promotion and qualification</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="key" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>A key for the type of result described</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="comment" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>Textual comment about the outcome result</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        
    </xs:complexType>
    
    <!-- ========================================================================================= -->
    <!-- Award complex type -->
    <!-- ========================================================================================= -->
    <xs:complexType name="awardComplexType">
        <xs:annotation>
            <xs:documentation>A medal, ribbon, placement, or other type of award. | Can be assigned to an event, a team, or a player.</xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:element name="name" type="ConceptNameType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
        <xs:attributeGroup ref="commonAttributes"/>
        <xs:attribute name="award-type" type="QCodeType" use="optional">
            <xs:annotation>
                <xs:documentation>Type of award.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="player-or-team-idref" type="xs:IDREF" use="optional">
            <xs:annotation>
                <xs:documentation>Reference to the player or team that received the award.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="total" type="xs:nonNegativeInteger" use="optional">
            <xs:annotation>
                <xs:documentation>Total number of these such awards given to the player or team. Can be used to count medals for each country.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="place" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>The place for which this prize is offered. For example, place="1" means the first-place prize.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="value" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>The amount of money earned by the player who came in this place.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="currency" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>The units of currency for the value attribute.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    
    <!-- ========================================================================================= -->
    <!-- Event record complex type -->
    <!-- ========================================================================================= -->
    <xs:complexType name="eventRecordComplexType">
        <xs:annotation>
            <xs:documentation>A world, national, state, or school record. | More than one record can be set by one participant at one sports-event.</xs:documentation>
        </xs:annotation>
        <xs:attribute name="type" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>The type of record.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="previous-record" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>The score value of the previously-held record.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    
    <!-- ========================================================================================= -->
    <!-- Rank complex type -->
    <!-- ========================================================================================= -->
    <xs:complexType name="rankComplexType">
        <xs:annotation>
            <xs:documentation>How a team is doing in comparison to other teams or players. | May be qualified, so that one ranks teams or players according to, say, how they play at home, or within their division.</xs:documentation>
        </xs:annotation>
        <xs:attributeGroup ref="commonAttributes"/>
        <xs:attributeGroup ref="coverageAttributes"/>
        <xs:attribute name="type" type="QCodeType" use="optional">
            <xs:annotation>
                <xs:documentation>The type of the rank. Generally a publisher-specific controlled vocabulary.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="issuer" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>The entity or organization which issued the rank.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="value" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>The value of the rank.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="value-previous" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>The previous rank.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    
    <!-- ========================================================================================= -->
    <!-- Rating complex type -->
    <!-- ========================================================================================= -->
    <xs:complexType name="ratingComplexType">
        <xs:annotation>
            <xs:documentation>A judged value placed on the team or individual. | Often used in British soccer.</xs:documentation>
        </xs:annotation>
        <xs:attributeGroup ref="commonAttributes"/>
        <xs:attribute name="rating-type" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>A classification for the rating.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="rating-issuer" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>The entity or organization which issued the rating.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="rating-value" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>The value of the rating.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="rating-maximum" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>The maximum value for the rating.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    
    <!-- ========================================================================================= -->
    <!-- Player complex type -->
    <!-- ========================================================================================= -->
    <xs:complexType name="playerComplexType">
        <xs:annotation>
            <xs:documentation>A competitor. | Their athletic talents help them decide who wins a sports-event.</xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:element name="player-metadata" type="playerMetadataComplexType"/>
            <xs:element name="player-stats" type="playerStatsComplexType" minOccurs="0"  maxOccurs="unbounded"/>
            <xs:element name="wagering-stats" type="wagering-stats" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="associate" type="associateComplexType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="affiliation" type="affiliationComplexType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
        <xs:attributeGroup ref="commonAttributes"/>
    </xs:complexType>
    
    <!-- ========================================================================================= -->
    <!-- Officials complex type -->
    <!-- ========================================================================================= -->
    <xs:complexType name="officialsComplexType">
        <xs:annotation>
            <xs:documentation>A set of officials. | May hold zero or more.</xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:element name="official" type="officialComplexType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
        <xs:attributeGroup ref="commonAttributes"/>
    </xs:complexType>
    
    <!-- ========================================================================================= -->
    <!-- One official complex type -->
    <!-- ========================================================================================= -->
    <xs:complexType name="officialComplexType">
        <xs:annotation>
            <xs:documentation>Also referred to as umpire or referree. | Ensures that the
                sports-event is played according to its rules.</xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:element name="official-metadata" type="officialMetadataComplexType"/>
            <xs:element name="official-stats" type="officialStatsComplexType" minOccurs="0"/>
            <xs:element name="affiliation" type="affiliationComplexType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
        <xs:attributeGroup ref="commonAttributes"/>
    </xs:complexType>
    
    <!-- ========================================================================================= -->
    <!-- Associate complex type -->
    <!-- ========================================================================================= -->
    <xs:complexType name="associateComplexType">
        <xs:annotation>
            <xs:documentation>Manager or coach or jockey, etc. | An individual or a group that assists a team or player, and functions in a supporting capacity.</xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:element name="associate-metadata" type="associateMetadataComplexType"/>
            <xs:element name="associate-stats" type="associateStatsComplexType" minOccurs="0"/>
            <xs:element name="affiliation" type="affiliationComplexType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
        <xs:attributeGroup ref="commonAttributes"/>
    </xs:complexType>
    
    <!-- ========================================================================================= -->
    <!-- Affiliation complex type -->
    <!-- ========================================================================================= -->
    <xs:complexType name="affiliationComplexType">
        <xs:annotation>
            <xs:documentation>A mechanism for assigning the membership of a player, team, or associate within a division or larger organizational structure. Also, to indicate an official's affiliation with a team, club or federation, for
                example.</xs:documentation>
        </xs:annotation>
        <xs:attributeGroup ref="commonAttributes"/>
        <xs:attributeGroup ref="coverageAttributes"/>
        <xs:attribute name="membership-idref" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>A pointer to the ID for the larger organizational structure.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="membership-type" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>The type of organizational structure in which this item is a member.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="membership-key" type="QCodeType" use="optional">
            <xs:annotation>
                <xs:documentation>A unique key for the organizational structure in which this item is a member.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="membership-name" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>The name associated with the organizational structure in which this item is a member.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    
    <!-- ========================================================================================= -->
    <!-- Tournament Complex type -->
    <!-- ========================================================================================= -->
    <xs:complexType name="tournamentComplexType">
        <xs:annotation>
            <xs:documentation>A structured series of competitions within one sport. | Generally organized by a particular sponsoring body. Can happen all in one day, or be spread out - like the Davis Cup in tennis.</xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:element name="tournament-metadata" type="tournamentMetadataComplexType" minOccurs="0"/>
            <xs:element name="standing" type="standingComplexType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:choice>
                <xs:element name="tournament-division" type="tournamentDivisionComplexType" minOccurs="0" maxOccurs="unbounded"/>
                <xs:element name="tournament-part" type="tournamentPartComplexType" minOccurs="0" maxOccurs="unbounded"/>
                <xs:element name="sports-event" type="sportsEventComplexType" minOccurs="0" maxOccurs="unbounded"/>
            </xs:choice>
        </xs:sequence>
        <xs:attributeGroup ref="commonAttributes"/>
    </xs:complexType>
    
    <!-- ========================================================================================= -->
    <!-- Tournament division Complex type -->
    <!-- ========================================================================================= -->
    <xs:complexType name="tournamentDivisionComplexType">
        <xs:annotation>
            <xs:documentation>A tournament subcategory, often with its own trophy and prize. | Use
                it to divide specific overall competitions in a large multi-sport tournament such as
                Olympics. Can also divide gender competitions, for example in tennis tournaments.
                Can be nested to divide gender at a higher level (tournament/tournament-division)
                and then to divide specific sport competitions futher down the tree
                (tournament-part/tournament-division). </xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:element name="tournament-division-metadata" type="tournamentDivisionMetadataComplexType" minOccurs="0"/>
            <xs:element name="standing" type="standingComplexType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:choice>
                <xs:element name="tournament-part" type="tournamentPartComplexType" minOccurs="0"  maxOccurs="unbounded"/>
                <xs:element name="sports-event" type="sportsEventComplexType" minOccurs="0" maxOccurs="unbounded"/>
            </xs:choice>
        </xs:sequence>
        <xs:attributeGroup ref="commonAttributes"/>
    </xs:complexType>
    
    <!-- ========================================================================================= -->
    <!-- Tournament Part Complex type -->
    <!-- ========================================================================================= -->
    <xs:complexType name="tournamentPartComplexType">
        <xs:annotation>
            <xs:documentation>A tournament part. Use it do group specific parts of a tournament, like a stage or a round. </xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:element name="tournament-part-metadata" type="tournamentPartMetadataComplexType" minOccurs="0"/>
            <xs:element name="standing" type="standingComplexType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:choice>
                <xs:element name="tournament-part" type="tournamentPartComplexType" minOccurs="0"  maxOccurs="unbounded"/>
                <xs:element name="sports-event" type="sportsEventComplexType" minOccurs="0"  maxOccurs="unbounded"/>
            </xs:choice>
        </xs:sequence>
        <xs:attributeGroup ref="commonAttributes"/>
        <xs:attribute name="part-index" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation> For provider-specific tournament indexing systems. DPA, for
                    example, has one that looks like this: part-name="Group A"
                    part-index="p1/1/p2/A" </xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    
    <!-- ========================================================================================= -->
    <!-- Article Complex type -->
    <!-- ========================================================================================= -->
    <xs:complexType name="articleComplexType">
        <xs:annotation>
            <xs:documentation>Holds either an article or a reference to an article. Format of the content is up to the provider. NITF from IPTC or HTML are common alternatives.</xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
        <xs:attributeGroup ref="commonAttributes"/>
        <xs:attribute name="format" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>Format for the included content.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="article-ref" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>URL or system identifier (or IDREF?) to an externally-located news article.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    
    <!-- ========================================================================================= -->
    <!-- Standing Complex type -->
    <!-- ========================================================================================= -->
    <xs:complexType name="standingComplexType">
        <xs:sequence>
            <xs:annotation>
                <xs:documentation>Also known as a (league) table | A ranked, comparative list of team or individual records.</xs:documentation>
            </xs:annotation>
            <xs:element name="standing-metadata" type="standingMetadataComplexType" minOccurs="0"/>
            <xs:choice>
                <xs:element name="team" type="teamComplexType" minOccurs="0" maxOccurs="unbounded"/>
                <xs:element name="player" type="playerComplexType" minOccurs="0" maxOccurs="unbounded"/>
            </xs:choice>
        </xs:sequence>
        <xs:attributeGroup ref="commonAttributes"/>
        <xs:attribute name="content-label" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>A displayable label describing this standing.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    
    <!-- ========================================================================================= -->
    <!-- Standing metadata Complex type -->
    <!-- ========================================================================================= -->
    <xs:complexType name="standingMetadataComplexType">
        <xs:annotation>
            <xs:documentation>A series of team or individual records. | A series of team or individual records.</xs:documentation>
        </xs:annotation>
        <xs:complexContent>
            <xs:extension base="baseMetadataComplexType"/>
        </xs:complexContent>
    </xs:complexType>
    
    <!-- ========================================================================================= -->
    <!-- Schedule Complex type -->
    <!-- ========================================================================================= -->
    <xs:complexType name="scheduleComplexType">
        <xs:annotation>
            <xs:documentation>A series of games. | Usually grouped by date.</xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:element name="schedule-metadata" type="scheduleMetadataComplexType"/>
            <xs:element name="sports-event" type="sportsEventComplexType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
        <xs:attributeGroup ref="commonAttributes"/>
        <xs:attribute name="date-label" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>Displayable label that describes what dates this schedule covers.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="content-label" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>Displayable label that describes what events this schedule includes.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    
    <!-- ========================================================================================= -->
    <!-- Schedule metadata Complex type -->
    <!-- ========================================================================================= -->
    <xs:complexType name="scheduleMetadataComplexType">
        <xs:annotation>
            <xs:documentation>Background information about the schedule. | Describes the time period which the schedule covers, and which teams or events may be covered.</xs:documentation>
        </xs:annotation>
        <xs:complexContent>
            <xs:extension base="baseMetadataComplexType"/>
        </xs:complexContent>
    </xs:complexType>
    
    <!-- ========================================================================================= -->
    <!-- Statistic Complex type -->
    <!-- ========================================================================================= -->
    <xs:complexType name="statisticComplexType">
        <xs:annotation>
            <xs:documentation>A table that generally compares the performance of teams or players. |
                The fixture-key can identify which regulary-running statistics are being presented.
                Also appropriate for rosters (squad listings).</xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:element name="statistic-metadata" type="statisticMetadataComplexType"/>
            <xs:element name="group" type="groupComplexType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="team" type="teamComplexType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="player" type="playerComplexType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="associate" type="associateComplexType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="status-change" type="statusChangeComplexType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
        <xs:attributeGroup ref="commonAttributes"/>
        <xs:attributeGroup ref="coverageAttributes"/>
        <xs:attribute name="type" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>A code describing the class of statistic covered herein, generally part of a controlled vocabulary.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="content-label" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>A display label for the enclosed statistical ranking. (Should be placed as name in the metadata section.)</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    
    <!-- ========================================================================================= -->
    <!-- Statistic metadata Complex type -->
    <!-- ========================================================================================= -->
    <xs:complexType name="statisticMetadataComplexType">
        <xs:annotation>
            <xs:documentation>Identifies which teams are being covered. | Also indicates the date ranges for which these stats cover.</xs:documentation>
        </xs:annotation>
        <xs:complexContent>
            <xs:extension base="baseMetadataComplexType"/>
        </xs:complexContent>
    </xs:complexType>
    
    <!-- ========================================================================================= -->
    <!-- Status change Complex type -->
    <!-- ========================================================================================= -->
    <xs:complexType name="statusChangeComplexType">
        <xs:annotation>
            <xs:documentation>Indicates status change of an entity.</xs:documentation>
        </xs:annotation>
        <xs:attributeGroup ref="commonAttributes"/>
        <xs:attributeGroup ref="coverageAttributes"/>
        <xs:attribute name="changer-idref" type="xs:IDREF" use="required">
            <xs:annotation>
                <xs:documentation>A pointer to the player or team that has undergone the status change.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="status-change-type" type="QCodeType" use="required">
            <xs:annotation>
                <xs:documentation>What type of change was made in the status of a player or team. Examples are injury, trade, cut.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="original-status" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>What the original status of the player or team was. Examples are active, inactive, disabled-list.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="new-status" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>What the new status of the player or team is. Examples are active, inactive, disabled-list.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="original-idref" type="xs:IDREF" use="optional">
            <xs:annotation>
                <xs:documentation>Generally, a pointer to the original team that the player in changer-idref was affiliated with.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="new-idref" type="xs:IDREF" use="optional">
            <xs:annotation>
                <xs:documentation>Generally, a pointer to the new team that the player in changer-idref is now affiliated with.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    
    <!-- ========================================================================================= -->
    <!-- Group Complex type -->
    <!-- ========================================================================================= -->
    <xs:complexType name="groupComplexType">
        <xs:annotation>
            <xs:documentation>A holder for statistics about a particular bracket or division or
                conference or league. | Holds metadata and stats. Also appropriate for expressing
                general organization/league membership and structure.</xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:element name="group-metadata" type="groupMetadataComplexType"/>
            <xs:element name="group-stats" type="groupStatsComplexType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="group" type="groupComplexType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="team" type="teamComplexType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="player" type="playerComplexType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="affiliation" type="affiliationComplexType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
        <xs:attributeGroup ref="commonAttributes"/>
    </xs:complexType>
    
    <!-- ========================================================================================= -->
    <!-- Group Metadata Complex type -->
    <!-- ========================================================================================= -->
    <xs:complexType name="groupMetadataComplexType">
        <xs:annotation>
            <xs:documentation>Metadata about the group.</xs:documentation>
        </xs:annotation>
        <xs:complexContent>
            <xs:extension base="base2MetadataComplexType">
                <xs:attribute name="group-type" type="xs:string" use="optional">
                    <xs:annotation>
                        <xs:documentation>The type of group. For example: conference, division, etc.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="home-page-url" type="xs:string" use="optional">
                    <xs:annotation>
                        <xs:documentation>The home page URL for the group.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    
    <!-- ========================================================================================= -->
    <!-- Group Stats Complex type -->
    <!-- ========================================================================================= -->
    <xs:complexType name="groupStatsComplexType">
        <xs:annotation>
            <xs:documentation>Statistics that apply to the group as a whole. | Not all stats are used in every sport.</xs:documentation>
        </xs:annotation>
        <xs:complexContent>
            <xs:extension base="base3StatsComplexType"> </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    
    <!-- ========================================================================================= -->
    <!-- Stat Complex type -->
    <!-- ========================================================================================= -->
    <xs:complexType name="genericStatComplexType">
        <xs:annotation>
            <xs:documentation>A generic stat element that can be used together with or instead of
                more specific stat element and attributes. With nested stats the lower levels should
                be regarded as having the same value as their parents if that attribute is not
                specifically set.</xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:element name="name" type="ConceptNameType" minOccurs="0" maxOccurs="unbounded">
                <xs:annotation>
                    <xs:documentation>The name of the stat. SportsML names are same as attribute names of stats in the sport-specific plugins.</xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="stat" type="genericStatComplexType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
        <xs:attributeGroup ref="genericStatAttributes"/>
        <xs:attributeGroup ref="coverageAttributes"/>
    </xs:complexType>
    
    <!-- ========================================================================================= -->
    <!-- Wagering Stats Complex type -->
    <!-- ========================================================================================= -->
    <xs:complexType name="wagering-stats">
        <xs:annotation>
            <xs:documentation>An element to house lines and odds for wagering. | Includes moneylines, spreads, etc.</xs:documentation>
        </xs:annotation>
        <xs:choice minOccurs="0" maxOccurs="unbounded">
            <xs:element name="wagering-moneyline" type="wagering-moneyline"/>
            <xs:element name="wagering-total-score" type="wagering-total-score"/>
            <xs:element name="wagering-runline" type="wagering-runline"/>
            <xs:element name="wagering-odds" type="wagering-odds"/>
            <xs:element name="wagering-straight-spread" type="wagering-straight-spread"/>
        </xs:choice>
        <xs:attributeGroup ref="commonAttributes"/>
        <xs:attribute name="comment" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>A generic comment for the wagering stats.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    <xs:complexType name="wagering-moneyline">
        <xs:annotation>
            <xs:documentation>Odds in terms of money. | Negative amount indicates wagerer must lay
                that amount to win say a hundred dollars. Positive amount indicates wagerer gets
                that amount for every hundred dollars wagered.</xs:documentation>
        </xs:annotation>
        <xs:attributeGroup ref="commonAttributes"/>
        <xs:attributeGroup ref="wagering3Attributes"/>
    </xs:complexType>
    <xs:complexType name="wagering-runline">
        <xs:annotation>
            <xs:documentation>A line used in baseball.</xs:documentation>
        </xs:annotation>
        <xs:attributeGroup ref="commonAttributes"/>
        <xs:attributeGroup ref="wagering3Attributes"/>
        <xs:attribute name="value" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>Generally +1.5 or -1.5.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="value-opening" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>The opening value for this runline.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    <xs:complexType name="wagering-straight-spread">
        <xs:annotation>
            <xs:documentation>A wager built around the different between the scores of two teams.</xs:documentation>
        </xs:annotation>
        <xs:attributeGroup ref="commonAttributes"/>
        <xs:attributeGroup ref="wagering3Attributes"/>
        <xs:attribute name="value" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>The number of points for which the two scores should differ.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="value-opening" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>The opening value.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    <xs:complexType name="wagering-total-score">
        <xs:annotation>
            <xs:documentation>Total combined point/runs/goals scored in a game.</xs:documentation>
        </xs:annotation>
        <xs:attributeGroup ref="commonAttributes"/>
        <xs:attributeGroup ref="wagering2Attributes"/>
        <xs:attribute name="line-over" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>The OVER section of an over/under line.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="line-under" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>The UNDER section of an over/under line.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="total" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>The combined total of the score for the two teams.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="line-over-opening" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>The opening value of the OVER section of an over/under line.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="line-under-opening" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>The opening value of the UNDER section of an over/under line.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="total-opening" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>The opening value of the combined score for the two teams.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    <xs:complexType name="wagering-odds">
        <xs:annotation>
            <xs:documentation>A line that gives formal odds on a team or player winning, such as 3-to-1 odds.</xs:documentation>
        </xs:annotation>
        <xs:sequence minOccurs="0" maxOccurs="unbounded">
            <xs:element name="wagering-prediction" type="wagering-prediction"/>
        </xs:sequence>
        <xs:attributeGroup ref="commonAttributes"/>
        <xs:attributeGroup ref="wageringAttributes"/>
        <xs:attribute name="numerator" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>The numerator of the chances this team or player is given.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="denominator" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>The denominator of the chances this team or player is given.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="numerator-opening" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>The opening value of the numerator.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="denominator-opening" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>The opening value of the denominator.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="payout-calcluation" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>How much money additional gets paid should this team or player or team win.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="payback-amount" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>The total amount paid back to the winning wagerer, including the amount invested.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    <xs:complexType name="wagering-prediction">
        <xs:annotation>
            <xs:documentation>A prediction as to whether a team or player is a favorite or an underdog.</xs:documentation>
        </xs:annotation>
        <xs:attributeGroup ref="commonAttributes"/>
        <xs:attributeGroup ref="coverageAttributes"/>
        <xs:attribute name="prediction" type="QCodeType" use="optional">
            <xs:annotation>
                <xs:documentation>Whether this team or player is the favorite or the underdog.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    
    <!-- ========================================================================================= -->
    <!-- Base types -->
    <!-- ========================================================================================= -->
    
    <!-- ========================================================================================= -->
    <!-- base metadata Complex type -->
    <!-- ========================================================================================= -->
    <xs:complexType name="baseMetadataComplexType">
        <xs:annotation>
            <xs:documentation>Basic metadata elements and attributes. Used directly by sports, standing, schedule and statistic and extended further by base2MetadataComplexType</xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:element name="sports-content-codes" type="sportsContentCodesComplexType" minOccurs="0"/>
            <xs:element name="sports-property" type="sportsPropertyComplexType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
        <xs:attributeGroup ref="commonAttributes"/>
        <xs:attributeGroup ref="coverageAttributes"/>
    </xs:complexType>
    
    <!-- ========================================================================================= -->
    <!-- Base 2 metadata complex type -->
    <!-- ========================================================================================= -->
    <xs:complexType name="base2MetadataComplexType">
        <xs:annotation>
            <xs:documentation>Extends the baseMetadata with more elements and attributes. Used by baseEvent and baseTournament</xs:documentation>
        </xs:annotation>
        <xs:complexContent>
            <xs:extension base="baseMetadataComplexType">
                <xs:sequence>
                    <xs:element name="name" type="ConceptNameType" minOccurs="0" maxOccurs="unbounded"/>
                    <xs:element name="site" type="siteComplexType" minOccurs="0" maxOccurs="unbounded"/>
                    <xs:element name="award" type="awardComplexType" minOccurs="0" maxOccurs="unbounded"/>
                </xs:sequence>
                <xs:attribute name="key" type="QCodeType" use="optional">
                    <xs:annotation>
                        <xs:documentation>The symbol or identifying key for the tournament or tournament part.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    
    <!-- ========================================================================================= -->
    <!-- Base stat complex type -->
    <!-- ========================================================================================= -->
    <xs:complexType name="baseStatsComplexType">
        <xs:annotation>
            <xs:documentation>The very basic stats type for persons and teams, Extended by base2stats and used directly by officalstats. </xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:element name="rating" type="ratingComplexType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="sports-property" type="sportsPropertyComplexType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="stats" type="genericStatComplexType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
        <xs:attributeGroup ref="commonAttributes"/>
    </xs:complexType>
    
    <!-- ========================================================================================= -->
    <!-- Base stat 2 complex type -->
    <!-- ========================================================================================= -->
    <xs:complexType name="base2StatsComplexType">
        <xs:annotation>
            <xs:documentation>Second level stats. Extends baseStats. Extended further in base3stats and used directly in associate</xs:documentation>
        </xs:annotation>
        <xs:complexContent>
            <xs:extension base="baseStatsComplexType">
                <xs:sequence>
                    <xs:element name="outcome-totals" type="outcomeTotalsComplexType" minOccurs="0" maxOccurs="unbounded"/>
                    <xs:element name="outcome-result" type="outcomeResultComplexType" minOccurs="0" maxOccurs="unbounded"/>
                </xs:sequence>
                <xs:attribute name="points" type="xs:nonNegativeInteger" use="optional">
                    <xs:annotation>
                        <xs:documentation>Points accumulated by this associate. For example, points earned by a NASCAR owner.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    
    <!-- ========================================================================================= -->
    <!-- Base stat 3 complex type -->
    <!-- ========================================================================================= -->
    <xs:complexType name="base3StatsComplexType">
        <xs:annotation>
            <xs:documentation>Extends base2stats. Further extended in genericEntitystats. Used directly by groupStats</xs:documentation>
        </xs:annotation>
        <xs:complexContent>
            <xs:extension base="base2StatsComplexType">
                <xs:sequence>
                    <xs:element name="penalty-stats" type="penaltyStatsComplexType" minOccurs="0" maxOccurs="unbounded"/>
                    <xs:element name="award" type="awardComplexType" minOccurs="0" maxOccurs="unbounded"/>
                    <xs:element name="rank" type="rankComplexType" minOccurs="0"  maxOccurs="unbounded"/>
                </xs:sequence>
                <xs:attributeGroup ref="coverageAttributes"/>
                <xs:attributeGroup ref="statAttributes"/>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    
    <!-- ========================================================================================= -->
    <!-- Generic entity stat complex type -->
    <!-- ========================================================================================= -->
    <xs:complexType name="baseGenericEntityStatsComplexType">
        <xs:annotation>
            <xs:documentation>Statistics that apply to a team as a whole or a player. | Not all stats are used in every sport.</xs:documentation>
        </xs:annotation>
        <xs:complexContent>
            <xs:extension base="base3StatsComplexType">
                <xs:sequence>
                    <xs:element name="sub-score" type="subScoreComplexType" minOccurs="0" maxOccurs="unbounded"/>
                   <!-- <xs:element name="sub-score-attempts" type="subScoreAttemptsComplexType" minOccurs="0" maxOccurs="unbounded"/>-->
                    <xs:element name="event-record" type="eventRecordComplexType" minOccurs="0" maxOccurs="unbounded"/>
                </xs:sequence>
                <xs:attribute name="events-played" type="xs:nonNegativeInteger" use="optional">
                    <xs:annotation>
                        <xs:documentation>The number of sports-events in which this team or player has already participated.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="time-played-total" type="xs:string" use="optional">
                    <xs:annotation>
                        <xs:documentation>Value for the amount of time played by the team or player over the course of a particular time-span, such as a season.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    
    <!-- ========================================================================================= -->
    <!-- Base Team stat complex type -->
    <!-- ========================================================================================= -->
    <xs:complexType name="baseTeamStatsComplexType">
        <xs:annotation>
            <xs:documentation>Statistics that apply to the team as a whole. | Not all stats are used in every sport.</xs:documentation>
        </xs:annotation>
        <xs:complexContent>
            <xs:extension base="baseGenericEntityStatsComplexType"/>
        </xs:complexContent>
    </xs:complexType>
    
    <!-- ========================================================================================= -->
    <!-- Team metadata Complex type -->
    <!-- ========================================================================================= -->
    <xs:complexType name="baseTeamMetadataComplexType">
        <xs:annotation>
            <xs:documentation>Info about the team. Properties of a team that are not based on their competitive performance. | An included sports-content-code element can hold what division it is in, etc.</xs:documentation>
        </xs:annotation>
        <xs:complexContent>
            <xs:extension base="baseEntityMetadataComplexType">
                <xs:sequence>
                    <xs:element name="site" type="siteComplexType" minOccurs="0" maxOccurs="unbounded"/>
                    <xs:element name="sports-content-codes" type="sportsContentCodesComplexType" minOccurs="0" maxOccurs="unbounded"/>
                </xs:sequence>
                <xs:attribute name="alignment" use="optional">
                    <xs:annotation>
                        <xs:documentation>Home or visiting. This is more information about the
                            alignment of the team or player in the event regarding rules etc. It
                            does not necessarily indicate that it is the geographical home-site of
                            the team or player.</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType id="alignment">
                        <xs:restriction base="xs:string">
                            <xs:enumeration id="alignmentHome" value="home"/>
                            <xs:enumeration id="alignmentAway" value="away"/>
                            <xs:enumeration id="alignmentNone" value="none"/>
                        </xs:restriction>
                    </xs:simpleType>
                </xs:attribute>
                <xs:attribute name="established" type="TruncatedDateTimeType" use="optional">
                    <xs:annotation>
                        <xs:documentation>Date (and time) when the team was established.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="dissolved" type="TruncatedDateTimeType" use="optional">
                    <xs:annotation>
                        <xs:documentation>Date (and time) when the team was dissolved.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="team-idref" type="xs:IDREF" use="optional">
                    <xs:annotation>
                        <xs:documentation>Optional reference to a team in which this team is a member. Example: The U.S. Davis Cup team consists of many
                            sub-teams.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="home-page-url" type="xs:anyURI" use="optional">
                    <xs:annotation>
                        <xs:documentation>The fully-qualified URL for the official home page of the team.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="round-position" type="xs:string" use="optional">
                    <xs:annotation>
                        <xs:documentation>The seed or position in this particular round for which this team started. Useful for bracketed tournaments, such as tennis.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    
    <!-- ========================================================================================= -->
    <!-- Player stat base complex type -->
    <!-- ========================================================================================= -->
    <xs:complexType name="basePlayerStatsComplexType">
        <xs:annotation>
            <xs:documentation>Statistics that capture how a player has performed. | Generally does change over the course of a sports-event.</xs:documentation>
        </xs:annotation>
        <xs:complexContent>
            <xs:extension base="baseGenericEntityStatsComplexType">
                <xs:attribute name="time-played-event" type="xs:string" use="optional">
                    <xs:annotation>
                        <xs:documentation>Value for the amount of time played by this player in a particular sports-event.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="time-played-event-average" type="xs:string" use="optional">
                    <xs:annotation>
                        <xs:documentation>Value for the average amount of time played per-event by the player over the course of a particular time-span, such as a season.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="events-started" type="xs:nonNegativeInteger" use="optional">
                    <xs:annotation>
                        <xs:documentation>Number of sports-events the player has played in since the start of the event.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="date-time-entered" type="xs:dateTime" use="optional">
                    <xs:annotation>
                        <xs:documentation>Exact universal time player entered event. For example, the time a downhill skiier began a run.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="date-time-exited" type="xs:dateTime" use="optional">
                    <xs:annotation>
                        <xs:documentation>Exact universal time player exited event. For example, the time a downhill skiier finished a run.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="event-time-entered" type="xs:string" use="optional">
                    <xs:annotation>
                        <xs:documentation>Time player entered event expressed as conventional game-clock time. For example, the game minute a soccer player was subbed on to the field.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="event-time-exited" type="xs:string" use="optional">
                    <xs:annotation>
                        <xs:documentation>Time player exited event expressed as conventional game-clock time. For example, the game minute a soccer player was subbed off the field.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <!-- ========================================================================================= -->
    <!-- Base action complex type -->
    <!-- ========================================================================================= -->
    <xs:complexType name="baseActionComplexType">
        <xs:sequence>
            <xs:element name="action" type="baseActionComplexType" minOccurs="0" maxOccurs="unbounded">
                <!-- An action can have any number of sub-actions -->
                <xs:annotation>
                    <xs:documentation>Any number of action inside the actions holder.</xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="participant" type="baseParticipantComplexType" minOccurs="0" maxOccurs="unbounded"/>
            <!-- Used for human participants, animals, equipment whatever -->
        </xs:sequence>
        <xs:attributeGroup ref="actionAttributes"/>
        <!-- The action can have a number of attributes -->
    </xs:complexType>

    <!-- Compilation of attributes used in actions -->
    <xs:attributeGroup name="actionAttributes">
        <xs:attributeGroup ref="commonAttributes">
            <xs:annotation>
                <xs:documentation>Common attributes</xs:documentation>
            </xs:annotation>
        </xs:attributeGroup>
        <xs:attributeGroup ref="baseEventStateAttributeGroup"/>
        <xs:attribute name="team-idref" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>This is considered the "current" team in action</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="opposing-team-idref" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>This is the opposing team, if any</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="created" type="xs:dateTime" use="optional">
            <xs:annotation>
                <xs:documentation>Date and time when this play/action record was created. This would be the record from the reporter's data entry system.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="last-modified" type="xs:dateTime" use="optional">
            <xs:annotation>
                <xs:documentation>Date and time when this play/action record was last modified. This would be the record from the reporter's data entry system.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="date-time" type="xs:dateTime" use="optional">
            <xs:annotation>
                <xs:documentation>Date and time when this play/action took place on the field.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="result" use="optional" type="QCodeType">
            <xs:annotation>
                <xs:documentation>The result of the play or action. See "result" SportsML vocabs for various sports:
                    http://cv.iptc.org/newscodes/spamfresult/
                    http://cv.iptc.org/newscodes/spsocresult/
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="sequence-number" type="xs:integer" use="optional">
            <xs:annotation>
                <xs:documentation>Sequence-number. Should be separate sequences for sub-actions inside an action</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="comment" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>Textual comment of the action</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="type" type="QCodeType" use="optional">
            <xs:annotation>
                <xs:documentation>The type of competitive action taken on the field of play. See "action" SportsML vocabs for various sports:
                    http://cv.iptc.org/newscodes/spamfaction/
                    http://cv.iptc.org/newscodes/spbblaction/
                    http://cv.iptc.org/newscodes/spbkbaction/
                    http://cv.iptc.org/newscodes/spichaction/
                    http://cv.iptc.org/newscodes/spmcraction/
                    http://cv.iptc.org/newscodes/rgxaction/
                    http://cv.iptc.org/newscodes/spsocaction/
                    http://cv.iptc.org/newscodes/sptenaction/
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="time-elapsed" type="truncatedTimeType" use="optional">
            <xs:annotation>
                <xs:documentation>Total time elapsed of event</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="time-remaining" type="truncatedTimeType" use="optional">
            <xs:annotation>
                <xs:documentation>Time remaining of event</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="player-count" type="xs:integer" use="optional">
            <xs:annotation>
                <xs:documentation>Number of players in the "current" team</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="player-count-opposing" type="xs:integer" use="optional">
            <xs:annotation>
                <xs:documentation>Number of players in the opposing team</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="start-location" use="optional" type="xs:string">
            <xs:annotation>
                <xs:documentation>A string indicating where on the court the action began. Could be an approximate region, or a more complex value adhering to some elaborate coordinate system.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="end-location" use="optional" type="xs:string">
            <xs:annotation>
                <xs:documentation>A string indicating where on the court the action occured. Could be an approximate region, or a more complex value adhering to some elaborate coordinate system.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="zone" use="optional" type="QCodeType">
            <xs:annotation>
                <xs:documentation>The zone on the playing field where the action took place. qcoded value that can be sport specific</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="power-play-time-remaining" use="optional" type="truncatedTimeType">
            <xs:annotation>
                <xs:documentation>Time remaining of powerplay</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="power-play-advantage" use="optional" type="xs:nonNegativeInteger">
            <xs:annotation>
                <xs:documentation>Number of players more on the team in power play, also see the player count attributes</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="caller-type" use="optional" type="QCodeType">
            <xs:annotation>
                <xs:documentation>Who called the timeout, either team or official. ID is given under participant.  SportsML vocab uri: http://cv.iptc.org/newscodes/spamfcaller/ </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="strength" use="optional" type="QCodeType">
            <xs:annotation>
                <xs:documentation>Even strength, power play, short handed, etc.  SportsML vocab uri: http://cv.iptc.org/newscodes/spichstrength/ </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="points" use="optional" type="xs:integer">
            <xs:annotation>
                <xs:documentation>How many points this score was worth for the scoring team.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="turnover-type" use="optional" type="QCodeType">
            <xs:annotation>
                <xs:documentation>How the initiative changed. Steal, lost-ball etc.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="period-value" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>Number or name of current period of event. Normally a number but can be things like OT etc</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="period-length" type="truncatedTimeType" use="optional">
            <xs:annotation>
                <xs:documentation>Length of current period of event</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="score-team" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>Score of the "current" team</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="score-team-opposing" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>Score of the opposing team</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="timeouts-left" type="xs:integer" use="optional">
            <xs:annotation>
                <xs:documentation>Timeouts left for the "current" team</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="timeout-duration" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>Length of timeout</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="timeout-type" use="optional" type="QCodeType">
            <xs:annotation>
                <xs:documentation>Type of timeout. SportsML vocab uri: http://cv.iptc.org/newscodes/spamftimeout/</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="score-type" use="optional" type="QCodeType">
        <xs:annotation>
            <xs:documentation>The type of score for sports with more than one way to gain points (american-football) in which every play is a score attempt. For other sports use score-attempt-type. SportsML vocab uri: http://cv.iptc.org/newscodes/spamfscore/
            </xs:documentation>
        </xs:annotation>
        </xs:attribute>
        <xs:attribute name="save-type" use="optional" type="QCodeType"/>
        <xs:attribute name="save-method" use="optional" type="QCodeType"/>
        <xs:attribute name="pass-type" use="optional" type="QCodeType"/>
        <xs:attribute name="pass-description" use="optional" type="QCodeType"/>
        <xs:attribute name="pass-method" use="optional" type="QCodeType"/>
        <xs:attribute name="shot-type" use="optional" type="QCodeType">
            <xs:annotation>
                <xs:documentation>The type of shot taken. See "shot" SportsML vocabs for various sports:
                    http://cv.iptc.org/newscodes/spgolshot/
                    http://cv.iptc.org/newscodes/sptenshot/
                    http://cv.iptc.org/newscodes/spcurshot/
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="shot-distance" use="optional" type="xs:double"/>
        <xs:attribute name="shot-distance-units" type="QCodeType" use="optional">
            <xs:annotation>
                <xs:documentation>SportsML vocab uri: http://cv.iptc.org/newscodes/spdistanceunits/</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="penalty-type" use="optional" type="QCodeType">
            <xs:annotation>
                <xs:documentation>The name of the type of penalty. See "penalty" SportsML vocabs for various sports:
                    http://cv.iptc.org/newscodes/spamfpenalty/
                    http://cv.iptc.org/newscodes/spichpenalty/
                    http://cv.iptc.org/newscodes/sprgxpenalty/
                    http://cv.iptc.org/newscodes/spsocpenalty/
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="penalty-level" use="optional" type="QCodeType">
            <xs:annotation>
                <xs:documentation>The degree of punishment for the penalty eg. yellow or red card, major, minor, game misconduct, etc. See "penaltylevel" SportsML vocabs for various sports:
                    http://cv.iptc.org/newscodes/spbkbpenaltylevel/
                    http://cv.iptc.org/newscodes/spichpenaltylevel/
                    http://cv.iptc.org/newscodes/sprgxpenaltylevel/
                    http://cv.iptc.org/newscodes/spsocpenaltylevel/
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="penalty-result" use="optional" type="QCodeType">
            <xs:annotation>
                <xs:documentation>What the foul resulted in. See "penaltyresult" SportsML vocabs for various sports:
                    http://cv.iptc.org/newscodes/sprgxpenaltyresult/
                    http://cv.iptc.org/newscodes/spsocpenaltyresult/
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="penalty-side" type="QCodeType" use="optional">
            <xs:annotation>
                <xs:documentation>Which side committed the penalty, usually offense or defense. SportsML vocab uri: http://cv.iptc.org/newscodes/sppenaltyside/</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="penalty-length" use="optional" type="xs:string">
            <xs:annotation>
                <xs:documentation>The length of this penalty. Normally in minutes, but could be rest of the game etc</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="penalty-name" use="optional" type="xs:string">
            <xs:annotation>
                <xs:documentation>The name of the penalty</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="penalty-count" use="optional" type="xs:integer">
            <xs:annotation>
                <xs:documentation>The sum of penalties recieved by this team/participant this event</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="penalty-status" use="optional">
            <!-- If this action marks the start or the end of the penalty time -->
            <xs:simpleType id="penaltyStatus">
                <xs:restriction base="xs:string">
                    <xs:enumeration id="penaltyStatusStart" value="start"/>
                    <xs:enumeration id="penaltyStatusEnd" value="end"/>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
        <xs:attribute name="recipient-type" type="QCodeType" use="optional">
            <xs:annotation>
                <xs:documentation>Whether the receiver of the penalty was the team, the player, a coach, a ref, etc. SportsML vocab uri: http://cv.iptc.org/newscodes/sprecipienttype/</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="score-attempt-type" use="optional" type="QCodeType">
            <xs:annotation>
                <xs:documentation>The type of score that was attempted. See "scoreattempt" SportsML vocabs for various sports:
                    http://cv.iptc.org/newscodes/spbkbscoreattempt/
                    http://cv.iptc.org/newscodes/spichscoreattempt/
                    http://cv.iptc.org/newscodes/sprgxscoreattempt/
                    http://cv.iptc.org/newscodes/spsocscoreattempt/
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="score-attempt-result" use="optional" type="QCodeType">
            <xs:annotation>
                <xs:documentation>The result of the score attempt eg. blocked, missed, etc. See "scoreattemptresult" SportsML vocabs for various sports:
                    http://cv.iptc.org/newscodes/spbkbscoreattemptresult/
                    http://cv.iptc.org/newscodes/spichscoreattemtresult/
                    http://cv.iptc.org/newscodes/sprgxscoreattemptresult/
                    http://cv.iptc.org/newscodes/spsocscoreattemptresult/
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="score-attempt-side" use="optional" type="bodySideList">
            <xs:annotation>
                <xs:documentation>Side of the body of the player attempting to score</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="score-attempt-method" use="optional" type="QCodeType">
            <xs:annotation>
                <xs:documentation>What part of the body or equipment the player used to attempt to score. See "scoreattemptmethod" SportsML vocabs for various sports:
                    http://cv.iptc.org/newscodes/spsocscoreattemptmethod/
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="score-attempt-situation" use="optional" type="QCodeType"/>
        <xs:attribute name="goal-zone" use="optional" type="QCodeType">
            <xs:annotation>
                <xs:documentation>Part of the goal where the score or score-attempt was aimed.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="angle" use="optional" type="xs:string">
            <xs:annotation>
                <xs:documentation>Angle on the field of the play.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="distance" use="optional" type="xs:string">
            <xs:annotation>
                <xs:documentation>Angle on the field of the play.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="body-part" use="optional" type="QCodeType">
            <xs:annotation>
                <xs:documentation>Body part used to perform an action.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="field-location" use="optional" type="gridType">
            <xs:annotation>
                <xs:documentation>Recommended x,y 0-100. The location of the action on the field of play represented as a grid.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="goal-location" use="optional" type="gridType">
            <xs:annotation>
                <xs:documentation>Recommended x,y 0-100. The location on goal-mouth grid in which the ball/puck entered.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="time-addition" use="optional" type="xs:string">
            <xs:annotation>
                <xs:documentation>time added to period.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="shootout-shot-order" use="optional" type="xs:integer">
            <xs:annotation>
                <xs:documentation>When this shot was take, amongst all the shootout shots of a game for one particular team. For example: 3 (if it was the third shot of the shootout).</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="faceoff-winner" use="optional" type="xs:NCName">
            <xs:annotation>
                <xs:documentation>also used to show winner of jumpball in basket.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="substitution-reason" type="xs:string" use="optional"/>
        <!-- The reason for the substitution of a player -->

        <xs:attributeGroup ref="americanFootballActionAttributes"/>
        <xs:attributeGroup ref="baseballActionAttributes"/>
        <xs:attributeGroup ref="curlingActionAttributes"/>
        <xs:attributeGroup ref="golfActionAttributes"/>
        <xs:attributeGroup ref="motorRacingActionAttributes"/>
        <xs:attributeGroup ref="soccerActionAttributes"/>
        <xs:attributeGroup ref="tennisActionAttributes"/>
    </xs:attributeGroup>

    <!-- ========================================================================================= -->
    <!-- Base participant complex type -->
    <!-- ========================================================================================= -->
    <xs:complexType name="baseParticipantComplexType">
        <xs:annotation>
            <xs:documentation>Base structure for a participant.</xs:documentation>
        </xs:annotation>
        <xs:attributeGroup ref="commonAttributes"/>
        <xs:attributeGroup ref="participantAttributes"/>
        <xs:attribute name="field-location" use="optional" type="xs:string">
            <xs:annotation>
                <xs:documentation>Recommended x,y 0-100.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="goals-cumulative" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>Total number goals at time of goal scored.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="assists-cumulative" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>Total number assists at time of assist scored.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="lineup-slot" use="optional" type="xs:integer"/>
        <xs:attribute name="yards-gained" use="optional" type="xs:integer"/>
        <xs:attribute name="score-credit" use="optional">
            <xs:annotation>
                <xs:documentation>Whether the participant in the play can be given credit for the goal or score.</xs:documentation>
            </xs:annotation>
            <xs:simpleType id="scoreCredit">
                <xs:restriction base="xs:integer">
                    <xs:enumeration id="scoreCredit1" value="1"/>
                    <xs:enumeration id="scoreCredit0" value="0"/>
                </xs:restriction>
            </xs:simpleType>            
        </xs:attribute>
    </xs:complexType>
    
    <xs:attributeGroup name="participantAttributes">
        <xs:attributeGroup ref="commonParticipantAttributes"/>
        <xs:attributeGroup ref="curlingEquipmentAttributes"/>
    </xs:attributeGroup>
    
    <xs:attributeGroup name="commonParticipantAttributes">
        <xs:attribute name="idref" type="xs:IDREF" use="required">
            <xs:annotation>
                <xs:documentation>A pointer to a player who participated in the play.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="team-idref" type="xs:IDREF" use="optional">
            <xs:annotation>
                <xs:documentation>A pointer to the participant's team.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="role" type="QCodeType" use="optional">
            <xs:annotation>
                <xs:documentation>The role of the participant in the particular action, as opposed to their designated position on the team.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:attributeGroup>
    
    <xs:attributeGroup name="curlingEquipmentAttributes">
        <xs:attribute name="stone-color" use="optional" type="xs:string"/>
        <xs:attribute name="stone-id" use="optional" type="xs:string"/>
        <xs:attribute name="stone-number" use="optional" type="xs:integer"/>
    </xs:attributeGroup>
    
    <!-- ========================================================================================= -->
    <!-- Event metadata Complex type, used in SportsContent -->
    <!-- ========================================================================================= -->
    <xs:complexType name="baseEventMetadataComplexType">
        <xs:annotation>
            <xs:documentation>Background information about an event. | Where, when, and what an event is.</xs:documentation>
        </xs:annotation>
        <xs:complexContent>
            <xs:extension base="base2MetadataComplexType">
                <xs:sequence>
                    <xs:element name="event-sponsor" type="eventSponsorComplexType" minOccurs="0" maxOccurs="unbounded"/>
                    <xs:element name="event-recurring-name" type="ConceptNameType" minOccurs="0" maxOccurs="unbounded">
                        <xs:annotation>
                            <xs:documentation>A displayable name for the event-recurring-key.</xs:documentation>
                        </xs:annotation>
                    </xs:element>
                </xs:sequence>
                <xs:attributeGroup ref="baseEventStateAttributeGroup"/>
                <xs:attribute name="event-recurring-key" type="QCodeType" use="optional">
                    <xs:annotation>
                        <xs:documentation>The symbol for an identified sports-event that recurs every season. This same key should be used from season to season.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="event-style" type="QCodeType" use="optional">
                    <xs:annotation>
                        <xs:documentation>Indicates whether competitors are trying to defeat each other or just outdo one another. SportsML vocabulary uri: http://cv.iptc.org/newscodes/speventstyle/</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="event-number" type="xs:nonNegativeInteger" use="optional">
                    <xs:annotation>
                        <xs:documentation>The ranked position this event had among other events.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="event-status" type="QCodeType" use="optional">
                    <xs:annotation>
                        <xs:documentation>The stage of the event, describing whether it has started, is in progress, etc. SportsML vocabulary uri: http://cv.iptc.org/newscodes/speventstatus/</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="event-type" type="QCodeType" use="optional">
                    <xs:annotation>
                        <xs:documentation>The type of event, esp. in relation to tournament phase. Recommended SportsML vocabulary uri: http://cv.iptc.org/newscodes/sptournamentphase/</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="event-status-reason" type="QCodeType" use="optional">
                    <xs:annotation>
                        <xs:documentation>The reason for the event status. Eg. why the cancellation, postponement, etc. SportsML vocabulary uri: http://cv.iptc.org/newscodes/speventstatusreason</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="event-status-note" type="xs:string" use="optional">
                    <xs:annotation>
                        <xs:documentation>A textual description of the reason or context of the event-status or event-status-reason value.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="event-of-day" type="xs:string" use="optional">
                    <xs:annotation>
                        <xs:documentation>If the day had multiple events involving these
                            competitors, which event of the day it was. Example values: 1, 2, 3, etc.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="events-day-total" type="xs:string" use="optional">
                    <xs:annotation>
                        <xs:documentation>How many events involving these competitors have been planned for that day.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="start-weekday" type="QCodeType" use="optional">
                    <xs:annotation>
                        <xs:documentation>Day of the week in which the game starts.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="end-weekday" type="QCodeType" use="optional">
                    <xs:annotation>
                        <xs:documentation>Day of the week in which the game ends.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="heat-number" type="xs:string" use="optional">
                    <xs:annotation>
                        <xs:documentation>The ranked position this heat had among other heats.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="duration" type="xs:duration" use="optional">
                    <xs:annotation>
                        <xs:documentation>The length of time the event took place.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="time-certainty" use="optional">
                    <xs:annotation>
                        <xs:documentation>For TBA times.</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType id="timeCertainty">
                        <xs:restriction base="xs:string">
                            <xs:enumeration id="timeCertaintyCertain" value="certain"/>
                            <xs:enumeration id="timeCertaintyTo-be-announced" value="to-be-announced"/>
                        </xs:restriction>
                    </xs:simpleType>
                </xs:attribute>
                <xs:attribute name="season-key" type="QCodeType" use="optional">
                    <xs:annotation>
                        <xs:documentation>The season this event is in.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="season-type" type="QCodeType" use="optional">
                    <xs:annotation>
                        <xs:documentation>A subcategory of the season. SportsML vocab uri: http://cv.iptc.org/newscodes/spseasontype/</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="series-index" type="xs:string" use="optional">
                    <xs:annotation>
                        <xs:documentation>The tournament division or series to which an event belongs.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="event-outcome-type" type="QCodeType" use="optional">
                    <xs:annotation>
                        <xs:documentation>What type of outcome. Includes overtime, random (eg. by coin toss), etc. SportsML vocab uri: http://cv.iptc.org/newscodes/speventoutcometype/</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    
    <!-- ========================================================================================= -->
    <!-- Base Entity metadata complex type -->
    <!-- ========================================================================================= -->
    <xs:complexType name="baseEntityMetadataComplexType">
        <xs:annotation>
            <xs:documentation>Base metadata for different entities. Extended by baseTeamMetadata and basePersonMetadata and siteMetadata </xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:element name="name" type="ConceptNameType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="home-location" type="FlexLocationPropType" minOccurs="0"/>
            <xs:element name="sports-property" type="sportsPropertyComplexType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
        <xs:attributeGroup ref="commonAttributes"/>
        <xs:attribute name="key" type="QCodeType" use="optional">
            <xs:annotation>
                <xs:documentation>The symbol or identifying key for the entity.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="nationality" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>The country of citizinship of the entity.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    
    <!-- ========================================================================================= -->
    <!-- Base person metadata complex type -->
    <!-- ========================================================================================= -->
    <xs:complexType name="basePersonMetadataComplexType">
        <xs:annotation>
            <xs:documentation>Metadata that describes a person. | Generally does not change over the course of a sports-events. Extends the baseEntityMetadata type</xs:documentation>
        </xs:annotation>
        <xs:complexContent>
            <xs:extension base="baseEntityMetadataComplexType">
                <xs:attribute name="date-of-birth" type="TruncatedDateTimeType" use="optional">
                    <xs:annotation>
                        <xs:documentation>The day on which a person was born, normalized to ISO 8601
                            extended format: YYYY-MM-DDTHH:MM:SS+HH:MM. Use YYYY-MM-DD when no time
                            is available. Can also be YYYY-MM or just YYYY if year and/or month not available.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="date-of-death" type="TruncatedDateTimeType" use="optional">
                    <xs:annotation>
                        <xs:documentation>The day on which a person died, normalized to ISO 8601
                            extended format: YYYY-MM-DDTHH:MM:SS+HH:MM. Use YYYY-MM-DD when no time is available.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="height" type="xs:string" use="optional">
                    <xs:annotation>
                        <xs:documentation>Height of the person. Generally in cm.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="weight" type="xs:nonNegativeInteger" use="optional">
                    <xs:annotation>
                        <xs:documentation>Weight of a person. Generally in kg.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="position-regular" type="QCodeType" use="optional">
                    <xs:annotation>
                        <xs:documentation>The code for the typical position of the person.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="position-event" type="QCodeType" use="optional">
                    <xs:annotation>
                        <xs:documentation>The code for the position held by the person at this  particular sports-event.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="position-depth" type="xs:string" use="optional">
                    <xs:annotation>
                        <xs:documentation>A ranking amongst players on the team who share the same position.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="health" type="QCodeType" use="optional">
                    <xs:annotation>
                        <xs:documentation>An indication of the health of the person.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="gender" use="optional">
                    <xs:annotation>
                        <xs:documentation>Male or female.</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType id="gender">
                        <xs:restriction base="xs:string">
                            <xs:enumeration id="genderMale" value="male"/>
                            <xs:enumeration id="genderFemale" value="female"/>
                        </xs:restriction>
                    </xs:simpleType>
                </xs:attribute>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    
    <!-- ========================================================================================= -->
    <!-- Base player metadata complex type -->
    <!-- ========================================================================================= -->
    <xs:complexType name="basePlayerMetadataComplexType">
        <xs:annotation>
            <xs:documentation>Metadata that describes a person. | Generally does not change over the course of a sports-events.</xs:documentation>
        </xs:annotation>
        <xs:complexContent>
            <xs:extension base="basePersonMetadataComplexType">
                <xs:choice minOccurs="0">
                    <xs:element name="career-phase" type="baseCareerPhaseMetadataComplexType"/>
                    <xs:element name="injury-phase" type="baseInjuryPhaseMetadataComplexType"/>
                </xs:choice>
                <xs:attribute name="team-idref" type="xs:string" use="optional">
                    <xs:annotation>
                        <xs:documentation>A reference to the team for which this player competes.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="status" type="QCodeType" use="optional">
                    <xs:annotation>
                        <xs:documentation>Whether a player starts playing at the beginning of a sports-event, joins mid-game, or is not available to participate.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="lineup-slot" type="xs:string" use="optional">
                    <xs:annotation>
                        <xs:documentation>The order in which a player participated in an event.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="lineup-slot-sequence" type="xs:string" use="optional">
                    <xs:annotation>
                        <xs:documentation>For baseball, cricket, relay races if they substituted for a player in the original lineup, the order in which they served at the above lineup-slot value. Defaults to 1.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="scratch-reason" type="QCodeType" use="optional">
                    <xs:annotation>
                        <xs:documentation>An indication as to why this player did not play in an event.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="uniform-number" type="xs:string" use="optional">
                    <xs:annotation>
                        <xs:documentation>The number currently displayed on the uniform or jersey of the player.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="home-page-url" type="xs:anyURI" use="optional">
                    <xs:annotation>
                        <xs:documentation>The fully-qualified URL for the official home page of the team.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="round-position" type="xs:string" use="optional">
                    <xs:annotation>
                        <xs:documentation>The seed or position in this particular round for which this player started. Useful for bracketed tournaments, such as tennis.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    
    <!-- ========================================================================================= -->
    <!-- Career phase metadata complex type -->
    <!-- ========================================================================================= -->
    <xs:complexType name="baseCareerPhaseMetadataComplexType">
        <xs:annotation>
            <xs:documentation>A description of where a player is playing, or has previously played. | Can be used to state where the player went to college. Can also list previous teams of the player.</xs:documentation>
        </xs:annotation>
        <xs:complexContent>
            <xs:extension base="basePlayerMetadataComplexType">
                <xs:attribute name="phase-type" type="QCodeType" use="optional">
                    <xs:annotation>
                        <xs:documentation>Value can be college or professional, etc.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="start-date" type="TruncatedDateTimeType" use="optional">
                    <xs:annotation>
                        <xs:documentation>When the player started this phase in the career, normalized to ISO 8601 extended format: YYYY-MM-DDTHH:MM:SS+HH:MM. Use YYYY-MM-DD when no time is available.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="end-date" type="TruncatedDateTimeType" use="optional">
                    <xs:annotation>
                        <xs:documentation>When the player ended this phase in the career, normalized to ISO 8601 extended format: YYYY-MM-DDTHH:MM:SS+HH:MM. Use YYYY-MM-DD when no time is available.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="duration" type="QCodeType" use="optional">
                    <xs:annotation>
                        <xs:documentation>In lieu of a start-date and end-date. Generally in years. Could hold the number of years that a player was a pro. Use temporal-unit vocabulary.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="subphase-type" type="QCodeType" use="optional">
                    <xs:annotation>
                        <xs:documentation>A subcategory of the phase-type, for example could be sophomore or rookie.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="phase-status" type="QCodeType" use="optional">
                    <xs:annotation>
                        <xs:documentation>Player's status within a particular phase. For example, active, injured, etc.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="phase-caliber" type="QCodeType" use="optional">
                    <xs:annotation>
                        <xs:documentation>A controlled vocabulary for the name attribute. States organization this player was in, for the duration of the phase. For example, league or team.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="phase-caliber-key" type="QCodeType" use="optional">
                    <xs:annotation>
                        <xs:documentation>The metadata key within the phase-caliber. For example, l.nfl.com if phase-caliber is league. Or l.nfl.com-t.2 if phase-caliber is team.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="entry-reason" type="QCodeType" use="optional">
                    <xs:annotation>
                        <xs:documentation>The reason why the player entered this phase. For example, draft or trade.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="selection-level" type="xs:integer" use="optional">
                    <xs:annotation>
                        <xs:documentation>The level within which the player was selected to enter this phase. For example, 1, if drafted in 1st round.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="selection-sublevel" type="xs:integer" use="optional">
                    <xs:annotation>
                        <xs:documentation>The sublevel of the selection-level. For example, 27, if picked as 27th selection in 1st round.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="selection-overall" type="xs:integer" use="optional">
                    <xs:annotation>
                        <xs:documentation>The total ranking amongst all levels in a draft.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="exit-reason" type="QCodeType" use="optional">
                    <xs:annotation>
                        <xs:documentation>The reason why the player exitted this phase. For example, retired or waived.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <!-- ========================================================================================= -->
    <!-- Career phase metadata complex type -->
    <!-- ========================================================================================= -->
    <xs:complexType name="baseInjuryPhaseMetadataComplexType">
        <xs:annotation>
            <xs:documentation>A description of where a player is playing, or has previously played. | Can be used to state where the player went to college. Can also list previous teams of the player.</xs:documentation>
        </xs:annotation>
        <xs:complexContent>
            <xs:extension base="basePlayerMetadataComplexType">
                <xs:attribute name="phase-type" type="QCodeType" use="optional">
                    <xs:annotation>
                        <xs:documentation>Value can be college or professional, etc.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="start-date" type="TruncatedDateTimeType" use="optional">
                    <xs:annotation>
                        <xs:documentation>When the player started this phase in the career, normalized to ISO 8601 extended format: YYYY-MM-DDTHH:MM:SS+HH:MM. Use YYYY-MM-DD when no time is available.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="end-date" type="TruncatedDateTimeType" use="optional">
                    <xs:annotation>
                        <xs:documentation>When the player ended this phase in the career, normalized to ISO 8601 extended format: YYYY-MM-DDTHH:MM:SS+HH:MM. Use YYYY-MM-DD when no time is available.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="phase-status" type="QCodeType" use="optional">
                    <xs:annotation>
                        <xs:documentation>Player's status within a particular phase. For example, active, injured, etc.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="injury-type" type="QCodeType" use="optional">
                    <xs:annotation>
                        <xs:documentation>A controlled vocabulary for the injury. For example, thigh or hand or lower-back.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="injury-side" type="bodySideList" use="optional">
                    <xs:annotation>
                        <xs:documentation>A controlled vocabulary for the body side of the injury. For example, left or right.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="upcoming-event-date" type="TruncatedDateTimeType" use="optional">
                    <xs:annotation>
                        <xs:documentation>Generally, the date on which this player has a non-injured status, and has some probability of playing again.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="upcoming-event-key" type="QCodeType" use="optional">
                    <xs:annotation>
                        <xs:documentation>The key for the forthcoming event taking place on upcoming-event-date.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="upcoming-event-status" type="QCodeType" use="optional">
                    <xs:annotation>
                        <xs:documentation>A measurement of the status of the player for that upcoming event. For example, probable or likely.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
                <xs:attribute name="comment" type="xs:string" use="optional">
                    <xs:annotation>
                        <xs:documentation>A textual description for the injury phase.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <!-- ========================================================================================= -->
    <!-- Official metadata complex type -->
    <!-- ========================================================================================= -->
    <xs:complexType name="baseOfficialMetadataComplexType">
        <xs:annotation>
            <xs:documentation>Metadata about the official. | Generally does not change over the course of a sports-events.</xs:documentation>
        </xs:annotation>
        <xs:complexContent>
            <xs:extension base="basePersonMetadataComplexType">
                <xs:attribute name="uniform-number" type="xs:string" use="optional">
                    <xs:annotation>
                        <xs:documentation>The number currently displayed on the uniform or jersey of the official.</xs:documentation>
                    </xs:annotation>
                </xs:attribute>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    
    <!-- ========================================================================================= -->
    <!-- Associate metadata complex type -->
    <!-- ========================================================================================= -->
    <xs:complexType name="baseAssociateMetadataComplexType">
        <xs:annotation>
            <xs:documentation>Metadata that describes an associate | Generally does not change over the course of a sports-events.</xs:documentation>
        </xs:annotation>
        <xs:complexContent>
            <xs:extension base="basePersonMetadataComplexType"/>
        </xs:complexContent>
    </xs:complexType>
    
    <!-- ========================================================================================= -->
    <!-- Base tournament metadata complex type also used by various tournament parts -->
    <!-- ========================================================================================= -->
    <xs:complexType name="baseTournamentMetadataComplexType">
        <xs:annotation>
            <xs:documentation>Background data about a tournament or tournament part. | Where and when the this tournament took place.</xs:documentation>
        </xs:annotation>
        <xs:complexContent>
            <xs:extension base="base2MetadataComplexType">
                <xs:attributeGroup ref="tournamentAttributes"/>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>
    
    <!-- ========================================================================================= -->
    <!-- Base time adjustment complex type -->
    <!-- ========================================================================================= -->
    <xs:complexType name="baseTimeAdjustmentComplexType">
        <xs:annotation>
            <xs:documentation>Record time added by referee. | Holds values for the time added by the referee and how much extra time was actually played.</xs:documentation>
        </xs:annotation>
        <xs:attributeGroup ref="commonAttributes"/>
        <xs:attribute name="period-extra-time-added" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>How many minutes the referee has decided to add to the period.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="period-extra-time-elapsed" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>How much time exactly MMSS that was actually elapsed in the period.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    
    <!-- ========================================================================================= -->
    <!-- Coverage Attributes -->
    <!-- ========================================================================================= -->
    <xs:attributeGroup name="coverageAttributes">
        <xs:attribute name="stats-coverage" type="QCodeType" use="optional">
            <xs:annotation>
                <xs:documentation>A relative indication of how many statistics are included in the item. SportsML vocab uri: http://cv.iptc.org/newscodes/spstatscoverage/</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="team-coverage" use="optional">
            <xs:annotation>
                <xs:documentation>Indicates whether the item contains information about one team, or
                    many teams.</xs:documentation>
            </xs:annotation>
            <xs:simpleType id="teamCoverage">
                <xs:restriction base="xs:string">
                    <xs:enumeration id="teamCoverageSingle-team" value="single-team">
                        <xs:annotation>
                            <xs:documentation>Contains only information about a single
                                team.</xs:documentation>
                        </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration id="teamCoverageMulti-team" value="multi-team">
                        <xs:annotation>
                            <xs:documentation>Contains information about many or all teams in a
                                league.</xs:documentation>
                        </xs:annotation>
                    </xs:enumeration>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
        <xs:attribute name="duration-scope" type="QCodeType" use="optional">
            <xs:annotation>
                <xs:documentation>Indicates what class of events the included statistics apply. Example: those events that went into overtime. SportsML vocab uri: http://cv.iptc.org/newscodes/spdurationscope/</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="alignment-scope" use="optional">
            <xs:annotation>
                <xs:documentation>Indicates that the included statistics apply only to events played either at home or away.</xs:documentation>
            </xs:annotation>
            <xs:simpleType id="alignmentScope">
                <xs:annotation>
                    <xs:documentation>Every event played, including those played at home and hope so. The default option.</xs:documentation>
                </xs:annotation>
                <xs:restriction base="xs:string">
                    <xs:enumeration id="alignmentScopeEvents-all" value="events-all"/>
                    <xs:enumeration id="alignmentScopeEvents-home" value="events-home"/>
                    <xs:enumeration id="alignmentScopeEvents-away" value="events-away"/>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
        <xs:attribute name="position" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>Indicates that the included statistics apply only to while played at a particular position.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="record-making-scope" type="QCodeType" use="optional">
            <xs:annotation>
                <xs:documentation>Indicates that the included statistics apply only to values that set a record, such as a team-high, or an individual-low.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="scoping-label" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>A textual description for the scope.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="period-value" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>Used for tracking stats and events by period.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="period-type" type="QCodeType" use="optional">
            <xs:annotation>
                <xs:documentation>For certain types of periods: overtime, declared (cricket), etc.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="start-date-time" type="TruncatedDateTimeType" use="optional">
            <xs:annotation>
                <xs:documentation>The starting date, with optional time, of the event for which the stats are relevant.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="end-date-time" type="TruncatedDateTimeType" use="optional">
            <xs:annotation>
                <xs:documentation>The ending date, with optional time, of the event for which the stats are relevant.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="period-start-date-time" type="TruncatedDateTimeType" use="optional">
            <xs:annotation>
                <xs:documentation>The starting date, with optional time, of the period for which the stats are relevant.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="period-end-date-time" type="TruncatedDateTimeType" use="optional">
            <xs:annotation>
                <xs:documentation>The ending date, with optional time, of the period for which the stats are relevant.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="temporal-unit-type" type="QCodeType" use="optional">
            <xs:annotation>
                <xs:documentation>The unit of performance to which the stats apply eg. single-event, season, career.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="temporal-unit-value" type="QCodeType" use="optional">
            <xs:annotation>
                <xs:documentation>The key of performance unit to which the stats apply.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="event-span" type="xs:nonNegativeInteger" use="optional">
            <xs:annotation>
                <xs:documentation>Qualifier of "most-recent-events" value for temporal-unit attribute. Specify the number of events eg. 10 for last 10 games.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="opponent-value" type="QCodeType" use="optional">
            <xs:annotation>
                <xs:documentation>The key of the player, team, division, conference, league or other unit which provide the opposition relevant to the stat.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="opponent-type" type="QCodeType" use="optional">
            <xs:annotation>
                <xs:documentation>Whether the opponent was a player, team, etc.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="team" type="QCodeType" use="optional">
            <xs:annotation>
                <xs:documentation>The key of the team for which the player or team generated the stats.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="competition" type="QCodeType" use="optional">
            <xs:annotation>
                <xs:documentation>The key of the league or competition for which the player or team generated the stats.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="unit-value" type="QCodeType" use="optional">
            <xs:annotation>
                <xs:documentation>The key, other than team or league/competition, of the competitive unit for which the player or team generated the stats.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="unit-type" type="QCodeType" use="optional">
            <xs:annotation>
                <xs:documentation>The type, other than team or league/competition, of the competitive unit for which the player or team generated the stats.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="situation" type="QCodeType" use="optional">
            <xs:annotation>
                <xs:documentation>Final or current score of the team or player.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="location-key" type="QCodeType" use="optional">
            <xs:annotation>
                <xs:documentation>The key of the site,venue or location where the stats were generated.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="venue-type" type="QCodeType" use="optional">
            <xs:annotation>
                <xs:documentation>The type of event (eg. indoor, outdoor, etc.) in which the stats were generated.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="surface-type" type="QCodeType" use="optional">
            <xs:annotation>
                <xs:documentation>The type of surface (eg. clay, artificial grass, etc.) upon which the stats were generated.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="weather-type" type="QCodeType" use="optional">
            <xs:annotation>
                <xs:documentation>A code for the weather situation in which the stats were generated. SportsML weather codes recommended.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="scope-value" type="QCodeType" use="optional">
            <xs:annotation>
                <xs:documentation>A generic scope indicator. Use only if none of the other coverage attributes are suitable.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="distance" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>Measure of distance for the generated stat.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="distance-maximum" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>Maximum distance for the generated stat.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="distance-minimum" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>Minimum distance for the generated stat.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    <xs:attribute name="measurement-units" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>The type of unit used to measure distance, speed, etc. Could be mph, kph, metres, yards, etc.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:attributeGroup>
    <!-- ========================================================================================= -->
    <!-- Stat Attributes -->
    <!-- ========================================================================================= -->
    <xs:attributeGroup name="statAttributes">
        <xs:attribute name="score" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>Final or current score of the team or player.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="score-opposing" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>Final or current score of the opposing team or player.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="score-average" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>Average per-game score for the team or player.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="score-opposing-average" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>Average per-game score for the opposing team or player.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="score-units" type="QCodeType" use="optional">
            <xs:annotation>
                <xs:documentation>Describes how the score and score-opposing is valued. SportsML vocab uri: http://cv.iptc.org/newscodes/spscoreunits/</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="score-behind" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>The points or time behind the leading score.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="score-attempts" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>Final or current number of attempts to score by a team or player. Example: in ice hockey, would represent total shots on goal.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="score-attempts-opposing" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>Final or current number of attempts to score by an opposing team or player.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="score-attempts-on-goal" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>A subset of score-attempts. Only counts those attempts that were on-goal.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="score-attempts-on-goal-opposing" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>Final or current number of attempts to score by an opposing team or player that were on-goal.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="score-percentage" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>Percentage of attempted scores that reached their mark.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="score-percentage-opposing" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>Percentage of attempted scores by opposing team or player that reached their mark.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="result-effect" type="QCodeType" use="optional">
            <xs:annotation>
                <xs:documentation>Describes the effect that the result of the event or rank changing
                    has had on the team. Example: Whether or not a team has qualified for the
                    playoffs, or has been promoted or demoted to a different division. SportsML vocab uri: http://cv.iptc.org/newscodes/spresulteffect/</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="event-outcome" type="QCodeType" use="optional">
            <xs:annotation>
                <xs:documentation>Whether the competitor won, lost, or tied. SportsML vocab uri: http://cv.iptc.org/newscodes/speventoutcome/</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="event-standing-points" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>How many points were earned as a result of the outcome of this particular event.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="event-standing-points-against" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>How many points were deducted as a result of the outcome of this particular event. This occurs, for example, in the German Handball leagues.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="score-type" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>Qualifies "score" attribute.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="events-remaining" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>Number of sports-events the player has yet to participate in.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="time-of-possession" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>Amount of time the team or player has possession of ball (or similar object like puck).</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="time-of-possession-percentage" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>Amount of time the team or player has possession of ball (or similar object like puck) expressed as a percentage of the full time of the match.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="time-of-possession-percentage-opposing" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>Amount of time the opposing team or player has possession of ball (or similar object like puck) expressed as a percentage of the full time of the match.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="time-of-possession-average" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>Amount of time the team or player has possession of ball (or similar object like puck) per game.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="time-of-possession-average-opposing" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>Amount of time the opposing team or player has possession of ball (or similar object like puck) per game.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="series-score" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>Number of events in a series won by team or player.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="series-score-opposing" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>Number of events in a series won by opposing team or player.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="adjusted-score-for" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>The final score as adjusted by some authority. Usually as a result
                    of some dispute or transgression that must be settled post-event and rendered in
                    the score. Will differ from the regular score reflecting the number of actual
                    goals scored in play. Should be tested for before displaying actual
                    score.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="adjusted-score-against" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>The final score against as adjusted by some authority. Usually as
                    a result of some dispute or transgression that must be settled post-event and
                    rendered in the score. Will differ from the regular score reflecting the number
                    of actual goals scored in play. Should be tested for before displaying actual
                    score.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:attributeGroup>

    <!-- ========================================================================================= -->
    <!-- Compilation of attribute groups to form the action attributes -->
    <!-- ========================================================================================= -->
    <xs:attributeGroup name="americanFootballActionAttributes">
        <xs:attribute name="touchdown-type" use="optional" type="QCodeType">
            <xs:annotation>
                <xs:documentation>SportsML vocab uri: http://cv.iptc.org/newscodes/spamftouchdown/</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="clock-state" use="optional">
            <!-- Whether the clock is running or stopped. -->
            <xs:simpleType id="clockState">
                <xs:restriction base="xs:string">
                    <xs:enumeration id="clockStateStopped" value="stopped"/>
                    <xs:enumeration id="clockStateRunning" value="running"/>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
        <xs:attribute name="distance-for-1st-down" use="optional" type="xs:integer">
            <xs:annotation>
                <xs:documentation>The distance between the current line of scrimmage and the line to gain, 10 yards downfield from the start of possession. In yards. The word goal is used when the distance to the goal line is less than 10 yards. The word kick is used for kick-scoring attempt.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="field-side" use="optional">
            <xs:annotation>
                <xs:documentation>Which side of the field the event is taking place.  Either "home" or "away".</xs:documentation>
            </xs:annotation>
            <xs:simpleType id="fieldSide">
                <xs:restriction base="xs:string">
                    <xs:enumeration id="fieldSideHome" value="home"/>
                    <xs:enumeration id="fieldSideAway" value="away"/>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
        <!-- Which side of the field the event is taking place. Either "home" or "away". -->
        <xs:attribute name="field-line" use="optional" type="xs:integer">
            <xs:annotation>
                <xs:documentation>The line of scrimmage. The yard line where the ball is placed at the start of play.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="drive-plays" use="optional" type="xs:nonNegativeInteger">
            <xs:annotation>
                <xs:documentation>The number of plays in this drive.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="drive-yards" use="optional" type="xs:nonNegativeInteger">
            <xs:annotation>
                <xs:documentation>The number of yards covered during this drive.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="drive-duration" use="optional" type="xs:duration">
            <xs:annotation>
                <xs:documentation>The time it took for the drive.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="drive-result" use="optional" type="QCodeType">
            <xs:annotation>
                <xs:documentation>How a drive came to an end. SportsML vocab uri: http://cv.iptc.org/newscodes/spamfdriveresult/</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="down" use="optional" type="xs:nonNegativeInteger">
            <xs:annotation>
                <xs:documentation>The current down. Valid values are 1,2,3,4,5. (Could period be used?)</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="yards-gained" use="optional" type="xs:integer"/>
        <xs:attribute name="penalty-yards" use="optional" type="QCodeType"/>
        
        <xs:attribute name="penalty-acceptance" use="optional" type="QCodeType"/>
        
        <xs:attribute name="penalty-challenge" use="optional" type="QCodeType"/>
        
        <xs:attribute name="penalty-review" use="optional" type="QCodeType"/>
        
        <xs:attribute name="penalty-review-ruling" use="optional" type="QCodeType"/>
        
        <xs:attribute name="kick-type" use="optional" type="QCodeType">
            <xs:annotation>
                <xs:documentation>SportsML vocab uri: http://cv.iptc.org/newscodes/spamfkick/</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:attributeGroup>

    <xs:attributeGroup name="baseballActionAttributes">
        <xs:attribute name="at-bat-number" use="optional" type="xs:integer"/>
        
        <xs:attribute name="balls" use="optional" type="xs:integer"/>
        
        <xs:attribute name="batter-advance" use="optional" type="xs:integer"/>
        
        <xs:attribute name="batter-side" use="optional" type="bodySideList"/>
        
        <xs:attribute name="earned-runs-scored" use="optional" type="xs:integer"/>
        
        <xs:attribute name="error-type" use="optional" type="QCodeType"/>
        
        <xs:attribute name="hit-by-pitch-type" use="optional">
            <xs:simpleType id="hitByPitchType">
                <xs:restriction base="xs:string">
                    <xs:enumeration id="hitByPitchTypeIntentional" value="intentional"/>
                    <xs:enumeration id="hitByPitchTypeUnintentional" value="unintentional"/>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
        
        <xs:attribute name="hit-location" use="optional" type="QCodeType"/>
        
        <xs:attribute name="hit-type" use="optional" type="QCodeType"/>
        
        <xs:attribute name="inning-exiting" use="optional" type="QCodeType"/>
        
        <xs:attribute name="inning-half" use="optional">
            <xs:simpleType id="inningHalf">
                <xs:restriction base="xs:string">
                    <xs:enumeration id="inningHalfTop" value="top"/>
                    <xs:enumeration id="inningHalfBottom" value="bottom"/>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
        
        <xs:attribute name="inning-value" use="optional" type="xs:integer"/>
        
        <xs:attribute name="interference-type" use="optional" type="QCodeType"/>
        
        <xs:attribute name="lead-entering" use="optional" type="QCodeType"/>
        
        <xs:attribute name="lead-exiting" use="optional" type="QCodeType"/>
        
        <xs:attribute name="out-type" use="optional" type="QCodeType">
            <xs:annotation>
                <xs:documentation>How the batter got out. SportsML vocab uri: http://cv.iptc.org/newscodes/spbblout/</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="outs" use="optional" type="xs:integer"/>
        
        <xs:attribute name="outs-recorded" use="optional" type="xs:integer"/>
        
        <xs:attribute name="pitcher-side" use="optional" type="bodySideList"/>
        
        <xs:attribute name="play-scorekeepers-notation" use="optional" type="xs:string"/>
        
        <xs:attribute name="rbi" use="optional" type="xs:integer"/>
        
        <xs:attribute name="runner-on-first" use="optional" type="xs:boolean"/>
        
        <xs:attribute name="runner-on-first-advance" use="optional" type="QCodeType"/>
        
        <xs:attribute name="runner-on-first-idref" use="optional" type="QCodeType"/>
        
        <xs:attribute name="runner-on-second" use="optional" type="xs:boolean"/>
        
        <xs:attribute name="runner-on-second-advance" use="optional" type="QCodeType"/>
        
        <xs:attribute name="runner-on-second-idref" use="optional" type="QCodeType"/>
        
        <xs:attribute name="runner-on-third" use="optional" type="xs:boolean"/>
        
        <xs:attribute name="runner-on-third-advance" use="optional" type="QCodeType"/>
        
        <xs:attribute name="runner-on-third-idref" use="optional" type="QCodeType"/>
        
        <xs:attribute name="runners-on-base" use="optional" type="xs:boolean"/>
        
        <xs:attribute name="runs-scored" use="optional" type="xs:integer"/>
        
        <xs:attribute name="runs-this-inning-half" use="optional" type="xs:integer"/>
        
        <xs:attribute name="sacrifice-type" use="optional" type="QCodeType"/>
        
        <xs:attribute name="strikeout-type" use="optional">
            <xs:simpleType id="strikeoutType">
                <xs:restriction base="xs:string">
                    <xs:enumeration id="strikeoutTypeCalled" value="called"/>
                    <xs:enumeration id="strikeoutTypeSwinging" value="swinging"/>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
        <xs:attribute name="strikes" use="optional" type="xs:integer"/>
        
        <xs:attribute name="trajectory-coordinates" use="optional" type="QCodeType">
            <xs:annotation>
                <xs:documentation>The path of the ball. SportsML vocab uri: http://cv.iptc.org/newscodes/spbbltrajectory/</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="velocity" use="optional" type="QCodeType"/>
        
        <xs:attribute name="walk-type" use="optional">
            <xs:simpleType id="walkType">
                <xs:restriction base="xs:string">
                    <xs:enumeration id="walkTypeIntentional" value="intentional"/>
                    <xs:enumeration id="walkTypeUnintentional" value="unintentional"/>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
        <xs:attribute name="ball-location" use="optional" type="gridType"/>
        
        <xs:attribute name="ball-location-horizontal" use="optional" type="QCodeType">
            <xs:annotation>
                <xs:documentation>Where the pitch was located horizontally. SportsML vocab uri: http://cv.iptc.org/newscodes/spbblballlocationhorizontal/</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="ball-location-vertical" use="optional" type="QCodeType">
            <xs:annotation>
                <xs:documentation>Where the pitch was located vertically. SportsML vocab uri: http://cv.iptc.org/newscodes/spbblballlocationvertical/</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="pitch-type" use="optional" type="QCodeType"/>
        
        <xs:attribute name="pitch-velocity" use="optional" type="xs:decimal"/>
        
        <xs:attribute name="pitch-units" use="optional">
            <xs:simpleType id="pitchUnits">
                <xs:restriction base="xs:string">
                    <xs:enumeration id="pitchUnitsKph" value="kph"/>
                    <xs:enumeration id="pitchUnitsMph" value="mph"/>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
        <xs:attribute name="strike-type" use="optional">
            <xs:simpleType id="strikeType">
            <xs:restriction base="xs:string">
                <xs:enumeration id="strikeTypeCalled" value="called"/>
                <xs:enumeration id="strikeTypeSwinging" value="swinging"/>
                <xs:enumeration id="strikeTypeFoul" value="foul"/>
            </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
        
        <xs:attribute name="umpire-call" use="optional">
            <xs:annotation>
                <xs:documentation>The net result of the pitch.</xs:documentation>
            </xs:annotation>
            <xs:simpleType id="umpireCall">
                <xs:restriction base="xs:string">
                    <xs:enumeration id="umpireCallBall" value="ball"/>
                    <xs:enumeration id="umpireCallStrike" value="strike"/>
                    <xs:enumeration id="umpireCallIn-play" value="in-play"/>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
    </xs:attributeGroup>

    <xs:attributeGroup name="curlingActionAttributes">
        <xs:attribute name="end-number" type="xs:integer" use="optional">
            <xs:annotation>
                <xs:documentation>A curling game normally have 10 ends, but it can also be 8 or even 6</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="stone-number" type="xs:integer" use="optional">
            <xs:annotation>
                <xs:documentation>Each end has 8 stones per team</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="time-used" use="optional" type="xs:string">
            <xs:annotation>
                <xs:documentation>How much time the team used for this play</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="turn" use="optional">
            <xs:simpleType id="turn">
                <xs:restriction base="xs:string">
                    <xs:enumeration id="turnInturn" value="inturn">
                        <xs:annotation>
                            <xs:documentation>When the stone is released with a clock-wise
                                turn.</xs:documentation>
                        </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration id="turnOutturn" value="outturn">
                        <xs:annotation>
                            <xs:documentation>When the stone is released with a anti-clock-wise
                                turn.</xs:documentation>
                        </xs:annotation>
                    </xs:enumeration>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
        <!-- If the stone was played inhand or outhand -->
        <xs:attribute name="stone-speed" use="optional" type="QCodeType"/>
        <!-- The speed of the stone -->
    </xs:attributeGroup>
    
    <xs:attributeGroup name="golfActionAttributes">
        <xs:attribute name="round" type="xs:integer" use="optional">
            <xs:annotation>
                <xs:documentation>Which round this play takes place in</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="hole" type="xs:integer" use="optional">
            <xs:annotation>
                <xs:documentation>Which hole this play takes place on</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="strokes" use="optional" type="xs:nonNegativeInteger">
            <xs:annotation>
                <xs:documentation>How many strokes this player has done so far</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="score" use="optional" type="xs:integer">
            <xs:annotation>
                <xs:documentation>The current score of this player</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="score-against-par" use="optional" type="xs:integer">
            <xs:annotation>
                <xs:documentation>How the score of this player is compared to the course par</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="club" use="optional" type="QCodeType">
            <xs:annotation>
                <xs:documentation>Which club was used</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="start-distance" use="optional" type="xs:integer">
            <xs:annotation>
                <xs:documentation>The distance from the cup where the stroke was taken</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="end-distance" use="optional" type="xs:integer">
            <xs:annotation>
                <xs:documentation>The distance from the cup where the ball stopped after the stroke</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="landing" use="optional" type="QCodeType">
            <xs:annotation>
                <xs:documentation>The place or surface where a golf ball lands after being shot. SportsML vocab uri: http://cv.iptc.org/newscodes/spgollanding/</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:attributeGroup>
    
    <xs:attributeGroup name="motorRacingActionAttributes">
        <xs:attribute name="lap" type="xs:integer" use="optional">
            <xs:annotation>
                <xs:documentation>Which lap number this play takes place in</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="laps-remaining" type="xs:integer" use="optional">
            <xs:annotation>
                <xs:documentation>How many laps are remaining when this play takes place</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="flag-state" use="optional" type="QCodeType">
            <xs:annotation>
                <xs:documentation>Types of motor racing communication flags. SportsML vocab uri: http://cv.iptc.org/newscodes/spmcrflag/</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="flag-original" use="optional" type="QCodeType">
            <xs:annotation>
                <xs:documentation>Types of motor racing communication flags. SportsML vocab uri: http://cv.iptc.org/newscodes/spmcrflag/</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="flag-new" use="optional" type="QCodeType">
            <xs:annotation>
                <xs:documentation>Types of motor racing communication flags. SportsML vocab uri: http://cv.iptc.org/newscodes/spmcrflag/</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="passer-type" use="optional" type="QCodeType"/>
        
        <xs:attribute name="passer-key" use="optional" type="QCodeType"/>
        
        <xs:attribute name="position-original" use="optional" type="QCodeType"/>
        
        <xs:attribute name="position-new" use="optional" type="QCodeType"/>
        
    </xs:attributeGroup>
    
    <xs:attributeGroup name="soccerActionAttributes">
        <xs:attribute name="caution-value" use="optional" type="QCodeType"/>
        <!-- Yellow card, second yellow or red card -->
    </xs:attributeGroup>
    
    <xs:attributeGroup name="tennisActionAttributes">
        <xs:attribute name="set" type="xs:integer" use="optional">
            <xs:annotation>
                <xs:documentation>Which set this play takes place in. Tennis is played in 3 or 5 sets</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="game" type="xs:integer" use="optional">
            <xs:annotation>
                <xs:documentation>Which game in this set the play takes place in</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="win-type" use="optional">
            <xs:simpleType id="winType">
                <xs:restriction base="xs:string">
                    <xs:enumeration id="winTypeForced" value="forced">
                        <xs:annotation>
                            <xs:documentation>The point was made while the opponent for example
                                advanced towards the net.</xs:documentation>
                        </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration id="winTypeUnforced" value="unforced">
                        <xs:annotation>
                            <xs:documentation>The point was made regardless of specific actions by
                                the opponent.</xs:documentation>
                        </xs:annotation>
                    </xs:enumeration>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
        
        <xs:attribute name="server-score" use="optional" type="QCodeType">
            <xs:annotation>
                <xs:documentation>SportsML vocab uri: http://cv.iptc.org/newscodes/sptengameresult/</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="receiver-score" use="optional" type="QCodeType">
            <xs:annotation>
                <xs:documentation>SportsML vocab uri: http://cv.iptc.org/newscodes/sptengameresult/</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="serve-number" use="optional" type="QCodeType"/>
        
    </xs:attributeGroup>
      
    <xs:simpleType name="gridType">
        <xs:annotation>
            <xs:documentation>A two dimentional grid coordinate representation in the form of a  number representing the x coordinate, a colon, then a number representing the y coordinate.</xs:documentation>
            <xs:documentation>The origin (0,0) and granularity may be determined by the  distributor.</xs:documentation>
        </xs:annotation>
        <xs:restriction base="xs:string">
            <xs:pattern value="[-]?\d+(\.\d{1,2})?,[-]?\d+(\.\d{1,2})?"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="MinutesAndSeconds">
        <xs:restriction base="xs:string">
            <xs:pattern value="\d{2}:\d{2}"/>
        </xs:restriction>
    </xs:simpleType>
    
    <xs:simpleType name="truncatedTimeType">
        <xs:union memberTypes="xs:time xs:nonNegativeInteger MinutesAndSeconds"/>
    </xs:simpleType>
    
    <xs:simpleType id="bodySideList" name="bodySideList">
        <xs:annotation>
            <xs:documentation>General purpose vocabulary for various properties describing the the side with which a player shoots, kicks, catches, bats, etc. Also to describe injury side.</xs:documentation>
        </xs:annotation>
        <xs:restriction base="xs:string">
            <xs:enumeration id="bodySideListRight" value="right"/>
            <xs:enumeration id="bodySideListLeft" value="left"/>
            <xs:enumeration id="bodySideListBoth" value="both"/>
        </xs:restriction>
    </xs:simpleType>
    
    
    <!-- ========================================================================================= -->
    <!-- Tournament Part Attributes -->
    <!-- ========================================================================================= -->
    <xs:attributeGroup name="tournamentAttributes">
        <xs:annotation>
            <xs:documentation>Attributes that are used in all tournament constructions.</xs:documentation>
        </xs:annotation>
        <xs:attribute name="status" type="QCodeType" use="optional">
            <xs:annotation>
                <xs:documentation>The state of the tournament or tournament part, describing whether it has started, is in progress, etc.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="minimum-subparts" type="xs:nonNegativeInteger" use="optional">
            <xs:annotation>
                <xs:documentation>The minimum number of subparts for this level in a tournament. The subparts can either be tournament-part or sports-event.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="maximum-subparts" type="xs:positiveInteger" use="optional">
            <xs:annotation>
                <xs:documentation>The maximum number of subparts for this level in a tournament. The subparts can either be tournament-part or sports-event.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="number" type="xs:positiveInteger" use="optional">
            <xs:annotation>
                <xs:documentation>The number of the particular tournament part eg. 2 for second round or second leg</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:attributeGroup>
    
    <!-- ========================================================================================= -->
    <!-- Common Attributes -->
    <!-- ========================================================================================= -->
    <xs:attributeGroup name="commonAttributes">
        <xs:attribute name="id" type="xs:ID" use="optional">
            <xs:annotation>
                <xs:documentation>An XML-specific identifier for the element.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="class" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>An open placeholder for categorization.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="style" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>An open placeholder for reference by an external stylesheet.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:attributeGroup>
    
    <!-- ========================================================================================= -->
    <!-- Generic Stat Attributes -->
    <!-- ========================================================================================= -->
    <xs:attributeGroup name="genericStatAttributes">
        <xs:annotation>
            <xs:documentation>List of attributes used in generic stats</xs:documentation>
        </xs:annotation>
        <xs:attribute name="sport" type="QCodeType" use="optional">
            <xs:annotation>
                <xs:documentation>The sport to which the stats belong.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="class" type="QCodeType" use="optional">
            <xs:annotation>
                <xs:documentation>The general classification of the stat within the sport eg ofensive, defensive, rebounding (basketball), special teams (american football).</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="stat-type" type="QCodeType" use="optional">
            <xs:annotation>
                <xs:documentation>The formal identifier of the kind of stat.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="value-type" type="QCodeType" use="optional">
            <xs:annotation>
                <xs:documentation>The formal type of the stat value eg. integer, string, etc.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="value" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>The value of the stat.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:attributeGroup>
    
    <xs:attributeGroup name="wageringAttributes">
        <xs:annotation>
            <xs:documentation>Basic wagering attributes, used in all wagering elements</xs:documentation>
        </xs:annotation>
        <xs:attribute name="bookmaker-key" type="QCodeType" use="optional">
            <xs:annotation>
                <xs:documentation>Unique ID for the make of the line.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="bookmaker-name" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>Name of the maker of the line.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="rotation-key" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>Reusable ID for the team generally agreed upon by a pool of bookmakers.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="comment" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>A comment for this line. Often the same comment is supplied for  both teams in a game.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="date-time" type="TruncatedDateTimeType" use="optional">
            <xs:annotation>
                <xs:documentation>The date and time which this wagering info was assigned by the bookmaker, normalized to ISO 8601 extended format: YYYY-MM-DDTHH:MM:SS+HH:MM. Use YYYY-MM-DD when no time is available.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="context" use="optional">
            <xs:annotation>
                <xs:documentation>An indication of whether this line is a current line, or a repeat of a special-interest line from the past.</xs:documentation>
            </xs:annotation>
            <xs:simpleType id="context">
                <xs:restriction base="xs:string">
                    <xs:enumeration id="contextOpening" value="opening"/>
                    <xs:enumeration id="contextClosing" value="closing"/>
                    <xs:enumeration id="contextCurrent" value="current"/>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
    </xs:attributeGroup>
    
    <xs:attributeGroup name="wagering2Attributes">
        <xs:attributeGroup ref="wageringAttributes"/>
        <xs:attribute name="prediction" type="QCodeType" use="optional">
            <xs:annotation>
                <xs:documentation>Whether this team or player is the favorite or the underdog.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="prediction-opening" type="QCodeType" use="optional">
            <xs:annotation>
                <xs:documentation>The opening value for this prediction.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="vigorish" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>The commission paid to the bookmaker.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:attributeGroup>
    
    <xs:attributeGroup name="wagering3Attributes">
        <xs:attributeGroup ref="wagering2Attributes"/>
        <xs:attribute name="line" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>The value of the runline.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="line-opening" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>The opening line for this runline.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:attributeGroup>
    
    <xs:attributeGroup name="baseEventStateAttributeGroup">
        <xs:attribute name="minutes-elapsed" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>Number of minutes that have elapsed since the beginning of the game.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="period-minute-elapsed" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>The time elapsed, but only given as whole minutes.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="period-time-elapsed" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>The time elapsed in the current period.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="period-time-remaining" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>The time remaining in the current period.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:attributeGroup>
    
</xs:schema>

<!--
IPTC - International Press Telecommunications Council
Royal Albert House, Windsor, Berkshire SL4 1BE, England
www.iptc.org
Non-Exclusive License Agreement for International Press
Telecommunications Council Specifications and Related Documentation
IMPORTANT: International Press Telecommunications Council (IPTC)
standard specifications for news (the Specifications) and supporting
software, documentation, technical reports, web sites and other
material related to the Specifications (the Materials) including the
document accompanying this license (the Document), whether in a paper
or electronic format, are made available to you subject to the terms
stated below. By obtaining, using and/or copying the Specifications or
Materials, you (the licensee) agree that you have read, understood,
and will comply with the following terms and conditions.
1. The Specifications and Materials are licensed for use only on the
condition that you agree to be bound by the terms of this license.
Subject to this and other licensing requirements contained herein, you
may, on a non-exclusive basis, use the Specifications and Materials.
2. The IPTC openly provides the Specifications and Materials for
voluntary use by individuals, partnerships, companies, corporations,
organizations and any other entity for use at the entity's own risk.
This disclaimer, license and release is intended to apply to the IPTC,
its officers, directors, agents, representatives, members,
contributors, affiliates, contractors, or co-venturers acting jointly
or severally.
3. The Document and translations thereof may be copied and furnished
to others, and derivative works that comment on or otherwise explain
it or assist in its implementation may be prepared, copied, published
and distributed, in whole or in part, without restriction of any kind,
provided that the copyright and license notices and references to the
IPTC appearing in the Document and the terms of this Specifications
License Agreement are included on all such copies and derivative
works. Further, upon the receipt of written permission from the IPTC,
the Document may be modified for the purpose of developing
applications that use IPTC Specifications or as required to translate
the Document into languages other than English.
4. Any use, duplication, distribution, or exploitation of the Document
and Specifications and Materials in any manner is at your own risk.
5. NO WARRANTY, EXPRESSED OR IMPLIED, IS MADE REGARDING THE ACCURACY,
ADEQUACY, COMPLETENESS, LEGALITY, RELIABILITY OR USEFULNESS OF ANY
INFORMATION CONTAINED IN THE DOCUMENT OR IN ANY SPECIFICATION OR OTHER
PRODUCT OR SERVICE PRODUCED OR SPONSORED BY THE IPTC. THE DOCUMENT AND
THE INFORMATION CONTAINED HEREIN AND INCLUDED IN ANY SPECIFICATION OR
OTHER PRODUCT OR SERVICE OF THE IPTC IS PROVIDED ON AN "AS IS" BASIS.
THE IPTC DISCLAIMS ALL WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING, BUT NOT LIMITED TO, ANY ACTUAL OR ASSERTED WARRANTY OF NON-
INFRINGEMENT OF PROPRIETARY RIGHTS, MERCHANTABILITY, OR FITNESS FOR A
PARTICULAR PURPOSE. NEITHER THE IPTC NOR ITS CONTRIBUTORS SHALL BE
HELD LIABLE FOR ANY IMPROPER OR INCORRECT USE OF INFORMATION. NEITHER
THE IPTC NOR ITS CONTRIBUTORS ASSUME ANY RESPONSIBILITY FOR ANYONE'S
USE OF INFORMATION PROVIDED BY THE IPTC. IN NO EVENT SHALL THE IPTC OR
ITS CONTRIBUTORS BE LIABLE TO ANYONE FOR DAMAGES OF ANY KIND,
INCLUDING BUT NOT LIMITED TO, COMPENSATORY DAMAGES, LOST PROFITS, LOST
DATA OR ANY FORM OF SPECIAL, INCIDENTAL, INDIRECT, CONSEQUENTIAL OR
PUNITIVE DAMAGES OF ANY KIND WHETHER BASED ON BREACH OF CONTRACT OR
WARRANTY, TORT, PRODUCT LIABILITY OR OTHERWISE.
6. The IPTC takes no position regarding the validity or scope of any
Intellectual Property or other rights that might be claimed to pertain
to the implementation or use of the technology described in the
Document or the extent to which any license under such rights might or
might not be available. The IPTC does not represent that it has made
any effort to identify any such rights. Copies of claims of rights
made available for publication, assurances of licenses to be made
available, or the result of an attempt made to obtain a general
license or permission for the use of such proprietary rights by
implementers or users of the Specifications and Materials, can be
obtained from the Managing Director of the IPTC.
7. By using the Specifications and Materials including the Document in
any manner or for any purpose, you release the IPTC from all
liabilities, claims, causes of action, allegations, losses, injuries,
damages, or detriments of any nature arising from or relating to the
use of the Specifications, Materials or any portion thereof. You
further agree not to file a lawsuit, make a claim, or take any other
formal or informal legal action against the IPTC, resulting from your
acquisition, use, duplication, distribution, or exploitation of the
Specifications, Materials or any portion thereof. Finally, you hereby
agree that the IPTC is not liable for any direct, indirect, special or
consequential damages arising from or relating to your acquisition,
use, duplication, distribution, or exploitation of the Specifications,
Materials or any portion thereof.
8. Specifications and Materials may be downloaded or copied provided
that ALL copies retain the ownership, copyright and license notices.
9. Materials may not be edited, modified, or presented in a context
that creates a misleading or false impression or statement as to the
positions, actions, or statements of the IPTC.
10. The name and trademarks of the IPTC may not be used in
advertising, publicity, or in relation to products or services and
their names without the specific, written prior permission of the
IPTC. Any permitted use of the trademarks of the IPTC, whether
registered or not, shall be accompanied by an appropriate mark and
attribution, as agreed with the IPTC.
11. Specifications may be extended by both members and non-members to
provide additional functionality (Extended Specifications) provided
that there is a clear recognition of the IPTC IP and its ownership in
the Extended Specifications and the related documentation and provided
that the extensions are clearly identified and provided that a
perpetual license is granted by the creator of the Extended
Specifications for other members and non-members to use the Extended
Specifications and to continue extensions of the Extended
Specifications. The IPTC does not waive any of its rights in the
Specifications and Materials in this context. The Extended
Specifications may be considered the intellectual property of their
creator. The IPTC expressly disclaims any responsibility for damage
caused by an extension to the Specifications.
12. Specifications and Materials may be included in derivative work of
both members and non-members provided that there is a clear
recognition of the IPTC IP and its ownership in the derivative work
and its related documentation. The IPTC does not waive any of its
rights in the Specifications and Materials in this context. Derivative
work in its entirety may be considered the intellectual property of
the creator of the work .The IPTC expressly disclaims any
responsibility for damage caused when its IP is used in a derivative
context.
13. This Specifications License Agreement is perpetual subject to your
conformance to the terms of this Agreement. The IPTC may terminate
this Specifications License Agreement immediately upon your breach of
this Agreement and, upon such termination you will cease all use,
duplication, distribution, and/or exploitation in any manner of the
Specifications and Materials.
14. This Specifications License Agreement reflects the entire
agreement of the parties regarding the subject matter hereof and
supersedes all prior agreements or representations regarding such
matters, whether written or oral. To the extent any portion or
provision of this Specifications License Agreement is found to be
illegal or unenforceable, then the remaining provisions of this
Specifications License Agreement will remain in full force and effect
and the illegal or unenforceable provision will be construed to give
it such effect as it may properly have that is consistent with the
intentions of the parties.
15. This Specifications License Agreement may only be modified in
writing signed by an authorized representative of the IPTC.
16. This Specifications License Agreement is governed by the law of
United Kingdom, as such law is applied to contracts made and fully
performed in the United Kingdom. Any disputes arising from or relating
to this Specifications License Agreement will be resolved in the
courts of the United Kingdom. You consent to the jurisdiction of such
courts over you and covenant not to assert before such courts any
objection to proceeding in such forums.
IF YOU DO NOT AGREE TO THESE TERMS YOU MUST CEASE ALL USE OF THE
SPECIFICATIONS AND MATERIALS NOW. IF YOU HAVE ANY QUESTIONS ABOUT
THESE TERMS, PLEASE CONTACT THE MANAGING DIRECTOR OF THE INTERNATIONAL
PRESS TELECOMMUNICATION COUNCIL. AS OF THE DATE OF THIS REVISION OF
THIS SPECIFICATIONS LICENSE AGREEMENT YOU MAY CONTACT THE IPTC at
http://www.iptc.org.
License agreement version of: 30 January 2006
-->
Collapse AttributeGroups:
Collapse ComplexTypes:
Collapse Elements:
Collapse SimpleTypes: