Warning, /multimedia/k3b/libk3b/k3bimage.xsd is written in an unsupported language. File is not indexed.
0001 <!--
0002 This document describes the layout of the toc.xml file in a K3b image archive.
0003 A K3b image archive is a TAR archive with a simple layout as follows.
0004
0005 Every K3b image archive contains the toc.xml file as described in this document
0006 which describes the layout of the CD or DVD saved in the K3b image archive.
0007 Additionally the K3b image archive contains an arbitrary number of files which
0008 contain the CD/DVD sector data. These files are referenced in the elements of
0009 type "file".
0010
0011 The most simple K3b image archive may look as follows:
0012 Archive
0013 |- toc.xml
0014 |- image.iso
0015 and the toc.xml may look as follows:
0016 <image>
0017 <numsessions>1</numsessions>
0018 <numtracks>1</numtracks>
0019 <session number="1">
0020 <numtracks>1</numtracks>
0021 <track number="1" type="Data Mode1">
0022 <data sectorsize="2048">
0023 <file>image.iso</file>
0024 </data>
0025 </track>
0026 </session>
0027 </image>
0028
0029
0030 We used tar as a backend because K3b image archives tend to get really big when it
0031 comes to DVD images and ZIP does not support archives bigger than 2 GB.
0032 Although tar supports files bigger than 2 GB (inside the archive) K3b splits every
0033 track bigger than 1 GB into chunks of 1 GB to avoid any problems with big filesizes.
0034 -->
0035
0036
0037 <!-- FIXME: introduce a version field! -->
0038
0039 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
0040 targetNamespace="http://www.k3b.org"
0041 xmlns="http://www.k3b.org"
0042 elementFormDefault="qualified">
0043
0044 <!-- THE TYPES -->
0045 <xs:simpleType name="tracktype">
0046 <xs:restriction base="xs:string">
0047 <xs:enumeration value="Audio" />
0048 <xs:enumeration value="Data Mode1" />
0049 <xs:enumeration value="Data Mode2" />
0050 <xs:enumeration value="Data XA Form1" />
0051 <xs:enumeration value="Data XA Form2" />
0052 </xs:restriction>
0053 </xs:simpleType>
0054
0055 <xs:simpleType name="sector_size">
0056 <xs:restriction base="xs:integer">
0057 <xs:enumeration value="2048" /> <!-- Mode1/Mode2 Form1/DVD: plain user data -->
0058 <xs:enumeration value="2056" /> <!-- Mode2 Form1: 2048 bytes user data + 8 bytes sub header FIXME: or does this include 4 bytes crc? -->
0059 <xs:enumeration value="2324" /> <!-- Mode2 Form2: plain user data -->
0060 <xs:enumeration value="2332" /> <!-- Mode2 Form2: 2324 bytes user data + 8 bytes sub header FIXME: or does this include 4 bytes crc? -->
0061 <xs:enumeration value="2352" /> <!-- Audio: 16bit, stereo, 44100Hz, big endian -->
0062 <xs:enumeration value="2448" /> <!-- Raw data -->
0063 </xs:restriction>
0064 </xs:simpleType>
0065
0066 <xs:complexType name="filecontents">
0067 <xs:simpleContent>
0068 <!-- Filename in the image archive. -->
0069 <xs:extension base="xs:string">
0070 <!-- The start_sector allows for multiple tracks including the CD-TEXT to be defined in one file. Default: 0 -->
0071 <xs:attribute name="start_offset" type="xs:nonNegativeInteger" use="optional" />
0072
0073 <!-- The number of bytes to be used. Default: up to end of the file -->
0074 <xs:attribute name="length" type="xs:positiveInteger" use="optional" />
0075 </xs:extension>
0076 </xs:simpleContent>
0077 </xs:complexType>
0078
0079 <xs:simpleType name="catalogname">
0080 <xs:restriction base="xs:string">
0081 <xs:pattern value="[0-9]{13}" />
0082 </xs:restriction>
0083 </xs:simpleType>
0084
0085 <xs:simpleType name="isrcname">
0086 <xs:restriction base="xs:string">
0087 <xs:pattern value="[A-Z0-9]{5}[0-9]{7}" />
0088 </xs:restriction>
0089 </xs:simpleType>
0090
0091
0092
0093 <!-- THE IMAGE DEFINITION -->
0094
0095 <xs:element name="image">
0096 <xs:complexType>
0097 <xs:sequence>
0098 <!-- Number of session for convinience -->
0099 <xs:element name="numsessions" type="xs:positiveInteger" />
0100
0101 <!-- Number of tracks for convinience -->
0102 <xs:element name="numtracks" type="xs:positiveInteger" />
0103
0104 <!-- CD-TEXT is always stored in binary form -->
0105 <xs:element name="cdtext" type="filecontents" minOccurs="0" />
0106
0107 <!-- The optional catalog name. -->
0108 <xs:element name="catalog" type="catalogname" minOccurs="0" />
0109
0110 <!-- The tracks are split into sessions. In most cases there will only be one session. -->
0111 <xs:element name="session" maxOccurs="99"> <!-- FIXME: what is the real max here? -->
0112 <xs:complexType>
0113 <xs:sequence>
0114 <!-- Number of tracks in this session for convinience -->
0115 <xs:element name="numtracks" type="xs:positiveInteger" />
0116
0117 <!-- And here come the tracks. -->
0118 <xs:element name="track" maxOccurs="99">
0119 <xs:complexType>
0120 <xs:sequence>
0121 <!-- The data tag contains file elements specifying where to find the data for the track.
0122 The data may span over multiple files but all need to have the same sector size. -->
0123 <xs:element name="data" minOccurs="1" maxOccurs="1">
0124 <xs:complexType>
0125 <xs:sequence>
0126 <xs:element name="file" type="filecontents" />
0127 </xs:sequence>
0128 <xs:attribute name="sectorsize" type="sector_size" />
0129 </xs:complexType>
0130 </xs:element>
0131
0132 <!-- The index tag contains the start sector of the index relative to the start of the track. -->
0133 <xs:element name="index" minOccurs="0" maxOccurs="100">
0134 <xs:complexType>
0135 <xs:simpleContent>
0136 <xs:extension base="xs:nonNegativeInteger">
0137 <xs:attribute name="number" type="xs:nonNegativeInteger" />
0138 </xs:extension>
0139 </xs:simpleContent>
0140 </xs:complexType>
0141 </xs:element>
0142
0143 <!-- Pre emphasis. -->
0144 <xs:element name="preemp" type="xs:boolean" minOccurs="0" default="false" />
0145
0146 <!-- Copy permitted. -->
0147 <xs:element name="copy" type="xs:boolean" minOccurs="0" default="true" />
0148
0149 <!-- SCMS enabled (alternating copy control bit). Only useful in combination with
0150 copy=true. -->
0151 <xs:element name="scms" type="xs:boolean" minOccurs="0" default="false" />
0152
0153 <xs:element name="isrc" type="isrcname" minOccurs="0" />
0154 </xs:sequence>
0155
0156 <!-- The track number for convinience. -->
0157 <xs:attribute name="number" type="xs:positiveInteger" />
0158
0159 <!-- Type of the track as defined above. -->
0160 <xs:attribute name="type" type="tracktype" />
0161 </xs:complexType>
0162 </xs:element>
0163 </xs:sequence>
0164
0165 <!-- The session number for convinience. There is one special case in which the first session's number may be
0166 bigger than 1. It is used internally by K3b to indicate that the image contains a session to be appended
0167 to a multisession CD or DVD. It cannot be used in another situation since the data does only fit for the
0168 multisession CD or DVD it was created for. -->
0169 <xs:attribute name="number" type="xs:positiveInteger" />
0170 </xs:complexType>
0171 </xs:element>
0172 </xs:sequence>
0173 </xs:complexType>
0174 </xs:element>
0175 </xs:schema>