Subversion Repositories Scribus

Rev

Rev 8374 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
8374 malex 1
<?xml version="1.0" encoding="UTF-8" ?>
2
<!--
3
Main Scribus DTD, Version 0.99.1
4
 
5
Copyright 2005, 2006 Oleksandr Moskalenko <malex@tagancha.org> and the Scribus
6
Development Team.
7
 
8
This DTD and its accompanying documentation are free software; you can
9
redistribute and/or modify them under the terms of the GNU General Public
10
License as published by the Free Software Foundation; either version 2 of the
11
License, or (at your option) any later version.
12
 
13
This software is distributed in the hope that it will be useful, but WITHOUT
14
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15
FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
16
details.
17
 
18
You should have received a copy of the GNU General Public License along with
19
this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
20
St, Fifth Floor, Boston, MA  02110-1301 USA
21
 
22
This is the DTD for Scribus, the Open Document Layout Software. Its primary
23
use is to describe the file format of Scribus.
24
 
25
All elements declared by this DTD are in the http://scribus.tagancha.org/xml
26
namespace.
27
 
28
Documents adhering to this DTD should have the root element "scribus".
29
 
30
This DTD is identified by the following PUBLIC and SYSTEM identifiers:
31
 
32
    PUBLIC "-//Scribus//DTD File Format//EN"
33
    SYSTEM "http://scribus.tagancha.org/xml/scribus.dtd"
34
A local copy identifier for the SYSTEM ID is, for example:
35
    <!DOCTYPE scribus PUBLIC "-//Scribus//DTD File Format//EN" "scribus.dtd">
36
 
37
For more information see http://scribus.tagancha.org/xml/
38
-->
39
 
