Documentation for SportsML/Baseball

Version: 0.5
Creator: IPTC
PublicId: -//IPTC//SportsML DTD 0.7//EN

Description

SportsML Plug-in for Baseball.

Root elements

Element index

action-baseball-other A custom action.
action-baseball-pitch Issued after a pitch. Not used if the batter hit the ball into play.
action-baseball-play Issued when a non-scoring play occurred.
action-baseball-score Issued when a run is scored.
action-baseball-substitution An exchange of players occurred.
all-specific-elements A placeholder, to help isolate sport-specific elements.
event-actions-baseball A container for specific baseball actions.
event-metadata-baseball Metadata about the event itself.
player-metadata-baseball Metadata about the player.
player-stats-baseball Stats collected by a player.
stats-baseball-defensive Stats accumulated while a team is out in the field.
stats-baseball-offensive Stats accumulated while a team is at bat.
stats-baseball-pitching Stats accumulated while a team is pitching.
team-metadata-baseball Metadata about the team.
team-stats-baseball Specific statistics for baseball.

Element descriptions

action-baseball-other

A custom action. For use when none of the pre-build actions apply.

Attributes

Name Description
Type (Declaration) Default
action-source The name of the controlled-vocabulary for the action-type attribute.
CDATA (#IMPLIED )
action-type A selection from a controlled-vocabulary list maintained by the publisher.
CDATA (#IMPLIED )
balls Either 1, 2, 3, or 4.
CDATA (#IMPLIED )
batter-idref A pointer to the player element for the batter at the plate.
IDREF (#IMPLIED )
batter-side Which side of the plate the batter was on when taking the pitch.
['left', 'right'] (#IMPLIED )
comment Textual comment about the action.
CDATA (#IMPLIED )
id An XML-specific identifier for the element.
ID (#IMPLIED )
inning-half Either top or bottom.
['top', 'bottom'] (#IMPLIED )
inning-value An integer. 1 through 9 for the main innings. 10, 11, 12, etc. for extra innings.
CDATA (#IMPLIED )
outs Either 1, 2, or 3.
CDATA (#IMPLIED )
pitcher-idref A pointer to the player element for the pitcher standing on the mound.
IDREF (#IMPLIED )
runner-on-first Whether or not a player is standing on first base. Either true or false.
CDATA (#IMPLIED )
runner-on-first-idref A pointer to the player on first base.
IDREF (#IMPLIED )
runner-on-second Whether or not a player is standing on second base. Either true or false.
CDATA (#IMPLIED )
runner-on-second-idref A pointer to the player on second base.
IDREF (#IMPLIED )
runner-on-third Whether or not a player is standing on third base. Either true or false.
CDATA (#IMPLIED )
runner-on-third-idref A pointer to the player on third base.
IDREF (#IMPLIED )
runs-this-inning-half An integer.
CDATA (#IMPLIED )
strikes Either 1, 2, or 3.
CDATA (#IMPLIED )

Parents

event-actions-baseball

Content model

EMPTY

action-baseball-pitch

Issued after a pitch. Not used if the batter hit the ball into play. Can indicate whether the pitch was a ball or strike, and where the pitch was located.

Attributes

Name Description
Type (Declaration) Default
ball-location Where with respect to the batter the ball was pitched. (Controlled vocabulary.)
CDATA (#IMPLIED )
balls Either 1, 2, 3, or 4.
CDATA (#IMPLIED )
batter-idref A pointer to the player element for the batter at the plate.
IDREF (#IMPLIED )
batter-side Which side of the plate the batter was on when taking the pitch.
['left', 'right'] (#IMPLIED )
comment Textual comment about the action.
CDATA (#IMPLIED )
id An XML-specific identifier for the element.
ID (#IMPLIED )
inning-half Either top or bottom.
['top', 'bottom'] (#IMPLIED )
inning-value An integer. 1 through 9 for the main innings. 10, 11, 12, etc. for extra innings.
CDATA (#IMPLIED )
outs Either 1, 2, or 3.
CDATA (#IMPLIED )
pitch-type Could be a slider, fastball, etc. (Controlled vocabulary.)
['ball', 'strike', 'in-play'] (#IMPLIED )
pitcher-idref A pointer to the player element for the pitcher standing on the mound.
IDREF (#IMPLIED )
runner-on-first Whether or not a player is standing on first base. Either true or false.
CDATA (#IMPLIED )
runner-on-first-idref A pointer to the player on first base.
IDREF (#IMPLIED )
runner-on-second Whether or not a player is standing on second base. Either true or false.
CDATA (#IMPLIED )
runner-on-second-idref A pointer to the player on second base.
IDREF (#IMPLIED )
runner-on-third Whether or not a player is standing on third base. Either true or false.
CDATA (#IMPLIED )
runner-on-third-idref A pointer to the player on third base.
IDREF (#IMPLIED )
runs-this-inning-half An integer.
CDATA (#IMPLIED )
strike-type Whether a strike was called by the umpire, or due to swinging. (Controlled vocabulary.)
CDATA (#IMPLIED )
strikes Either 1, 2, or 3.
CDATA (#IMPLIED )

Parents

event-actions-baseball

Content model

EMPTY

action-baseball-play

Issued when a non-scoring play occurred. Records a hit, a strikeout, etc.

Attributes

Name Description
Type (Declaration) Default
balls Either 1, 2, 3, or 4.
CDATA (#IMPLIED )
batter-idref A pointer to the player element for the batter at the plate.
IDREF (#IMPLIED )
batter-side Which side of the plate the batter was on when taking the pitch.
['left', 'right'] (#IMPLIED )
comment Textual comment about the action.
CDATA (#IMPLIED )
hit-by-pitch-type A description for how or why a batter was hit by a pitch. (Controlled vocabulary.)
CDATA (#IMPLIED )
hit-type A description for the hit. (Controlled vocabulary.)
CDATA (#IMPLIED )
id An XML-specific identifier for the element.
ID (#IMPLIED )
inning-half Either top or bottom.
['top', 'bottom'] (#IMPLIED )
inning-value An integer. 1 through 9 for the main innings. 10, 11, 12, etc. for extra innings.
CDATA (#IMPLIED )
out-type How the out was made. (Controlled vocabulary.)
CDATA (#IMPLIED )
outs Either 1, 2, or 3.
CDATA (#IMPLIED )
outs-recorded How many outs were recorded on the play. Values are 1, 2, 3.
['none', 'one', 'two', 'three'] (#IMPLIED )
pitcher-idref A pointer to the player element for the pitcher standing on the mound.
IDREF (#IMPLIED )
play-scorekeepers-notation Denotes which fielders touched the ball during the play. Example: 6-4-3.
CDATA (#IMPLIED )
play-type A description for the play. (Controlled vocabulary.)
CDATA (#IMPLIED )
runner-on-first Whether or not a player is standing on first base. Either true or false.
CDATA (#IMPLIED )
runner-on-first-idref A pointer to the player on first base.
IDREF (#IMPLIED )
runner-on-second Whether or not a player is standing on second base. Either true or false.
CDATA (#IMPLIED )
runner-on-second-idref A pointer to the player on second base.
IDREF (#IMPLIED )
runner-on-third Whether or not a player is standing on third base. Either true or false.
CDATA (#IMPLIED )
runner-on-third-idref A pointer to the player on third base.
IDREF (#IMPLIED )
runs-this-inning-half An integer.
CDATA (#IMPLIED )
strikes Either 1, 2, or 3.
CDATA (#IMPLIED )
walk-type If this play was a base-on-balls, the type of walk. (Controlled vocabulary.)
CDATA (#IMPLIED )

Parents

event-actions-baseball

Content model

EMPTY

action-baseball-score

Issued when a run is scored. Describes which players scored, also.

Attributes

Name Description
Type (Declaration) Default
balls Either 1, 2, 3, or 4.
CDATA (#IMPLIED )
batter-idref A pointer to the player element for the batter at the plate.
IDREF (#IMPLIED )
batter-side Which side of the plate the batter was on when taking the pitch.
['left', 'right'] (#IMPLIED )
comment Textual comment about the action.
CDATA (#IMPLIED )
hit-by-pitch-type A description for how or why a batter was hit by a pitch. (Controlled vocabulary.)
CDATA (#IMPLIED )
hit-type A description for the hit. (Controlled vocabulary.)
CDATA (#IMPLIED )
id An XML-specific identifier for the element.
ID (#IMPLIED )
inning-half Either top or bottom.
['top', 'bottom'] (#IMPLIED )
inning-value An integer. 1 through 9 for the main innings. 10, 11, 12, etc. for extra innings.
CDATA (#IMPLIED )
out-type How the out was made. (Controlled vocabulary.)
CDATA (#IMPLIED )
outs Either 1, 2, or 3.
CDATA (#IMPLIED )
outs-recorded How many outs were recorded on the play. Values are 1, 2, 3.
['none', 'one', 'two', 'three'] (#IMPLIED )
pitcher-idref A pointer to the player element for the pitcher standing on the mound.
IDREF (#IMPLIED )
play-scorekeepers-notation Denotes which fielders touched the ball during the play. Example: 6-4-3.
CDATA (#IMPLIED )
play-type A description for the play. (Controlled vocabulary.)
CDATA (#IMPLIED )
rbi How many runs-batted-in were credited on the play. An error may preclude the assigning of an rbi.
CDATA (#IMPLIED )
runner-on-first Whether or not a player is standing on first base. Either true or false.
CDATA (#IMPLIED )
runner-on-first-idref A pointer to the player on first base.
IDREF (#IMPLIED )
runner-on-second Whether or not a player is standing on second base. Either true or false.
CDATA (#IMPLIED )
runner-on-second-idref A pointer to the player on second base.
IDREF (#IMPLIED )
runner-on-third Whether or not a player is standing on third base. Either true or false.
CDATA (#IMPLIED )
runner-on-third-idref A pointer to the player on third base.
IDREF (#IMPLIED )
runs-scored How many runs scored on the play.
CDATA (#IMPLIED )
runs-this-inning-half An integer.
CDATA (#IMPLIED )
score-team The score of the team that did the scoring, once the play completed.
CDATA (#IMPLIED )
score-team-opposing The current score of the team that did not do the scoring.
CDATA (#IMPLIED )
strikes Either 1, 2, or 3.
CDATA (#IMPLIED )
walk-type If this play was a base-on-balls, the type of walk. (Controlled vocabulary.)
CDATA (#IMPLIED )

Parents

event-actions-baseball

Content model

EMPTY

action-baseball-substitution

An exchange of players occurred. Most commonly-recorded substitution is a pitching change.

Attributes

Name Description
Type (Declaration) Default
balls Either 1, 2, 3, or 4.
CDATA (#IMPLIED )
batter-idref A pointer to the player element for the batter at the plate.
IDREF (#IMPLIED )
batter-side Which side of the plate the batter was on when taking the pitch.
['left', 'right'] (#IMPLIED )
comment Textual comment about the action.
CDATA (#IMPLIED )
id An XML-specific identifier for the element.
ID (#IMPLIED )
inning-half Either top or bottom.
['top', 'bottom'] (#IMPLIED )
inning-value An integer. 1 through 9 for the main innings. 10, 11, 12, etc. for extra innings.
CDATA (#IMPLIED )
outs Either 1, 2, or 3.
CDATA (#IMPLIED )
person-original-idref A pointer to the person who left the game.
IDREF (#IMPLIED )
person-original-lineup-slot The order in the lineup that the player held.
CDATA (#IMPLIED )
person-original-position The position of the original person. (Controlled vocabulary.)
CDATA (#IMPLIED )
person-replacing-idref A pointer to the person who entered the game.
IDREF (#IMPLIED )
person-replacing-lineup-slot The order in the lineup that the player will hold.
CDATA (#IMPLIED )
person-replacing-position The position of the replacing person.
CDATA (#IMPLIED )
person-type Whether this substitution was for a player, a coach, an umpire.
['player', 'associate', 'official'] (#IMPLIED )
pitcher-idref A pointer to the player element for the pitcher standing on the mound.
IDREF (#IMPLIED )
runner-on-first Whether or not a player is standing on first base. Either true or false.
CDATA (#IMPLIED )
runner-on-first-idref A pointer to the player on first base.
IDREF (#IMPLIED )
runner-on-second Whether or not a player is standing on second base. Either true or false.
CDATA (#IMPLIED )
runner-on-second-idref A pointer to the player on second base.
IDREF (#IMPLIED )
runner-on-third Whether or not a player is standing on third base. Either true or false.
CDATA (#IMPLIED )
runner-on-third-idref A pointer to the player on third base.
IDREF (#IMPLIED )
runs-this-inning-half An integer.
CDATA (#IMPLIED )
strikes Either 1, 2, or 3.
CDATA (#IMPLIED )
substitution-reason Why a substitution was made.
CDATA (#IMPLIED )

Parents

event-actions-baseball

Content model

EMPTY

all-specific-elements

A placeholder, to help isolate sport-specific elements. Just helps the documentation. Not part of SportsML.

Attributes

Name Description
Type (Declaration) Default
id An XML-specific identifier for the element.
ID (#IMPLIED )

Parents

Must appear as the root element.

Content model

(event-metadata-baseball , event-actions-baseball , team-metadata-baseball , team-stats-baseball , player-metadata-baseball , player-stats-baseball)

event-actions-baseball

A container for specific baseball actions. Generally ordered chronologically.

Attributes

Name Description
Type (Declaration) Default
id An XML-specific identifier for the element.
ID (#IMPLIED )

Parents

all-specific-elements

Content model

(action-baseball-substitution | action-baseball-score | action-baseball-play | action-baseball-pitch | action-baseball-other)*

event-metadata-baseball

Metadata about the event itself. Includes what state the game is in.

Attributes

Name Description
Type (Declaration) Default
balls Either 1, 2, 3, or 4.
CDATA (#IMPLIED )
batter-idref A pointer to the player element for the batter at the plate.
IDREF (#IMPLIED )
batter-side Which side of the plate the batter was on when taking the pitch.
['left', 'right'] (#IMPLIED )
id An XML-specific identifier for the element.
ID (#IMPLIED )
inning-half Either top or bottom.
['top', 'bottom'] (#IMPLIED )
inning-value An integer. 1 through 9 for the main innings. 10, 11, 12, etc. for extra innings.
CDATA (#IMPLIED )
outs Either 1, 2, or 3.
CDATA (#IMPLIED )
pitcher-idref A pointer to the player element for the pitcher standing on the mound.
IDREF (#IMPLIED )
runner-on-first Whether or not a player is standing on first base. Either true or false.
CDATA (#IMPLIED )
runner-on-first-idref A pointer to the player on first base.
IDREF (#IMPLIED )
runner-on-second Whether or not a player is standing on second base. Either true or false.
CDATA (#IMPLIED )
runner-on-second-idref A pointer to the player on second base.
IDREF (#IMPLIED )
runner-on-third Whether or not a player is standing on third base. Either true or false.
CDATA (#IMPLIED )
runner-on-third-idref A pointer to the player on third base.
IDREF (#IMPLIED )
runs-this-inning-half An integer.
CDATA (#IMPLIED )
strikes Either 1, 2, or 3.
CDATA (#IMPLIED )

Parents

all-specific-elements

Content model

EMPTY

player-metadata-baseball

Metadata about the player. Specific to the sport of baseball.

Attributes

Name Description
Type (Declaration) Default
batting-hand Indicates whether player bats left, right, or is a switch-hitter.
['left', 'right', 'both'] (#IMPLIED )
id An XML-specific identifier for the element.
ID (#IMPLIED )
throwing-hand Indicates whether player throws left, right, or is a switch-thrower.
['left', 'right', 'both'] (#IMPLIED )

Parents

all-specific-elements

Content model

EMPTY

player-stats-baseball

Stats collected by a player. Includes offensive, pitching, and defensive stats.

Attributes

Name Description
Type (Declaration) Default
id An XML-specific identifier for the element.
ID (#IMPLIED )

Parents

all-specific-elements

Content model

(stats-baseball-offensive* , stats-baseball-pitching* , stats-baseball-defensive*)

stats-baseball-defensive

Stats accumulated while a team is out in the field. Includes double-plays and errors.

Attributes

Name Description
Type (Declaration) Default
assists Number of plays in which a fielder throws a ball to another fielder for the out.
CDATA (#IMPLIED )
defensive-average Rate a fielder turns a bill hit to their area into an out.
CDATA (#IMPLIED )
double-plays Number of times two runners thrown out at the base.
CDATA (#IMPLIED )
errors Number of plays in which a fielder committed an error, such as dropping a ball.
CDATA (#IMPLIED )
errors-catchers-interference Number of times a catcher has improperly interfered with play.
CDATA (#IMPLIED )
errors-passed-ball Number of times a catcher is faulted with letting a pitched ball go past.
CDATA (#IMPLIED )
fielding-percentage A measure of fielding success. Calculated as follows: (putouts + assists) / (putouts + assists + errors).
CDATA (#IMPLIED )
id An XML-specific identifier for the element.
ID (#IMPLIED )
putouts Number of times a fielder caught a fly ball for an out.
CDATA (#IMPLIED )
triple-plays Number of times three runners thrown out at the base.
CDATA (#IMPLIED )

Parents

player-stats-baseball team-stats-baseball

Content model

EMPTY

stats-baseball-offensive

Stats accumulated while a team is at bat. Includes hits and runs.

Attributes

Name Description
Type (Declaration) Default
at-bats Number of at-bats (Does not include walks or Sacrifice Hits)
CDATA (#IMPLIED )
at-bats-per-home-run Home runs per at-bat ratio
CDATA (#IMPLIED )
at-bats-per-rbi RBI per at-bat ratio
CDATA (#IMPLIED )
average Average number of hits per at-bats
CDATA (#IMPLIED )
bases-on-balls Number of times batter was walked
CDATA (#IMPLIED )
defensive-interferance-reaches The number of times the player reached a base due to interference by the defense.
CDATA (#IMPLIED )
doubles Number of hits off of which batter advances to second base
CDATA (#IMPLIED )
grand-slams Number of home runs with bases loaded
CDATA (#IMPLIED )
grounded-into-double-play Number of ground balls which result in batter and base runner outs
CDATA (#IMPLIED )
hit-by-pitch Number of times batter hit by pitch
CDATA (#IMPLIED )
hits Number of hits
CDATA (#IMPLIED )
hits-extra-base Calculated by adding doubles, triples, and home-runs.
CDATA (#IMPLIED )
home-runs Number of hits off of which batter advances to home plate
CDATA (#IMPLIED )
id An XML-specific identifier for the element.
ID (#IMPLIED )
left-in-scoring-position Number of runners left on second and/or third base
CDATA (#IMPLIED )
left-on-base Number of runners left on base
CDATA (#IMPLIED )
moved-up Number of times runner advances to another base
CDATA (#IMPLIED )
on-base-percentage Calculated as follows: (hits + bases-on-balls + hit-by-pitch) / (at-bats + bases-on-balls + hit-by-pitch + sac-flies)
CDATA (#IMPLIED )
on-base-plus-slugging Calculated by adding on-base-percentage to slugging-percentage.
CDATA (#IMPLIED )
plate-appearances Calculated by adding at-bats, bases-on-balls, hit-by-pitch, sac-flies, sac-bunts, and defensive-interfance-reaches.
CDATA (#IMPLIED )
plate-appearances-per-home-run Plate appearances per home run ratio
CDATA (#IMPLIED )
plate-appearances-per-rbi Plate appearances per at-bat ratio
CDATA (#IMPLIED )
rbi Number of runs batted in
CDATA (#IMPLIED )
runs-scored Number of runs scored
CDATA (#IMPLIED )
sac-bunts Number of bunts resulting in batter out which advance base runner(s)
CDATA (#IMPLIED )
sac-flies Number of hits resulting in batter out which advance base runner(s)
CDATA (#IMPLIED )
singles Number of hits off of which batter advances to first base
CDATA (#IMPLIED )
slugging-percentage Total bases divided by at-bats.
CDATA (#IMPLIED )
stolen-bases Number of successfully stolen bases.
CDATA (#IMPLIED )
stolen-bases-average Success rate for stealing bases.
CDATA (#IMPLIED )
stolen-bases-caught Number of times the runner was caught while trying to steal bases.
CDATA (#IMPLIED )
strikeouts Number of times batter struck out
CDATA (#IMPLIED )
total-bases Calculated by hits + doubles + (triples times 2) + (home-runs times 3).
CDATA (#IMPLIED )
triples Number of hits off of which batter advances to third base
CDATA (#IMPLIED )

Parents

player-stats-baseball team-stats-baseball

Content model

EMPTY

stats-baseball-pitching

Stats accumulated while a team is pitching. Includes strikeouts and shutouts.

Attributes

Name Description
Type (Declaration) Default
balks Number of balks
CDATA (#IMPLIED )
bases-on-balls Number of earned walks allowed
CDATA (#IMPLIED )
bases-on-balls-intentional Number of batters intentionally walked
CDATA (#IMPLIED )
earned-runs Number of earned runs against
CDATA (#IMPLIED )
era Earned run average: Number of earned runs divided by number of innings pitched multiplied by nine
CDATA (#IMPLIED )
errors-hit-with-pitch Number of times pitcher hits batter with pitch
CDATA (#IMPLIED )
errors-wild-pitch Number of wild pitches thrown
CDATA (#IMPLIED )
event-credit Whether a pitcher has received credit for winning or losing the game.
['win', 'loss', 'save'] (#IMPLIED )
games-complete Number of complete games pitched
CDATA (#IMPLIED )
games-finished Number of games pitched to the end
CDATA (#IMPLIED )
hits Number of hits against
CDATA (#IMPLIED )
home-runs-allowed Number of home runs against
CDATA (#IMPLIED )
id An XML-specific identifier for the element.
ID (#IMPLIED )
inherited-runners-scored Number of runners which a previous pitcher allowed on base which scored
CDATA (#IMPLIED )
innings-pitched Number of innings pitched
CDATA (#IMPLIED )
losses Number of games pitcher has lost
CDATA (#IMPLIED )
number-of-pitches Number of pitches thrown
CDATA (#IMPLIED )
pick-offs The number of times the pitcher caught a player trying to steal, before making the pitch.
CDATA (#IMPLIED )
runs-allowed Number of runs against
CDATA (#IMPLIED )
saves Number of games pitcher has saved
CDATA (#IMPLIED )
shutouts Number of games pitched in which opposing team did not score
CDATA (#IMPLIED )
strikeout-to-bb-ratio Strikeout to walks ratio
CDATA (#IMPLIED )
strikeouts Number of earned strikeouts
CDATA (#IMPLIED )
unearned-runs Number of unearned runs against
CDATA (#IMPLIED )
winning-percentage Calculated by wins divided by (wins + losses).
CDATA (#IMPLIED )
wins Number of games pitcher has won
CDATA (#IMPLIED )

Parents

player-stats-baseball team-stats-baseball

Content model

EMPTY

team-metadata-baseball

Metadata about the team. Specific to the sport of baseball.

Attributes

Name Description
Type (Declaration) Default
id An XML-specific identifier for the element.
ID (#IMPLIED )
probable-starting-pitcher-idref ID of the pitcher who will probably start the game.
IDREF (#IMPLIED )

Parents

all-specific-elements

Content model

EMPTY

team-stats-baseball

Specific statistics for baseball. Includes offensive, pitching, and defensive stats.

Attributes

Name Description
Type (Declaration) Default
id An XML-specific identifier for the element.
ID (#IMPLIED )

Parents

all-specific-elements

Content model

(stats-baseball-offensive* , stats-baseball-pitching* , stats-baseball-defensive*)
Produced by dtddoc.py, using xmlproc.