<xs:schema elementFormDefault="qualified" targetNamespace="http://www.sci.fi/~stniekat/pccc/2007/Problem/1/0" xmlns="http://www.sci.fi/~stniekat/pccc/2007/Problem/1/0" xmlns:vCard="http://www.w3.org/2001/vcard-rdf/3.0#" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:annotation>
<xs:documentation xml:lang="en">
<!--
some UTF characters to convince text editors that this document
is in UTF-8: Чепижный
-->
<xhtml:p>
Schema for exchanging chess problems
<xhtml:br/>
Status: Release Candidate
<xhtml:br/>
Revision info: $Id: problem.xsd,v 1.22 2007/07/25 13:54:51 thomasmaeder Exp $
</xhtml:p>
<xhtml:h2>About this document</xhtml:h2>
<xhtml:p>
This document is an XML schema. It defines a Standard format
for the exchange of chess problems.
</xhtml:p>
<xhtml:h3>Naming convention</xhtml:h3>
<xhtml:p>
The target namespace of this schema is
http://www.sci.fi/~stniekat/pccc/2007/Problem/1/0 ; all names
introduced by this schema belong to that namespace. The name
of this namespace looks like an URL (aka "Internet address"),
but in fact, it is just a string. The structure of the string
follows the apparently standard naming convention for
namespaces:
</xhtml:p>
<xhtml:ul>
<xhtml:li>
Identification of the organization that released the schema
(www.sci.fi/~stniekat/pccc - homepage of the
<xhtml:b>P</xhtml:b>
ermanent
<xhtml:b>C</xhtml:b>
ommission
for
<xhtml:b>C</xhtml:b>
hess
<xhtml:b>C</xhtml:b>
omposition
of the FIDE)
</xhtml:li>
<xhtml:li>
Year of release (2007)
</xhtml:li>
<xhtml:li>
Identification of the context (Problem)
</xhtml:li>
<xhtml:li>
Versioning information; in this case, the form
majorVersion/minorVersion is used (1/0)
</xhtml:li>
</xhtml:ul>
<xhtml:h3>Annotations</xhtml:h3>
<xhtml:p>
Each element and attribute defined by this XML schema is
provided with an
<xhtml:code>annotation</xhtml:code>
element
that documents it. The primary usage of these annotations is
to produce
<xhtml:a href="TODO">the online documentation</xhtml:a>
,
which may affect their readability in this document itself.
</xhtml:p>
<xhtml:a name="glossary"/>
<xhtml:h3>Glossary</xhtml:h3>
<xhtml:p>
A little glossary of terms used within this document.
</xhtml:p>
<xhtml:dl>
<xhtml:dt>identify</xhtml:dt>
<xhtml:dd>
refer to somebody or something in a unique way
</xhtml:dd>
<xhtml:dt>indicate</xhtml:dt>
<xhtml:dd>
refer to somebody or something without necessarily making it
possible to determine the refered person or thing uniquely
</xhtml:dd>
<xhtml:dt>this (problem, release, move, ...)</xhtml:dt>
<xhtml:dd>
The problem (release, move ...) represented by the element
of which the annotation containing the expression is part
of, or by an ancestor of that element
</xhtml:dd>
<xhtml:dt>twin</xhtml:dt>
<xhtml:dd>
Part of a problem with a position, a set of fairy
conditions, a solution etc.
<xhtml:br/>
In the context of this Standard format, every problem
element has at least one twin child element; problems that
have twins in the common language usage of the term have two
twins in this Standard format.
<xhtml:br/>
Zero-positions and duplexes are special kinds of twins.
</xhtml:dd>
</xhtml:dl>
</xs:documentation>
</xs:annotation>
<xs:annotation>
<xs:documentation xml:lang="en">
The transcription attribute
<xhtml:a href="../schema-summary.html#glossary">indicates</xhtml:a>
if and how the name was transcribed.
<xhtml:br/>
It can assume the following values:
<xhtml:ul>
<xhtml:li>
<xhtml:code>unspecified</xhtml:code>
(default): no
information about
</xhtml:li>
<xhtml:li>
<xhtml:code>unified</xhtml:code>
: the name is given in
Latin letters; if the name is orginally written in
another alphabet,
<xhtml:a href="http://en.wikipedia.org/wiki/Scientific_transliteration">
scientific transliteration
</xhtml:a>
was used to convert the characters to the (extended)
Latin alphabet
</xhtml:li>
<xhtml:li>
<xhtml:code>local</xhtml:code>
: the name was transcribed
according to rules typical for a certain language; the
language attribute
<xhtml:a href="../schema-summary.html#glossary">identifies</xhtml:a>
identifies that language.
</xhtml:li>
</xhtml:ul>
<xhtml:br/>
Examples of usage:
<xhtml:ul>
<xhtml:li>
German person, written in
<xhtml:code>unified</xhtml:code>
form:
<xhtml:br/>
<xhtml:code>
<authorName transcription="unified">
<xhtml:br/>
<familyname>Büsing</familyname>
<xhtml:br/>
<givennames>Günter</givennames>
<xhtml:br/>
</authorName>
<xhtml:br/>
</xhtml:code>
<xhtml:br/>
</xhtml:li>
<xhtml:li>
Latvian person, written in
<xhtml:code>unified</xhtml:code>
form:
<xhtml:br/>
<xhtml:code>
<authorName transcription="unified">
<xhtml:br/>
<familyname>Šķūze</familyname>
<xhtml:br/>
<givennames>Jānis</givennames>
<xhtml:br/>
</authorName>
<xhtml:br/>
</xhtml:code>
<xhtml:br/>
</xhtml:li>
<xhtml:li>
Russian person, written in Cyrillic letters:
<xhtml:br/>
<xhtml:code>
<authorName language="ru" transcription="local">
<xhtml:br/>
<familyname>Чепижный</familyname>
<xhtml:br/>
<givennames>Виктор Иванович</givennames>
<xhtml:br/>
</authorName>
<xhtml:br/>
</xhtml:code>
<xhtml:br/>
</xhtml:li>
<xhtml:li>
Russian person, written in
<xhtml:code>unified</xhtml:code>
form:
<xhtml:br/>
<xhtml:code>
<authorName transcription="unified">
<xhtml:br/>
<familyname>Čepižny</familyname>
<xhtml:br/>
<givennames>Viktor</givennames>
<xhtml:br/>
</authorName>
<xhtml:br/>
</xhtml:code>
<xhtml:br/>
</xhtml:li>
<xhtml:li>
Russian person, written in German
transcription:
<xhtml:br/>
<xhtml:code>
<authorName language="de" transcription="local">
<xhtml:br/>
<familyname>Tschepischnij</familyname>
<xhtml:br/>
<givennames>Wiktor</givennames>
<xhtml:br/>
</authorName>
<xhtml:br/>
</xhtml:code>
<xhtml:br/>
</xhtml:li>
<xhtml:li>
Swiss person, written in Latvian
transcription:
<xhtml:br/>
<xhtml:code>
<authorName language="lv" transcription="local">
<xhtml:br/>
<familyname>Mēders</familyname>
<xhtml:br/>
<givennames>Tomass</givennames>
<xhtml:br/>
</authorName>
<xhtml:br/>
</xhtml:code>
<xhtml:br/>
</xhtml:li>
</xhtml:ul>
</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="unspecified"/>
<xs:enumeration value="unified"/>
<xs:enumeration value="local"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="type" use="optional"> <xs:annotation>
<xs:documentation xml:lang="en">
If present, the type attribute defines the twin to be
special.
<xhtml:br/>
The following types of special twins are allowed:
<xhtml:ul>
<xhtml:li>
<xhtml:b>duplex</xhtml:b>
: same as base twin, but with
exchanged roles for White and Black.
</xhtml:li>
<xhtml:li>
<xhtml:b>zeroposition</xhtml:b>
: twin without intended
solution
</xhtml:li>
</xhtml:ul>
</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="duplex"/>
<xs:enumeration value="zeroposition"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:annotation>
<xs:documentation xml:lang="en">
<xhtml:p>
Elements of type source_type
<xhtml:a href="../schema-summary.html#glossary">indicate</xhtml:a>
a publication where a problem (or release) was published.
</xhtml:p>
<xhtml:p>
The prefered way of indicating a source is using the
structed child elements (name, date etc.). Alternatively,
the source can be
<xhtml:a href="../schema-summary.html#glossary">indicated</xhtml:a>
by an unstructured text.
</xhtml:p>
<xhtml:p>
Examples of structured source indication:
<xhtml:ul>
<xhtml:li>
Publication in an informal tourney:
<xhtml:br/>
<xhtml:code>
<source>
<xhtml:br/>
<name>idee & form</name>
<xhtml:br/>
<issue>94</issue>
<xhtml:br/>
<date>
<xhtml:br/>
<month>4</month>
<xhtml:br/>
<year>2007</year>
<xhtml:br/>
</date>
<xhtml:br/>
<problemid>2253</problemid>
<xhtml:br/>
</source>
</xhtml:code>
<xhtml:br/>
<xhtml:br/>
</xhtml:li>
<xhtml:li>
Publication in the award of a formal tourney in a periodical:
<xhtml:br/>
<xhtml:code>
<source>
<xhtml:br/>
<name>The Problemist</name>
<xhtml:br/>
<volume>13</volume>
<xhtml:br/>
<issue>9</issue>
<xhtml:br/>
<date>
<xhtml:br/>
<month>5</month>
<xhtml:br/>
<year>1990</year>
<xhtml:br/>
</date>
<xhtml:br/>
<problemid>8</problemid>
<xhtml:br/>
<tourney>
<xhtml:br/>
<name>Babson Theme Tourney</name>
<xhtml:br/>
<date>
<year>1989-1990</year>
</date>
<xhtml:br/>
</tourney>
<xhtml:br/>
</source>
</xhtml:code>
<xhtml:br/>
<xhtml:br/>
</xhtml:li>
<xhtml:li>
Publication in the award of a formal tourney in a brochure
created for the purpose:
<xhtml:br/>
<xhtml:code>
<source>
<xhtml:br/>
<name>WCCT</name>
<xhtml:br/>
<issue>7</issue>
<xhtml:br/>
<date>
<xhtml:br/>
<month>5</month>
<xhtml:br/>
<year>2001-2004</year>
<xhtml:br/>
</date>
<xhtml:br/>
<problemid>E026</problemid>
<xhtml:br/>
</source>
</xhtml:code>
<xhtml:br/>
<xhtml:br/>
</xhtml:li>
</xhtml:ul>
</xhtml:p>
</xs:documentation>
</xs:annotation>
<xs:choice>
<xs:sequence>
<xs:attribute name="type" use="required"> <xs:annotation>
<xs:documentation xml:lang="en">
The type attribute
<xhtml:a href="../schema-summary.html#glossary">identifies</xhtml:a>
the type of
<xhtml:a href="../schema-summary.html#glossary">this move</xhtml:a>
.
<xhtml:br/>
The following types are allowed:
<xhtml:ul>
<xhtml:li>set</xhtml:li>
<xhtml:li>solution</xhtml:li>
<xhtml:li>try</xhtml:li>
<xhtml:li>variation</xhtml:li>
<xhtml:li>threat</xhtml:li>
<xhtml:li>refutation</xhtml:li>
</xhtml:ul>
In help and series play, only set, solution and try are to be used.
</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="solution"/>
<xs:enumeration value="variation"/>
<xs:enumeration value="threat"/>
<xs:enumeration value="try"/>
<xs:enumeration value="refutation"/>
<xs:enumeration value="set"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:element maxOccurs="unbounded" minOccurs="0" ref="plane"> <xs:annotation>
<xs:documentation xml:lang="en">
Each plane child element
<xhtml:a href="../schema-summary.html#glossary">identifies</xhtml:a>
one of the dimension of the square where the piece is
moved to as part of the change.
<xhtml:br/>
Typically, a change element has either
<xhtml:ul>
<xhtml:li>
the same number of plane child elements as the board
has dimensions: in this case, the planes
<xhtml:a href="../schema-summary.html#glossary">identify</xhtml:a>
the square where the piece
<xhtml:a href="../schema-summary.html#glossary">identfied</xhtml:a>
by the piece attribute moves to.
</xhtml:li>
<xhtml:li>
no plane child elements: in this case, the piece is
removed from the board by the change
</xhtml:li>
</xhtml:ul>
A number of plane child elements between 0 and the number
of dimensions of the board can be used to represent
partially random moves; the dimensions not provided by a
plane elements remain arbitrary.
<xhtml:br/>
To represent a completely random move by a piece, use 1
plane child element with value 0 for both its dim and
value attributes.
<xhtml:br/>
<xhtml:br/>
Examples:
<xhtml:ul>
<xhtml:li>
Piece piece1 moves to c5:
<xhtml:br/>
<xhtml:code>
<change piece="piece1">
<xhtml:br/>
<plane dim="1" value="3"/>
<xhtml:br/>
<plane dim="2" value="5"/>
<xhtml:br/>
</change>
<xhtml:br/>
</xhtml:code>
<xhtml:br/>
</xhtml:li>
<xhtml:li>
Piece piece2 is removed from the board:
<xhtml:br/>
<xhtml:code>
<change piece="piece2"/>
<xhtml:br/>
</xhtml:code>
<xhtml:br/>
</xhtml:li>
<xhtml:li>
Piece piece3 moves randomly on the 4 file:
<xhtml:br/>
<xhtml:code>
<change piece="piece3">
<xhtml:br/>
<plane dim="1" value="5"/>
<xhtml:br/>
</change>
<xhtml:br/>
</xhtml:code>
<xhtml:br/>
</xhtml:li>
<xhtml:li>
Piece piece4 moves randomly:
<xhtml:br/>
<xhtml:code>
<change piece="piece4">
<xhtml:br/>
<plane dim="0" value="0"/>
<xhtml:br/>
</change>
<xhtml:br/>
</xhtml:code>
<xhtml:br/>
</xhtml:li>
</xhtml:ul>
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:annotation>
<xs:documentation xml:lang="en">
An element of type stipulation_type defines the stipulation
of a twin.
<xhtml:br/>
The stipulation is specified by two main characteristics:
<xhtml:ul>
<xhtml:li>the state to be reached</xhtml:li>
<xhtml:li>how the state is to be reached</xhtml:li>
</xhtml:ul>
Stipulations can be recursive, i.e. a stipulation can be
defined to be fulfilled if another stipulation can be
fulfilled after the required sequence of moves; in that case,
the state to be reached is defined by a nested
stipulation_type element.
<xhtml:br/>
The end of the recursion is reached if a stipulation element
has an endstate child element.
<xhtml:br/>
<xhtml:br/>
Examples:
<xhtml:br/>
<xhtml:ul>
<xhtml:li>
<xhtml:b>#3</xhtml:b>
<xhtml:br/>
<xhtml:code>
<stipulation>
<xhtml:br/>
<length type="maximum" value="3"/>
<xhtml:br/>
<endstate type="mate"/>
<xhtml:br/>
</stipulation>
<xhtml:br/>
</xhtml:code>
<xhtml:br/>
</xhtml:li>
<xhtml:li>
<xhtml:b>1w -> ser-h#5</xhtml:b>
<xhtml:br/>
<xhtml:code>
<stipulation atmove="white" play="series">
<xhtml:br/>
<length type="exact" value="1"/>
<xhtml:br/>
<stipulation atmove="black" play="series">
<xhtml:br/>
<length type="maximum" value="4"/>
<xhtml:br/>
<stipulation play="help">
<xhtml:br/>
<length type="maximum" value="2"/>
<xhtml:br/>
<endstate type="mate"/>
<xhtml:br/>
</stipulation>
<xhtml:br/>
</stipulation>
<xhtml:br/>
</stipulation>
<xhtml:br/>
</xhtml:code>
<xhtml:br/>
</xhtml:li>
</xhtml:ul>
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:attribute default="alternating" name="order" use="optional"> <xs:annotation>
<xs:documentation xml:lang="en">
The order attribute specifies the order in which both sides
play their moves.
<xhtml:br/>
The following orders are allowed:
<xhtml:ul>
<xhtml:li>
<xhtml:b>alternating</xhtml:b>
both sides alternatively
play one move.
</xhtml:li>
<xhtml:li>
<xhtml:b>incremental</xhtml:b>
The side at the move
plays 1 move, then the other side plays 2 moves
etc.
<xhtml:br/>
</xhtml:li>
</xhtml:ul>
</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="alternating"/>
<xs:enumeration value="incremental"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute default="direct" name="play" use="optional"> <xs:annotation>
<xs:documentation xml:lang="en">
The play attribute specifies the type of play required by
the stipulation
<xhtml:br/>
The following types of play are allowed:
<xhtml:ul>
<xhtml:li>direct</xhtml:li>
<xhtml:li>help</xhtml:li>
<xhtml:li>self</xhtml:li>
<xhtml:li>reflex</xhtml:li>
<xhtml:li>semireflex</xhtml:li>
<xhtml:li>series</xhtml:li>
</xhtml:ul>
</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="direct"/>
<xs:enumeration value="help"/>
<xs:enumeration value="self"/>
<xs:enumeration value="reflex"/>
<xs:enumeration value="semireflex"/>
<xs:enumeration value="series"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="value" type="xs:unsignedInt" use="required"> <xs:annotation>
<xs:documentation>
<xhtml:p>
The value of the value attribute describes the number of moves
to be played to reach the required endstate.
<xhtml:br/>
The meaning of the value depends on the
<xhtml:a href="stipulation_type.html#r8">play</xhtml:a>
:
<xhtml:ul>
<xhtml:li>
<xhtml:b>help play</xhtml:b>
: the value is the sum of all
black and white moves
</xhtml:li>
<xhtml:li>
<xhtml:b>all other plays</xhtml:b>
: the value is the number
of moves of the side that plays the first move
</xhtml:li>
</xhtml:ul>
</xhtml:p>
<xhtml:p>
Examples:
<xhtml:table>
<xhtml:thead>
<xhtml:tr>
<xhtml:td>stipulation (plain text)</xhtml:td>
<xhtml:td/>
<xhtml:td>value of value attribute</xhtml:td>
</xhtml:tr>
</xhtml:thead>
<xhtml:tbody>
<xhtml:tr>
<xhtml:td>#2</xhtml:td>
<xhtml:td/>
<xhtml:td>2</xhtml:td>
</xhtml:tr>
<xhtml:tr>
<xhtml:td>=5</xhtml:td>
<xhtml:td/>
<xhtml:td>5</xhtml:td>
</xhtml:tr>
<xhtml:tr>
<xhtml:td>s#3</xhtml:td>
<xhtml:td/>
<xhtml:td>3</xhtml:td>
</xhtml:tr>
<xhtml:tr>
<xhtml:td>h#2</xhtml:td>
<xhtml:td/>
<xhtml:td>4</xhtml:td>
</xhtml:tr>
<xhtml:tr>
<xhtml:td>h#3½</xhtml:td>
<xhtml:td/>
<xhtml:td>7</xhtml:td>
</xhtml:tr>
</xhtml:tbody>
</xhtml:table>
</xhtml:p>
</xs:documentation>
</xs:annotation>
</xs:attribute>