40
<!-- Parsed entities that are used in many declarations -->
41
<!-- Object origin, e.g. ltop="Left Top corner" and so on. -->
42
<!ENTITY % origin "(ltop | rtop | lbottom | rbottom | center) 'ltop'">
43
<!-- Object origin co-ordinates on the horizontal axis. Default value reflects
44
the default units "pt". It is a real number of a form that depends on the
45
unit. -->
46
<!ENTITY % xorigin "xorigin CDATA '40'">
47
<!-- Object origin co-ordinates on the vertical axis. Default value reflects
48
the default units "pt". It is a real number of a form that depends on the
49
unit. -->
50
<!ENTITY % yorigin "yorigin CDATA '40'">
51
<!-- Measurement units currently include pt (Points), px (Pixels), pica
52
(Picas), in (Inches, mm (Millimeters), cm (Centimeters), c (Ciceros).
53
Wikipedia:
54
    Point, in typography, may also refer to a dot grapheme (e.g.: full stop;
55
middle dot) as in the expression, 'decimal point'. A point is a unit of
56
measure in typography (Abbreviated as "pt"). There are various sorts of
57
points, used in particular locations and times:
58
  * Fournier point: the first definition of the printer's point, by Pierre
59
Fournier. It was 0.34882 millimetres, which was 1/12 of a cicero.
60
  * Didot point: the French typesetting point defined by Francois-Ambroise
61
Didot in the 18th century. It equals 0.37597 mm, which are 1/72 of a French
62
royal inch (pouce).
63
  * Berthold point: an attempt to create a point with a metric definition.
64
0.37593 mm or 1/2660 of a metre.
65
  * German Didot point: defined in 1954 as 0.376065 mm. This is the standard
66
Didot point now used in Europe (unless replaced by metric typographic units).
67
  * American printer's point: defined as 0.013837in or 0.35145 mm by Nelson
68
Hawks in 1879.
69
  * PostScript point or computer point (now the universal point in
70
computers): defined as 1/72 of an English inch or 0.35277 mm by Warnock and
71
Geschke, the inventors of Adobe PostScript.
72
  The point is the standard unit for measuring font size and leading and other
73
minute items on a printed page. Twelve points make up a pica, there are 72
74
points in an inch (The actual visible size of 1 Inch high text is around
75
96pt), or 6 picas in an inch, a point is 1/12 of a pica. A measurement in
76
picas is usually represented by placing a small p after the number of picas.
77
"10 picas" is thus abbreviated 10p. Likewise, points are represented by
78
placing the number of points after a small p, such as 0p5 for "5 points," 6p2
79
for "6 picas and 2 points," or 1p1 for "13 points" which is converted to a
80
mixed fraction of 1 pica and 1 point.
81
    Pixel (pix, 1932 abbreviation of pictures, coined by Variety headline
82
writers + element) is one of the many tiny dots that make up the
83
representation of a picture in a computer's memory. Each such information
84
element is not really a dot, nor a square, but an abstract sample. With care,
85
pixels in an image can be reproduced at any size without the appearance of
86
visible dots or squares; but in many contexts, they are reproduced as dots or
87
squares and can be visibly distinct when not fine enough. The intensity of
88
each pixel is variable; in color systems, each pixel has typically three or
89
four dimensions of variability such and Red, Green and Blue, or Cyan, Magenta,
90
Yellow and Black.
91
    Pica is a unit of measure traditionally used in document layout. A pica
92
measures 1/6 of an inch, or about 4.2333 millimeters, and is used to measure
93
the size of blocks of type, margins, and other macroscopic elements of page
94
layout. 1/12 of a pica is a point, which is the standard unit for measuring
95
font size and leading. There are 72 points in an inch, or 6 picas in an inch.
96
A measurement in picas is usually represented by placing a small letter p
97
after the number of picas. "10 picas" is thus abbreviated to "10p". Likewise,
98
points are represented by placing the number of points after a small p, such
99
as 0p5 for "5 points," 6p2 for "6 picas and 2 points," or 1p1 for "13 points"
100
which is converted to a mixed fraction of 1 pica and 1 point.
101
    Inch is an Imperial and U.S. customary unit of length. Sweden also briefly
102
had a "decimal inch" based on the metric system: see below for more. According
103
to some sources, the inch was originally defined informally as the distance
104
between the tip of the thumb and the first joint of the thumb. Another source
105
says that the inch was at one time defined in terms of the yard, supposedly
106
defined as the distance between Henry I of England's nose and his thumb. In
107
another version, the inch was defined as the length of three barleycorns.
108
There are twelve inches in a foot, and three feet in a yard. The word for
109
"inch" is similar to or the same as the word for "thumb" in some languages.
110
French: pouce inch, pouce thumb; Italian: pollice inch, pollice thumb;
111
Spanish: pulgada inch, pulgar thumb; Portuguese: polegada inch, polegar thumb;
112
Swedish: tum inch, tumme thumb; Dutch: duim inch, duim thumb; Sanskrit:
113
Angulam inch, Anguli Finger.
114
    Millimeter is 1/1000 of a meter in the Metric system.
115
    Centimeter is 1/100 of a meter in the Metric system.
116
    Cicero is a unit of measure traditionally used in document layout. The
117
cicero was originally part of a point-based system developed by Francois
118
Ambroise Didot around 1780, measuring 1 / 6 of a French inch, and was composed
119
of 12 points. The French inch was larger than the one used to calibrate the
120
pica; there are about 1.061 cicero in a pica. In 1973, the cicero was
121
metrically standardized at 4.5 mm.
122
-->
123
<!ENTITY % unit  "(pt | px | pica | in | mm | cm | c) 'pt'">
124
<!-- unit is a general concept, so we use separate elements for sizeunit and
125
originunit, which can be set differently by the user. -->
126
<!ENTITY % sizeunit "sizeunit %unit;">
127
<!-- unit is a general concept, so we use separate elements for sizeunit and
128
originunit, which can be set differently by the user. -->
129
<!ENTITY % originunit "originunit %unit;">
130
<!-- Text styles DTD. See the file "style.ent" for more information. Here we
131
include that file through a parameter entity "style". -->
132
<!ENTITY % style SYSTEM "style.ent">
133
%style;
134
<!-- Graphics notations - defines various image types we support. See the file
135
"notations.ent" for more information. Here we include that file through a
136
parameter entity "notations".-->
137
<!ENTITY % notations SYSTEM 'notations.ent'>
138
%notations;
139
<!-- Namespaces defines various public namespaces we use. See the file
140
"namespaces.ent" for more information. Here we include that file through a
141
parameter entity "namespaces".-->
142
<!ENTITY % namespaces SYSTEM 'namespaces.ent'>
143
%namespaces;
144
<!-- Consolidate the canvas and page objects -->
145
<!ENTITY % pageobjectlist "imgframeobj*,textframeobj*,tableobj*,svgobject*,epsobject*">
146
<!ENTITY % canvasobjectlist "imgframe*,textframe*,table*,svgobject*,epsobject*">
147
 
148
<!-- Root element of a Scribus document. Contains all other elments, but only
149
"canvas" on which we put EVERYTHING else can be its child. -->
150
<!ELEMENT scribus (metadata,settings,colors,styles,canvas+,content*)>
151
 
152
<!-- This is a soup of various metadata RDFs like Dublin Core, etc. I don't
153
know how to make xmllint cope with the namespaces yet, so its contents are
154
going to be commented out during the work on this DTD -->
155
<!ELEMENT metadata ANY>
156
 
157
<!-- Options presented in the new document dialog -->
158
<!ELEMENT settings EMPTY>
159
<!ATTLIST settings  default-page-size CDATA "A4"
160
                    default-page-orientation CDATA "Portrait"
161
                    default-page-width CDATA #IMPLIED
162
                    default-page-height CDATA #IMPLIED
163
                    default-unit %unit;
164
                    facing-pages (yes | no) "no"
165
                    left-page-first (yes | no) "no"
166
                    first-page-number CDATA "1"
167
                    automatic-text-frames (yes | no) "no"
168
                    margin-guide-left CDATA "40"
169
                    margin-guide-right CDATA "40"
170
                    margin-guide-top CDATA "40"
171
                    margin-guide-bottom CDATA "40"
172
                    columns CDATA "1"
173
                    column-gap CDATA "11"
174
>
175
 
176
<!-- Colors used in the document. This is a subset of the system-wide color sets -->
177
<!ELEMENT colors (color)*>
178
 
179
<!-- Individual color data. Example:
180
<color register="0" spot="0" rgb="#f0f8ff" cmyk="#0f070000" name="AliceBlue" />
181
 -->
182
<!ELEMENT color EMPTY>
183
<!ATTLIST color color-register CDATA "0"
184
                color-spot CDATA "0"
185
                color-rgb CDATA #IMPLIED
186
                color-cmyk CDATA #IMPLIED
187
                color-name CDATA #IMPLIED
188
>
189
 
190
<!-- Paragraph and Text styles -->
191
<!ELEMENT styles (par-style*,txt-style*,table-style*,table-cellstyle*)>
192
 
193
<!-- This is the main canvas of a Scribus document. All pages will be placed
194
onto it. We can also have crop marks and guides there. It might later include
195
scratch space and other objects. At first let's leave it as a container for
196
pages with some markings for positioning.-->
197
<!ELEMENT canvas (canvasobjects*,scratchspace*,page*,cropmark*,guide*,%canvasobjectlist;)>
198
<!ATTLIST canvas    id ID #REQUIRED
199
                    width CDATA "8.5"
200
                    height CDATA "11.0"
201
                    %sizeunit;
202
>
203
 
204
<!-- This is the main content container. It encompasses content objects for
205
text and graphics and serves as a binding link between layout and content. -->
206
<!ELEMENT content (textcontent*,svgcontent*,epscontent*)>
207
 
208
<!-- Scratch space on the canvas is represented as a pseudo-page with a single
209
layer. So, this part of the canvas becomes equal to a page as a container. -->
210
<!ELEMENT scratchspace (%pageobjectlist;)>
211
<!ATTLIST scratchspace id ID #REQUIRED
212
                    canvasid IDREF #REQUIRED
213
                    visible (yes | no) "yes"
214
                    printable (yes | no) "no"
215
>
216
 
217
<!-- <!ATTLIST canvasobjects> -->
218
<!ELEMENT canvasobjects (%canvasobjectlist;)>
219
 
220
<!-- Main container into which visible objects are placed on layer canvasses.
221
Contains global non-layered elements such as guides, baseline grid, crop
222
marks. -->
223
<!ELEMENT page (guide*,cropmark*,layer+)>
224
<!ATTLIST page      id ID #REQUIRED
225
                    number CDATA #IMPLIED
226
                    width CDATA "8.5"
227
                    height CDATA "11.0"
228
                    %sizeunit;
229
                    canvasorigin %origin;
230
                    %xorigin;
231
                    %yorigin;
232
                    %originunit;
233
                    orientation (portrait | landscape) "portrait"
234
>
235
 
236
<!-- Main canvas on which visible objects are placed. Use can0 type id values.-->
237
<!ELEMENT layer (%pageobjectlist;)>
238
<!ATTLIST layer     id ID #REQUIRED
239
                    name CDATA #REQUIRED
240
                    level CDATA #REQUIRED
241
                    visible (yes | no) "yes"
242
                    printable (yes | no) "yes"
243
>
244
 
245
<!-- Main container for raster images. Use fimg0 type id values.-->
246
<!ELEMENT imgframe (img*)>
247
<!-- Scale is in fractions: 1=100% -->
248
<!ATTLIST imgframe id ID #REQUIRED
249
                    text-frame-id IDREF #IMPLIED
250
                    width CDATA "200"
251
                    height CDATA "200"
252
                    canvasorigin %origin;
253
                    %sizeunit;
254
                    %xorigin;
255
                    %yorigin;
256
                    %originunit;
257
                    rotation CDATA "0"
258
                    basepoint %origin;
259
                    printable (yes | no) "yes"
260
                    locked (yes | no) "no"
261
                    size-locked (yes | no) "no"
262
                    round-corners CDATA "0"
263
                    level CDATA "0"
264
                    text-flows-around (yes | no) "no"
265
                    use-bounding-box (yes | no) "no"
266
                    use-contour-line (yes | no) "no"
267
                    line-color CDATA "none"
268
                    fill-color CDATA "none"
269
                    image-scale-frame-size (yes | no) "yes"
270
                    image-scale-proportional (yes | no) "yes"
271
                    image-x-position CDATA "0"
272
                    image-y-position CDATA "0"
273
                    image-x-scale CDATA "1"
274
                    image-y-scale CDATA "1"
275
                    image-x-dpi CDATA "72"
276
                    image-y-dpi CDATA "72"
277
>
278
 
279
<!ELEMENT imgframeobj EMPTY>
280
<!ATTLIST imgframeobj idref IDREF #REQUIRED>
281
 
282
<!ELEMENT img ANY>
283
<!ATTLIST img       id ID #REQUIRED
284
                    src ENTITY #REQUIRED
285
                    type NOTATION (png | jpg | jpeg | tiff) "tiff"
286
                    width CDATA #REQUIRED
287
                    height CDATA #REQUIRED
288
                    %sizeunit;
289
                    vresolution CDATA #REQUIRED
290
                    hresolution CDATA #REQUIRED
291
                    colorspace (rgb | cmyk | lab | greyscale ) "rgb"
292
                    color-depth (1 | 8 | 16 | 24 | 32 | 48) "8"
293
                    icc-profile CDATA #IMPLIED
294
                    rendering-intent-printer (Perceptual | Relative-Colorimetric | Saturation | Absolute-Colorimetric) #IMPLIED
295
>
296
 
297
<!-- Main container for text. Use ftxt0 type id values. -->
298
<!ELEMENT textframe ((textcontentobj)* | (%pageobjectlist;)*)* >
299
<!ATTLIST textframe id ID #REQUIRED
300
                    nextframeid IDREF #IMPLIED
301
                    width CDATA "200"
302
                    height CDATA "200"
303
                    %sizeunit;
304
                    canvasorigin %origin;
305
                    %xorigin;
306
                    %yorigin;
307
                    %originunit;
308
                    rotation CDATA "0"
309
                    basepoint %origin;
310
                    printable (yes | no) "yes"
311
                    locked (yes | no) "no"
312
                    size-locked (yes | no) "no"
313
                    round-corners CDATA "0"
314
                    columnnumber CDATA "1"
315
                    columngap CDATA "0"
316
                    topdistance CDATA "0"
317
                    bottomdistance CDATA "0"
318
                    leftdistance CDATA "0"
319
                    righttdistance CDATA "0"
320
                    level CDATA "0"
321
                    text-flows-around (yes | no) "no"
322
                    use-bounding-box (yes | no) "no"
323
                    use-contour-line (yes | no) "no"
324
                    line-color CDATA "none"
325
                    fill-color CDATA "none"
326
>
327
 
328
<!-- svgobject is the object that contains an SVG graphic. It has properties
329
similar to text and image frames on a page and on the canvas. -->
330
<!ELEMENT svgobject (svgcontentobj)+>
331
<!ATTLIST svgobject id ID #REQUIRED
332
                    width CDATA "200"
333
                    height CDATA "200"
334
                    %sizeunit;
335
                    canvasorigin %origin;
336
                    %xorigin;
337
                    %yorigin;
338
                    %originunit;
339
                    rotation CDATA "0"
340
                    basepoint %origin;
341
                    printable (yes | no) "yes"
342
                    level CDATA "0"
343
>
344
 
345
<!-- epsobject is the object that contains encapsulated postscript. It has properties
346
similar to text and image frames on a page and on the canvas. -->
347
<!ELEMENT epsobject (epscontentobj)+>
348
<!ATTLIST epsobject id ID #REQUIRED
349
                    width CDATA "200"
350
                    height CDATA "200"
351
                    %sizeunit;
352
                    canvasorigin %origin;
353
                    %xorigin;
354
                    %yorigin;
355
                    %originunit;
356
                    rotation CDATA "0"
357
                    basepoint %origin;
358
                    printable (yes | no) "yes"
359
                    level CDATA "0"
360
>
361
 
362
<!ELEMENT textframeobj EMPTY>
363
<!ATTLIST textframeobj idref IDREF #REQUIRED>
364
 
365
<!-- Abstraction layer for text blocks inside a text frame. -->
8397 avox 366
<!ELEMENT textcontent parstyle (p)+>
8374 malex 367
<!ATTLIST textcontent id ID #REQUIRED>
368
 
369
<!-- References "textcontent". -->
370
<!ELEMENT textcontentobj EMPTY>
371
<!ATTLIST textcontentobj idref IDREF #REQUIRED>
372
 
8397 avox 373
<!ELEMENT p parstyle (span)+
8374 malex 374
<!-- Lowest level block unit of text. Add a mathexpression later when MathML dtd is
375
referenced properly. Use "id" values like par0. We need an id for the
376
paragraph to make it the atomic unit for change tracking and undo for example. -->
8397 avox 377
<!ELEMENT span txtstyle (text|inlineframe|breakline|breakcolumn|breakframe|tab|pagenr)*>
8374 malex 378
>
379
 
380
 
381
<!-- Use any printable character for tab alignment -->
382
<!ELEMENT tab EMPTY>
383
<!ATTLIST tab parid IDREF #REQUIRED
384
              location CDATA #REQUIRED
385
              spacing CDATA "10"
386
              spacing-unit %unit;
387
              type (left|right|center|decimal|comma|char) "left"
388
              tabchar CDATA #IMPLIED
389
>
390
 
391
<!ELEMENT table (table-caption?,table-row+)>
392
<!ATTLIST table id ID #REQUIRED
393
                table-style IDREF #REQUIRED
394
                canvasorigin %origin;
395
                %xorigin;
396
                %yorigin;
397
                %originunit;
398
                width CDATA "100"
399
                height CDATA "150"
400
                %sizeunit;
401
                basepoint %origin;
402
                rotation CDATA "0"
403
                printable (yes | no) "yes"
404
                locked (yes | no) "no"
405
                size-locked (yes | no) "no"
406
                round-corners CDATA "0"
407
                columnnumber CDATA #IMPLIED
408
                rownumber CDATA #IMPLIED
409
                level CDATA "0"
410
                text-flows-around (yes | no) "no"
411
                use-bounding-box (yes | no) "no"
412
                use-contour-line (yes | no) "no"
413
                line-color CDATA "none"
414
                fill-color CDATA "none"
415
>
416
 
417
<!ELEMENT tableobj EMPTY>
418
<!ATTLIST tableobj idref IDREF #REQUIRED>
419
 
420
<!ELEMENT table-caption (textcontentobj*)>
421
 
422
<!ELEMENT table-row (table-cell+)>
423
 
424
<!ELEMENT table-cell (textcontentobj*)>
425
<!ATTLIST table-cell table-cellstyle IDREF #REQUIRED
426
                     rowspan CDATA "1"
427
                     colspan CDATA "1"
428
>
429
 
430
<!-- Glue between the layout element svgobject and the content object
431
svgcontent -->
432
<!ELEMENT svgcontentobj EMPTY>
433
<!ATTLIST svgcontentobj idref IDREF #REQUIRED>
434
 
435
<!-- Glue between the layout element epsobject and the content object
436
epscontent -->
437
<!ELEMENT epscontentobj EMPTY>
438
<!ATTLIST epscontentobj idref IDREF #REQUIRED>
439
 
440
<!-- Content element svgcontent, which contains at least one standard <svg>
441
-->
442
<!ELEMENT svgcontent (svg)+>
443
<!ATTLIST svgcontent id ID #REQUIRED>
444
 
445
<!-- Due to the namespace validation problem svg should currently be allowed
446
to contain anything. -->
447
<!ELEMENT svg ANY>
448
 
449
<!-- Content element epscontent, which contains at least one standard <eps>
450
-->
451
<!ELEMENT epscontent (eps)+>
452
<!ATTLIST epscontent id ID #REQUIRED>
453
 
454
<!-- Due to the namespace validation problem eps should currently be allowed
455
to contain anything. -->
456
<!ELEMENT eps ANY>