HOME XML-SCHEMA XML-EXAMPLES CHESS VARIANTS FBR MBN ANCP FAQ RESOURCES ABOUT

CIF - Basic Types


This element has no content at all.

A token is a non-empty string and does not include line feeds, carriage returns, tabs, leading and trailing spaces, and multiple spaces.

<xs:simpleType name="Identifier"> <xs:restriction base="Token"> <xs:pattern value="[^:\s][^\s]*"/> </xs:restriction> </xs:simpleType>

An index ID is any non-negative number with maximal 24 bits (this means less than 16,777,216).

<xs:simpleType name="IndexID"> <xs:restriction base="xs:nonNegativeInteger"> <xs:maxInclusive value="16777215"/> <!-- 2**24 - 1 --> </xs:restriction> </xs:simpleType>

A namebase ID is any non-negative number with maximal 24 bits (this means less than 16,777,216).

<xs:simpleType name="NamebaseID"> <xs:restriction base="xs:nonNegativeInteger"> <xs:maxInclusive value="16777215"/> <!-- 2**24 - 1 --> </xs:restriction> </xs:simpleType>

An identifier is a non-empty string and does not include line feeds, carriage returns, tabs, and spaces. The first character of an identifier must not be a colon.

<xs:simpleType name="Year"> <xs:restriction base="xs:string"> <xs:pattern value="[0-9]{4}"/> </xs:restriction> </xs:simpleType>

A year must be a valid year in Gregorian calendar, except the year is before 1582, in this case the Julian calendar will be applied.

<xs:simpleType name="Date"> <xs:restriction base="xs:string"> <xs:pattern value="[0-9]{4}(-[0-9]{2}(-[0-9]{2})?)?"/> <xs:attribute name="utc" type="xs:boolean" default="false"/> </xs:restriction> </xs:simpleType>

A date consists of a hyphen-delimited sequence of three parts: year, month, and day. The month and the day part are optional.

A date should be a valid date in Gregorian calendar, except the date is before 1582-10-15 (start of the Gregorian calendar), in this case the Julian calendar will be applied.

Example: "2011-02-29" is not valid, this date does not exist, because 2011 is not a leap year.

Example: "1582-10-05" is not valid, because dates before 1582-10-15 will be interpreted as a Julian date, and the Julian date prior to the Gregorian date 1582-10-15 is 1582-10-04 (there is a hole between 1582-10-04 and 1582-10-15, due to the mapping rules from Julian calendar to Gregorian calendar).

Because C/CIF provides lossless transfer it is allowed to store invalid dates, this means that the reader of the archive is responsible to fix ro to deny this an invalid date.

<xs:simpleType name="Time"> <xs:restriction base="xs:string"> <xs:pattern value="[0-9]{2}:[0-9]{2}:[0-9]{2}"/> <xs:attribute name="utc" type="xs:boolean" default="false"/> </xs:restriction> </xs:simpleType>

A time specification is a hyphen-delimited sequence of three parts: hour, minute, and second. A standalone time specification will be always given in local time.

Example: "23:00:00" is specifying one hour before midnight.

<xs:simpleType name="Timestamp"> <xs:restriction base="xs:string"> <xs:pattern value="[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}"/> </xs:restriction> </xs:simpleType>

A timestamp is a sequence of two space-delimited parts: date, and time. In this case the date don't has optional parts. A timestamp will always be given in UTC.

The optional language attribute will be given as an ISO 639-1 code. If this is not possible the code may be given as an ISO 639-2 code, in this case the terminology code has to be used. See Alpha-3 codes for a list of language codes. If no language code is given it will be assumed that this comment is language independent, it will not be assumed that the default language is English. Note that the language code will be given in lowercase. There is one exceptional value: lang="*". This value means that the language code is unknown, but it is not a language independent comment. This special value is especially required for the decoding of PGN archives to C/CIF, because PGN does not know about the existence of the various languages, this means that the language inside comments in PGN is in general unknown.

C/CIF supports any board size, but it is limited to maximal 64 files and 64 ranks – in practice this should be sufficient. Furthermore up to 8 levels (3D Chess, or multi-board chess) will be supported. And the 4D Chess support allows up to 4 columns and rows. But note that Levels x Files must not exceed 64, and Columns x Files, as well as Rows x Ranks, also must not exceed 64.

<xs:complexType name="Tag"> <xs:simpleContent> <xs:extension base="xs:string"> <xs:attribute name="name" type="Identifier"/> <xs:attribute name="signature" type="Signature"/> </xs:extension> </xs:simpleContent> </xs:complexType>

This is defining a name/value pair, well known from PGN. But in C/CIF tags are not mandatory. So the PGN value "*" corresponds to an empty C/CIF tag. And the PGN value "-" corresponds to an undefined tag in C/CIF. Furthermore in C/CIF it is possible to use binary data for tag values.

The MIME type gives the reader the neccesary information about the content of the binary data. It is also allowed to use a private application defined type.

<xs:simpleType name="Signature"> <xs:union memberTypes="Token SignatureID"/> </xs:simpleType> <xs:simpleType name="SignatureID"> <xs:restriction base="xs:string"> <xs:enumeration value=":Arena"/> <xs:enumeration value=":BPGN"/> <xs:enumeration value=":Chess-Assistant"/> <xs:enumeration value=":ChessBase"/> <xs:enumeration value=":ChessX"/> <xs:enumeration value=":ExaChess"/> <xs:enumeration value=":FICS"/> <xs:enumeration value=":Lichess"/> <xs:enumeration value=":ICC"/> <xs:enumeration value=":Mac-Chess-Explorer"/> <xs:enumeration value=":PGN"/> <xs:enumeration value=":Playchess"/> <xs:enumeration value=":PyChess"/> <xs:enumeration value=":Raptor"/> <xs:enumeration value=":Rybka-Aquarium"/> <xs:enumeration value=":SchemingMind"/> <xs:enumeration value=":Scid"/> <xs:enumeration value=":ScidVsPC"/> <xs:enumeration value=":Scidb"/> <xs:enumeration value=":XBoard"/> </xs:restriction> </xs:simpleType>

A signature is either a predefined token, or any token string which must not start with a colon.

<xs:complexType name="ExternalResource"> <xs:simpleContent> <xs:extension base="xs:anyURI"> <xs:attribute name="mimetype" type="MimeType" use="required"/> <xs:attribute name="signature" type="Signature"/> </xs:extension> </xs:simpleContent> </xs:complexType>

An external resource is a link to any data outside of the archive.

A reference is a link to any data inside of the archive.



Google translation

Share this page

C/CIF at Sourceforge

C/CIF at Sourceforge

C/CIF at Launchpad

C/CIF at Launchpad