2
%%Creator: dvips(k) 5.86 Copyright 1999 Radical Eye Software
5
%%BoundingBox: 0 0 596 842
6
%%DocumentFonts: Helvetica-Bold Times-Roman Times-Bold Times-Italic
7
%%+ Courier Courier-Oblique Helvetica-BoldOblique Courier-Bold
8
%%DocumentPaperSizes: a4
10
%DVIPSWebPage: (www.radicaleye.com)
11
%DVIPSCommandLine: dvips -f
12
%DVIPSParameters: dpi=600, compressed
13
%DVIPSSource: TeX output 2001.12.19:2219
14
%%BeginProcSet: texc.pro
16
/TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S
17
N}B/A{dup}B/TR{translate}N/isls false N/vsize 11 72 mul N/hsize 8.5 72
18
mul N/landplus90{false}def/@rigin{isls{[0 landplus90{1 -1}{-1 1}ifelse 0
19
0 0]concat}if 72 Resolution div 72 VResolution div neg scale isls{
20
landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div hsize
21
mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul TR[
22
matrix currentmatrix{A A round sub abs 0.00001 lt{round}if}forall round
23
exch round exch]setmatrix}N/@landscape{/isls true N}B/@manualfeed{
24
statusdict/manualfeed true put}B/@copies{/#copies X}B/FMat[1 0 0 -1 0 0]
25
N/FBB[0 0 0 0]N/nn 0 N/IEn 0 N/ctr 0 N/df-tail{/nn 8 dict N nn begin
26
/FontType 3 N/FontMatrix fntrx N/FontBBox FBB N string/base X array
27
/BitMaps X/BuildChar{CharBuilder}N/Encoding IEn N end A{/foo setfont}2
28
array copy cvx N load 0 nn put/ctr 0 N[}B/sf 0 N/df{/sf 1 N/fntrx FMat N
29
df-tail}B/dfs{div/sf X/fntrx[sf 0 0 sf neg 0 0]N df-tail}B/E{pop nn A
30
definefont setfont}B/Cw{Cd A length 5 sub get}B/Ch{Cd A length 4 sub get
31
}B/Cx{128 Cd A length 3 sub get sub}B/Cy{Cd A length 2 sub get 127 sub}
32
B/Cdx{Cd A length 1 sub get}B/Ci{Cd A type/stringtype ne{ctr get/ctr ctr
33
1 add N}if}B/id 0 N/rw 0 N/rc 0 N/gp 0 N/cp 0 N/G 0 N/CharBuilder{save 3
34
1 roll S A/base get 2 index get S/BitMaps get S get/Cd X pop/ctr 0 N Cdx
35
0 Cx Cy Ch sub Cx Cw add Cy setcachedevice Cw Ch true[1 0 0 -1 -.1 Cx
36
sub Cy .1 sub]/id Ci N/rw Cw 7 add 8 idiv string N/rc 0 N/gp 0 N/cp 0 N{
37
rc 0 ne{rc 1 sub/rc X rw}{G}ifelse}imagemask restore}B/G{{id gp get/gp
38
gp 1 add N A 18 mod S 18 idiv pl S get exec}loop}B/adv{cp add/cp X}B
39
/chg{rw cp id gp 4 index getinterval putinterval A gp add/gp X adv}B/nd{
40
/cp 0 N rw exit}B/lsh{rw cp 2 copy get A 0 eq{pop 1}{A 255 eq{pop 254}{
41
A A add 255 and S 1 and or}ifelse}ifelse put 1 adv}B/rsh{rw cp 2 copy
42
get A 0 eq{pop 128}{A 255 eq{pop 127}{A 2 idiv S 128 and or}ifelse}
43
ifelse put 1 adv}B/clr{rw cp 2 index string putinterval adv}B/set{rw cp
44
fillstr 0 4 index getinterval putinterval adv}B/fillstr 18 string 0 1 17
45
{2 copy 255 put pop}for N/pl[{adv 1 chg}{adv 1 chg nd}{1 add chg}{1 add
46
chg nd}{adv lsh}{adv lsh nd}{adv rsh}{adv rsh nd}{1 add adv}{/rc X nd}{
47
1 add set}{1 add clr}{adv 2 chg}{adv 2 chg nd}{pop nd}]A{bind pop}
48
forall N/D{/cc X A type/stringtype ne{]}if nn/base get cc ctr put nn
49
/BitMaps get S ctr S sf 1 ne{A A length 1 sub A 2 index S get sf div put
50
}if put/ctr ctr 1 add N}B/I{cc 1 add D}B/bop{userdict/bop-hook known{
51
bop-hook}if/SI save N @rigin 0 0 moveto/V matrix currentmatrix A 1 get A
52
mul exch 0 get A mul add .99 lt{/QV}{/RV}ifelse load def pop pop}N/eop{
53
SI restore userdict/eop-hook known{eop-hook}if showpage}N/@start{
54
userdict/start-hook known{start-hook}if pop/VResolution X/Resolution X
55
1000 div/DVImag X/IEn 256 array N 2 string 0 1 255{IEn S A 360 add 36 4
56
index cvrs cvn put}for pop 65781.76 div/vsize X 65781.76 div/hsize X}N
57
/p{show}N/RMat[1 0 0 -1 0 0]N/BDot 260 string N/Rx 0 N/Ry 0 N/V{}B/RV/v{
58
/Ry X/Rx X V}B statusdict begin/product where{pop false[(Display)(NeXT)
59
(LaserWriter 16/600)]{A length product length le{A length product exch 0
60
exch getinterval eq{pop true exit}if}{pop}ifelse}forall}{false}ifelse
61
end{{gsave TR -.1 .1 TR 1 1 scale Rx Ry false RMat{BDot}imagemask
62
grestore}}{{gsave TR -.1 .1 TR Rx Ry scale 1 1 false RMat{BDot}
63
imagemask grestore}}ifelse B/QV{gsave newpath transform round exch round
64
exch itransform moveto Rx 0 rlineto 0 Ry neg rlineto Rx neg 0 rlineto
65
fill grestore}B/a{moveto}B/delta 0 N/tail{A/delta X 0 rmoveto}B/M{S p
66
delta add tail}B/b{S p tail}B/c{-4 M}B/d{-3 M}B/e{-2 M}B/f{-1 M}B/g{0 M}
67
B/h{1 M}B/i{2 M}B/j{3 M}B/k{4 M}B/w{0 rmoveto}B/l{p -4 w}B/m{p -3 w}B/n{
68
p -2 w}B/o{p -1 w}B/q{p 1 w}B/r{p 2 w}B/s{p 3 w}B/t{p 4 w}B/x{0 S
69
rmoveto}B/y{3 2 roll p a}B/bos{/SS save N}B/eos{SS restore}B end
72
%%BeginProcSet: 8r.enc
74
% author = "S. Rahtz, P. MacKay, Alan Jeffrey, B. Horn, K. Berry",
76
% date = "1 July 1998",
77
% filename = "8r.enc",
78
% email = "tex-fonts@@tug.org",
79
% docstring = "Encoding for TrueType or Type 1 fonts
80
% to be used with TeX."
83
% Idea is to have all the characters normally included in Type 1 fonts
84
% available for typesetting. This is effectively the characters in Adobe
85
% Standard Encoding + ISO Latin 1 + extra characters from Lucida.
87
% Character code assignments were made as follows:
89
% (1) the Windows ANSI characters are almost all in their Windows ANSI
90
% positions, because some Windows users cannot easily reencode the
91
% fonts, and it makes no difference on other systems. The only Windows
92
% ANSI characters not available are those that make no sense for
93
% typesetting -- rubout (127 decimal), nobreakspace (160), softhyphen
94
% (173). quotesingle and grave are moved just because it's such an
95
% irritation not having them in TeX positions.
97
% (2) Remaining characters are assigned arbitrarily to the lower part
98
% of the range, avoiding 0, 10 and 13 in case we meet dumb software.
100
% (3) Y&Y Lucida Bright includes some extra text characters; in the
101
% hopes that other PostScript fonts, perhaps created for public
102
% consumption, will include them, they are included starting at 0x12.
104
% (4) Remaining positions left undefined are for use in (hopefully)
105
% upward-compatible revisions, if someday more characters are generally
108
% (5) hyphen appears twice for compatibility with both
112
% 0x00 (encoded characters from Adobe Standard not in Windows 3.1)
113
/.notdef /dotaccent /fi /fl
114
/fraction /hungarumlaut /Lslash /lslash
115
/ogonek /ring /.notdef
116
/breve /minus /.notdef
117
% These are the only two remaining unencoded characters, so may as
122
% (unusual TeX characters available in, e.g., Lucida Bright)
123
/dotlessj /ff /ffi /ffl
124
/.notdef /.notdef /.notdef /.notdef
125
/.notdef /.notdef /.notdef /.notdef
126
% very contentious; it's so painful not having quoteleft and quoteright
127
% at 96 and 145 that we move the things normally found there to here.
129
% 0x20 (ASCII begins)
130
/space /exclam /quotedbl /numbersign
131
/dollar /percent /ampersand /quoteright
132
/parenleft /parenright /asterisk /plus /comma /hyphen /period /slash
134
/zero /one /two /three /four /five /six /seven
135
/eight /nine /colon /semicolon /less /equal /greater /question
137
/at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O
139
/P /Q /R /S /T /U /V /W
140
/X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore
142
/quoteleft /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o
144
/p /q /r /s /t /u /v /w
145
/x /y /z /braceleft /bar /braceright /asciitilde
146
/.notdef % rubout; ASCII ends
148
/.notdef /.notdef /quotesinglbase /florin
149
/quotedblbase /ellipsis /dagger /daggerdbl
150
/circumflex /perthousand /Scaron /guilsinglleft
151
/OE /.notdef /.notdef /.notdef
153
/.notdef /.notdef /.notdef /quotedblleft
154
/quotedblright /bullet /endash /emdash
155
/tilde /trademark /scaron /guilsinglright
156
/oe /.notdef /.notdef /Ydieresis
158
/.notdef % nobreakspace
159
/exclamdown /cent /sterling
160
/currency /yen /brokenbar /section
161
/dieresis /copyright /ordfeminine /guillemotleft
163
/hyphen % Y&Y (also at 45); Windows' softhyphen
167
/degree /plusminus /twosuperior /threesuperior
168
/acute /mu /paragraph /periodcentered
169
/cedilla /onesuperior /ordmasculine /guillemotright
170
/onequarter /onehalf /threequarters /questiondown
172
/Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla
173
/Egrave /Eacute /Ecircumflex /Edieresis
174
/Igrave /Iacute /Icircumflex /Idieresis
176
/Eth /Ntilde /Ograve /Oacute
177
/Ocircumflex /Otilde /Odieresis /multiply
178
/Oslash /Ugrave /Uacute /Ucircumflex
179
/Udieresis /Yacute /Thorn /germandbls
181
/agrave /aacute /acircumflex /atilde
182
/adieresis /aring /ae /ccedilla
183
/egrave /eacute /ecircumflex /edieresis
184
/igrave /iacute /icircumflex /idieresis
186
/eth /ntilde /ograve /oacute
187
/ocircumflex /otilde /odieresis /divide
188
/oslash /ugrave /uacute /ucircumflex
189
/udieresis /yacute /thorn /ydieresis
193
%%BeginProcSet: texps.pro
195
TeXDict begin/rf{findfont dup length 1 add dict begin{1 index/FID ne 2
196
index/UniqueID ne and{def}{pop pop}ifelse}forall[1 index 0 6 -1 roll
197
exec 0 exch 5 -1 roll VResolution Resolution div mul neg 0 0]/Metrics
198
exch def dict begin Encoding{exch dup type/integertype ne{pop pop 1 sub
199
dup 0 le{pop}{[}ifelse}{FontMatrix 0 get div Metrics 0 get div def}
200
ifelse}forall Metrics/Metrics currentdict end def[2 index currentdict
201
end definefont 3 -1 roll makefont/setfont cvx]cvx def}def/ObliqueSlant{
202
dup sin S cos div neg}B/SlantFont{4 index mul add}def/ExtendFont{3 -1
203
roll mul exch}def/ReEncodeFont{CharStrings rcheck{/Encoding false def
204
dup[exch{dup CharStrings exch known not{pop/.notdef/Encoding true def}
205
if}forall Encoding{]exch pop}{cleartomark}ifelse}if/Encoding exch def}
209
%%BeginProcSet: special.pro
211
TeXDict begin/SDict 200 dict N SDict begin/@SpecialDefaults{/hs 612 N
212
/vs 792 N/ho 0 N/vo 0 N/hsc 1 N/vsc 1 N/ang 0 N/CLIP 0 N/rwiSeen false N
213
/rhiSeen false N/letter{}N/note{}N/a4{}N/legal{}N}B/@scaleunit 100 N
214
/@hscale{@scaleunit div/hsc X}B/@vscale{@scaleunit div/vsc X}B/@hsize{
215
/hs X/CLIP 1 N}B/@vsize{/vs X/CLIP 1 N}B/@clip{/CLIP 2 N}B/@hoffset{/ho
216
X}B/@voffset{/vo X}B/@angle{/ang X}B/@rwi{10 div/rwi X/rwiSeen true N}B
217
/@rhi{10 div/rhi X/rhiSeen true N}B/@llx{/llx X}B/@lly{/lly X}B/@urx{
218
/urx X}B/@ury{/ury X}B/magscale true def end/@MacSetUp{userdict/md known
219
{userdict/md get type/dicttype eq{userdict begin md length 10 add md
220
maxlength ge{/md md dup length 20 add dict copy def}if end md begin
221
/letter{}N/note{}N/legal{}N/od{txpose 1 0 mtx defaultmatrix dtransform S
222
atan/pa X newpath clippath mark{transform{itransform moveto}}{transform{
223
itransform lineto}}{6 -2 roll transform 6 -2 roll transform 6 -2 roll
224
transform{itransform 6 2 roll itransform 6 2 roll itransform 6 2 roll
225
curveto}}{{closepath}}pathforall newpath counttomark array astore/gc xdf
226
pop ct 39 0 put 10 fz 0 fs 2 F/|______Courier fnt invertflag{PaintBlack}
227
if}N/txpose{pxs pys scale ppr aload pop por{noflips{pop S neg S TR pop 1
228
-1 scale}if xflip yflip and{pop S neg S TR 180 rotate 1 -1 scale ppr 3
229
get ppr 1 get neg sub neg ppr 2 get ppr 0 get neg sub neg TR}if xflip
230
yflip not and{pop S neg S TR pop 180 rotate ppr 3 get ppr 1 get neg sub
231
neg 0 TR}if yflip xflip not and{ppr 1 get neg ppr 0 get neg TR}if}{
232
noflips{TR pop pop 270 rotate 1 -1 scale}if xflip yflip and{TR pop pop
233
90 rotate 1 -1 scale ppr 3 get ppr 1 get neg sub neg ppr 2 get ppr 0 get
234
neg sub neg TR}if xflip yflip not and{TR pop pop 90 rotate ppr 3 get ppr
235
1 get neg sub neg 0 TR}if yflip xflip not and{TR pop pop 270 rotate ppr
236
2 get ppr 0 get neg sub neg 0 S TR}if}ifelse scaleby96{ppr aload pop 4
237
-1 roll add 2 div 3 1 roll add 2 div 2 copy TR .96 dup scale neg S neg S
238
TR}if}N/cp{pop pop showpage pm restore}N end}if}if}N/normalscale{
239
Resolution 72 div VResolution 72 div neg scale magscale{DVImag dup scale
240
}if 0 setgray}N/psfts{S 65781.76 div N}N/startTexFig{/psf$SavedState
241
save N userdict maxlength dict begin/magscale true def normalscale
242
currentpoint TR/psf$ury psfts/psf$urx psfts/psf$lly psfts/psf$llx psfts
243
/psf$y psfts/psf$x psfts currentpoint/psf$cy X/psf$cx X/psf$sx psf$x
244
psf$urx psf$llx sub div N/psf$sy psf$y psf$ury psf$lly sub div N psf$sx
245
psf$sy scale psf$cx psf$sx div psf$llx sub psf$cy psf$sy div psf$ury sub
246
TR/showpage{}N/erasepage{}N/copypage{}N/p 3 def @MacSetUp}N/doclip{
247
psf$llx psf$lly psf$urx psf$ury currentpoint 6 2 roll newpath 4 copy 4 2
248
roll moveto 6 -1 roll S lineto S lineto S lineto closepath clip newpath
249
moveto}N/endTexFig{end psf$SavedState restore}N/@beginspecial{SDict
250
begin/SpecialSave save N gsave normalscale currentpoint TR
251
@SpecialDefaults count/ocount X/dcount countdictstack N}N/@setspecial{
252
CLIP 1 eq{newpath 0 0 moveto hs 0 rlineto 0 vs rlineto hs neg 0 rlineto
253
closepath clip}if ho vo TR hsc vsc scale ang rotate rwiSeen{rwi urx llx
254
sub div rhiSeen{rhi ury lly sub div}{dup}ifelse scale llx neg lly neg TR
255
}{rhiSeen{rhi ury lly sub div dup scale llx neg lly neg TR}if}ifelse
256
CLIP 2 eq{newpath llx lly moveto urx lly lineto urx ury lineto llx ury
257
lineto closepath clip}if/showpage{}N/erasepage{}N/copypage{}N newpath}N
258
/@endspecial{count ocount sub{pop}repeat countdictstack dcount sub{end}
259
repeat grestore SpecialSave restore end}N/@defspecial{SDict begin}N
260
/@fedspecial{end}B/li{lineto}B/rl{rlineto}B/rc{rcurveto}B/np{/SaveX
261
currentpoint/SaveY X N 1 setlinecap newpath}N/st{stroke SaveX SaveY
262
moveto}N/fil{fill SaveX SaveY moveto}N/ellipse{/endangle X/startangle X
263
/yrad X/xrad X/savematrix matrix currentmatrix N TR xrad yrad scale 0 0
264
1 startangle endangle arc savematrix setmatrix}N end
267
%%BeginProcSet: color.pro
269
TeXDict begin/setcmykcolor where{pop}{/setcmykcolor{dup 10 eq{pop
270
setrgbcolor}{1 sub 4 1 roll 3{3 index add neg dup 0 lt{pop 0}if 3 1 roll
271
}repeat setrgbcolor pop}ifelse}B}ifelse/TeXcolorcmyk{setcmykcolor}def
272
/TeXcolorrgb{setrgbcolor}def/TeXcolorgrey{setgray}def/TeXcolorgray{
273
setgray}def/TeXcolorhsb{sethsbcolor}def/currentcmykcolor where{pop}{
274
/currentcmykcolor{currentrgbcolor 10}B}ifelse/DC{exch dup userdict exch
275
known{pop pop}{X}ifelse}B/GreenYellow{0.15 0 0.69 0 setcmykcolor}DC
276
/Yellow{0 0 1 0 setcmykcolor}DC/Goldenrod{0 0.10 0.84 0 setcmykcolor}DC
277
/Dandelion{0 0.29 0.84 0 setcmykcolor}DC/Apricot{0 0.32 0.52 0
278
setcmykcolor}DC/Peach{0 0.50 0.70 0 setcmykcolor}DC/Melon{0 0.46 0.50 0
279
setcmykcolor}DC/YellowOrange{0 0.42 1 0 setcmykcolor}DC/Orange{0 0.61
280
0.87 0 setcmykcolor}DC/BurntOrange{0 0.51 1 0 setcmykcolor}DC
281
/Bittersweet{0 0.75 1 0.24 setcmykcolor}DC/RedOrange{0 0.77 0.87 0
282
setcmykcolor}DC/Mahogany{0 0.85 0.87 0.35 setcmykcolor}DC/Maroon{0 0.87
283
0.68 0.32 setcmykcolor}DC/BrickRed{0 0.89 0.94 0.28 setcmykcolor}DC/Red{
284
0 1 1 0 setcmykcolor}DC/OrangeRed{0 1 0.50 0 setcmykcolor}DC/RubineRed{
285
0 1 0.13 0 setcmykcolor}DC/WildStrawberry{0 0.96 0.39 0 setcmykcolor}DC
286
/Salmon{0 0.53 0.38 0 setcmykcolor}DC/CarnationPink{0 0.63 0 0
287
setcmykcolor}DC/Magenta{0 1 0 0 setcmykcolor}DC/VioletRed{0 0.81 0 0
288
setcmykcolor}DC/Rhodamine{0 0.82 0 0 setcmykcolor}DC/Mulberry{0.34 0.90
289
0 0.02 setcmykcolor}DC/RedViolet{0.07 0.90 0 0.34 setcmykcolor}DC
290
/Fuchsia{0.47 0.91 0 0.08 setcmykcolor}DC/Lavender{0 0.48 0 0
291
setcmykcolor}DC/Thistle{0.12 0.59 0 0 setcmykcolor}DC/Orchid{0.32 0.64 0
292
0 setcmykcolor}DC/DarkOrchid{0.40 0.80 0.20 0 setcmykcolor}DC/Purple{
293
0.45 0.86 0 0 setcmykcolor}DC/Plum{0.50 1 0 0 setcmykcolor}DC/Violet{
294
0.79 0.88 0 0 setcmykcolor}DC/RoyalPurple{0.75 0.90 0 0 setcmykcolor}DC
295
/BlueViolet{0.86 0.91 0 0.04 setcmykcolor}DC/Periwinkle{0.57 0.55 0 0
296
setcmykcolor}DC/CadetBlue{0.62 0.57 0.23 0 setcmykcolor}DC
297
/CornflowerBlue{0.65 0.13 0 0 setcmykcolor}DC/MidnightBlue{0.98 0.13 0
298
0.43 setcmykcolor}DC/NavyBlue{0.94 0.54 0 0 setcmykcolor}DC/RoyalBlue{1
299
0.50 0 0 setcmykcolor}DC/Blue{1 1 0 0 setcmykcolor}DC/Cerulean{0.94 0.11
300
0 0 setcmykcolor}DC/Cyan{1 0 0 0 setcmykcolor}DC/ProcessBlue{0.96 0 0 0
301
setcmykcolor}DC/SkyBlue{0.62 0 0.12 0 setcmykcolor}DC/Turquoise{0.85 0
302
0.20 0 setcmykcolor}DC/TealBlue{0.86 0 0.34 0.02 setcmykcolor}DC
303
/Aquamarine{0.82 0 0.30 0 setcmykcolor}DC/BlueGreen{0.85 0 0.33 0
304
setcmykcolor}DC/Emerald{1 0 0.50 0 setcmykcolor}DC/JungleGreen{0.99 0
305
0.52 0 setcmykcolor}DC/SeaGreen{0.69 0 0.50 0 setcmykcolor}DC/Green{1 0
306
1 0 setcmykcolor}DC/ForestGreen{0.91 0 0.88 0.12 setcmykcolor}DC
307
/PineGreen{0.92 0 0.59 0.25 setcmykcolor}DC/LimeGreen{0.50 0 1 0
308
setcmykcolor}DC/YellowGreen{0.44 0 0.74 0 setcmykcolor}DC/SpringGreen{
309
0.26 0 0.76 0 setcmykcolor}DC/OliveGreen{0.64 0 0.95 0.40 setcmykcolor}
310
DC/RawSienna{0 0.72 1 0.45 setcmykcolor}DC/Sepia{0 0.83 1 0.70
311
setcmykcolor}DC/Brown{0 0.81 1 0.60 setcmykcolor}DC/Tan{0.14 0.42 0.56 0
312
setcmykcolor}DC/Gray{0 0 0 0.50 setcmykcolor}DC/Black{0 0 0 1
313
setcmykcolor}DC/White{0 0 0 0 setcmykcolor}DC end
316
TeXDict begin 39158280 55380996 1000 600 600 () @start
317
/Fa 106[21 149[{TeXBase1Encoding ReEncodeFont}1 59.7758
318
/Times-Roman rf /Fb 133[45 45 45 45 45 45 45 45 45 45
319
45 45 45 45 45 45 1[45 45 45 45 45 45 45 45 45 1[45 11[45
320
83[{TeXBase1Encoding ReEncodeFont}27 74.7198 /Courier-Bold
321
rf /Fc 135[77 2[77 77 77 3[77 77 77 3[77 3[77 77 77 99[{
322
TeXBase1Encoding ReEncodeFont}11 129.116 /Courier-Bold
323
rf /Fd 134[65 65 2[65 65 65 65 1[65 65 65 65 65 2[65
324
65 65 65 65 65 65 65 65 1[65 36[65 6[65 65 65 49[{
325
TeXBase1Encoding ReEncodeFont}25 107.597 /Courier-Bold
326
rf /Fe 141[56 4[128 7[80 88 2[80 97[{TeXBase1Encoding ReEncodeFont}5
327
143.462 /Helvetica-BoldOblique rf /Ff 147[21 4[37 1[33
328
3[37 23[25 14[25 58[{TeXBase1Encoding ReEncodeFont}6
329
74.7198 /Times-Italic rf /Fg 204[25 25 25 49[{
330
TeXBase1Encoding ReEncodeFont}3 49.8132 /Times-Roman
332
%DVIPSBitmapFont: Fh cmmi8 8 2
333
/Fh 2 63 df<EE01C01607161FEE7F00ED01FCED07F0ED1FC0037FC7FCEC01FCEC07F0EC
334
0FC0023FC8FC14FCEB03F8EB0FE0EB3F8001FEC9FCEA03F8EA0FE0EA3F8000FECAFC12F8
335
12FEEA3F80EA0FE0EA03F8EA00FEEB3F80EB0FE0EB03F8EB00FC143FEC0FC0EC07F0EC01
336
FCEC007FED1FC0ED07F0ED01FCED007FEE1FC0160716012A2B7AA537>60
337
D<12E012F812FEEA3F80EA0FE0EA03F8EA00FEEB3F80EB0FE0EB03F8EB00FC143FEC0FC0
338
EC07F0EC01FCEC007FED1FC0ED07F0ED01FCED007FEE1FC01607161FEE7F00ED01FCED07
339
F0ED1FC0037FC7FCEC01FCEC07F0EC0FC0023FC8FC14FCEB03F8EB0FE0EB3F8001FEC9FC
340
EA03F8EA0FE0EA3F8000FECAFC12F812E02A2B7AA537>62 D E
342
/Fi 131[40 1[40 40 40 40 40 40 40 40 40 40 40 40 40 40
343
40 40 1[40 40 40 1[40 40 40 40 40 1[40 5[40 3[40 40 40
344
40 40 40 40 40 40 40 40 1[40 40 40 1[40 40 40 40 40 1[40
345
40 40 40 40 40 1[40 4[40 1[40 1[40 40 40 40 40 40 40
346
40 40 40 40 1[40 40 40 33[{TeXBase1Encoding ReEncodeFont}69
347
67.2479 /Courier rf /Fj 105[37 28[37 37 54 37 37 21 29
348
25 37 37 37 37 58 21 37 1[21 37 37 25 33 37 33 37 33
349
7[54 54 3[46 5[54 66 46 2[25 2[42 2[50 50 54 5[21 21
350
11[19 1[19 2[25 25 25 4[30 31[42 2[{TeXBase1Encoding ReEncodeFont}45
351
74.7198 /Times-Roman rf /Fk 135[55 7[61 2[89 28 6[55
352
3[55 27[66 69[{TeXBase1Encoding ReEncodeFont}7 99.6264
353
/Helvetica-Bold rf /Fl 145[27 2[27 57[27 49[{
354
TeXBase1Encoding ReEncodeFont}3 44.8318 /Courier-Oblique
355
rf /Fm 135[50 5[50 1[50 50 50 50 50 2[50 2[50 50 1[50
356
1[50 97[{TeXBase1Encoding ReEncodeFont}12 83.022 /Courier-Oblique
358
%DVIPSBitmapFont: Fn cmmi10 10 2
359
/Fn 2 63 df<EF0380EF0FC0173FEFFF80933803FE00EE0FF8EE3FE0EEFF80DB03FEC7FC
360
ED0FF8ED3FE0EDFF80DA03FEC8FCEC0FF8EC3FE0ECFF80D903FEC9FCEB0FF8EB3FE0EBFF
361
80D803FECAFCEA0FF8EA3FE0EA7F8000FECBFCA2EA7F80EA3FE0EA0FF8EA03FEC66C7EEB
362
3FE0EB0FF8EB03FE903800FF80EC3FE0EC0FF8EC03FE913800FF80ED3FE0ED0FF8ED03FE
363
923800FF80EE3FE0EE0FF8EE03FE933800FF80EF3FC0170FEF0380323279AD41>60
364
D<126012FCB4FCEA7FC0EA1FF0EA07FCEA01FF38007FC0EB1FF0EB07FCEB01FF9038007F
365
C0EC1FF0EC07FCEC01FF9138007FC0ED1FF0ED07FCED01FF9238007FC0EE1FF0EE07FCEE
366
01FF9338007F80EF1FC0A2EF7F80933801FF00EE07FCEE1FF0EE7FC04B48C7FCED07FCED
367
1FF0ED7FC04A48C8FCEC07FCEC1FF0EC7FC04948C9FCEB07FCEB1FF0EB7FC04848CAFCEA
368
07FCEA3FF0EA7FC048CBFC12FC1270323279AD41>62 D E
370
/Fo 134[45 45 1[45 45 45 45 45 1[45 45 45 45 45 2[45
371
45 45 45 45 45 45 45 45 7[45 2[45 7[45 45 5[45 2[45 45
372
1[45 19[45 45[{TeXBase1Encoding ReEncodeFont}30 74.7198
374
%DVIPSBitmapFont: Fp cmmi9 9 2
375
/Fp 2 63 df<171C177EEE01FEEE07FCEE1FF0EE7FC0923801FF00ED07FCED1FF0ED7FC0
376
4A48C7FCEC07FCEC1FF0EC7FC04948C8FCEB07FCEB1FF0EB7FC04848C9FCEA07FCEA1FF0
377
EA7FC048CAFCA2EA7FC0EA1FF0EA07FCEA01FF38007FC0EB1FF0EB07FCEB01FF9038007F
378
C0EC1FF0EC07FCEC01FF9138007FC0ED1FF0ED07FCED01FF9238007FC0EE1FF0EE07FCEE
379
01FEEE007E171C2F2E7AA93C>60 D<127012FCB4FCEA7FC0EA1FF0EA07FCEA01FF38007F
380
C0EB1FF0EB07FCEB01FF9038007FC0EC1FF0EC07FCEC01FF9138007FC0ED1FF0ED07FCED
381
01FF9238007FC0EE1FF0EE07FCEE01FEA2EE07FCEE1FF0EE7FC0923801FF00ED07FCED1F
382
F0ED7FC04A48C7FCEC07FCEC1FF0EC7FC04948C8FCEB07FCEB1FF0EB7FC04848C9FCEA07
383
FCEA1FF0EA7FC048CAFC12FC12702F2E7AA93C>62 D E
385
/Fq 133[60 66 66 93 66 73 40 66 47 1[73 73 73 106 33
386
2[33 73 73 40 66 73 66 73 66 8[80 113 80 86 73 80 86
387
1[80 93 86 100 73 2[33 86 1[73 80 86 86 1[86 1[73 4[40
388
66 66 66 66 66 66 66 66 66 66 1[33 40 33 2[40 40 5[57
389
31[73 2[{TeXBase1Encoding ReEncodeFont}61 119.552 /Helvetica-Bold
390
rf /Fr 129[45 45 45 45 45 45 45 45 45 45 45 45 45 45
391
45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45
392
45 45 45 45 1[45 45 45 45 45 45 45 45 45 45 45 45 45
393
45 45 1[45 45 45 45 45 45 45 45 45 45 45 45 45 45 45
394
45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45
395
45 45 45 45 1[45 45 45 33[{TeXBase1Encoding ReEncodeFont}91
396
74.7198 /Courier rf /Fs 134[37 37 55 37 42 23 32 32 1[42
397
42 42 60 23 37 23 23 42 42 23 37 42 37 42 42 1[42 5[46
398
51 69 1[60 46 42 2[51 1[55 69 46 2[28 3[51 60 55 51 51
399
1[42 4[28 42 42 42 42 42 42 42 42 42 42 23 21 28 21 10[28
400
30[42 2[{TeXBase1Encoding ReEncodeFont}59 83.022 /Times-Italic
401
rf /Ft 138[105 57 96 67 1[105 105 105 153 48 1[48 48
402
105 105 57 96 105 96 105 96 8[115 163 1[124 105 3[115
403
2[143 105 5[105 2[124 3[105 10[96 96 96 96 2[48 43[105
404
2[{TeXBase1Encoding ReEncodeFont}35 172.154 /Helvetica-Bold
405
rf /Fu 106[23 29 29 25[33 33 48 33 33 18 26 22 1[33 33
406
33 52 18 33 18 18 33 33 22 29 33 29 33 29 8[48 3[41 37
407
2[37 6[22 1[48 12[18 10[18 17 1[17 2[22 22 5[27 31[37
408
2[{TeXBase1Encoding ReEncodeFont}41 66.4176 /Times-Roman
409
rf /Fv 134[42 42 60 42 46 28 32 37 1[46 42 46 69 23 46
410
1[23 46 42 28 37 46 37 46 42 9[83 60 60 55 46 60 1[51
411
65 60 78 55 2[32 65 65 51 55 60 60 55 60 1[42 4[28 1[42
412
1[42 42 42 42 42 42 2[21 28 21 4[28 36[46 2[{
413
TeXBase1Encoding ReEncodeFont}57 83.022 /Times-Bold rf
414
/Fw 27[37 58[63 42[45 40 1[40 37 42 42 60 42 42 23 32
415
28 42 42 42 42 65 23 42 23 23 42 42 28 37 42 37 42 37
416
28 42 1[28 23 28 1[60 60 78 60 60 51 46 55 60 46 60 60
417
74 51 60 1[28 60 60 46 51 60 55 55 60 1[37 47 47 47 23
418
23 42 42 42 42 42 42 42 42 42 42 23 21 28 21 47 1[28
419
28 28 65 69 1[42 34 28 29[46 46 2[{TeXBase1Encoding ReEncodeFont}91
420
83.022 /Times-Roman rf /Fx 136[65 1[51 1[46 32 2[51 51
421
1[23 2[23 51 51 1[46 51 2[46 8[55 3[51 3[55 11[60 9[28
422
18[23 39[{TeXBase1Encoding ReEncodeFont}19 83.022 /Helvetica-Bold
423
rf /Fy 134[80 80 112 80 88 48 80 56 1[88 88 88 128 40
424
80 1[40 88 88 48 80 88 80 88 80 8[96 1[96 1[88 96 104
425
2[112 104 120 88 2[40 104 112 1[96 104 104 1[104 6[48
426
4[80 80 80 80 80 2[40 48 45[{TeXBase1Encoding ReEncodeFont}47
427
143.462 /Helvetica-Bold rf /Fz 138[126 1[115 80 8[57
428
126 126 1[115 126 11[138 2[149 126 3[138 6[57 26[57 6[57
429
39[{TeXBase1Encoding ReEncodeFont}15 206.584 /Helvetica-Bold
433
%%Feature: *Resolution 600dpi
441
1 0 bop Black Black 890 647 a Fz(The)58 b(PXP)f(user')-12
442
b(s)58 b(guide)1384 2594 y Fy(Ger)m(d)39 b(Stolpmann)p
445
2 1 bop Black Black -2 579 a Fx(The)22 b(PXP)j(user')-5
446
b(s)23 b(guide)-2 687 y Fw(by)d(Gerd)f(Stolpmann)-2 903
447
y(Cop)o(yright)f(\251)j(1999)e(-)h(2001)f(by)h(Gerd)g(Stolpmann)-2
448
1135 y(PXP)h(is)g(a)g(v)n(alidating)d(parser)i(for)f(XML-1.0)g(which)h
449
(has)g(been)g(written)g(entirely)f(in)h(Objecti)n(v)o(e)g(Caml.)-2
450
1285 y Fx(Do)o(wnload)h(PXP:)j Fw(The)c(free)g(PXP)h(library)e(can)h
451
(be)g(do)n(wnloaded)d(at)k(http://www)-5 b(.ocaml-programming)o(.de)o
452
(/pack)o(age)o(s/.)15 b(This)-2 1393 y(user')-5 b(s)20
453
b(guide)f(is)j(included.)c(Ne)n(west)j(releases)f(of)g(PXP)h(will)g(be)
454
f(announced)e(in)i(The)g(OCaml)g(Link)g(Database)-2 1500
455
y(\(http://www)-5 b(.npc.de/ocaml/linkdb)o(/\).)-2 1899
456
y Fv(License)-2 2090 y Fu(This)16 b(document,)j(and)e(the)h(described)h
457
(softw)o(are,)f("PXP",)e(are)i(cop)o(yright)i(by)d(Gerd)g(Stolpmann.)-2
458
2198 y(Permission)h(is)e(hereby)j(granted,)f(free)g(of)f(char)o(ge,)h
459
(to)f(an)o(y)h(person)f(obtaining)j(a)d(cop)o(y)h(of)f(this)h(document)
460
g(and)g(the)f("PXP")g(softw)o(are)i(\(the)f("Softw)o(are"\),)g(to)f
461
(deal)i(in)-2 2306 y(the)f(Softw)o(are)g(without)h(restriction,)g
462
(including)h(without)e(limitation)i(the)e(rights)g(to)f(use,)g(cop)o(y)
463
l(,)g(modify)l(,)g(mer)o(ge,)g(publish,)h(distrib)o(ute,)h(sublicense,)
464
g(and/or)f(sell)-2 2414 y(copies)g(of)f(the)h(Softw)o(are,)g(and)g(to)f
465
(permit)h(persons)f(to)h(whom)e(the)i(Softw)o(are)h(is)e(furnished)h
466
(to)f(do)g(so,)g(subject)h(to)g(the)f(follo)n(wing)j(conditions:)-2
467
2522 y(The)d(abo)o(v)o(e)h(cop)o(yright)h(notice)g(and)f(this)f
468
(permission)h(notice)h(shall)f(be)g(included)h(in)e(all)h(copies)h(or)e
469
(substantial)i(portions)g(of)e(the)g(Softw)o(are.)-2
470
2630 y(The)g(Softw)o(are)h(is)f(pro)o(vided)i(\223as)e(is\224,)g
471
(without)i(w)o(arranty)g(of)e(an)o(y)g(kind,)h(e)o(xpress)f(or)g
472
(implied,)i(including)g(b)o(ut)e(not)h(limited)h(to)e(the)h(w)o
473
(arranties)h(of)e(merchantability)l(,)-2 2737 y(\002tness)g(for)g(a)g
474
(particular)j(purpose)e(and)g(noninfringement.)i(In)d(no)g(e)n(v)o(ent)
475
h(shall)h(Gerd)e(Stolpmann)h(be)g(liable)h(for)e(an)o(y)g(claim,)h
476
(damages)g(or)f(other)h(liability)l(,)i(whether)-2 2845
477
y(in)d(an)g(action)i(of)e(contract,)i(tort)f(or)f(otherwise,)i(arising)
478
f(from,)e(out)i(of)f(or)g(in)g(connection)j(with)e(the)f(Softw)o(are)i
479
(or)e(the)h(use)f(or)g(other)h(dealings)h(in)e(the)h(softw)o(are.)p
482
3 2 bop Black Black -2 621 a Ft(T)-14 b(ab)n(le)48 b(of)g(Contents)396
483
815 y Fv(I.)21 b(User')m(s)g(guide)p Black 4 w(.)p Black
484
Black -1 w(.)p Black Black(.)p Black Black -1 w(.)p Black
485
Black(.)p Black Black(.)p Black Black(.)p Black Black
486
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
487
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
488
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
489
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
490
Black Black(.)p Black Black(.)p Black Black(.)p Black
491
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
492
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
493
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
494
Black(.)p Black Black(.)p Black Black(.)p Black Black
495
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
496
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
497
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
498
Black Black(.)p Black Black(.)p Black Black(.)p Black
499
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
500
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
501
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
502
Black(.)p Black Black(.)p Black Black(.)p Black Black
503
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
504
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
505
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
506
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
507
Black Black(.)p Black Black(.)p Black Black(.)p Black
508
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
509
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
510
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
511
Black(.)p Black Black(.)p Black Black(.)p Black Black
512
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
513
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
514
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
515
Black Black(.)p Black Black(.)p Black Black(.)p Black
516
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
517
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
518
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
519
Black(.)p Black Black(.)p Black Black(.)p Black Black
520
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
521
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
522
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
523
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
524
Black Black(.)p Black Black(.)p Black Black(.)p Black
525
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
526
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
527
Black(.)p Black Black(.)p Black Black(.)p Black Black
528
-1 w(.)p Black Black(.)p Black Black(.)p Black 4 w(6)596
529
943 y Fw(1.)f(What)g(is)h(XML?)p Black 4 w(.)p Black
530
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
531
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
532
Black(.)p Black Black(.)p Black Black(.)p Black Black
533
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
534
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
535
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
536
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
537
Black Black(.)p Black Black(.)p Black Black(.)p Black
538
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
539
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
540
Black(.)p Black Black(.)p Black Black(.)p Black Black
541
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
542
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
543
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
544
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
545
Black Black(.)p Black Black(.)p Black Black(.)p Black
546
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
547
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
548
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
549
Black(.)p Black Black(.)p Black Black(.)p Black Black
550
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
551
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
552
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
553
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
554
Black Black(.)p Black Black(.)p Black Black(.)p Black
555
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
556
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
557
Black(.)p Black Black(.)p Black Black(.)p Black Black
558
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
559
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
560
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
561
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
562
Black Black(.)p Black Black(.)p Black Black(.)p Black
563
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
564
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
565
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
566
Black(.)p Black Black(.)p Black Black(.)p Black Black
567
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
568
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
569
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
570
Black Black(.)p Black Black(.)p Black 4 w(7)795 1051
571
y(1.1.)e(Introduction)p Black 14 w(.)p Black Black -1
572
w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
573
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
574
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
575
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
576
Black Black(.)p Black Black(.)p Black Black(.)p Black
577
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
578
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
579
Black(.)p Black Black(.)p Black Black(.)p Black Black
580
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
581
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
582
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
583
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
584
Black Black(.)p Black Black(.)p Black Black(.)p Black
585
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
586
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
587
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
588
Black(.)p Black Black(.)p Black Black(.)p Black Black
589
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
590
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
591
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
592
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
593
Black Black(.)p Black Black(.)p Black Black(.)p Black
594
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
595
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
596
Black(.)p Black Black(.)p Black Black(.)p Black Black
597
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
598
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
599
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
600
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
601
Black Black(.)p Black Black(.)p Black Black(.)p Black
602
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
603
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
604
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
605
Black(.)p Black Black(.)p Black Black(.)p Black Black
606
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
607
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
608
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
609
Black Black(.)p Black Black(.)p Black 4 w(7)994 1159
610
y(1.1.1.)g(The)g("hello)h(w)o(orld")g(e)o(xample)p Black
611
13 w(.)p Black Black(.)p Black Black -1 w(.)p Black Black(.)p
612
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
613
Black Black(.)p Black Black(.)p Black Black(.)p Black
614
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
615
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
616
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
617
Black(.)p Black Black(.)p Black Black(.)p Black Black
618
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
619
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
620
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
621
Black Black(.)p Black Black(.)p Black Black(.)p Black
622
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
623
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
624
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
625
Black(.)p Black Black(.)p Black Black(.)p Black Black
626
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
627
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
628
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
629
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
630
Black Black(.)p Black Black(.)p Black Black(.)p Black
631
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
632
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
633
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
634
Black(.)p Black Black(.)p Black Black(.)p Black Black
635
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
636
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
637
Black Black(.)p Black 4 w(7)994 1267 y(1.1.2.)f(XML)h(parsers)g(and)f
638
(processors)p Black 3 w(.)p Black Black -2 w(.)p Black
639
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
640
Black(.)p Black Black(.)p Black Black(.)p Black Black
641
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
642
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
643
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
644
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
645
Black Black(.)p Black Black(.)p Black Black(.)p Black
646
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
647
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
648
Black(.)p Black Black(.)p Black Black(.)p Black Black
649
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
650
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
651
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
652
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
653
Black Black(.)p Black Black(.)p Black Black(.)p Black
654
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
655
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
656
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
657
Black(.)p Black Black(.)p Black Black(.)p Black Black
658
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
659
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
660
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
661
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
662
Black Black(.)p Black Black(.)p Black Black(.)p Black
663
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
664
Black(.)p Black 4 w(9)994 1375 y(1.1.3.)g(Discussion)p
665
Black 9 w(.)p Black Black -1 w(.)p Black Black(.)p Black
666
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
667
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
668
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
669
Black(.)p Black Black(.)p Black Black(.)p Black Black(.)p
670
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
671
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
672
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
673
Black Black(.)p Black Black(.)p Black Black(.)p Black
674
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
675
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
676
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
677
Black(.)p Black Black(.)p Black Black(.)p Black Black
678
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
679
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
680
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
681
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
682
Black Black(.)p Black Black(.)p Black Black(.)p Black
683
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
684
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
685
Black(.)p Black Black(.)p Black Black(.)p Black Black
686
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
687
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
688
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
689
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
690
Black Black(.)p Black Black(.)p Black Black(.)p Black
691
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
692
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
693
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
694
Black(.)p Black Black(.)p Black Black(.)p Black Black
695
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
696
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
697
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
698
Black Black(.)p Black Black(.)p Black Black(.)p Black
699
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
700
4 w(9)795 1483 y(1.2.)g(Highlights)g(of)h(XML)p Black
701
10 w(.)p Black Black(.)p Black Black -1 w(.)p Black Black(.)p
702
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
703
Black Black(.)p Black Black(.)p Black Black(.)p Black
704
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
705
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
706
Black(.)p Black Black(.)p Black Black(.)p Black Black
707
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
708
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
709
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
710
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
711
Black Black(.)p Black Black(.)p Black Black(.)p Black
712
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
713
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
714
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
715
Black(.)p Black Black(.)p Black Black(.)p Black Black
716
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
717
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
718
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
719
Black Black(.)p Black Black(.)p Black Black(.)p Black
720
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
721
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
722
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
723
Black(.)p Black Black(.)p Black Black(.)p Black Black
724
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
725
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
726
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
727
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
728
Black Black(.)p Black Black(.)p Black Black(.)p Black
729
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
730
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
731
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
732
Black(.)p Black Black(.)p Black Black(.)p Black Black
733
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
734
Black Black(.)p Black Black -1 w(.)p Black 4 w(11)994
735
1591 y(1.2.1.)f(The)g(DTD)i(and)e(the)i(instance)p Black
736
15 w(.)p Black Black(.)p Black Black(.)p Black Black
737
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
738
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
739
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
740
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
741
Black Black(.)p Black Black(.)p Black Black(.)p Black
742
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
743
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
744
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
745
Black(.)p Black Black(.)p Black Black(.)p Black Black
746
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
747
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
748
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
749
Black Black(.)p Black Black(.)p Black Black(.)p Black
750
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
751
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
752
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
753
Black(.)p Black Black(.)p Black Black(.)p Black Black
754
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
755
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
756
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
757
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
758
Black Black(.)p Black Black(.)p Black Black(.)p Black
759
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
760
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
761
Black(.)p Black Black(.)p Black Black(.)p Black Black
762
-1 w(.)p Black 4 w(11)994 1699 y(1.2.2.)e(Reserv)o(ed)g(characters)p
763
Black 19 w(.)p Black Black -1 w(.)p Black Black(.)p Black
764
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
765
Black(.)p Black Black(.)p Black Black(.)p Black Black
766
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
767
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
768
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
769
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
770
Black Black(.)p Black Black(.)p Black Black(.)p Black
771
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
772
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
773
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
774
Black(.)p Black Black(.)p Black Black(.)p Black Black
775
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
776
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
777
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
778
Black Black(.)p Black Black(.)p Black Black(.)p Black
779
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
780
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
781
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
782
Black(.)p Black Black(.)p Black Black(.)p Black Black
783
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
784
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
785
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
786
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
787
Black Black(.)p Black Black(.)p Black Black(.)p Black
788
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
789
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
790
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
791
Black(.)p Black Black(.)p Black Black(.)p Black Black(.)p
792
Black Black -1 w(.)p Black 4 w(12)994 1807 y(1.2.3.)g(Elements)g(and)h
793
(ELEMENT)f(declarations)p Black 7 w(.)p Black Black -2
794
w(.)p Black Black(.)p Black Black(.)p Black Black -1
795
w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
796
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
797
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
798
Black Black(.)p Black Black(.)p Black Black(.)p Black
799
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
800
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
801
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
802
Black(.)p Black Black(.)p Black Black(.)p Black Black
803
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
804
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
805
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
806
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
807
Black Black(.)p Black Black(.)p Black Black(.)p Black
808
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
809
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
810
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
811
Black(.)p Black Black(.)p Black Black(.)p Black Black
812
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
813
Black Black(.)p Black Black -1 w(.)p Black 4 w(13)994
814
1915 y(1.2.4.)g(Attrib)n(ute)g(lists)j(and)e(A)-9 b(TTLIST)19
815
b(declarations)p Black 6 w(.)p Black Black -2 w(.)p Black
816
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
817
Black(.)p Black Black(.)p Black Black(.)p Black Black
818
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
819
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
820
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
821
Black Black(.)p Black Black(.)p Black Black(.)p Black
822
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
823
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
824
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
825
Black(.)p Black Black(.)p Black Black(.)p Black Black
826
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
827
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
828
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
829
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
830
Black Black(.)p Black Black(.)p Black Black(.)p Black
831
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
832
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
833
Black(.)p Black Black(.)p Black Black(.)p Black Black
834
-1 w(.)p Black 4 w(15)994 2023 y(1.2.5.)g(P)o(arsed)g(entities)p
835
Black 18 w(.)p Black Black -1 w(.)p Black Black(.)p Black
836
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
837
Black(.)p Black Black(.)p Black Black(.)p Black Black(.)p
838
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
839
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
840
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
841
Black Black(.)p Black Black(.)p Black Black(.)p Black
842
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
843
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
844
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
845
Black(.)p Black Black(.)p Black Black(.)p Black Black
846
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
847
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
848
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
849
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
850
Black Black(.)p Black Black(.)p Black Black(.)p Black
851
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
852
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
853
Black(.)p Black Black(.)p Black Black(.)p Black Black
854
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
855
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
856
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
857
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
858
Black Black(.)p Black Black(.)p Black Black(.)p Black
859
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
860
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
861
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
862
Black(.)p Black Black(.)p Black Black(.)p Black Black
863
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
864
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
865
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
866
Black Black(.)p Black Black(.)p Black Black(.)p Black
867
Black -1 w(.)p Black 4 w(16)994 2131 y(1.2.6.)g(Notations)g(and)h
868
(unparsed)e(entities)p Black 14 w(.)p Black Black(.)p
869
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
870
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
871
Black Black(.)p Black Black(.)p Black Black(.)p Black
872
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
873
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
874
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
875
Black(.)p Black Black(.)p Black Black(.)p Black Black
876
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
877
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
878
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
879
Black Black(.)p Black Black(.)p Black Black(.)p Black
880
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
881
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
882
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
883
Black(.)p Black Black(.)p Black Black(.)p Black Black
884
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
885
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
886
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
887
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
888
Black Black(.)p Black Black(.)p Black Black(.)p Black
889
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
890
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
891
Black(.)p Black Black(.)p Black Black(.)p Black Black
892
-1 w(.)p Black 4 w(19)795 2238 y(1.3.)h(A)i(complete)e(e)o(xample:)g
893
(The)h Fs(r)m(eadme)f Fw(DTD)p Black 3 w(.)p Black Black(.)p
894
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
895
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
896
Black Black(.)p Black Black(.)p Black Black(.)p Black
897
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
898
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
899
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
900
Black(.)p Black Black(.)p Black Black(.)p Black Black
901
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
902
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
903
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
904
Black Black(.)p Black Black(.)p Black Black(.)p Black
905
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
906
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
907
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
908
Black(.)p Black Black(.)p Black Black(.)p Black Black
909
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
910
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
911
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
912
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
913
Black Black(.)p Black Black(.)p Black Black(.)p Black
914
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
915
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
916
Black(.)p Black Black(.)p Black Black(.)p Black Black
917
-1 w(.)p Black 4 w(20)596 2346 y(2.)h(Using)g(PXP)p Black
918
6 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
919
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
920
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
921
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
922
Black Black(.)p Black Black(.)p Black Black(.)p Black
923
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
924
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
925
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
926
Black(.)p Black Black(.)p Black Black(.)p Black Black
927
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
928
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
929
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
930
Black Black(.)p Black Black(.)p Black Black(.)p Black
931
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
932
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
933
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
934
Black(.)p Black Black(.)p Black Black(.)p Black Black
935
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
936
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
937
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
938
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
939
Black Black(.)p Black Black(.)p Black Black(.)p Black
940
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
941
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
942
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
943
Black(.)p Black Black(.)p Black Black(.)p Black Black
944
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
945
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
946
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
947
Black Black(.)p Black Black(.)p Black Black(.)p Black
948
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
949
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
950
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
951
Black(.)p Black Black(.)p Black Black(.)p Black Black
952
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
953
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
954
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
955
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
956
Black Black(.)p Black Black(.)p Black Black(.)p Black
957
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
958
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
959
Black(.)p Black Black(.)p Black Black(.)p Black Black
960
-1 w(.)p Black 4 w(24)795 2454 y(2.1.)f(V)-9 b(alidation)p
961
Black 3 w(.)p Black Black -2 w(.)p Black Black(.)p Black
962
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
963
Black(.)p Black Black(.)p Black Black(.)p Black Black
964
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
965
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
966
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
967
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
968
Black Black(.)p Black Black(.)p Black Black(.)p Black
969
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
970
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
971
Black(.)p Black Black(.)p Black Black(.)p Black Black
972
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
973
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
974
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
975
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
976
Black Black(.)p Black Black(.)p Black Black(.)p Black
977
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
978
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
979
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
980
Black(.)p Black Black(.)p Black Black(.)p Black Black
981
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
982
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
983
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
984
Black Black(.)p Black Black(.)p Black Black(.)p Black
985
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
986
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
987
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
988
Black(.)p Black Black(.)p Black Black(.)p Black Black
989
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
990
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
991
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
992
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
993
Black Black(.)p Black Black(.)p Black Black(.)p Black
994
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
995
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
996
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
997
Black(.)p Black Black(.)p Black Black(.)p Black Black
998
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
999
Black Black(.)p Black Black -1 w(.)p Black 4 w(24)795
1000
2562 y(2.2.)19 b(Ho)n(w)h(to)g(parse)g(a)h(document)d(from)h(an)h
1001
(application)p Black 10 w(.)p Black Black -2 w(.)p Black
1002
Black(.)p Black Black(.)p Black Black(.)p Black Black
1003
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1004
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1005
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1006
Black Black(.)p Black Black(.)p Black Black(.)p Black
1007
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1008
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1009
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1010
Black(.)p Black Black(.)p Black Black(.)p Black Black
1011
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1012
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1013
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1014
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1015
Black Black(.)p Black Black(.)p Black Black(.)p Black
1016
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1017
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1018
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1019
Black(.)p Black Black(.)p Black Black(.)p Black Black
1020
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1021
Black Black(.)p Black Black -1 w(.)p Black 4 w(24)795
1022
2670 y(2.3.)f(Class-based)h(processing)f(of)h(the)g(node)g(tree)p
1023
Black 8 w(.)p Black Black -1 w(.)p Black Black(.)p Black
1024
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1025
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1026
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1027
Black(.)p Black Black(.)p Black Black(.)p Black Black
1028
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1029
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1030
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1031
Black Black(.)p Black Black(.)p Black Black(.)p Black
1032
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1033
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1034
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1035
Black(.)p Black Black(.)p Black Black(.)p Black Black
1036
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1037
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1038
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1039
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1040
Black Black(.)p Black Black(.)p Black Black(.)p Black
1041
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1042
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1043
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1044
Black(.)p Black Black(.)p Black Black(.)p Black Black
1045
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1046
Black Black(.)p Black Black -1 w(.)p Black 4 w(29)795
1047
2778 y(2.4.)f(Example:)g(An)h(HTML)g(back)o(end)f(for)g(the)i
1048
Fs(r)m(eadme)e Fw(DTD)p Black 3 w(.)p Black Black -1
1049
w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1050
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1051
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1052
Black Black(.)p Black Black(.)p Black Black(.)p Black
1053
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1054
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1055
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1056
Black(.)p Black Black(.)p Black Black(.)p Black Black
1057
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1058
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1059
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1060
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1061
Black Black(.)p Black Black(.)p Black Black(.)p Black
1062
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1063
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1064
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1065
Black(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1066
Black Black -1 w(.)p Black 4 w(33)994 2886 y(2.4.1.)g(Header)p
1067
Black 9 w(.)p Black Black -2 w(.)p Black Black(.)p Black
1068
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1069
Black(.)p Black Black(.)p Black Black(.)p Black Black
1070
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1071
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1072
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1073
Black Black(.)p Black Black(.)p Black Black(.)p Black
1074
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1075
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1076
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1077
Black(.)p Black Black(.)p Black Black(.)p Black Black
1078
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1079
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1080
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1081
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1082
Black Black(.)p Black Black(.)p Black Black(.)p Black
1083
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1084
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1085
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1086
Black(.)p Black Black(.)p Black Black(.)p Black Black
1087
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1088
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1089
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1090
Black Black(.)p Black Black(.)p Black Black(.)p Black
1091
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1092
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1093
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1094
Black(.)p Black Black(.)p Black Black(.)p Black Black
1095
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1096
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1097
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1098
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1099
Black Black(.)p Black Black(.)p Black Black(.)p Black
1100
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1101
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1102
Black(.)p Black Black(.)p Black Black(.)p Black Black
1103
-1 w(.)p Black 4 w(33)994 2994 y(2.4.2.)g(T)-7 b(ype)19
1104
b(declarations)p Black 14 w(.)p Black Black(.)p Black
1105
Black(.)p Black Black(.)p Black Black(.)p Black Black
1106
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1107
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1108
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1109
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1110
Black Black(.)p Black Black(.)p Black Black(.)p Black
1111
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1112
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1113
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1114
Black(.)p Black Black(.)p Black Black(.)p Black Black
1115
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1116
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1117
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1118
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1119
Black Black(.)p Black Black(.)p Black Black(.)p Black
1120
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1121
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1122
Black(.)p Black Black(.)p Black Black(.)p Black Black
1123
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1124
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1125
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1126
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1127
Black Black(.)p Black Black(.)p Black Black(.)p Black
1128
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1129
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1130
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1131
Black(.)p Black Black(.)p Black Black(.)p Black Black
1132
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1133
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1134
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1135
Black 4 w(33)994 3102 y(2.4.3.)g(Class)i Fr(store)p Black
1136
11 w Fw(.)p Black Black -1 w(.)p Black Black(.)p Black
1137
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1138
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1139
Black(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1140
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1141
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1142
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1143
Black Black(.)p Black Black(.)p Black Black(.)p Black
1144
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1145
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1146
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1147
Black(.)p Black Black(.)p Black Black(.)p Black Black
1148
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1149
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1150
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1151
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1152
Black Black(.)p Black Black(.)p Black Black(.)p Black
1153
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1154
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1155
Black(.)p Black Black(.)p Black Black(.)p Black Black
1156
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1157
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1158
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1159
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1160
Black Black(.)p Black Black(.)p Black Black(.)p Black
1161
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1162
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1163
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1164
Black(.)p Black Black(.)p Black Black(.)p Black Black
1165
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1166
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1167
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1168
Black Black(.)p Black Black(.)p Black Black(.)p Black
1169
Black -1 w(.)p Black 4 w(34)994 3210 y(2.4.4.)e(Function)g
1170
Fr(escape_html)p Black Fw(.)p Black Black -2 w(.)p Black
1171
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1172
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1173
Black(.)p Black Black(.)p Black Black(.)p Black Black
1174
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1175
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1176
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1177
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1178
Black Black(.)p Black Black(.)p Black Black(.)p Black
1179
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1180
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1181
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1182
Black(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1183
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1184
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1185
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1186
Black Black(.)p Black Black(.)p Black Black(.)p Black
1187
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1188
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1189
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1190
Black(.)p Black Black(.)p Black Black(.)p Black Black
1191
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1192
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1193
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1194
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1195
Black Black(.)p Black Black(.)p Black Black(.)p Black
1196
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1197
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1198
4 w(35)994 3318 y(2.4.5.)g(V)-5 b(irtual)20 b(class)h
1199
Fr(shared)p Black 4 w Fw(.)p Black Black -2 w(.)p Black
1200
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1201
Black(.)p Black Black(.)p Black Black(.)p Black Black
1202
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1203
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1204
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1205
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1206
Black Black(.)p Black Black(.)p Black Black(.)p Black
1207
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1208
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1209
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1210
Black(.)p Black Black(.)p Black Black(.)p Black Black
1211
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1212
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1213
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1214
Black Black(.)p Black Black(.)p Black Black(.)p Black
1215
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1216
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1217
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1218
Black(.)p Black Black(.)p Black Black(.)p Black Black
1219
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1220
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1221
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1222
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1223
Black Black(.)p Black Black(.)p Black Black(.)p Black
1224
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1225
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1226
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1227
Black(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1228
Black Black -1 w(.)p Black 4 w(35)994 3426 y(2.4.6.)e(Class)i
1229
Fr(only_data)p Black 17 w Fw(.)p Black Black(.)p Black
1230
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1231
Black(.)p Black Black(.)p Black Black(.)p Black Black
1232
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1233
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1234
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1235
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1236
Black Black(.)p Black Black(.)p Black Black(.)p Black
1237
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1238
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1239
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1240
Black(.)p Black Black(.)p Black Black(.)p Black Black
1241
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1242
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1243
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1244
Black Black(.)p Black Black(.)p Black Black(.)p Black
1245
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1246
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1247
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1248
Black(.)p Black Black(.)p Black Black(.)p Black Black
1249
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1250
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1251
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1252
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1253
Black Black(.)p Black Black(.)p Black Black(.)p Black
1254
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1255
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1256
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1257
Black(.)p Black Black(.)p Black Black(.)p Black Black
1258
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1259
Black Black(.)p Black Black -1 w(.)p Black 4 w(36)994
1260
3534 y(2.4.7.)e(Class)i Fr(readme)p Black 8 w Fw(.)p
1261
Black Black -1 w(.)p Black Black -1 w(.)p Black Black(.)p
1262
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1263
Black Black(.)p Black Black(.)p Black Black(.)p Black
1264
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1265
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1266
Black(.)p Black Black(.)p Black Black(.)p Black Black
1267
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1268
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1269
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1270
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1271
Black Black(.)p Black Black(.)p Black Black(.)p Black
1272
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1273
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1274
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1275
Black(.)p Black Black(.)p Black Black(.)p Black Black
1276
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1277
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1278
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1279
Black Black(.)p Black Black(.)p Black Black(.)p Black
1280
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1281
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1282
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1283
Black(.)p Black Black(.)p Black Black(.)p Black Black
1284
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1285
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1286
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1287
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1288
Black Black(.)p Black Black(.)p Black Black(.)p Black
1289
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1290
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1291
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1292
Black(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1293
Black Black -1 w(.)p Black 4 w(36)994 3642 y(2.4.8.)e(Classes)i
1294
Fr(section)p Fw(,)f Fr(sect1)p Fw(,)f Fr(sect2)p Fw(,)h(and)g
1295
Fr(sect3)p Black 13 w Fw(.)p Black Black(.)p Black Black(.)p
1296
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1297
Black Black(.)p Black Black(.)p Black Black(.)p Black
1298
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1299
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1300
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1301
Black(.)p Black Black(.)p Black Black(.)p Black Black
1302
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1303
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1304
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1305
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1306
Black Black(.)p Black Black(.)p Black Black(.)p Black
1307
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1308
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1309
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1310
Black(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1311
Black Black -1 w(.)p Black 4 w(39)994 3749 y(2.4.9.)f(Classes)i
1312
Fr(map_tag)p Fw(,)f Fr(p)p Fw(,)g Fr(em)p Fw(,)g Fr(ul)p
1313
Fw(,)g Fr(li)p Black 16 w Fw(.)p Black Black(.)p Black
1314
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1315
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1316
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1317
Black(.)p Black Black(.)p Black Black(.)p Black Black
1318
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1319
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1320
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1321
Black Black(.)p Black Black(.)p Black Black(.)p Black
1322
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1323
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1324
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1325
Black(.)p Black Black(.)p Black Black(.)p Black Black
1326
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1327
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1328
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1329
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1330
Black Black(.)p Black Black(.)p Black Black(.)p Black
1331
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1332
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1333
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1334
Black(.)p Black Black(.)p Black Black(.)p Black Black
1335
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1336
Black Black(.)p Black Black -1 w(.)p Black 4 w(40)994
1337
3857 y(2.4.10.)e(Class)k Fr(br)p Black Fw(.)p Black Black
1338
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1339
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1340
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1341
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1342
Black Black(.)p Black Black(.)p Black Black(.)p Black
1343
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1344
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1345
Black(.)p Black Black(.)p Black Black(.)p Black Black
1346
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1347
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1348
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1349
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1350
Black Black(.)p Black Black(.)p Black Black(.)p Black
1351
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1352
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1353
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1354
Black(.)p Black Black(.)p Black Black(.)p Black Black
1355
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1356
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1357
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1358
Black Black(.)p Black Black(.)p Black Black(.)p Black
1359
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1360
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1361
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1362
Black(.)p Black Black(.)p Black Black(.)p Black Black
1363
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1364
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1365
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1366
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1367
Black Black(.)p Black Black(.)p Black Black(.)p Black
1368
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1369
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1370
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1371
Black(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1372
Black Black -1 w(.)p Black 4 w(40)994 3965 y(2.4.11.)c(Class)k
1373
Fr(code)p Black 13 w Fw(.)p Black Black(.)p Black Black(.)p
1374
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1375
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1376
Black Black(.)p Black Black(.)p Black Black(.)p Black
1377
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1378
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1379
Black(.)p Black Black(.)p Black Black(.)p Black Black
1380
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1381
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1382
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1383
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1384
Black Black(.)p Black Black(.)p Black Black(.)p Black
1385
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1386
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1387
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1388
Black(.)p Black Black(.)p Black Black(.)p Black Black
1389
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1390
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1391
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1392
Black Black(.)p Black Black(.)p Black Black(.)p Black
1393
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1394
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1395
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1396
Black(.)p Black Black(.)p Black Black(.)p Black Black
1397
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1398
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1399
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1400
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1401
Black Black(.)p Black Black(.)p Black Black(.)p Black
1402
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1403
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1404
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1405
Black(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1406
Black Black -1 w(.)p Black 4 w(41)994 4073 y(2.4.12.)c(Class)k
1407
Fr(a)p Black 4 w Fw(.)p Black Black -1 w(.)p Black Black(.)p
1408
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1409
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1410
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1411
Black Black(.)p Black Black(.)p Black Black(.)p Black
1412
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1413
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1414
Black(.)p Black Black(.)p Black Black(.)p Black Black
1415
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1416
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1417
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1418
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1419
Black Black(.)p Black Black(.)p Black Black(.)p Black
1420
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1421
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1422
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1423
Black(.)p Black Black(.)p Black Black(.)p Black Black
1424
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1425
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1426
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1427
Black Black(.)p Black Black(.)p Black Black(.)p Black
1428
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1429
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1430
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1431
Black(.)p Black Black(.)p Black Black(.)p Black Black
1432
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1433
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1434
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1435
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1436
Black Black(.)p Black Black(.)p Black Black(.)p Black
1437
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1438
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1439
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1440
Black(.)p Black Black(.)p Black Black(.)p Black Black
1441
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1442
Black Black(.)p Black Black -1 w(.)p Black 4 w(42)994
1443
4181 y(2.4.13.)c(Class)k Fr(footnote)p Black 1 w Fw(.)p
1444
Black Black -2 w(.)p Black Black(.)p Black Black(.)p
1445
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1446
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1447
Black Black(.)p Black Black(.)p Black Black(.)p Black
1448
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1449
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1450
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1451
Black(.)p Black Black(.)p Black Black(.)p Black Black
1452
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1453
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1454
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1455
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1456
Black Black(.)p Black Black(.)p Black Black(.)p Black
1457
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1458
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1459
Black(.)p Black Black(.)p Black Black(.)p Black Black
1460
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1461
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1462
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1463
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1464
Black Black(.)p Black Black(.)p Black Black(.)p Black
1465
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1466
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1467
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1468
Black(.)p Black Black(.)p Black Black(.)p Black Black
1469
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1470
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1471
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1472
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1473
Black Black(.)p Black Black(.)p Black Black(.)p Black
1474
Black(.)p Black Black -1 w(.)p Black 4 w(42)994 4289
1475
y(2.4.14.)c(The)i(speci\002cation)f(of)h(the)g(document)f(model)p
1476
Black 12 w(.)p Black Black -2 w(.)p Black Black -1 w(.)p
1477
Black Black(.)p Black Black(.)p Black Black(.)p Black
1478
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1479
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1480
Black(.)p Black Black(.)p Black Black(.)p Black Black
1481
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1482
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1483
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1484
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1485
Black Black(.)p Black Black(.)p Black Black(.)p Black
1486
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1487
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1488
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1489
Black(.)p Black Black(.)p Black Black(.)p Black Black
1490
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1491
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1492
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1493
Black Black(.)p Black Black(.)p Black Black(.)p Black
1494
Black -1 w(.)p Black 4 w(44)596 4397 y(3.)h(The)f(objects)h
1495
(representing)e(the)j(document)p Black 4 w(.)p Black
1496
Black -3 w(.)p Black Black(.)p Black Black(.)p Black
1497
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1498
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1499
Black(.)p Black Black(.)p Black Black(.)p Black Black
1500
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1501
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1502
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1503
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1504
Black Black(.)p Black Black(.)p Black Black(.)p Black
1505
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1506
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1507
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1508
Black(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1509
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1510
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1511
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1512
Black Black(.)p Black Black(.)p Black Black(.)p Black
1513
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1514
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1515
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1516
Black(.)p Black Black(.)p Black Black(.)p Black Black
1517
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1518
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1519
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1520
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1521
Black Black(.)p Black Black(.)p Black Black(.)p Black
1522
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1523
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1524
4 w(46)795 4505 y(3.1.)e(The)h Fr(document)f Fw(class)p
1525
Black 7 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1526
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1527
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1528
Black Black(.)p Black Black(.)p Black Black(.)p Black
1529
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1530
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1531
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1532
Black(.)p Black Black(.)p Black Black(.)p Black Black
1533
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1534
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1535
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1536
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1537
Black Black(.)p Black Black(.)p Black Black(.)p Black
1538
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1539
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1540
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1541
Black(.)p Black Black(.)p Black Black(.)p Black Black
1542
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1543
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1544
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1545
Black Black(.)p Black Black(.)p Black Black(.)p Black
1546
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1547
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1548
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1549
Black(.)p Black Black(.)p Black Black(.)p Black Black
1550
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1551
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1552
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1553
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1554
Black Black(.)p Black Black(.)p Black Black(.)p Black
1555
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1556
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1557
Black(.)p Black Black(.)p Black Black(.)p Black Black
1558
-1 w(.)p Black 4 w(46)795 4613 y(3.2.)g(The)h(class)h(type)f
1559
Fr(node)p Black 2 w Fw(.)p Black Black -2 w(.)p Black
1560
Black(.)p Black Black(.)p Black Black(.)p Black Black
1561
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1562
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1563
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1564
Black Black(.)p Black Black(.)p Black Black(.)p Black
1565
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1566
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1567
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1568
Black(.)p Black Black(.)p Black Black(.)p Black Black
1569
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1570
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1571
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1572
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1573
Black Black(.)p Black Black(.)p Black Black(.)p Black
1574
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1575
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1576
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1577
Black(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1578
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1579
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1580
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1581
Black Black(.)p Black Black(.)p Black Black(.)p Black
1582
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1583
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1584
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1585
Black(.)p Black Black(.)p Black Black(.)p Black Black
1586
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1587
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1588
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1589
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1590
Black Black(.)p Black Black(.)p Black Black(.)p Black
1591
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1592
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1593
4 w(47)994 4721 y(3.2.1.)f(The)g(principal)g(structure)h(of)f(document)
1594
g(trees)p Black 18 w(.)p Black Black(.)p Black Black(.)p
1595
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1596
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1597
Black Black(.)p Black Black(.)p Black Black(.)p Black
1598
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1599
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1600
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1601
Black(.)p Black Black(.)p Black Black(.)p Black Black
1602
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1603
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1604
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1605
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1606
Black Black(.)p Black Black(.)p Black Black(.)p Black
1607
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1608
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1609
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1610
Black(.)p Black Black(.)p Black Black(.)p Black Black
1611
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1612
Black Black(.)p Black Black -1 w(.)p Black 4 w(49)994
1613
4829 y(3.2.2.)g(Optional)g(features)p Black 7 w(.)p Black
1614
Black -2 w(.)p Black Black(.)p Black Black(.)p Black
1615
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1616
Black(.)p Black Black(.)p Black Black(.)p Black Black
1617
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1618
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1619
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1620
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1621
Black Black(.)p Black Black(.)p Black Black(.)p Black
1622
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1623
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1624
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1625
Black(.)p Black Black(.)p Black Black(.)p Black Black
1626
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1627
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1628
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1629
Black Black(.)p Black Black(.)p Black Black(.)p Black
1630
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1631
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1632
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1633
Black(.)p Black Black(.)p Black Black(.)p Black Black
1634
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1635
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1636
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1637
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1638
Black Black(.)p Black Black(.)p Black Black(.)p Black
1639
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1640
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1641
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1642
Black(.)p Black Black(.)p Black Black(.)p Black Black
1643
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1644
Black Black(.)p Black Black -1 w(.)p Black 4 w(53)p Black
1645
3842 5278 a Fs(3)p Black eop
1647
4 3 bop Black Black 994 579 a Fw(3.2.3.)19 b(Namespaces)p
1648
Black(.)p Black Black -2 w(.)p Black Black(.)p Black
1649
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1650
Black(.)p Black Black(.)p Black Black(.)p Black Black
1651
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1652
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1653
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1654
Black Black(.)p Black Black(.)p Black Black(.)p Black
1655
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1656
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1657
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1658
Black(.)p Black Black(.)p Black Black(.)p Black Black
1659
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1660
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1661
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1662
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1663
Black Black(.)p Black Black(.)p Black Black(.)p Black
1664
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1665
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1666
Black(.)p Black Black(.)p Black Black(.)p Black Black
1667
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1668
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1669
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1670
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1671
Black Black(.)p Black Black(.)p Black Black(.)p Black
1672
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1673
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1674
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1675
Black(.)p Black Black(.)p Black Black(.)p Black Black
1676
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1677
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1678
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1679
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1680
Black Black(.)p Black Black(.)p Black Black(.)p Black
1681
Black(.)p Black Black -1 w(.)p Black 4 w(54)994 687 y(3.2.4.)g(T)-7
1682
b(ypes)p Black 11 w(.)p Black Black -1 w(.)p Black Black(.)p
1683
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1684
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1685
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1686
Black Black(.)p Black Black(.)p Black Black(.)p Black
1687
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1688
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1689
Black(.)p Black Black(.)p Black Black(.)p Black Black
1690
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1691
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1692
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1693
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1694
Black Black(.)p Black Black(.)p Black Black(.)p Black
1695
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1696
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1697
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1698
Black(.)p Black Black(.)p Black Black(.)p Black Black
1699
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1700
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1701
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1702
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1703
Black Black(.)p Black Black(.)p Black Black(.)p Black
1704
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1705
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1706
Black(.)p Black Black(.)p Black Black(.)p Black Black
1707
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1708
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1709
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1710
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1711
Black Black(.)p Black Black(.)p Black Black(.)p Black
1712
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1713
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1714
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1715
Black(.)p Black Black(.)p Black Black(.)p Black Black
1716
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1717
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1718
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1719
Black 4 w(55)994 795 y(3.2.5.)19 b(The)g(methods)h(of)f(the)i(class)g
1720
(type)f Fr(node)p Black 13 w Fw(.)p Black Black(.)p Black
1721
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1722
Black(.)p Black Black(.)p Black Black(.)p Black Black
1723
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1724
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1725
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1726
Black Black(.)p Black Black(.)p Black Black(.)p Black
1727
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1728
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1729
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1730
Black(.)p Black Black(.)p Black Black(.)p Black Black
1731
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1732
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1733
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1734
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1735
Black Black(.)p Black Black(.)p Black Black(.)p Black
1736
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1737
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1738
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1739
Black(.)p Black Black(.)p Black Black(.)p Black Black
1740
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1741
Black Black(.)p Black Black -1 w(.)p Black 4 w(57)994
1742
903 y(3.2.6.)f(The)g(class)j Fr(element_impl)p Black
1743
2 w Fw(.)p Black Black -3 w(.)p Black Black(.)p Black
1744
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1745
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1746
Black(.)p Black Black(.)p Black Black(.)p Black Black
1747
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1748
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1749
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1750
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1751
Black Black(.)p Black Black(.)p Black Black(.)p Black
1752
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1753
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1754
Black(.)p Black Black(.)p Black Black(.)p Black Black
1755
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1756
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1757
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1758
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1759
Black Black(.)p Black Black(.)p Black Black(.)p Black
1760
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1761
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1762
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1763
Black(.)p Black Black(.)p Black Black(.)p Black Black
1764
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1765
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1766
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1767
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1768
Black Black(.)p Black Black(.)p Black Black(.)p Black
1769
Black(.)p Black Black -1 w(.)p Black 4 w(76)994 1011
1770
y(3.2.7.)d(The)g(class)j Fr(data_impl)p Black 12 w Fw(.)p
1771
Black Black -2 w(.)p Black Black -1 w(.)p Black Black(.)p
1772
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1773
Black Black(.)p Black Black(.)p Black Black(.)p Black
1774
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1775
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1776
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1777
Black(.)p Black Black(.)p Black Black(.)p Black Black
1778
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1779
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1780
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1781
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1782
Black Black(.)p Black Black(.)p Black Black(.)p Black
1783
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1784
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1785
Black(.)p Black Black(.)p Black Black(.)p Black Black
1786
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1787
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1788
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1789
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1790
Black Black(.)p Black Black(.)p Black Black(.)p Black
1791
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1792
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1793
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1794
Black(.)p Black Black(.)p Black Black(.)p Black Black
1795
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1796
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1797
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1798
Black Black(.)p Black Black(.)p Black Black(.)p Black
1799
Black -1 w(.)p Black 4 w(77)994 1119 y(3.2.8.)d(The)g(classes)j
1800
Fr(super_root_impl)p Fw(,)c Fr(pinstr_impl)p Fw(,)g(and)i
1801
Fr(comment_impl)p Black 15 w Fw(.)p Black Black(.)p Black
1802
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1803
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1804
Black(.)p Black Black(.)p Black Black(.)p Black Black
1805
-1 w(.)p Black 4 w(78)994 1226 y(3.2.9.)f(Examples:)g(Creating)h(and)f
1806
(accessing)h(nodes)p Black 17 w(.)p Black Black(.)p Black
1807
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1808
Black(.)p Black Black(.)p Black Black(.)p Black Black
1809
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1810
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1811
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1812
Black Black(.)p Black Black(.)p Black Black(.)p Black
1813
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1814
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1815
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1816
Black(.)p Black Black(.)p Black Black(.)p Black Black
1817
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1818
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1819
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1820
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1821
Black Black(.)p Black Black(.)p Black Black(.)p Black
1822
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1823
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1824
Black(.)p Black Black(.)p Black Black(.)p Black Black
1825
-1 w(.)p Black 4 w(79)994 1334 y(3.2.10.)e(The)i(type)g
1826
Fr(spec)p Black 5 w Fw(.)p Black Black -1 w(.)p Black
1827
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1828
Black(.)p Black Black(.)p Black Black(.)p Black Black
1829
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1830
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1831
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1832
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1833
Black Black(.)p Black Black(.)p Black Black(.)p Black
1834
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1835
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1836
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1837
Black(.)p Black Black(.)p Black Black(.)p Black Black
1838
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1839
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1840
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1841
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1842
Black Black(.)p Black Black(.)p Black Black(.)p Black
1843
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1844
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1845
Black(.)p Black Black(.)p Black Black(.)p Black Black
1846
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1847
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1848
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1849
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1850
Black Black(.)p Black Black(.)p Black Black(.)p Black
1851
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1852
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1853
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1854
Black(.)p Black Black(.)p Black Black(.)p Black Black
1855
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1856
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1857
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1858
Black 4 w(83)994 1442 y(3.2.11.)e(Examples:)h(Creating)h(nodes)f(using)
1859
h Fr(spec)p Black 14 w Fw(.)p Black Black(.)p Black Black
1860
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1861
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1862
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1863
Black Black(.)p Black Black(.)p Black Black(.)p Black
1864
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1865
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1866
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1867
Black(.)p Black Black(.)p Black Black(.)p Black Black
1868
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1869
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1870
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1871
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1872
Black Black(.)p Black Black(.)p Black Black(.)p Black
1873
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1874
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1875
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1876
Black(.)p Black Black(.)p Black Black(.)p Black Black
1877
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1878
Black Black(.)p Black Black -1 w(.)p Black 4 w(86)994
1879
1550 y(3.2.12.)e(Iterators)p Black 13 w(.)p Black Black
1880
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1881
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1882
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1883
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1884
Black Black(.)p Black Black(.)p Black Black(.)p Black
1885
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1886
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1887
Black(.)p Black Black(.)p Black Black(.)p Black Black
1888
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1889
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1890
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1891
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1892
Black Black(.)p Black Black(.)p Black Black(.)p Black
1893
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1894
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1895
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1896
Black(.)p Black Black(.)p Black Black(.)p Black Black
1897
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1898
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1899
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1900
Black Black(.)p Black Black(.)p Black Black(.)p Black
1901
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1902
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1903
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1904
Black(.)p Black Black(.)p Black Black(.)p Black Black
1905
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1906
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1907
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1908
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1909
Black Black(.)p Black Black(.)p Black Black(.)p Black
1910
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1911
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1912
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1913
Black(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1914
Black Black -1 w(.)p Black 4 w(87)994 1658 y(3.2.13.)g(Stripping)h
1915
(whitespace)p Black 7 w(.)p Black Black -1 w(.)p Black
1916
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1917
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1918
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1919
Black(.)p Black Black(.)p Black Black(.)p Black Black
1920
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1921
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1922
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1923
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1924
Black Black(.)p Black Black(.)p Black Black(.)p Black
1925
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1926
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1927
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1928
Black(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1929
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1930
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1931
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1932
Black Black(.)p Black Black(.)p Black Black(.)p Black
1933
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1934
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1935
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1936
Black(.)p Black Black(.)p Black Black(.)p Black Black
1937
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1938
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1939
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1940
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1941
Black Black(.)p Black Black(.)p Black Black(.)p Black
1942
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1943
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1944
4 w(91)994 1766 y(3.2.14.)f(Document)h(order)p Black
1945
16 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1946
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1947
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1948
Black Black(.)p Black Black(.)p Black Black(.)p Black
1949
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1950
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1951
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1952
Black(.)p Black Black(.)p Black Black(.)p Black Black
1953
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1954
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1955
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1956
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1957
Black Black(.)p Black Black(.)p Black Black(.)p Black
1958
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1959
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1960
Black(.)p Black Black(.)p Black Black(.)p Black Black
1961
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1962
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1963
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1964
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1965
Black Black(.)p Black Black(.)p Black Black(.)p Black
1966
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1967
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1968
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1969
Black(.)p Black Black(.)p Black Black(.)p Black Black
1970
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1971
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1972
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1973
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1974
Black Black(.)p Black Black(.)p Black Black(.)p Black
1975
Black(.)p Black Black -1 w(.)p Black 4 w(93)994 1874
1976
y(3.2.15.)f(Functions)p Black 5 w(.)p Black Black -2
1977
w(.)p Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1978
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1979
Black Black(.)p Black Black(.)p Black Black(.)p Black
1980
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1981
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1982
Black(.)p Black Black(.)p Black Black(.)p Black Black
1983
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1984
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1985
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1986
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
1987
Black Black(.)p Black Black(.)p Black Black(.)p Black
1988
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1989
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1990
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1991
Black(.)p Black Black(.)p Black Black(.)p Black Black
1992
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
1993
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
1994
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
1995
Black Black(.)p Black Black(.)p Black Black(.)p Black
1996
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
1997
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
1998
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
1999
Black(.)p Black Black(.)p Black Black(.)p Black Black
2000
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2001
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2002
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2003
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2004
Black Black(.)p Black Black(.)p Black Black(.)p Black
2005
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2006
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2007
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2008
Black(.)p Black Black(.)p Black Black(.)p Black Black
2009
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2010
Black Black(.)p Black Black -1 w(.)p Black 4 w(94)795
2011
1982 y(3.3.)h(The)h(class)h(type)f Fr(extension)p Black
2012
6 w Fw(.)p Black Black -2 w(.)p Black Black(.)p Black
2013
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2014
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2015
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2016
Black(.)p Black Black(.)p Black Black(.)p Black Black
2017
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2018
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2019
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2020
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2021
Black Black(.)p Black Black(.)p Black Black(.)p Black
2022
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2023
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2024
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2025
Black(.)p Black Black(.)p Black Black(.)p Black Black
2026
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2027
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2028
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2029
Black Black(.)p Black Black(.)p Black Black(.)p Black
2030
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2031
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2032
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2033
Black(.)p Black Black(.)p Black Black(.)p Black Black
2034
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2035
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2036
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2037
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2038
Black Black(.)p Black Black(.)p Black Black(.)p Black
2039
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2040
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2041
Black(.)p Black Black(.)p Black Black(.)p Black Black
2042
-1 w(.)p Black 4 w(95)994 2090 y(3.3.1.)f(Ho)n(w)h(to)g(de\002ne)g(an)g
2043
(e)o(xtension)f(class)p Black 13 w(.)p Black Black -1
2044
w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2045
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2046
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2047
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2048
Black Black(.)p Black Black(.)p Black Black(.)p Black
2049
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2050
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2051
Black(.)p Black Black(.)p Black Black(.)p Black Black
2052
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2053
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2054
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2055
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2056
Black Black(.)p Black Black(.)p Black Black(.)p Black
2057
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2058
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2059
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2060
Black(.)p Black Black(.)p Black Black(.)p Black Black
2061
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2062
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2063
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2064
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2065
Black Black(.)p Black Black(.)p Black Black(.)p Black
2066
Black(.)p Black Black -1 w(.)p Black 4 w(97)994 2198
2067
y(3.3.2.)g(Ho)n(w)h(to)g(bind)f(e)o(xtension)g(classes)i(to)g(element)e
2068
(types)p Black 10 w(.)p Black Black(.)p Black Black(.)p
2069
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2070
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2071
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2072
Black Black(.)p Black Black(.)p Black Black(.)p Black
2073
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2074
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2075
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2076
Black(.)p Black Black(.)p Black Black(.)p Black Black
2077
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2078
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2079
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2080
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2081
Black Black(.)p Black Black(.)p Black Black(.)p Black
2082
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2083
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2084
4 w(98)795 2306 y(3.4.)g(Details)i(of)f(the)g(mapping)e(from)i(XML)g
2085
(te)o(xt)g(to)g(the)g(tree)h(representation)p Black 13
2086
w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2087
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2088
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2089
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2090
Black Black(.)p Black Black(.)p Black Black(.)p Black
2091
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2092
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2093
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2094
Black(.)p Black Black(.)p Black Black(.)p Black Black
2095
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2096
Black Black(.)p Black Black -1 w(.)p Black 4 w(99)994
2097
2414 y(3.4.1.)e(The)g(representation)g(of)g(character)n(-free)f
2098
(elements)p Black 9 w(.)p Black Black -1 w(.)p Black
2099
Black(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2100
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2101
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2102
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2103
Black Black(.)p Black Black(.)p Black Black(.)p Black
2104
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2105
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2106
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2107
Black(.)p Black Black(.)p Black Black(.)p Black Black
2108
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2109
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2110
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2111
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2112
Black Black(.)p Black Black(.)p Black Black(.)p Black
2113
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2114
Black(.)p Black 4 w(100)994 2522 y(3.4.2.)h(The)g(representation)g(of)g
2115
(character)g(data)p Black 10 w(.)p Black Black -1 w(.)p
2116
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2117
Black Black(.)p Black Black(.)p Black Black(.)p Black
2118
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2119
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2120
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2121
Black(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2122
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2123
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2124
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2125
Black Black(.)p Black Black(.)p Black Black(.)p Black
2126
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2127
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2128
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2129
Black(.)p Black Black(.)p Black Black(.)p Black Black
2130
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2131
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2132
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2133
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2134
Black Black(.)p Black Black(.)p Black Black(.)p Black
2135
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2136
Black(.)p Black 4 w(100)994 2630 y(3.4.3.)g(The)g(representation)g(of)g
2137
(entities)i(within)f(documents)p Black 12 w(.)p Black
2138
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2139
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2140
Black(.)p Black Black(.)p Black Black(.)p Black Black
2141
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2142
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2143
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2144
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2145
Black Black(.)p Black Black(.)p Black Black(.)p Black
2146
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2147
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2148
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2149
Black(.)p Black Black(.)p Black Black(.)p Black Black
2150
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2151
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2152
Black Black(.)p Black 4 w(101)994 2737 y(3.4.4.)f(The)g(representation)
2153
g(of)g(attrib)n(utes)p Black 20 w(.)p Black Black(.)p
2154
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2155
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2156
Black Black(.)p Black Black(.)p Black Black(.)p Black
2157
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2158
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2159
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2160
Black(.)p Black Black(.)p Black Black(.)p Black Black
2161
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2162
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2163
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2164
Black Black(.)p Black Black(.)p Black Black(.)p Black
2165
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2166
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2167
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2168
Black(.)p Black Black(.)p Black Black(.)p Black Black
2169
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2170
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2171
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2172
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2173
Black Black(.)p Black Black(.)p Black Black(.)p Black
2174
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2175
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2176
Black(.)p Black Black(.)p Black 4 w(101)994 2845 y(3.4.5.)g(The)g
2177
(representation)g(of)g(processing)g(instructions)p Black(.)p
2178
Black Black -1 w(.)p Black Black -1 w(.)p Black Black(.)p
2179
Black Black(.)p Black Black(.)p Black Black(.)p Black
2180
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2181
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2182
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2183
Black(.)p Black Black(.)p Black Black(.)p Black Black
2184
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2185
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2186
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2187
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2188
Black Black(.)p Black Black(.)p Black Black(.)p Black
2189
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2190
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2191
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2192
Black(.)p Black Black(.)p Black Black(.)p Black Black
2193
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2194
Black 4 w(102)994 2953 y(3.4.6.)g(The)g(representation)g(of)g(comments)
2195
p Black 7 w(.)p Black Black -1 w(.)p Black Black -1 w(.)p
2196
Black Black(.)p Black Black(.)p Black Black(.)p Black
2197
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2198
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2199
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2200
Black(.)p Black Black(.)p Black Black(.)p Black Black
2201
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2202
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2203
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2204
Black Black(.)p Black Black(.)p Black Black(.)p Black
2205
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2206
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2207
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2208
Black(.)p Black Black(.)p Black Black(.)p Black Black
2209
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2210
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2211
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2212
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2213
Black Black(.)p Black Black(.)p Black Black(.)p Black
2214
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2215
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2216
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2217
Black(.)p Black Black(.)p Black Black(.)p Black 4 w(102)994
2218
3061 y(3.4.7.)g(The)g(attrib)n(utes)i Fr(xml:lang)e Fw(and)h
2219
Fr(xml:space)p Black 10 w Fw(.)p Black Black -2 w(.)p
2220
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2221
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2222
Black Black(.)p Black Black(.)p Black Black(.)p Black
2223
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2224
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2225
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2226
Black(.)p Black Black(.)p Black Black(.)p Black Black
2227
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2228
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2229
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2230
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2231
Black Black(.)p Black Black(.)p Black Black(.)p Black
2232
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2233
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2234
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2235
Black(.)p Black Black(.)p Black Black(.)p Black Black
2236
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2237
Black 4 w(102)795 3169 y(3.5.)f(Namespaces)p Black 13
2238
w(.)p Black Black -2 w(.)p Black Black(.)p Black Black(.)p
2239
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2240
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2241
Black Black(.)p Black Black(.)p Black Black(.)p Black
2242
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2243
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2244
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2245
Black(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2246
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2247
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2248
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2249
Black Black(.)p Black Black(.)p Black Black(.)p Black
2250
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2251
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2252
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2253
Black(.)p Black Black(.)p Black Black(.)p Black Black
2254
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2255
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2256
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2257
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2258
Black Black(.)p Black Black(.)p Black Black(.)p Black
2259
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2260
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2261
Black(.)p Black Black(.)p Black Black(.)p Black Black
2262
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2263
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2264
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2265
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2266
Black Black(.)p Black Black(.)p Black Black(.)p Black
2267
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2268
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2269
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2270
Black(.)p Black Black(.)p Black Black(.)p Black Black
2271
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2272
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2273
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2274
Black Black(.)p Black Black(.)p Black 4 w(102)994 3277
2275
y(3.5.1.)g(Pre\002x)h(normalization)p Black 5 w(.)p Black
2276
Black -4 w(.)p Black Black(.)p Black Black(.)p Black
2277
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2278
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2279
Black(.)p Black Black(.)p Black Black(.)p Black Black
2280
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2281
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2282
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2283
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2284
Black Black(.)p Black Black(.)p Black Black(.)p Black
2285
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2286
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2287
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2288
Black(.)p Black Black(.)p Black Black(.)p Black Black
2289
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2290
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2291
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2292
Black Black(.)p Black Black(.)p Black Black(.)p Black
2293
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2294
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2295
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2296
Black(.)p Black Black(.)p Black Black(.)p Black Black
2297
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2298
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2299
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2300
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2301
Black Black(.)p Black Black(.)p Black Black(.)p Black
2302
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2303
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2304
Black(.)p Black Black(.)p Black 4 w(102)994 3385 y(3.5.2.)f(DTDs)p
2305
Black 5 w(.)p Black Black -1 w(.)p Black Black(.)p Black
2306
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2307
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2308
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2309
Black(.)p Black Black(.)p Black Black(.)p Black Black
2310
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2311
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2312
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2313
Black Black(.)p Black Black(.)p Black Black(.)p Black
2314
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2315
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2316
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2317
Black(.)p Black Black(.)p Black Black(.)p Black Black
2318
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2319
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2320
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2321
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2322
Black Black(.)p Black Black(.)p Black Black(.)p Black
2323
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2324
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2325
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2326
Black(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2327
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2328
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2329
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2330
Black Black(.)p Black Black(.)p Black Black(.)p Black
2331
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2332
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2333
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2334
Black(.)p Black Black(.)p Black Black(.)p Black Black
2335
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2336
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2337
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2338
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2339
Black Black(.)p Black Black(.)p Black Black(.)p Black
2340
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2341
Black(.)p Black 4 w(104)994 3493 y(3.5.3.)g(Ho)n(w)h(to)g(enable)f
2342
(namespace)g(processing)p Black 2 w(.)p Black Black -1
2343
w(.)p Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2344
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2345
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2346
Black Black(.)p Black Black(.)p Black Black(.)p Black
2347
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2348
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2349
Black(.)p Black Black(.)p Black Black(.)p Black Black
2350
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2351
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2352
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2353
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2354
Black Black(.)p Black Black(.)p Black Black(.)p Black
2355
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2356
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2357
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2358
Black(.)p Black Black(.)p Black Black(.)p Black Black
2359
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2360
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2361
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2362
Black Black(.)p Black Black(.)p Black 4 w(104)596 3601
2363
y(4.)h(Con\002guring)e(and)h(calling)h(the)g(parser)p
2364
Black 11 w(.)p Black Black -1 w(.)p Black Black(.)p Black
2365
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2366
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2367
Black(.)p Black Black(.)p Black Black(.)p Black Black
2368
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2369
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2370
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2371
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2372
Black Black(.)p Black Black(.)p Black Black(.)p Black
2373
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2374
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2375
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2376
Black(.)p Black Black(.)p Black Black(.)p Black Black
2377
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2378
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2379
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2380
Black Black(.)p Black Black(.)p Black Black(.)p Black
2381
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2382
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2383
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2384
Black(.)p Black Black(.)p Black Black(.)p Black Black
2385
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2386
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2387
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2388
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2389
Black Black(.)p Black Black(.)p Black Black(.)p Black
2390
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2391
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2392
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2393
Black(.)p Black Black(.)p Black Black(.)p Black 4 w(106)795
2394
3709 y(4.1.)f(Ov)o(ervie)n(w)p Black 19 w(.)p Black Black
2395
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2396
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2397
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2398
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2399
Black Black(.)p Black Black(.)p Black Black(.)p Black
2400
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2401
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2402
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2403
Black(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2404
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2405
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2406
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2407
Black Black(.)p Black Black(.)p Black Black(.)p Black
2408
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2409
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2410
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2411
Black(.)p Black Black(.)p Black Black(.)p Black Black
2412
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2413
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2414
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2415
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2416
Black Black(.)p Black Black(.)p Black Black(.)p Black
2417
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2418
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2419
Black(.)p Black Black(.)p Black Black(.)p Black Black
2420
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2421
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2422
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2423
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2424
Black Black(.)p Black Black(.)p Black Black(.)p Black
2425
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2426
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2427
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2428
Black(.)p Black Black(.)p Black Black(.)p Black Black
2429
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2430
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2431
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2432
Black Black(.)p Black Black(.)p Black 4 w(106)795 3817
2433
y(4.2.)g(Resolv)o(ers)h(and)g(sources)p Black 2 w(.)p
2434
Black Black -1 w(.)p Black Black -1 w(.)p Black Black(.)p
2435
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2436
Black Black(.)p Black Black(.)p Black Black(.)p Black
2437
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2438
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2439
Black(.)p Black Black(.)p Black Black(.)p Black Black
2440
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2441
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2442
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2443
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2444
Black Black(.)p Black Black(.)p Black Black(.)p Black
2445
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2446
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2447
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2448
Black(.)p Black Black(.)p Black Black(.)p Black Black
2449
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2450
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2451
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2452
Black Black(.)p Black Black(.)p Black Black(.)p Black
2453
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2454
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2455
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2456
Black(.)p Black Black(.)p Black Black(.)p Black Black
2457
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2458
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2459
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2460
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2461
Black Black(.)p Black Black(.)p Black Black(.)p Black
2462
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2463
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2464
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2465
Black(.)p Black Black(.)p Black Black(.)p Black 4 w(108)994
2466
3925 y(4.2.1.)f(Using)h(the)g(b)n(uilt-in)f(resolv)o(ers)h(\(called)f
2467
(sources\))p Black 5 w(.)p Black Black -1 w(.)p Black
2468
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2469
Black(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2470
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2471
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2472
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2473
Black Black(.)p Black Black(.)p Black Black(.)p Black
2474
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2475
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2476
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2477
Black(.)p Black Black(.)p Black Black(.)p Black Black
2478
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2479
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2480
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2481
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2482
Black Black(.)p Black Black(.)p Black Black(.)p Black
2483
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2484
Black(.)p Black 4 w(108)994 4033 y(4.2.2.)g(The)g(resolv)o(er)g(API)p
2485
Black 11 w(.)p Black Black -1 w(.)p Black Black(.)p Black
2486
Black(.)p Black Black(.)p Black Black(.)p Black Black
2487
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2488
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2489
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2490
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2491
Black Black(.)p Black Black(.)p Black Black(.)p Black
2492
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2493
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2494
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2495
Black(.)p Black Black(.)p Black Black(.)p Black Black
2496
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2497
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2498
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2499
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2500
Black Black(.)p Black Black(.)p Black Black(.)p Black
2501
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2502
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2503
Black(.)p Black Black(.)p Black Black(.)p Black Black
2504
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2505
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2506
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2507
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2508
Black Black(.)p Black Black(.)p Black Black(.)p Black
2509
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2510
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2511
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2512
Black(.)p Black Black(.)p Black Black(.)p Black Black
2513
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2514
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2515
Black Black(.)p Black 4 w(109)994 4141 y(4.2.3.)g(Prede\002ned)f
2516
(resolv)o(er)h(components)p Black 13 w(.)p Black Black(.)p
2517
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2518
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2519
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2520
Black Black(.)p Black Black(.)p Black Black(.)p Black
2521
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2522
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2523
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2524
Black(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2525
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2526
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2527
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2528
Black Black(.)p Black Black(.)p Black Black(.)p Black
2529
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2530
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2531
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2532
Black(.)p Black Black(.)p Black Black(.)p Black Black
2533
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2534
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2535
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2536
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2537
Black Black(.)p Black Black(.)p Black Black(.)p Black
2538
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2539
Black(.)p Black 4 w(111)795 4248 y(4.3.)g(The)h(DTD)g(classes)p
2540
Black 1 w(.)p Black Black 1 w(.)p Black Black -1 w(.)p
2541
Black Black(.)p Black Black(.)p Black Black(.)p Black
2542
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2543
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2544
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2545
Black(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2546
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2547
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2548
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2549
Black Black(.)p Black Black(.)p Black Black(.)p Black
2550
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2551
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2552
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2553
Black(.)p Black Black(.)p Black Black(.)p Black Black
2554
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2555
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2556
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2557
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2558
Black Black(.)p Black Black(.)p Black Black(.)p Black
2559
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2560
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2561
Black(.)p Black Black(.)p Black Black(.)p Black Black
2562
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2563
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2564
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2565
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2566
Black Black(.)p Black Black(.)p Black Black(.)p Black
2567
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2568
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2569
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2570
Black(.)p Black Black(.)p Black Black(.)p Black Black
2571
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2572
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2573
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2574
Black Black(.)p Black Black(.)p Black 4 w(114)795 4356
2575
y(4.4.)f(In)m(v)n(oking)f(the)i(parser)p Black 14 w(.)p
2576
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2577
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2578
Black Black(.)p Black Black(.)p Black Black(.)p Black
2579
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2580
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2581
Black(.)p Black Black(.)p Black Black(.)p Black Black
2582
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2583
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2584
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2585
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2586
Black Black(.)p Black Black(.)p Black Black(.)p Black
2587
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2588
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2589
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2590
Black(.)p Black Black(.)p Black Black(.)p Black Black
2591
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2592
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2593
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2594
Black Black(.)p Black Black(.)p Black Black(.)p Black
2595
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2596
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2597
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2598
Black(.)p Black Black(.)p Black Black(.)p Black Black
2599
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2600
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2601
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2602
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2603
Black Black(.)p Black Black(.)p Black Black(.)p Black
2604
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2605
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2606
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2607
Black(.)p Black Black(.)p Black Black(.)p Black Black
2608
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2609
Black 4 w(125)994 4464 y(4.4.1.)f(Def)o(aults)p Black
2610
10 w(.)p Black Black -1 w(.)p Black Black(.)p Black Black
2611
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2612
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2613
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2614
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2615
Black Black(.)p Black Black(.)p Black Black(.)p Black
2616
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2617
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2618
Black(.)p Black Black(.)p Black Black(.)p Black Black
2619
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2620
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2621
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2622
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2623
Black Black(.)p Black Black(.)p Black Black(.)p Black
2624
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2625
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2626
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2627
Black(.)p Black Black(.)p Black Black(.)p Black Black
2628
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2629
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2630
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2631
Black Black(.)p Black Black(.)p Black Black(.)p Black
2632
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2633
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2634
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2635
Black(.)p Black Black(.)p Black Black(.)p Black Black
2636
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2637
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2638
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2639
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2640
Black Black(.)p Black Black(.)p Black Black(.)p Black
2641
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2642
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2643
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2644
Black(.)p Black Black(.)p Black Black(.)p Black 4 w(125)994
2645
4572 y(4.4.2.)g(P)o(arsing)g(functions)p Black 4 w(.)p
2646
Black Black -3 w(.)p Black Black(.)p Black Black(.)p
2647
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2648
Black Black(.)p Black Black(.)p Black Black(.)p Black
2649
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2650
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2651
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2652
Black(.)p Black Black(.)p Black Black(.)p Black Black
2653
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2654
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2655
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2656
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2657
Black Black(.)p Black Black(.)p Black Black(.)p Black
2658
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2659
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2660
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2661
Black(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2662
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2663
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2664
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2665
Black Black(.)p Black Black(.)p Black Black(.)p Black
2666
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2667
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2668
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2669
Black(.)p Black Black(.)p Black Black(.)p Black Black
2670
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2671
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2672
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2673
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2674
Black Black(.)p Black Black(.)p Black Black(.)p Black
2675
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2676
Black(.)p Black 4 w(125)994 4680 y(4.4.3.)g(Con\002guration)f(options)p
2677
Black 19 w(.)p Black Black(.)p Black Black -1 w(.)p Black
2678
Black(.)p Black Black(.)p Black Black(.)p Black Black
2679
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2680
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2681
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2682
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2683
Black Black(.)p Black Black(.)p Black Black(.)p Black
2684
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2685
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2686
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2687
Black(.)p Black Black(.)p Black Black(.)p Black Black
2688
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2689
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2690
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2691
Black Black(.)p Black Black(.)p Black Black(.)p Black
2692
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2693
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2694
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2695
Black(.)p Black Black(.)p Black Black(.)p Black Black
2696
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2697
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2698
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2699
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2700
Black Black(.)p Black Black(.)p Black Black(.)p Black
2701
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2702
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2703
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2704
Black(.)p Black Black(.)p Black Black(.)p Black 4 w(126)994
2705
4788 y(4.4.4.)h(Which)h(con\002guration)d(should)i(I)i(use?)p
2706
Black 18 w(.)p Black Black(.)p Black Black -1 w(.)p Black
2707
Black(.)p Black Black(.)p Black Black(.)p Black Black
2708
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2709
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2710
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2711
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2712
Black Black(.)p Black Black(.)p Black Black(.)p Black
2713
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2714
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2715
Black(.)p Black Black(.)p Black Black(.)p Black Black
2716
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2717
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2718
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2719
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2720
Black Black(.)p Black Black(.)p Black Black(.)p Black
2721
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2722
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2723
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2724
Black(.)p Black Black(.)p Black Black(.)p Black Black
2725
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2726
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2727
Black Black(.)p Black 4 w(128)p Black 3842 5278 a Fs(4)p
2730
5 4 bop Black Black -2 621 a Ft(List)48 b(of)g(Figures)396
2731
815 y Fw(3-1.)19 b(A)i(tree)f(with)h(element)e(nodes,)h(data)g(nodes,)f
2732
(and)g(attrib)n(utes)p Black 18 w(.)p Black Black(.)p
2733
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2734
Black Black(.)p Black Black(.)p Black Black(.)p Black
2735
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2736
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2737
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2738
Black(.)p Black Black(.)p Black Black(.)p Black Black
2739
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2740
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2741
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2742
Black Black(.)p Black Black(.)p Black Black(.)p Black
2743
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2744
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2745
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2746
Black(.)p Black Black(.)p Black Black(.)p Black Black
2747
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2748
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2749
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2750
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2751
Black Black(.)p Black Black(.)p Black Black(.)p Black
2752
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2753
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2754
Black(.)p Black Black(.)p Black Black(.)p Black Black
2755
-1 w(.)p Black 4 w(50)396 923 y(3-2.)g(Nodes)h(are)g(doubly)f(link)o
2756
(ed)g(trees)p Black 15 w(.)p Black Black(.)p Black Black(.)p
2757
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2758
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2759
Black Black(.)p Black Black(.)p Black Black(.)p Black
2760
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2761
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2762
Black(.)p Black Black(.)p Black Black(.)p Black Black
2763
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2764
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2765
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2766
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2767
Black Black(.)p Black Black(.)p Black Black(.)p Black
2768
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2769
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2770
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2771
Black(.)p Black Black(.)p Black Black(.)p Black Black
2772
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2773
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2774
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2775
Black Black(.)p Black Black(.)p Black Black(.)p Black
2776
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2777
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2778
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2779
Black(.)p Black Black(.)p Black Black(.)p Black Black
2780
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2781
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2782
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2783
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2784
Black Black(.)p Black Black(.)p Black Black(.)p Black
2785
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2786
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2787
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2788
Black(.)p Black Black(.)p Black Black(.)p Black Black
2789
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2790
Black Black(.)p Black Black -1 w(.)p Black 4 w(51)396
2791
1031 y(3-3.)g(A)i(node)e(can)h(only)g(be)g(added)f(if)h(it)h(is)g(a)g
2792
(root)p Black 5 w(.)p Black Black -1 w(.)p Black Black(.)p
2793
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2794
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2795
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2796
Black Black(.)p Black Black(.)p Black Black(.)p Black
2797
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2798
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2799
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2800
Black(.)p Black Black(.)p Black Black(.)p Black Black
2801
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2802
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2803
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2804
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2805
Black Black(.)p Black Black(.)p Black Black(.)p Black
2806
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2807
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2808
Black(.)p Black Black(.)p Black Black(.)p Black Black
2809
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2810
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2811
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2812
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2813
Black Black(.)p Black Black(.)p Black Black(.)p Black
2814
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2815
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2816
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2817
Black(.)p Black Black(.)p Black Black(.)p Black Black
2818
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2819
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2820
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2821
Black Black(.)p Black Black(.)p Black Black(.)p Black
2822
Black -1 w(.)p Black 4 w(51)396 1139 y(3-4.)e(A)i(remo)o(v)o(ed)d(node)
2823
h(becomes)g(the)i(root)e(of)h(the)g(subtree)p Black 16
2824
w(.)p Black Black(.)p Black Black(.)p Black Black -1
2825
w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2826
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2827
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2828
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2829
Black Black(.)p Black Black(.)p Black Black(.)p Black
2830
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2831
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2832
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2833
Black(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2834
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2835
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2836
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2837
Black Black(.)p Black Black(.)p Black Black(.)p Black
2838
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2839
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2840
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2841
Black(.)p Black Black(.)p Black Black(.)p Black Black
2842
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2843
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2844
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2845
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2846
Black Black(.)p Black Black(.)p Black Black(.)p Black
2847
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2848
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2849
4 w(52)396 1247 y(3-5.)f(The)h(clone)g(of)g(a)g(subtree)p
2850
Black 18 w(.)p Black Black(.)p Black Black(.)p Black
2851
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2852
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2853
Black(.)p Black Black(.)p Black Black(.)p Black Black
2854
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2855
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2856
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2857
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2858
Black Black(.)p Black Black(.)p Black Black(.)p Black
2859
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2860
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2861
Black(.)p Black Black(.)p Black Black(.)p Black Black
2862
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2863
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2864
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2865
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2866
Black Black(.)p Black Black(.)p Black Black(.)p Black
2867
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2868
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2869
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2870
Black(.)p Black Black(.)p Black Black(.)p Black Black
2871
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2872
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2873
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2874
Black Black(.)p Black Black(.)p Black Black(.)p Black
2875
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2876
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2877
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2878
Black(.)p Black Black(.)p Black Black(.)p Black Black
2879
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2880
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2881
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2882
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2883
Black Black(.)p Black Black(.)p Black Black(.)p Black
2884
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2885
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2886
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2887
Black(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2888
Black Black -1 w(.)p Black 4 w(52)396 1355 y(3-6.)f(The)h(structure)g
2889
(of)f(nodes)h(and)g(e)o(xtensions)p Black 18 w(.)p Black
2890
Black(.)p Black Black(.)p Black Black(.)p Black Black
2891
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2892
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2893
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2894
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2895
Black Black(.)p Black Black(.)p Black Black(.)p Black
2896
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2897
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2898
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2899
Black(.)p Black Black(.)p Black Black(.)p Black Black
2900
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2901
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2902
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2903
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2904
Black Black(.)p Black Black(.)p Black Black(.)p Black
2905
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2906
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2907
Black(.)p Black Black(.)p Black Black(.)p Black Black
2908
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2909
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2910
Black Black(.)p Black Black -1 w(.)p Black Black(.)p
2911
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2912
Black Black(.)p Black Black(.)p Black Black(.)p Black
2913
Black -1 w(.)p Black Black(.)p Black Black(.)p Black
2914
Black(.)p Black Black -1 w(.)p Black Black(.)p Black
2915
Black(.)p Black Black(.)p Black Black -1 w(.)p Black
2916
Black(.)p Black Black(.)p Black Black(.)p Black Black
2917
-1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p
2918
Black Black -1 w(.)p Black Black(.)p Black Black(.)p
2919
Black Black(.)p Black Black(.)p Black Black -1 w(.)p
2920
Black 4 w(96)p Black 3842 5278 a Fs(5)p Black eop
2922
6 5 bop Black Black 1241 647 a Fz(I.)58 b(User')-12 b(s)57
2923
b(guide)p Black Black eop
2925
7 6 bop Black Black -2 621 a Ft(Chapter)48 b(1.)f(What)h(is)f(XML?)-2
2926
1055 y Fy(1.1.)39 b(Intr)m(oduction)396 1235 y Fw(XML)20
2927
b(\(short)g(for)f Fs(Extensible)h(Markup)g(Langua)o(g)o(e)p
2928
Fw(\))e(generalizes)h(the)h(idea)g(that)g(te)o(xt)g(documents)f(are)h
2929
(typically)396 1343 y(structured)f(in)h(sections,)g(sub-sections,)f
2930
(paragraphs,)f(and)i(so)g(on.)g(The)g(format)f(of)h(the)g(document)e
2931
(is)j(not)f(\002x)o(ed)g(\(as,)396 1451 y(for)g(e)o(xample,)e(in)j
2932
(HTML\),)e(b)n(ut)h(can)g(be)g(declared)f(by)h(a)h(so-called)e(DTD)i
2933
(\(document)c(type)j(de\002nition\).)f(The)g(DTD)396
2934
1559 y(describes)h(only)f(the)i(rules)f(ho)n(w)f(the)i(document)d(can)i
2935
(be)g(structured,)e(b)n(ut)j(not)e(ho)n(w)h(the)g(document)e(can)i(be)
2936
396 1667 y(processed.)f(F)o(or)h(e)o(xample,)e(if)j(you)e(w)o(ant)i(to)
2937
f(publish)f(a)i(book)e(that)h(uses)h(XML)f(markup,)e(you)h(will)i(need)
2938
f(a)g(processor)396 1775 y(that)h(con)m(v)o(erts)d(the)i(XML)g(\002le)h
2939
(into)f(a)h(printable)e(format)g(such)h(as)h(Postscript.)f(On)g(the)g
2940
(one)g(hand,)f(the)h(structure)f(of)396 1883 y(XML)h(documents)f(is)i
2941
(con\002gurable;)d(on)i(the)g(other)f(hand,)g(there)h(is)h(no)f(longer)
2942
f(a)h(canonical)f(interpretation)f(of)i(the)396 1991
2943
y(elements)g(of)g(the)g(document;)f(for)g(e)o(xample)g(one)h(XML)g(DTD)
2944
g(might)g(w)o(ant)g(that)g(paragraphes)e(are)i(delimited)g(by)396
2945
2099 y Fr(para)g Fw(tags,)h(and)e(another)g(DTD)h(e)o(xpects)g
2946
Fr(p)g Fw(tags)h(for)e(the)i(same)f(purpose.)e(As)j(a)g(result,)f(for)g
2947
(e)n(v)o(ery)e(DTD)j(a)f(ne)n(w)396 2206 y(processor)f(is)i(required.)
2948
396 2356 y(Although)e(XML)h(can)g(be)g(used)g(to)g(e)o(xpress)g
2949
(structured)f(te)o(xt)h(documents)e(it)j(is)g(not)f(limited)g(to)g
2950
(this)h(kind)e(of)396 2464 y(application.)g(F)o(or)h(e)o(xample,)e(XML)
2951
i(can)g(also)h(be)f(used)g(to)g(e)o(xchange)e(structured)h(data)h(o)o
2952
(v)o(er)f(a)h(netw)o(ork,)f(or)h(to)396 2572 y(simply)g(store)g
2953
(structured)f(data)h(in)g(\002les.)h(Note)f(that)h(XML)f(documents)e
2954
(cannot)i(contain)f(arbitrary)f(binary)h(data)396 2680
2955
y(because)g(some)g(characters)g(are)g(forbidden;)e(for)i(some)g
2956
(applications)g(you)f(need)h(to)h(encode)e(binary)g(data)h(as)h(te)o
2957
(xt)g(\(e.g.)396 2788 y(the)g(base)h(64)f(encoding\).)-2
2958
3116 y Fq(1.1.1.)35 b(The)f("hello)g(w)n(orld")e(e)n(xample)396
2959
3283 y Fw(The)20 b(follo)n(wing)f(e)o(xample)f(sho)n(ws)j(a)f(v)o(ery)f
2960
(simple)i(DTD,)f(and)f(a)i(corresponding)c(document)h(instance.)h(The)
2961
396 3391 y(document)f(is)k(structured)c(such)i(that)h(it)f(consists)h
2962
(of)f(sections,)g(and)g(that)g(sections)g(consist)h(of)f(paragraphs,)d
2963
(and)j(that)396 3499 y(paragraphs)e(contain)h(plain)h(te)o(xt:)396
2964
3679 y Fr(<!ELEMENT)44 b(document)f(\(section\)+>)396
2965
3777 y(<!ELEMENT)h(section)f(\(paragraph\)+>)396 3874
2966
y(<!ELEMENT)h(paragraph)f(\(#PCDATA\)>)396 4065 y Fw(The)20
2967
b(follo)n(wing)f(document)f(is)j(an)f(instance)g(of)g(this)h(DTD:)396
2968
4245 y Fr(<?xml)44 b(version="1.0")f(encoding="ISO-8859-1"?>)396
2969
4342 y(<!DOCTYPE)h(document)f(SYSTEM)h("simple.dtd">)396
2970
4439 y(<document>)486 4536 y(<section>)576 4633 y(<paragraph>This)e(is)
2971
i(a)h(paragraph)e(of)i(the)f(first)g(section.</paragraph>)576
2972
4731 y(<paragraph>This)e(is)i(another)g(paragraph)f(of)i(the)f(first)g
2973
(section.</paragraph>)486 4828 y(</section>)p Black 3839
2974
5278 a Fs(7)p Black eop
2976
8 7 bop Black 3028 67 a Fs(Chapter)19 b(1.)h(What)h(is)g(XML?)p
2977
Black 486 579 a Fr(<section>)576 676 y(<paragraph>This)42
2978
b(is)i(the)h(only)f(paragraph)f(of)i(the)f(second)g
2979
(section.</paragraph>)486 773 y(</section>)396 870 y(</document>)396
2980
1061 y Fw(As)21 b(in)g(HTML)f(\(and,)f(of)h(course,)f(in)h(grand-f)o
2981
(ather)d(SGML\),)j(the)g("pieces")g(of)g(the)g(document)f(are)h
2982
(delimited)f(by)396 1169 y(element)h(braces,)f(i.e.)i(such)f(a)g(piece)
2983
g(be)o(gins)f(with)i Fp(<)p Fr(name-of-the-type-of-the-piece)p
2984
Fp(>)15 b Fw(and)20 b(ends)g(with)396 1277 y Fp(<)p Fr
2985
(/name-of-the-type-of-the-piece)p Fp(>)p Fw(,)15 b(and)20
2986
b(the)g(pieces)g(are)g(called)g Fs(elements)p Fw(.)g(Unlik)o(e)g(HTML)g
2987
(and)396 1385 y(SGML,)g(both)g(start)g(tags)h(and)f(end)f(tags)i
2988
(\(i.e.)f(the)g(delimiters)g(written)g(in)g(angle)g(brack)o(ets\))f
2989
(can)h(ne)n(v)o(er)f(be)h(left)g(out.)396 1493 y(F)o(or)g(e)o(xample,)f
2990
(HTML)h(calls)h(the)f(paragraphs)e(simply)i Fr(p)p Fw(,)g(and)f
2991
(because)h(paragraphs)e(ne)n(v)o(er)h(contain)g(paragraphs,)f(a)396
2992
1601 y(sequence)h(of)h(se)n(v)o(eral)g(paragraphs)e(can)i(be)g(written)
2993
g(as:)396 1781 y Fr(<p>First)44 b(paragraph)396 1878
2994
y(<p>Second)g(paragraph)396 2069 y Fw(This)21 b(is)g(not)f(possible)g
2995
(in)g(XML;)g(continuing)e(our)i(e)o(xample)e(abo)o(v)o(e)h(we)h(must)h
2996
(al)o(w)o(ays)f(write)396 2249 y Fr(<paragraph>First)42
2997
b(paragraph</paragraph>)396 2346 y(<paragraph>Second)g
2998
(paragraph</paragraph>)396 2537 y Fw(The)20 b(rationale)f(behind)g
2999
(that)h(is)i(to)e(\(1\))f(simplify)h(the)g(de)n(v)o(elopment)d(of)j
3000
(XML)h(parsers)f(\(you)e(need)i(not)g(con)m(v)o(ert)e(the)396
3001
2645 y(DTD)j(into)f(a)g(deterministic)f(\002nite)i(automaton)d(which)i
3002
(is)h(required)d(to)j(detect)f(omitted)f(tags\),)h(and)g(to)g(\(2\))g
3003
(mak)o(e)f(it)396 2753 y(possible)h(to)h(parse)e(the)i(document)d
3004
(independent)f(of)j(whether)f(the)i(DTD)f(is)h(kno)n(wn)e(or)h(not.)396
3005
2903 y(The)g(\002rst)h(line)f(of)g(our)g(sample)g(document,)396
3006
3083 y Fr(<?xml)44 b(version="1.0")f(encoding="ISO-8859-1"?>)396
3007
3274 y Fw(is)21 b(the)e(so-called)g Fs(XML)h(declar)o(ation)p
3008
Fw(.)d(It)j(e)o(xpresses)e(that)i(the)f(document)f(follo)n(ws)h(the)g
3009
(con)m(v)o(entions)e(of)i(XML)g(v)o(ersion)396 3382 y(1.0,)h(and)f
3010
(that)h(the)h(document)d(is)j(encoded)d(using)i(characters)f(from)g
3011
(the)i(ISO-8859-1)c(character)i(set)i(\(often)e(kno)n(wn)396
3012
3490 y(as)i("Latin)e(1",)g(mostly)h(used)f(in)h(W)-7
3013
b(estern)20 b(Europe\).)d(Although)h(the)i(XML)g(declaration)e(is)i
3014
(not)g(mandatory)-5 b(,)16 b(it)21 b(is)f(good)396 3598
3015
y(style)h(to)f(include)f(it;)i(e)n(v)o(erybody)c(sees)k(at)g(the)f
3016
(\002rst)h(glance)f(that)g(the)g(document)e(uses)j(XML)f(markup)f(and)g
3017
(not)h(the)396 3706 y(similar)n(-looking)e(HTML)i(and)g(SGML)g(markup)f
3018
(languages.)f(If)i(you)g(omit)g(the)g(XML)g(declaration,)e(the)j
3019
(parser)e(will)396 3813 y(assume)h(that)h(the)f(document)e(is)j
3020
(encoded)e(as)i(UTF-8)e(or)h(UTF-16)f(\(there)h(is)h(a)g(rule)e(that)i
3021
(mak)o(es)f(it)h(possible)f(to)396 3921 y(distinguish)f(between)h
3022
(UTF-8)g(and)f(UTF-16)g(automatically\);)g(these)h(are)g(encodings)f
3023
(of)h(Unicode')-5 b(s)19 b(uni)n(v)o(ersal)396 4029 y(character)g(set.)
3024
i(\(Note)f(that)g(PXP,)h(unlik)o(e)e(its)i(predecessor)e("Markup",)f
3025
(fully)i(supports)f(Unicode.\))396 4179 y(The)h(second)f(line,)396
3026
4359 y Fr(<!DOCTYPE)44 b(document)f(SYSTEM)h("simple.dtd">)396
3027
4550 y Fw(names)20 b(the)g(DTD)h(that)f(is)h(going)e(to)h(be)g(used)g
3028
(for)g(the)g(rest)h(of)f(the)g(document.)e(In)i(general,)f(it)i(is)g
3029
(possible)f(that)g(the)396 4658 y(DTD)h(consists)f(of)g(tw)o(o)h
3030
(parts,)f(the)g(so-called)f(e)o(xternal)g(and)h(the)g(internal)f
3031
(subset.)h("External")f(means)h(that)g(the)h(DTD)396
3032
4766 y(e)o(xists)g(as)g(a)f(second)g(\002le;)h("internal")e(means)h
3033
(that)g(the)g(DTD)h(is)g(included)d(in)j(the)f(same)g(\002le.)h(In)f
3034
(this)g(e)o(xample,)f(there)p Black 3842 5278 a Fs(8)p
3037
9 8 bop Black 3028 67 a Fs(Chapter)19 b(1.)h(What)h(is)g(XML?)p
3038
Black 396 579 a Fw(is)g(only)f(an)g(e)o(xternal)f(subset,)h(and)g(the)g
3039
(system)g(identi\002er)g("simple.dtd")e(speci\002es)j(where)f(the)g
3040
(DTD)g(\002le)h(can)f(be)396 687 y(found.)e(System)j(identi\002ers)f
3041
(are)g(interpreted)e(as)j(URLs;)g(for)f(instance)g(this)g(w)o(ould)g
3042
(be)g(le)o(gal:)396 867 y Fr(<!DOCTYPE)44 b(document)f(SYSTEM)h
3043
("http://host/location/simple.dtd">)396 1058 y Fw(Please)21
3044
b(note)f(that)g(PXP)h(cannot)e(interpret)g(HTTP)i(identi\002ers)e(by)h
3045
(def)o(ault,)f(b)n(ut)i(it)g(is)g(possible)f(to)g(change)f(the)396
3046
1166 y(interpretation)f(of)i(system)h(identi\002ers.)396
3047
1315 y(The)f(w)o(ord)g(immediately)f(follo)n(wing)f Fr(DOCTYPE)i
3048
Fw(determines)f(which)g(of)h(the)g(declared)f(element)h(types)g(\(here)
3049
396 1423 y("document",)e("section",)h(and)h("paragraph"\))d(is)k(used)f
3050
(for)g(the)g(outermost)f(element,)g(the)h Fs(r)l(oot)h(element)q
3051
Fw(.)f(In)g(this)396 1531 y(e)o(xample)f(it)i(is)g Fr(document)f
3052
Fw(because)f(the)h(outermost)f(element)h(is)h(delimited)e(by)h
3053
Fp(<)p Fr(document)p Fp(>)f Fw(and)396 1639 y Fp(<)p
3054
Fr(/document)p Fp(>)p Fw(.)396 1789 y(The)h(DTD)g(consists)h(of)f
3055
(three)g(declarations)f(for)g(element)h(types:)g Fr(document)p
3056
Fw(,)f Fr(section)p Fw(,)g(and)h Fr(paragraph)p Fw(.)f(Such)396
3057
1896 y(a)i(declaration)d(has)j(tw)o(o)f(parts:)396 2077
3058
y Fp(<)p Fr(!ELEMENT)43 b Fo(name)i(content-model)p Fp(>)396
3059
2268 y Fw(The)20 b(content)f(model)h(is)h(a)f(re)o(gular)f(e)o
3060
(xpression)g(which)g(describes)h(the)g(possible)g(inner)f(structure)h
3061
(of)g(the)g(element.)396 2376 y(Here,)g Fr(document)f
3062
Fw(contains)h(one)g(or)g(more)f(sections,)h(and)g(a)g
3063
Fr(section)g Fw(contains)f(one)h(or)g(more)f(paragraphs.)f(Note)396
3064
2483 y(that)j(these)f(tw)o(o)g(element)g(types)g(are)g(not)g(allo)n
3065
(wed)f(to)i(contain)e(arbitrary)g(te)o(xt.)g(Only)h(the)g
3066
Fr(paragraph)g Fw(element)f(type)396 2591 y(is)i(declared)e(such)h
3067
(that)h(parsed)e(character)g(data)h(\(indicated)f(by)h(the)g(symbol)f
3068
Fr(#PCDATA)p Fw(\))g(is)i(permitted.)396 2741 y(See)g(belo)n(w)e(for)h
3069
(a)h(detailed)e(discussion)h(of)g(content)f(models.)-2
3070
3110 y Fq(1.1.2.)35 b(XML)e(par)n(ser)n(s)h(and)g(pr)n(ocessor)n(s)396
3071
3278 y Fw(XML)20 b(documents)f(are)h(human-readable,)c(b)n(ut)21
3072
b(this)f(is)h(not)f(the)h(main)e(purpose)g(of)h(this)h(language.)d(XML)
3073
i(has)g(been)396 3386 y(designed)f(such)h(that)g(documents)f(can)h(be)g
3074
(read)g(by)f(a)i(program)d(called)i(an)g Fs(XML)h(par)o(ser)r
3075
Fw(.)f(The)g(parser)g(checks)f(that)396 3494 y(the)h(document)f(is)i
3076
(well-formatted,)d(and)h(it)i(represents)f(the)g(document)e(as)j
3077
(objects)f(of)g(the)g(programming)d(language.)396 3602
3078
y(There)j(are)g(tw)o(o)g(aspects)h(when)e(checking)g(the)h(document:)e
3079
(First,)j(the)f(document)e(must)j(follo)n(w)e(some)h(basic)396
3080
3710 y(syntactic)g(rules,)g(such)g(as)h(that)f(tags)h(are)f(written)g
3081
(in)g(angle)g(brack)o(ets,)f(that)h(for)g(e)n(v)o(ery)f(start)h(tag)h
3082
(there)e(must)i(be)f(a)396 3818 y(corresponding)d(end)j(tag)g(and)f(so)
3083
i(on.)f(A)g(document)e(respecting)h(these)i(rules)f(is)h
3084
Fs(well-formed)r Fw(.)f(Second,)f(the)396 3926 y(document)f(must)j
3085
(match)e(the)i(DTD)f(in)g(which)g(case)h(the)f(document)e(is)j
3086
Fs(valid)r Fw(.)f(Man)o(y)f(parsers)h(check)f(only)h(on)396
3087
4034 y(well-formedness)e(and)i(ignore)f(the)h(DTD;)h(PXP)g(is)g
3088
(designed)e(such)g(that)i(it)g(can)f(e)n(v)o(en)f(v)n(alidate)g(the)i
3089
(document.)396 4183 y(A)g(parser)f(does)f(not)h(mak)o(e)g(a)h(sensible)
3090
f(application,)e(it)j(only)f(reads)g(XML)g(documents.)e(The)i(whole)g
3091
(application)396 4291 y(w)o(orking)f(with)h(XML-formatted)e(data)i(is)h
3092
(called)f(an)g Fs(XML)h(pr)l(ocessor)r Fw(.)f(Often)g(XML)g(processors)
3093
f(con)m(v)o(ert)396 4399 y(documents)g(into)h(another)e(format,)h(such)
3094
h(as)h(HTML)f(or)g(Postscript.)g(Sometimes)g(processors)f(e)o(xtract)g
3095
(data)h(of)g(the)396 4507 y(documents)f(and)g(output)g(the)i(processed)
3096
e(data)h(again)f(XML-formatted.)e(The)j(parser)g(can)g(help)f(the)i
3097
(application)396 4615 y(processing)e(the)h(document;)f(for)g(e)o
3098
(xample)g(it)i(can)f(pro)o(vide)e(means)i(to)g(access)h(the)f(document)
3099
e(in)j(a)f(speci\002c)h(manner)-5 b(.)396 4723 y(PXP)21
3100
b(supports)e(an)i(object-oriented)c(access)k(layer)e(specially)-5
3101
b(.)p Black 3842 5278 a Fs(9)p Black eop
3103
10 9 bop Black 3028 67 a Fs(Chapter)19 b(1.)h(What)h(is)g(XML?)p
3104
Black -2 583 a Fq(1.1.3.)35 b(Discussion)396 751 y Fw(As)21
3105
b(we)g(ha)n(v)o(e)e(seen,)h(there)g(are)g(tw)o(o)h(le)n(v)o(els)f(of)g
3106
(description:)f(On)h(the)g(one)g(hand,)f(XML)h(can)g(de\002ne)f(rules)i
3107
(about)e(the)396 859 y(format)g(of)h(a)h(document)d(\(the)i(DTD\),)g
3108
(on)f(the)i(other)e(hand,)g(XML)h(e)o(xpresses)g(structured)f
3109
(documents.)f(There)h(are)h(a)396 967 y(number)f(of)h(possible)f
3110
(applications:)p Black 396 1199 a Fu(\225)p Black 60
3111
w Fw(XML)i(can)f(be)g(used)g(to)g(e)o(xpress)f(structured)g(te)o(xts.)h
3112
(Unlik)o(e)g(HTML,)g(there)g(is)h(no)e(canonical)g(interpretation;)g
3113
(one)479 1307 y(w)o(ould)h(ha)n(v)o(e)f(to)i(write)f(a)h(back)o(end)d
3114
(for)i(the)g(DTD)g(that)h(translates)f(the)g(structured)f(te)o(xts)h
3115
(into)g(a)h(format)e(that)479 1415 y(e)o(xisting)h(bro)n(wsers,)f
3116
(printers)g(etc.)i(understand.)c(The)j(adv)n(antage)e(of)i(a)h
3117
(self-de\002ned)e(document)f(format)h(is)i(that)f(it)479
3118
1523 y(is)h(possible)f(to)h(design)e(the)h(format)f(in)i(a)f(more)g
3119
(problem-oriented)c(w)o(ay)-5 b(.)20 b(F)o(or)f(e)o(xample,)g(if)h(the)
3120
h(task)f(is)h(to)g(e)o(xtract)479 1631 y(reports)f(from)f(a)h
3121
(database,)g(one)f(can)h(use)h(a)f(DTD)h(that)f(re\003ects)h(the)f
3122
(structure)f(of)h(the)g(report)f(or)h(the)g(database.)g(A)479
3123
1739 y(possible)g(approach)e(w)o(ould)i(be)g(to)g(ha)n(v)o(e)g(an)g
3124
(element)f(type)h(for)g(e)n(v)o(ery)f(database)g(table)h(and)g(for)g(e)
3125
n(v)o(ery)e(column.)479 1847 y(Once)i(the)g(DTD)h(has)f(been)g
3126
(designed,)e(the)j(report)e(procedure)e(can)j(be)g(splitted)h(up)e(in)i
3127
(a)f(part)g(that)h(selects)g(the)479 1955 y(database)f(ro)n(ws)g(and)g
3128
(outputs)f(them)h(as)h(an)f(XML)g(document)e(according)g(to)j(the)f
3129
(DTD,)g(and)g(in)g(a)g(part)g(that)479 2063 y(translates)h(the)f
3130
(document)e(into)i(other)f(formats.)g(Of)i(course,)e(the)h(latter)h
3131
(part)e(can)h(be)h(solv)o(ed)e(in)h(a)h(generic)e(w)o(ay)-5
3132
b(,)479 2170 y(e.g.)20 b(there)g(may)f(be)h(con\002gurable)e(back)o
3133
(ends)h(for)h(all)g(DTDs)h(that)f(follo)n(w)g(the)g(approach)e(and)i
3134
(ha)n(v)o(e)f(element)h(types)479 2278 y(for)g(tables)g(and)g(columns.)
3135
479 2428 y(XML)h(plays)f(the)g(role)g(of)g(a)g(con\002gurable)e
3136
(intermediate)h(format.)g(The)g(database)h(e)o(xtraction)e(function)h
3137
(can)h(be)479 2536 y(written)g(without)g(ha)n(ving)f(to)h(kno)n(w)f
3138
(the)h(details)h(of)f(typesetting;)f(the)h(back)o(ends)f(can)h(be)g
3139
(written)g(without)g(ha)n(ving)479 2644 y(to)h(kno)n(w)e(the)h(details)
3140
h(of)e(the)i(database.)479 2793 y(Of)g(course,)e(there)h(are)g
3141
(traditional)f(solutions.)g(One)h(can)g(de\002ne)g(an)g(ad)g(hoc)g
3142
(intermediate)e(te)o(xt)j(\002le)f(format.)f(This)479
3143
2901 y(disadv)n(antage)f(is)k(that)e(there)g(are)g(no)f(names)h(for)g
3144
(the)g(pieces)g(of)g(the)g(format,)f(and)h(that)g(such)g(formats)g
3145
(usually)f(lack)479 3009 y(of)h(documentation)d(because)j(of)g(this.)g
3146
(Another)f(solution)g(w)o(ould)h(be)g(to)g(ha)n(v)o(e)g(a)h(binary)e
3147
(representation,)e(either)j(as)479 3117 y(language-dependent)c(or)k
3148
(language-independent)14 b(structure)20 b(\(e)o(xample)e(of)i(the)g
3149
(latter)h(can)f(be)g(found)e(in)j(RPC)479 3225 y(implementations\).)d
3150
(The)i(disadv)n(antage)e(is)j(that)f(it)h(is)g(harder)e(to)i(vie)n(w)f
3151
(such)g(representations,)e(one)h(has)i(to)f(write)479
3152
3333 y(pretty)g(printers)f(for)h(this)g(purpose.)f(It)h(is)h(also)g
3153
(more)e(dif)n(\002cult)h(to)g(enter)g(test)h(data;)f(XML)g(is)h(plain)f
3154
(te)o(xt)g(that)h(can)f(be)479 3441 y(written)g(using)g(an)g(arbitrary)
3155
f(editor)g(\(Emacs)h(has)g(e)n(v)o(en)f(a)i(good)e(XML)h(mode,)f
3156
(PSGML\).)h(All)h(these)f(alternati)n(v)o(es)479 3549
3157
y(suf)n(fer)g(from)f(a)h(missing)g(structure)g(check)o(er)m(,)e(i.e.)i
3158
(the)h(programs)d(processing)h(these)h(formats)f(usually)h(do)g(not)479
3159
3657 y(check)g(the)g(input)f(\002le)i(or)f(input)g(object)f(in)i
3160
(detail;)f(XML)g(parsers)g(check)f(the)h(syntax)g(of)g(the)g(input)g
3161
(\(the)f(so-called)479 3765 y(well-formedness)f(check\),)h(and)h(the)g
3162
(adv)n(anced)e(parsers)i(lik)o(e)g(PXP)h(e)n(v)o(en)f(v)o(erify)e(that)
3163
j(the)f(structure)f(matches)h(the)479 3872 y(DTD)h(\(the)f(so-called)f
3164
(v)n(alidation\).)p Black 396 4022 a Fu(\225)p Black
3165
60 w Fw(XML)i(can)f(be)g(used)g(as)g(con\002gurable)e(communication)g
3166
(language.)g(A)i(fundamental)e(problem)h(of)h(e)n(v)o(ery)479
3167
4130 y(communication)e(is)j(that)f(sender)f(and)h(recei)n(v)o(er)f
3168
(must)h(follo)n(w)g(the)g(same)g(con)m(v)o(entions)e(about)h(the)h
3169
(language.)e(F)o(or)479 4238 y(data)i(e)o(xchange,)e(the)i(question)f
3170
(is)j(usually)d(which)h(data)g(records)f(and)h(\002elds)g(are)g(a)n(v)n
3171
(ailable,)g(ho)n(w)g(the)o(y)f(are)479 4346 y(syntactically)h
3172
(composed,)e(and)i(which)f(v)n(alues)h(are)g(possible)g(for)g(the)g(v)n
3173
(arious)f(\002elds.)h(Similar)h(questions)e(arise)479
3174
4454 y(for)h(te)o(xt)g(document)e(e)o(xchange.)g(XML)i(does)g(not)g
3175
(answer)g(these)g(problems)f(completely)-5 b(,)18 b(b)n(ut)i(it)h
3176
(reduces)e(the)479 4562 y(number)g(of)h(ambiguities)f(for)g(such)h(con)
3177
m(v)o(entions:)e(The)i(outlines)f(of)h(the)g(syntax)g(are)g
3178
(speci\002ed)g(by)g(the)g(DTD)g(\(b)n(ut)479 4669 y(not)g(necessarily)g
3179
(the)g(details\),)g(and)g(XML)g(introduces)e(canonical)h(names)h(for)g
3180
(the)g(components)e(of)i(documents)479 4777 y(such)g(that)h(it)f(is)i
3181
(simpler)d(to)i(describe)e(the)h(rest)h(of)f(the)g(syntax)g(and)f(the)h
3182
(semantics)h(informally)-5 b(.)p Black 3800 5278 a Fs(10)p
3185
11 10 bop Black 3028 67 a Fs(Chapter)19 b(1.)h(What)h(is)g(XML?)p
3186
Black Black 396 579 a Fu(\225)p Black 60 w Fw(XML)f(is)g(a)g(data)f
3187
(storage)g(format.)f(Currently)-5 b(,)17 b(e)n(v)o(ery)h(softw)o(are)h
3188
(product)f(tends)h(to)h(use)f(its)i(o)n(wn)d(w)o(ay)i(to)f(store)h
3189
(data;)479 687 y(commercial)f(softw)o(are)h(often)f(does)h(not)g
3190
(describe)f(such)h(formats,)f(and)h(it)h(is)g(a)g(pain)e(to)i(inte)o
3191
(grate)e(such)h(softw)o(are)479 795 y(into)g(a)g(bigger)f(project.)f
3192
(XML)i(can)g(help)f(to)h(impro)o(v)o(e)e(this)j(situation)e(when)g(se)n
3193
(v)o(eral)g(applications)g(share)h(the)g(same)479 903
3194
y(syntax)g(of)g(data)g(\002les.)h(DTDs)f(are)g(then)g(neutral)g
3195
(instances)g(that)g(check)f(the)h(format)g(of)f(data)i(\002les)g
3196
(independent)c(of)479 1011 y(applications.)-2 1512 y
3197
Fy(1.2.)39 b(Highlights)e(of)i(XML)396 1692 y Fw(This)21
3198
b(section)f(e)o(xplains)f(man)o(y)g(of)h(the)g(features)f(of)h(XML,)g
3199
(b)n(ut)h(not)e(all,)i(and)f(some)g(features)f(not)h(in)g(detail.)g(F)o
3200
(or)g(a)396 1800 y(complete)f(description,)g(see)i(the)f(XML)g
3201
(speci\002cation)396 1908 y(\(http://www)-5 b(.w3.or)o
3202
(g/TR/1998/REC-xml-)o(19)o(98)o(02)o(10)o(.htm)o(l\).)-2
3203
2236 y Fq(1.2.1.)35 b(The)f(DTD)g(and)g(the)f(instance)396
3204
2404 y Fw(The)20 b(DTD)g(contains)g(v)n(arious)f(declarations;)g(in)h
3205
(general)f(you)h(can)g(only)f(use)i(a)f(feature)f(if)i(you)e(ha)n(v)o
3206
(e)h(pre)n(viously)396 2512 y(declared)f(it.)i(The)f(document)e
3207
(instance)i(\002le)h(may)e(contain)g(the)i(full)f(DTD,)g(b)n(ut)g(it)h
3208
(is)g(also)g(possible)f(to)g(split)h(the)f(DTD)396 2619
3209
y(into)g(an)g(internal)g(and)f(an)h(e)o(xternal)f(subset.)h(A)h
3210
(document)d(must)j(be)o(gin)e(as)h(follo)n(ws)g(if)h(the)f(full)g(DTD)g
3211
(is)h(included:)396 2800 y Fp(<)p Fr(?xml)44 b(version="1.0")f
3212
(encoding=")p Fo(Your)f(encoding)t Fr("?)p Fp(>)396 2897
3213
y(<)p Fr(!DOCTYPE)h Fo(root)i Fr([)486 2994 y Fo(Declarations)396
3214
3091 y Fr(])p Fp(>)396 3282 y Fw(These)20 b(declarations)f(are)h
3215
(called)g(the)h Fs(internal)e(subset)q Fw(.)i(Note)f(that)g(the)g
3216
(usage)g(of)g(entities)h(and)e(conditional)g(sections)396
3217
3390 y(is)i(restricted)f(within)g(the)g(internal)g(subset.)396
3218
3539 y(If)g(the)h(declarations)d(are)j(located)e(in)h(a)h(dif)n(ferent)
3219
e(\002le,)h(you)f(can)h(refer)g(to)g(this)h(\002le)g(as)g(follo)n(ws:)
3220
396 3720 y Fp(<)p Fr(?xml)44 b(version="1.0")f(encoding=")p
3221
Fo(Your)f(encoding)t Fr("?)p Fp(>)396 3817 y(<)p Fr(!DOCTYPE)h
3222
Fo(root)i Fr(SYSTEM)e(")p Fo(file)h(name)p Fr(")p Fp(>)396
3223
4008 y Fw(The)20 b(declarations)f(in)h(the)h(\002le)f(are)h(called)f
3224
(the)g Fs(e)n(xternal)g(subset)q Fw(.)g(The)g(\002le)h(name)f(is)h
3225
(called)f(the)g Fs(system)h(identi\002er)r Fw(.)e(It)396
3226
4116 y(is)i(also)g(possible)f(to)g(refer)g(to)g(the)g(\002le)h(by)f(a)g
3227
(so-called)g Fs(public)f(identi\002er)r Fw(,)g(b)n(ut)i(most)f(XML)g
3228
(applications)f(w)o(on')o(t)g(use)396 4223 y(this)i(feature.)396
3229
4373 y(Y)-9 b(ou)20 b(can)g(also)g(specify)g(both)f(internal)h(and)f(e)
3230
o(xternal)g(subsets.)i(In)e(this)i(case,)g(the)f(declarations)f(of)h
3231
(both)f(subsets)i(are)396 4481 y(mix)o(ed,)e(and)h(if)g(there)g(are)g
3232
(con\003icts,)g(the)g(declaration)f(of)h(the)g(internal)f(subset)i(o)o
3233
(v)o(errides)d(those)i(of)g(the)g(e)o(xternal)396 4589
3234
y(subset)h(with)f(the)g(same)h(name.)e(This)h(looks)g(as)h(follo)n(ws:)
3235
396 4769 y Fp(<)p Fr(?xml)44 b(version="1.0")f(encoding=")p
3236
Fo(Your)f(encoding)t Fr("?)p Fp(>)396 4866 y(<)p Fr(!DOCTYPE)h
3237
Fo(root)89 b Fr(SYSTEM)44 b(")p Fo(file)g(name)p Fr(")g([)p
3238
Black 3800 5278 a Fs(11)p Black eop
3240
12 11 bop Black 3028 67 a Fs(Chapter)19 b(1.)h(What)h(is)g(XML?)p
3241
Black 486 579 a Fo(Declarations)396 676 y Fr(])p Fp(>)396
3242
909 y Fw(The)f(XML)g(declaration)f(\(the)h(string)g(be)o(ginning)d
3243
(with)k Fp(<)p Fr(?xml)e Fw(and)h(ending)f(at)i Fr(?)p
3244
Fp(>)p Fw(\))f(should)f(specify)g(the)h(encoding)396
3245
1016 y(of)g(the)g(\002le.)h(Common)e(v)n(alues)h(are)g(UTF-8,)f(and)h
3246
(the)g(ISO-8859)e(series)j(of)f(character)f(sets.)i(Note)f(that)g(e)n
3247
(v)o(ery)f(\002le)396 1124 y(parsed)h(by)f(the)i(XML)f(processor)f(can)
3248
h(be)o(gin)f(with)h(an)g(XML)h(declaration)d(and)i(that)g(e)n(v)o(ery)f
3249
(\002le)i(may)e(ha)n(v)o(e)h(its)h(o)n(wn)396 1232 y(encoding.)396
3250
1382 y(The)f(name)g(of)g(the)g(root)f(element)h(must)g(be)g(mentioned)f
3251
(directly)g(after)h(the)g Fr(DOCTYPE)g Fw(string.)f(This)i(means)e
3252
(that)i(a)396 1490 y(full)f(document)f(instance)g(looks)h(lik)o(e)396
3253
1670 y Fp(<)p Fr(?xml)44 b(version="1.0")f(encoding=")p
3254
Fo(Your)f(encoding)t Fr("?)p Fp(>)396 1767 y(<)p Fr(!DOCTYPE)h
3255
Fo(root)89 b Fr(SYSTEM)44 b(")p Fo(file)g(name)p Fr(")g([)486
3256
1864 y Fo(Declarations)396 1961 y Fr(])p Fp(>)396 2156
3257
y(<)p Fo(root)p Fp(>)486 2253 y Fo(inner)g(contents)396
3258
2350 y Fp(<)p Fr(/)p Fo(root)p Fp(>)-2 2802 y Fq(1.2.2.)35
3259
b(Reser)q(ved)h(c)o(haracter)n(s)396 2970 y Fw(Some)20
3260
b(characters)f(are)i(generally)d(reserv)o(ed)h(to)h(indicate)g(markup)e
3261
(such)i(that)g(the)o(y)g(cannot)f(be)h(used)g(for)g(character)396
3262
3078 y(data.)g(These)g(characters)f(are)h Fn(<)p Fw(,)h
3263
Fn(>)p Fw(,)f(and)f(&.)h(Furthermore,)e(single)i(and)g(double)e(quotes)
3264
i(are)g(sometimes)g(reserv)o(ed.)396 3186 y(If)g(you)g(w)o(ant)g(to)g
3265
(include)f(such)h(a)h(character)e(as)i(character)m(,)d(write)j(it)f(as)
3266
h(follo)n(ws:)p Black 396 3473 a Fu(\225)p Black 60 w
3267
Fr(<)f Fw(instead)g(of)g Fn(<)p Black 396 3581 a Fu(\225)p
3268
Black 60 w Fr(>)g Fw(instead)g(of)g Fn(>)p Black 396
3269
3689 a Fu(\225)p Black 60 w Fr(&)g Fw(instead)g(of)g(&)p
3270
Black 396 3797 a Fu(\225)p Black 60 w Fr(')g Fw(instead)g(of)g(')p
3271
Black 396 3905 a Fu(\225)p Black 60 w Fr(")g Fw(instead)g(of)g(")
3272
396 4054 y(All)h(other)e(characters)h(are)g(free)g(in)g(the)g(document)
3273
e(instance.)i(It)g(is)i(possible)d(to)i(include)e(a)i(character)e(by)g
3274
(its)j(position)396 4162 y(in)f(the)f(Unicode)f(alphabet:)396
3275
4342 y Fr(&#)p Fo(n)p Fr(;)396 4533 y Fw(where)h Fm(n)g
3276
Fw(is)i(the)e(decimal)f(number)g(of)h(the)g(character)-5
3277
b(.)19 b(Alternati)n(v)o(ely)-5 b(,)18 b(you)h(can)h(specify)g(the)g
3278
(character)f(by)h(its)396 4641 y(he)o(xadecimal)e(number:)396
3279
4822 y Fr(&#x)p Fo(n)p Fr(;)p Black 3800 5278 a Fs(12)p
3282
13 12 bop Black 3028 67 a Fs(Chapter)19 b(1.)h(What)h(is)g(XML?)p
3283
Black 396 579 a Fw(In)f(the)g(scope)g(of)g(declarations,)f(the)h
3284
(character)f(\045)i(is)g(no)f(longer)f(free.)g(T)-7 b(o)20
3285
b(include)g(it)h(as)f(character)m(,)f(you)g(must)h(use)396
3286
687 y(the)g(notations)g Fr(%)g Fw(or)f Fr(%)p
3287
Fw(.)396 836 y(Note)h(that)h(besides)f(<,)g(>,)g(&,)f
3288
(',)g(and)h(")f(there)h(are)g(no)g(prede\002nes)f(character)g
3289
(entities.)h(This)396 944 y(is)h(dif)n(ferent)e(from)g(HTML)h(which)g
3290
(de\002nes)g(a)g(list)i(of)d(characters)h(that)g(can)g(be)g(referenced)
3291
e(by)i(name)f(\(e.g.)h(ä)396 1052 y(for)g(\344\);)g(ho)n(we)n(v)o
3292
(er)m(,)e(if)i(you)g(prefer)e(named)i(characters,)f(you)g(can)h
3293
(declare)f(such)h(entities)h(yourself)e(\(see)h(belo)n(w\).)-2
3294
1422 y Fq(1.2.3.)35 b(Elements)g(and)f(ELEMENT)e(dec)n(larations)396
3295
1589 y Fw(Elements)20 b(structure)f(the)h(document)f(instance)g(in)i(a)
3296
f(hierarchical)f(w)o(ay)-5 b(.)20 b(There)f(is)i(a)g(top-le)n(v)o(el)d
3297
(element,)i(the)g Fs(r)l(oot)396 1697 y(element)q Fw(,)g(which)g
3298
(contains)g(a)g(sequence)f(of)h(inner)g(elements)f(and)h(character)f
3299
(sections.)h(The)g(inner)f(elements)h(are)396 1805 y(structured)f(in)h
3300
(the)f(same)h(w)o(ay)-5 b(.)20 b(Ev)o(ery)e(element)h(has)h(an)g
3301
Fs(element)f(type)p Fw(.)h(The)f(be)o(ginning)f(of)h(the)h(element)f
3302
(is)i(indicated)396 1913 y(by)f(a)h Fs(start)g(ta)o(g)p
3303
Fw(,)e(written)396 2093 y Fp(<)p Fo(element-type)p Fp(>)396
3304
2284 y Fw(and)h(the)g(element)g(continues)f(until)h(the)g
3305
(corresponding)d Fs(end)i(ta)o(g)h Fw(is)h(reached:)396
3306
2465 y Fp(<)p Fr(/)p Fo(element-type)p Fp(>)396 2655
3307
y Fw(In)f(XML,)f(it)i(is)f(not)g(allo)n(wed)f(to)h(omit)f(start)i(or)e
3308
(end)g(tags,)h(e)n(v)o(en)f(if)h(the)g(DTD)g(w)o(ould)f(permit)g(this.)
3309
h(Note)g(that)g(there)f(are)396 2763 y(no)h(special)g(rules)g(ho)n(w)g
3310
(to)g(interpret)g(spaces)g(or)g(ne)n(wlines)g(near)f(start)i(or)f(end)g
3311
(tags;)g(all)h(spaces)f(and)g(ne)n(wlines)g(count.)396
3312
2913 y(Ev)o(ery)f(element)h(type)f(must)i(be)f(declared)f(before)f(it)j
3313
(can)f(be)g(used.)g(The)g(declaration)f(consists)h(of)g(tw)o(o)h
3314
(parts:)f(the)396 3021 y(ELEMENT)f(declaration)f(describes)h(the)h
3315
(content)f(model,)f(i.e.)i(which)f(inner)g(elements)g(are)h(allo)n
3316
(wed;)f(the)h(A)-9 b(TTLIST)396 3129 y(declaration)19
3317
b(describes)h(the)g(attrib)n(utes)g(of)g(the)g(element.)396
3318
3278 y(An)g(element)g(can)g(simply)g(allo)n(w)g(e)n(v)o(erything)e(as)i
3319
(content.)f(This)i(is)g(written:)396 3458 y Fp(<)p Fr(!ELEMENT)43
3320
b Fo(name)i Fr(ANY)p Fp(>)396 3649 y Fw(On)20 b(the)h(opposite,)e(an)h
3321
(element)f(can)h(be)g(forced)f(to)i(be)f(empty;)f(declared)g(by:)396
3322
3829 y Fp(<)p Fr(!ELEMENT)43 b Fo(name)i Fr(EMPTY)p Fp(>)396
3323
4020 y Fw(Note)20 b(that)h(there)e(is)j(an)e(abbre)n(viated)e(notation)
3324
h(for)g(empty)g(element)h(instances:)g Fp(<)p Fo(name)p
3325
Fr(/)p Fp(>)p Fw(.)396 4170 y(There)g(are)g(tw)o(o)g(more)g
3326
(sophisticated)f(forms)g(of)h(declarations:)f(so-called)h
3327
Fs(mixed)g(declar)o(ations)p Fw(,)e(and)i Fs(r)m(e)m(gular)396
3328
4278 y(e)n(xpr)m(essions)p Fw(.)g(An)h(element)e(with)i(mix)o(ed)e
3329
(content)g(contains)g(character)g(data)h(interspersed)f(with)i(inner)e
3330
(elements,)396 4386 y(and)h(the)g(set)h(of)f(allo)n(wed)g(inner)f
3331
(elements)h(can)g(be)g(speci\002ed.)g(In)f(contrast)h(to)g(this,)h(a)g
3332
(re)o(gular)d(e)o(xpression)396 4494 y(declaration)h(does)h(not)g(allo)
3333
n(w)g(character)f(data,)h(b)n(ut)g(the)g(inner)f(elements)h(can)g(be)g
3334
(described)f(by)h(the)g(more)g(po)n(werful)396 4601 y(means)g(of)g(re)o
3335
(gular)f(e)o(xpressions.)396 4751 y(A)i(declaration)e(for)g(mix)o(ed)g
3336
(content)g(looks)h(as)h(follo)n(ws:)p Black 3800 5278
3339
14 13 bop Black 3028 67 a Fs(Chapter)19 b(1.)h(What)h(is)g(XML?)p
3340
Black 396 579 a Fp(<)p Fr(!ELEMENT)43 b Fo(name)i Fr(\(#PCDATA)e(|)i
3341
Fo(element)1892 609 y Fl(1)1962 579 y Fr(|)g(...)f(|)h
3342
Fo(element)2636 609 y Fl(n)2707 579 y Fr(\)*)p Fp(>)396
3343
770 y Fw(or)20 b(if)h(you)e(do)h(not)g(w)o(ant)g(to)g(allo)n(w)g(an)o
3344
(y)g(inner)f(element,)h(simply)396 950 y Fp(<)p Fr(!ELEMENT)43
3345
b Fo(name)i Fr(\(#PCDATA\))p Fp(>)396 1279 y Fk(Example)479
3346
1426 y Fj(If)19 b(element)g(type)g Fi(q)g Fj(is)g(declared)h(as)479
3347
1596 y Fi(<!ELEMENT)44 b(q)c(\(#PCDATA)k(|)c(r)h(|)g(s\)*>)479
3348
1776 y Fj(this)19 b(is)f(a)h(le)o(gal)g(instance:)479
3349
1947 y Fi(<q>This)43 b(is)e(character)j(data<r></r>with)h(<s></s>inner)
3350
g(elements</q>)479 2127 y Fj(But)19 b(this)g(is)f(ille)o(gal)g(because)
3351
i Fi(t)f Fj(has)h(not)f(been)g(enumerated)i(in)e(the)g(declaration:)479
3352
2297 y Fi(<q>This)43 b(is)e(character)j(data<r></r>with)h(<t></t>inner)
3353
g(elements</q>)396 2571 y Fw(The)20 b(other)f(form)h(uses)g(a)h(re)o
3354
(gular)e(e)o(xpression)f(to)j(describe)e(the)h(possible)g(contents:)396
3355
2752 y Fp(<)p Fr(!ELEMENT)43 b Fo(name)i(regexp)p Fp(>)396
3356
2942 y Fw(The)20 b(follo)n(wing)f(well-kno)n(wn)f(re)o(ge)o(xp)g
3357
(operators)h(are)h(allo)n(wed:)p Black 396 3299 a Fu(\225)p
3358
Black 60 w Fo(element-name)p Black 396 3407 a Fu(\225)p
3359
Black 60 w Fr(\()p Fo(subexpr)839 3437 y Fl(1)910 3407
3360
y Fr(,)g Fw(...)g Fr(,)45 b Fo(subexpr)1463 3437 y Fl(n)1533
3361
3407 y Fr(\))p Black 396 3515 a Fu(\225)p Black 60 w
3362
Fr(\()p Fo(subexpr)839 3545 y Fl(1)910 3515 y Fr(|)20
3363
b Fw(...)g Fr(|)45 b Fo(subexpr)1463 3545 y Fl(n)1533
3364
3515 y Fr(\))p Black 396 3623 a Fu(\225)p Black 60 w
3365
Fo(subexpr)s Fr(*)p Black 396 3731 a Fu(\225)p Black
3366
60 w Fo(subexpr)s Fr(+)p Black 396 3839 a Fu(\225)p Black
3367
60 w Fo(subexpr)s Fr(?)396 3989 y Fw(The)20 b Fr(,)h
3368
Fw(operator)d(indicates)i(a)h(sequence)e(of)h(sub-models,)e(the)i
3369
Fr(|)h Fw(operator)d(describes)i(alternati)n(v)o(e)f(sub-models.)f(The)
3370
396 4096 y Fr(*)j Fw(indicates)f(zero)f(or)h(more)g(repetitions,)f(and)
3371
g Fr(+)i Fw(one)f(or)f(more)h(repetitions.)f(Finally)-5
3372
b(,)19 b Fr(?)i Fw(can)f(be)g(used)g(for)f(optional)396
3373
4204 y(sub-models.)g(As)i(atoms)f(the)g(re)o(ge)o(xp)e(can)i(contain)f
3374
(names)h(of)g(elements;)g(note)g(that)g(it)h(is)g(not)f(allo)n(wed)f
3375
(to)i(include)396 4312 y Fr(#PCDATA)p Fw(.)396 4462 y(The)f(e)o(xact)g
3376
(syntax)f(of)h(the)g(re)o(gular)f(e)o(xpressions)g(is)i(rather)e
3377
(strange.)h(This)g(can)g(be)g(e)o(xplained)f(best)h(by)g(a)g(list)i(of)
3378
396 4570 y(constraints:)p Black 396 4802 a Fu(\225)p
3379
Black 60 w Fw(The)e(outermost)f(e)o(xpression)g(must)h(not)g(be)g
3380
Fo(element-name)p Fw(.)p Black 3800 5278 a Fs(14)p Black
3383
15 14 bop Black 3028 67 a Fs(Chapter)19 b(1.)h(What)h(is)g(XML?)p
3384
Black 479 579 a(Ille)m(gal:)e Fr(<!ELEMENT)43 b(x)i(y>)p
3385
Fw(;)21 b(this)f(must)h(be)f(written)g(as)h Fr(<!ELEMENT)43
3386
b(x)i(\(y\)>)p Fw(.)p Black 396 728 a Fu(\225)p Black
3387
60 w Fw(F)o(or)20 b(the)g(unary)f(operators)g Fo(subexpr)s
3388
Fr(*)p Fw(,)g Fo(subexpr)s Fr(+)p Fw(,)g(and)g Fo(subexpr)s
3389
Fr(?)p Fw(,)g(the)h Fo(subexpr)i Fw(must)f(not)f(be)g(again)f(an)479
3390
836 y(unary)g(operator)-5 b(.)479 986 y Fs(Ille)m(gal:)19
3391
b Fr(<!ELEMENT)43 b(x)i(y**>)p Fw(;)20 b(this)h(must)f(be)g(written)g
3392
(as)h Fr(<!ELEMENT)44 b(x)g(\(y*\)*>)p Fw(.)p Black 396
3393
1135 a Fu(\225)p Black 60 w Fw(Between)21 b Fr(\))f Fw(and)g(one)f(of)h
3394
(the)h(unary)d(operatory)g Fr(*)p Fw(,)j Fr(+)p Fw(,)f(or)g
3395
Fr(?)p Fw(,)g(there)g(must)g(not)g(be)g(whitespace.)479
3396
1285 y Fs(Ille)m(gal:)f Fr(<!ELEMENT)43 b(x)i(\(y|z\))f(*>)p
3397
Fw(;)21 b(this)f(must)h(be)f(written)g(as)h Fr(<!ELEMENT)43
3398
b(x)i(\(y|z\)*>)p Fw(.)p Black 396 1434 a Fu(\225)p Black
3399
60 w Fw(There)20 b(is)h(the)f(additional)f(constraint)g(that)h(the)h
3400
(right)e(parenthsis)g(must)i(be)f(contained)e(in)j(the)f(same)g(entity)
3401
g(as)h(the)479 1542 y(left)g(parenthesis;)e(see)i(the)f(section)g
3402
(about)f(parsed)h(entities)g(belo)n(w)-5 b(.)396 1733
3403
y(Note)20 b(that)g(there)g(is)h(another)e(restriction)g(on)h(re)o
3404
(gular)e(e)o(xpressions)h(which)h(must)g(be)g(deterministic.)f(This)h
3405
(means)g(that)396 1841 y(the)g(parser)g(must)g(be)g(able)g(to)h(see)g
3406
(by)e(looking)g(at)i(the)f(ne)o(xt)f(tok)o(en)h(which)f(alternati)n(v)o
3407
(e)g(is)i(actually)f(used,)g(or)f(whether)396 1949 y(the)h(repetition)f
3408
(stops.)i(The)f(reason)f(for)g(this)i(is)g(simply)f(compatability)f
3409
(with)h(SGML)g(\(there)g(is)h(no)f(intrinsic)f(reason)396
3410
2057 y(for)h(this)h(rule;)e(XML)i(can)f(li)n(v)o(e)g(without)f(this)i
3411
(restriction\).)396 2302 y Fk(Example)479 2449 y Fj(The)e(elements)g
3412
(are)g(declared)h(as)f(follo)n(ws:)479 2620 y Fi(<!ELEMENT)44
3413
b(q)c(\(r?,)i(\(s)f(|)g(t\)+\)>)479 2707 y(<!ELEMENT)j(r)c
3414
(\(#PCDATA\)>)479 2795 y(<!ELEMENT)k(s)c(EMPTY>)479 2882
3415
y(<!ELEMENT)k(t)c(\(q)i(|)e(r\)>)479 3062 y Fj(This)19
3416
b(is)f(a)h(le)o(gal)g(instance:)479 3233 y Fi(<q><r>Some)44
3417
b(characters</r><s/><)q(/q>)479 3413 y Fj(\(Note:)19
3418
b Fh(<)p Fi(s/)p Fh(>)g Fj(is)g(an)g(abbre)n(viation)h(for)f
3419
Fh(<)p Fi(s)p Fh(><)p Fi(/s)p Fh(>)p Fj(.\))g(It)f(w)o(ould)i(be)f
3420
(ille)o(gal)f(to)h(lea)o(v)o(e)g Fi(<s/>)h Fj(out)f(because)h(at)f
3421
(least)f(one)479 3510 y(instance)i(of)f Fi(s)g Fj(or)g
3422
Fi(t)g Fj(must)g(be)g(present.)g(It)f(w)o(ould)i(be)f(ille)o(gal,)f
3423
(too,)h(if)f(characters)i(e)o(xisted)f(outside)h(the)e
3424
Fi(r)i Fj(element;)f(the)g(only)479 3607 y(e)o(xception)h(is)f(white)g
3425
(space.)g(\226)g(This)f(is)h(le)o(gal,)f(too:)479 3778
3426
y Fi(<q><s/><t><q><s/><)q(/q>)q(</t)q(></)q(q>)-2 4230
3427
y Fq(1.2.4.)35 b(Attrib)n(ute)e(lists)h(and)g(A)-11 b(TTLIST)34
3428
b(dec)n(larations)396 4398 y Fw(Elements)20 b(may)g(ha)n(v)o(e)f
3429
(attrib)n(utes.)h(These)g(are)g(put)g(into)g(the)g(start)h(tag)f(of)g
3430
(an)g(element)g(as)h(follo)n(ws:)396 4578 y Fp(<)p Fo(element-name)43
3431
b(attribute)1444 4608 y Fl(1)1469 4578 y Fr(=")p Fo(value)1784
3432
4608 y Fl(1)1810 4578 y Fr(")i(...)f Fo(attribute)2484
3433
4608 y Fl(n)2509 4578 y Fr(=")p Fo(value)2824 4608 y
3434
Fl(n)2850 4578 y Fr(")p Fp(>)396 4769 y Fw(Instead)20
3435
b(of)g Fr(")p Fo(value)1017 4799 y Fl(k)1043 4769 y Fr(")g
3436
Fw(it)h(is)g(also)g(possible)f(to)g(use)g(single)g(quotes)g(as)h(in)f
3437
Fr(')p Fo(value)2817 4799 y Fl(k)2843 4769 y Fr(')p Fw(.)g(Note)h(that)
3438
f(you)f(cannot)g(use)396 4877 y(double)g(quotes)h(literally)g(within)g
3439
(the)g(v)n(alue)f(of)h(the)g(attrib)n(ute)g(if)h(double)d(quotes)i(are)
3440
g(the)g(delimiters;)g(the)g(same)p Black 3800 5278 a
3443
16 15 bop Black 3028 67 a Fs(Chapter)19 b(1.)h(What)h(is)g(XML?)p
3444
Black 396 579 a Fw(applies)f(to)h(single)f(quotes.)f(Y)-9
3445
b(ou)20 b(can)g(generally)e(not)i(use)g Fn(<)h Fw(and)e(&)i(as)g
3446
(characters)e(in)h(attrib)n(ute)g(v)n(alues.)g(It)g(is)396
3447
687 y(possible)g(to)h(include)e(the)h(paraphrases)e(<,)j(>,)f
3448
(&,)f(',)g(and)h(")f(\(and)g(an)o(y)g(other)h(reference)e
3449
(to)j(a)396 795 y(general)e(entity)h(as)h(long)f(as)g(the)h(entity)f
3450
(is)h(not)e(de\002ned)h(by)f(an)i(e)o(xternal)d(\002le\))j(as)g(well)g
3451
(as)g(&#)p Fm(n)p Fw(;.)396 944 y(Before)f(you)f(can)h(use)h(an)f
3452
(attrib)n(ute)g(you)f(must)h(declare)g(it.)g(An)g(A)-9
3453
b(TTLIST)20 b(declaration)e(looks)i(as)h(follo)n(ws:)396
3454
1124 y Fp(<)p Fr(!ATTLIST)43 b Fo(element-name)845 1222
3455
y(attribute-name)f(attribute-type)h(attribute-default)845
3456
1319 y Fr(...)845 1416 y Fo(attribute-name)f(attribute-type)h
3457
(attribute-default)396 1513 y Fp(>)396 1704 y Fw(There)20
3458
b(are)g(a)g(lot)h(of)f(types,)f(b)n(ut)i(most)f(important)f(are:)p
3459
Black 396 2061 a Fu(\225)p Black 60 w Fr(CDATA)p Fw(:)h(Ev)o(ery)f
3460
(string)h(is)h(allo)n(wed)f(as)g(attrib)n(ute)g(v)n(alue.)p
3461
Black 396 2169 a Fu(\225)p Black 60 w Fr(NMTOKEN)p Fw(:)g(Ev)o(ery)f
3462
(nametok)o(en)f(is)j(allo)n(wed)f(as)g(attrib)n(ute)g(v)n(alue.)g
3463
(Nametok)o(ens)f(consist)h(\(mainly\))f(of)g(letters,)479
3464
2277 y(digits,)h(.,)h(:,)f(-,)g(_)h(in)f(arbitrary)f(order)-5
3465
b(.)p Black 396 2385 a Fu(\225)p Black 60 w Fr(NMTOKENS)p
3466
Fw(:)20 b(A)g(space-separated)f(list)i(of)f(nametok)o(ens)e(is)k(allo)n
3467
(wed)d(as)i(attrib)n(ute)f(v)n(alue.)396 2534 y(The)g(most)g
3468
(interesting)g(def)o(ault)f(declarations)g(are:)p Black
3469
396 2767 a Fu(\225)p Black 60 w Fr(#REQUIRED)p Fw(:)h(The)f(attrib)n
3470
(ute)h(must)g(be)h(speci\002ed.)p Black 396 2874 a Fu(\225)p
3471
Black 60 w Fr(#IMPLIED)p Fw(:)e(The)h(attrib)n(ute)f(can)g(be)h
3472
(speci\002ed)f(b)n(ut)h(also)g(can)f(be)h(left)g(out.)f(The)g
3473
(application)g(can)g(\002nd)g(out)h(whether)479 2982
3474
y(the)g(attrib)n(ute)g(w)o(as)h(present)f(or)g(not.)p
3475
Black 396 3090 a Fu(\225)p Black 60 w Fr(")p Fo(value)p
3476
Fr(")g Fw(or)f Fr(')p Fo(value)p Fr(')p Fw(:)h(This)g(particular)e(v)n
3477
(alue)i(is)g(used)g(as)h(def)o(ault)e(if)h(the)g(attrib)n(ute)g(is)g
3478
(omitted)g(in)g(the)g(element.)396 3378 y Fk(Example)479
3479
3525 y Fj(This)f(is)f(a)h(v)n(alid)g(attrib)o(ute)g(declaration)g(for)g
3480
(element)g(type)h Fi(r)p Fj(:)479 3695 y Fi(<!ATTLIST)44
3481
b(r)883 3782 y(x)c(CDATA)164 b(#REQUIRED)883 3870 y(y)40
3482
b(NMTOKEN)84 b(#IMPLIED)883 3957 y(z)40 b(NMTOKENS)k("one)d(two)h
3483
(three">)479 4137 y Fj(This)19 b(means)g(that)g Fi(x)g
3484
Fj(is)g(a)g(required)g(attrib)o(ute)f(that)h(cannot)h(be)f(left)g(out,)
3485
f(while)h Fi(y)g Fj(and)h Fi(z)f Fj(are)g(optional.)g(The)g(XML)g
3486
(parser)479 4235 y(indicates)h(the)f(application)g(whether)h
3487
Fi(y)f Fj(is)f(present)i(or)f(not,)f(b)o(ut)h(if)f Fi(z)h
3488
Fj(is)g(missing)g(the)g(def)o(ault)h(v)n(alue)f("one)h(tw)o(o)f(three")
3489
h(is)479 4332 y(returned)g(automatically)-5 b(.)479 4470
3490
y(This)19 b(is)f(a)h(v)n(alid)g(e)o(xample)h(of)f(these)g(attrib)o
3491
(utes:)479 4641 y Fi(<r)41 b(x="He)h(said:)h("I)f(don't)g(like)g
3492
(quotes!"")j(y='1'>)p Black 3798 5278 a Fs(16)p
3495
17 16 bop Black 3028 67 a Fs(Chapter)19 b(1.)h(What)h(is)g(XML?)p
3496
Black -2 583 a Fq(1.2.5.)35 b(P)l(ar)n(sed)g(entities)396
3497
751 y Fw(Elements)20 b(describe)f(the)i(logical)e(structure)h(of)g(the)
3498
g(document,)e(while)i Fs(entities)g Fw(determine)f(the)h(physical)g
3499
(structure.)396 859 y(Entities)h(are)f(the)g(pieces)g(of)g(te)o(xt)g
3500
(the)g(parser)g(operates)f(on,)h(mostly)g(\002les)h(and)f(macros.)f
3501
(Entities)h(may)g(be)g Fs(par)o(sed)i Fw(in)396 967 y(which)e(case)h
3502
(the)f(parser)f(reads)h(the)g(te)o(xt)h(and)e(interprets)g(it)i(as)g
3503
(XML)g(markup,)d(or)i Fs(unpar)o(sed)h Fw(which)e(simply)h(means)396
3504
1075 y(that)h(the)f(data)g(of)g(the)g(entity)g(has)g(a)h(foreign)d
3505
(format)h(\(e.g.)h(a)g(GIF)h(icon\).)396 1224 y(If)f(the)g(parsed)f
3506
(entity)g(is)i(going)e(to)h(be)g(used)f(as)i(part)e(of)h(the)g(DTD,)g
3507
(it)g(is)h(called)f(a)g Fs(par)o(ameter)f(entity)p Fw(.)h(Y)-9
3508
b(ou)19 b(can)h(declare)396 1332 y(a)h(parameter)e(entity)g(with)i(a)f
3509
(\002x)o(ed)g(te)o(xt)g(as)h(content)e(by:)396 1512 y
3510
Fp(<)p Fr(!ENTITY)44 b(\045)g Fo(name)g Fr(")p Fo(value)p
3511
Fr(")p Fp(>)396 1703 y Fw(W)m(ithin)20 b(the)h(DTD,)f(you)f(can)h
3512
Fs(r)m(efer)h(to)f Fw(this)h(entity)-5 b(,)19 b(i.e.)i(read)e(the)h(te)
3513
o(xt)g(of)g(the)h(entity)-5 b(,)19 b(by:)396 1883 y Fr(\045)p
3514
Fo(name)p Fr(;)396 2074 y Fw(Such)h(entities)h(beha)n(v)o(e)e(lik)o(e)h
3515
(macros,)f(i.e.)i(when)e(the)o(y)h(are)g(referred)e(to,)i(the)g(macro)g
3516
(te)o(xt)g(is)h(inserted)e(and)h(read)396 2182 y(instead)g(of)g(the)g
3517
(original)f(te)o(xt.)396 2478 y Fk(Example)479 2625 y
3518
Fj(F)o(or)g(e)o(xample,)g(you)h(can)f(declare)h(tw)o(o)f(elements)g
3519
(with)f(the)h(same)h(content)f(model)h(by:)479 2795 y
3520
Fi(<!ENTITY)43 b(\045)e(model)h("a)f(|)g(b)g(|)f(c">)479
3521
2882 y(<!ELEMENT)k(x)c(\(\045model;\)>)479 2970 y(<!ELEMENT)k(y)c
3522
(\(\045model;\)>)396 3202 y Fw(If)20 b(the)h(contents)e(of)h(the)g
3523
(entity)g(are)g(gi)n(v)o(en)f(as)i(string)f(constant,)f(the)h(entity)g
3524
(is)h(called)f(an)g Fs(internal)g Fw(entity)-5 b(.)19
3525
b(It)i(is)g(also)396 3310 y(possible)f(to)h(name)e(a)i(\002le)g(to)f
3526
(be)g(used)g(as)h(content)e(\(an)h Fs(e)n(xternal)g Fw(entity\):)396
3527
3490 y Fp(<)p Fr(!ENTITY)44 b(\045)g Fo(name)g Fr(SYSTEM)g(")p
3528
Fo(file)g(name)p Fr(")p Fp(>)396 3681 y Fw(There)20 b(are)g(some)g
3529
(restrictions)f(for)h(parameter)f(entities:)p Black 396
3530
4038 a Fu(\225)p Black 60 w Fw(If)h(the)h(internal)e(parameter)g
3531
(entity)g(contains)h(the)g(\002rst)h(tok)o(en)e(of)h(a)h(declaration)e
3532
(\(i.e.)g Fp(<)p Fr(!)p Fw(\),)h(it)h(must)f(also)h(contain)479
3533
4146 y(the)f(last)i(tok)o(en)d(of)h(the)g(declaration,)e(i.e.)j(the)f
3534
Fp(>)p Fw(.)g(This)g(means)g(that)h(the)f(entity)g(either)g(contains)f
3535
(a)i(whole)e(number)479 4254 y(of)h(complete)f(declarations,)g(or)h
3536
(some)g(te)o(xt)g(from)f(the)h(middle)g(of)g(one)f(declaration.)479
3537
4404 y Fs(Ille)m(gal:)479 4542 y Fr(<!ENTITY)44 b(\045)g(e)h("\(a)f(|)h
3538
(b)g(|)f(c\)>">)479 4639 y(<!ELEMENT)g(x)g(\045e;)479
3539
4789 y Fw(Because)21 b Fp(<)p Fr(!)f Fw(is)h(contained)e(in)h(the)g
3540
(main)g(entity)-5 b(,)19 b(and)h(the)g(corresponding)d
3541
Fp(>)j Fw(is)h(contained)e(in)h(the)h(entity)e Fr(e)p
3542
Fw(.)p Black 3797 5278 a Fs(17)p Black eop
3544
18 17 bop Black 3028 67 a Fs(Chapter)19 b(1.)h(What)h(is)g(XML?)p
3545
Black Black 396 579 a Fu(\225)p Black 60 w Fw(If)f(the)h(internal)e
3546
(parameter)g(entity)g(contains)h(a)h(left)f(paranthesis,)f(it)i(must)f
3547
(also)h(contain)e(the)h(corresponding)d(right)479 687
3548
y(paranthesis.)479 836 y Fs(Ille)m(gal:)479 975 y Fr(<!ENTITY)44
3549
b(\045)g(e)h("\(a)f(|)h(b)g(|)f(c">)479 1072 y(<!ELEMENT)g(x)g
3550
(\045e;\)>)479 1222 y Fw(Because)21 b Fr(\()f Fw(is)h(contained)e(in)h
3551
(the)g(entity)g Fr(e)p Fw(,)h(and)e(the)i(corresponding)16
3552
b Fr(\))21 b Fw(is)g(contained)e(in)h(the)g(main)g(entity)-5
3553
b(.)p Black 396 1371 a Fu(\225)p Black 60 w Fw(When)20
3554
b(reading)e(te)o(xt)i(from)f(an)g(entity)-5 b(,)19 b(the)h(parser)f
3555
(automatically)f(inserts)i(one)g(space)f(character)g(before)f(the)i
3556
(entity)479 1479 y(te)o(xt)g(and)g(one)g(space)g(character)f(after)h
3557
(the)g(entity)g(te)o(xt.)f(Ho)n(we)n(v)o(er)m(,)f(this)j(rule)f(is)h
3558
(not)f(applied)f(within)h(the)g(de\002nition)479 1587
3559
y(of)g(another)f(entity)-5 b(.)479 1736 y Fs(Le)m(gal:)479
3560
1875 y Fr(<!ENTITY)44 b(\045)g(suffix)g("gif">)479 1972
3561
y(<!ENTITY)g(iconfile)f('icon.\045suffix;'>)479 2121
3562
y Fw(Because)21 b Fr(\045suffix;)e Fw(is)i(referenced)d(within)i(the)g
3563
(de\002nition)f(te)o(xt)h(for)g Fr(iconfile)p Fw(,)f(no)h(additional)f
3564
(spaces)h(are)479 2229 y(added.)479 2379 y Fs(Ille)m(gal:)479
3565
2517 y Fr(<!ENTITY)44 b(\045)g(suffix)g("test">)479 2615
3566
y(<!ELEMENT)g(x.\045suffix;)f(ANY>)479 2764 y Fw(Because)21
3567
b Fr(\045suffix;)e Fw(is)i(referenced)d(outside)i(the)g(de\002nition)f
3568
(te)o(xt)h(of)g(another)f(entity)-5 b(,)19 b(the)h(parser)g(replaces)
3569
479 2872 y Fr(\045suffix;)g Fw(by)f Fo(space)p Fr(test)p
3570
Fo(space)p Fw(.)479 3021 y Fs(Ille)m(gal:)479 3160 y
3571
Fr(<!ENTITY)44 b(\045)g(e)h("\(a)f(|)h(b)g(|)f(c\)">)479
3572
3257 y(<!ELEMENT)g(x)g(\045e;*>)479 3407 y Fw(Because)21
3573
b(there)e(is)j(a)e(whitespace)g(between)f Fr(\))i Fw(and)e
3574
Fr(*)p Fw(,)i(which)e(is)i(ille)o(gal.)p Black 396 3556
3575
a Fu(\225)p Black 60 w Fw(An)f(e)o(xternal)f(parameter)g(entity)h(must)
3576
g(al)o(w)o(ays)h(consist)f(of)g(a)h(whole)e(number)g(of)h(complete)f
3577
(declarations.)p Black 396 3664 a Fu(\225)p Black 60
3578
w Fw(In)h(the)g(internal)g(subset)g(of)g(the)g(DTD,)g(a)h(reference)d
3579
(to)j(a)f(parameter)f(entity)h(\(internal)f(or)h(e)o(xternal\))e(is)k
3580
(only)479 3772 y(allo)n(wed)e(at)h(positions)e(where)h(a)g(ne)n(w)g
3581
(declaration)f(can)h(start.)396 3963 y(If)g(the)f(parsed)g(entity)g(is)
3582
h(going)e(to)i(be)f(used)g(in)h(the)f(document)e(instance,)i(it)h(is)h
3583
(called)e(a)h Fs(g)o(ener)o(al)e(entity)p Fw(.)h(Such)g(entities)396
3584
4071 y(can)h(be)g(used)g(as)h(abbre)n(viations)d(for)i(frequent)e
3585
(phrases,)i(or)g(to)g(include)f(e)o(xternal)g(\002les.)i(Internal)e
3586
(general)g(entities)i(are)396 4179 y(declared)e(as)i(follo)n(ws:)396
3587
4359 y Fp(<)p Fr(!ENTITY)44 b Fo(name)g Fr(")p Fo(value)p
3588
Fr(")p Fp(>)396 4550 y Fw(External)19 b(general)g(entities)i(are)f
3589
(declared)f(this)i(w)o(ay:)396 4730 y Fp(<)p Fr(!ENTITY)44
3590
b Fo(name)g Fr(SYSTEM)g(")p Fo(file)g(name)p Fr(")p Fp(>)p
3591
Black 3800 5278 a Fs(18)p Black eop
3593
19 18 bop Black 3028 67 a Fs(Chapter)19 b(1.)h(What)h(is)g(XML?)p
3594
Black 396 579 a Fw(References)f(to)g(general)f(entities)i(are)f
3595
(written)g(as:)396 759 y Fr(&)p Fo(name)p Fr(;)396 950
3596
y Fw(The)g(main)g(dif)n(ference)e(between)h(parameter)g(and)h(general)f
3597
(entities)h(is)i(that)e(the)g(former)f(are)h(only)f(recognized)f(in)j
3598
(the)396 1058 y(DTD)g(and)e(that)i(the)f(latter)g(are)g(only)g
3599
(recognized)e(in)i(the)g(document)e(instance.)i(As)h(the)f(DTD)g(is)i
3600
(parsed)d(before)g(the)396 1166 y(document,)f(the)i(parameter)f
3601
(entities)i(are)f(e)o(xpanded)d(\002rst;)k(for)f(e)o(xample)f(it)i(is)g
3602
(possible)f(to)g(use)h(the)f(content)f(of)h(a)396 1274
3603
y(parameter)f(entity)h(as)h(the)f(name)g(of)f(a)i(general)e(entity:)h
3604
Fr(&\045name;;)2557 1241 y Fg(1)2580 1274 y Fw(.)396
3605
1423 y(General)g(entities)g(must)h(respect)e(the)i(element)e(hierarchy)
3606
-5 b(.)17 b(This)k(means)f(that)g(there)g(must)g(be)g(an)g(end)g(tag)g
3607
(for)g(e)n(v)o(ery)396 1531 y(start)h(tag)f(in)h(the)f(entity)g(v)n
3608
(alue,)f(and)h(that)g(end)f(tags)i(without)e(corresponding)e(start)k
3609
(tags)f(are)g(not)g(allo)n(wed.)396 1777 y Fk(Example)479
3610
1924 y Fj(If)f(the)f(author)i(of)f(a)f(document)j(changes)f(sometimes,)
3611
f(it)f(is)g(w)o(orthwhile)h(to)g(set)f(up)i(a)e(general)i(entity)e
3612
(containing)i(the)f(names)479 2021 y(of)g(the)g(authors.)h(If)e(the)h
3613
(author)h(changes,)g(you)f(need)h(only)g(to)e(change)j(the)e
3614
(de\002nition)g(of)g(the)g(entity)-5 b(,)18 b(and)i(do)f(not)h(need)f
3615
(to)479 2118 y(check)h(all)f(occurrences)h(of)f(authors')h(names:)479
3616
2289 y Fi(<!ENTITY)43 b(authors)g("Gerd)f(Stolpmann">)479
3617
2469 y Fj(In)19 b(the)g(document)i(te)o(xt,)d(you)i(can)f(no)n(w)h
3618
(refer)e(to)h(the)g(author)h(names)f(by)h(writing)e Fi(&authors;)p
3619
Fj(.)479 2607 y Ff(Ille)m(gal:)h Fj(The)g(follo)n(wing)g(tw)o(o)g
3620
(entities)g(are)g(ille)o(gal)f(because)i(the)f(elements)g(in)g(the)g
3621
(de\002nition)g(do)g(not)h(nest)f(properly:)479 2778
3622
y Fi(<!ENTITY)43 b(lengthy-tag)i("<section)e(textcolor='white')j
3623
(background='graphi)q(c'>)q(">)479 2865 y(<!ENTITY)d(nonsense)165
3624
b("<a></b>">)396 3139 y Fw(Earlier)20 b(in)g(this)h(introduction)d(we)i
3625
(e)o(xplained)e(that)j(there)e(are)i(substitutes)f(for)g(reserv)o(ed)e
3626
(characters:)i(<,)g(>,)396 3247 y(&,)f(',)h(and)f
3627
(".)g(These)h(are)g(simply)g(prede\002ned)e(general)h(entities;)i
3628
(note)f(that)g(the)o(y)g(are)g(the)g(only)396 3355 y(prede\002ned)e
3629
(entities.)j(It)f(is)h(allo)n(wed)f(to)g(de\002ne)g(these)g(entities)h
3630
(again)e(as)i(long)e(as)i(the)f(meaning)f(is)i(unchanged.)-2
3631
3725 y Fq(1.2.6.)35 b(Notations)g(and)e(unpar)n(sed)i(entities)396
3632
3892 y Fw(Unparsed)19 b(entities)i(ha)n(v)o(e)e(a)i(foreign)d(format)i
3633
(and)f(can)h(thus)g(not)g(be)g(read)g(by)g(the)g(XML)g(parser)-5
3634
b(.)20 b(Unparsed)f(entities)396 4000 y(are)h(al)o(w)o(ays)h(e)o
3635
(xternal.)e(The)h(format)f(of)h(an)g(unparsed)e(entity)i(must)g(ha)n(v)
3636
o(e)g(been)f(declared,)g(such)h(a)h(format)e(is)i(called)f(a)396
3637
4108 y Fs(notation)p Fw(.)f(The)g(entity)h(can)g(then)g(be)g(declared)f
3638
(by)h(referring)e(to)i(this)h(notation.)e(As)i(unparsed)d(entities)j
3639
(do)f(not)396 4216 y(contain)f(XML)i(te)o(xt,)e(it)i(is)h(not)d
3640
(possible)h(to)h(include)e(them)h(directly)f(into)h(the)g(document;)e
3641
(you)i(can)g(only)f(declare)396 4324 y(attrib)n(utes)h(such)g(that)h
3642
(names)e(of)h(unparsed)f(entities)h(are)h(acceptable)e(v)n(alues.)396
3643
4474 y(As)i(you)f(can)g(see,)g(unparsed)f(entities)h(are)g(too)g
3644
(complicated)f(in)h(order)f(to)h(ha)n(v)o(e)g(an)o(y)f(purpose.)g(It)h
3645
(is)h(almost)f(al)o(w)o(ays)396 4581 y(better)g(to)g(simply)g(pass)h
3646
(the)f(name)g(of)g(the)g(data)g(\002le)h(as)g(normal)e(attrib)n(ute)g
3647
(v)n(alue,)h(and)f(let)i(the)f(application)f(recognize)396
3648
4689 y(and)h(process)g(the)g(foreign)e(format.)p Black
3649
3800 5278 a Fs(19)p Black eop
3651
20 19 bop Black 3028 67 a Fs(Chapter)19 b(1.)h(What)h(is)g(XML?)p
3652
Black -2 597 a Fy(1.3.)39 b(A)g(complete)f(e)n(xample:)g(The)h
3653
Fe(readme)k Fy(DTD)396 777 y Fw(The)20 b(reason)g(for)f
3654
Fs(r)m(eadme)h Fw(w)o(as)h(that)f(I)g(often)g(wrote)g(tw)o(o)g(v)o
3655
(ersions)f(of)h(\002les)h(such)f(as)h(README)g(and)e(INST)-8
3656
b(ALL)396 885 y(which)20 b(e)o(xplain)f(aspects)h(of)g(a)h(distrib)n
3657
(uted)e(softw)o(are)h(archi)n(v)o(e;)f(one)g(v)o(ersion)g(w)o(as)i
3658
(ASCII-formatted,)d(the)i(other)g(w)o(as)396 993 y(written)g(in)h
3659
(HTML.)e(Maintaining)g(both)g(v)o(ersions)h(means)f(double)g(amount)g
3660
(of)h(w)o(ork,)f(and)h(changes)f(of)h(one)f(v)o(ersion)396
3661
1101 y(may)h(be)g(for)o(gotten)e(in)i(the)g(other)f(v)o(ersion.)g(T)-7
3662
b(o)20 b(impro)o(v)o(e)e(this)j(situation)e(I)i(in)m(v)o(ented)d(the)i
3663
Fs(r)m(eadme)g Fw(DTD)g(which)f(allo)n(ws)396 1209 y(me)h(to)h
3664
(maintain)e(only)h(one)f(source)h(written)g(as)g(XML)h(document,)d(and)
3665
h(to)i(generate)e(the)h(ASCII)g(and)g(the)g(HTML)396
3666
1317 y(v)o(ersion)f(from)g(it.)396 1466 y(In)h(this)h(section,)f(I)g(e)
3667
o(xplain)f(only)g(the)i(DTD.)f(The)f Fs(r)m(eadme)h Fw(DTD)h(is)g
3668
(contained)d(in)j(the)f(PXP)h(distrib)n(ution)e(together)396
3669
1574 y(with)i(the)f(tw)o(o)g(con)m(v)o(erters)e(to)j(produce)d(ASCII)i
3670
(and)g(HTML.)g(Another)e(section)i(of)g(this)h(manual)e(describes)h
3671
(the)396 1682 y(HTML)g(con)m(v)o(erter)-5 b(.)396 1831
3672
y(The)20 b(documents)f(ha)n(v)o(e)g(a)i(simple)f(structure:)f(There)h
3673
(are)g(up)g(to)g(three)g(le)n(v)o(els)g(of)g(nested)g(sections,)g
3674
(paragraphs,)d(item)396 1939 y(lists,)22 b(footnotes,)c(hyperlinks,)g
3675
(and)h(te)o(xt)h(emphasis.)g(The)g(outermost)f(element)g(has)i(usually)
3676
e(the)h(type)g Fr(readme)p Fw(,)g(it)h(is)396 2047 y(declared)e(by)396
3677
2228 y Fr(<!ELEMENT)44 b(readme)f(\(sect1+\)>)396 2325
3678
y(<!ATTLIST)h(readme)845 2422 y(title)g(CDATA)g(#REQUIRED>)396
3679
2613 y Fw(This)21 b(means)f(that)g(this)h(element)e(contains)h(one)f
3680
(or)h(more)f(sections)i(of)f(the)g(\002rst)h(le)n(v)o(el)f(\(element)f
3681
(type)h Fr(sect1)p Fw(\),)f(and)396 2721 y(that)i(the)f(element)f(has)i
3682
(a)f(required)f(attrib)n(ute)h Fr(title)f Fw(containing)g(character)g
3683
(data)h(\(CD)m(A)-9 b(T)h(A\).)19 b(Note)h(that)h Fr(readme)396
3684
2829 y Fw(elements)f(must)g(not)g(contain)f(te)o(xt)h(data.)396
3685
2978 y(The)g(three)g(le)n(v)o(els)g(of)g(sections)g(are)g(declared)f
3686
(as)i(follo)n(ws:)396 3158 y Fr(<!ELEMENT)44 b(sect1)g
3687
(\(title,\(sect2|p|ul\)+\)>)396 3352 y(<!ELEMENT)g(sect2)g
3688
(\(title,\(sect3|p|ul\)+\)>)396 3547 y(<!ELEMENT)g(sect3)g
3689
(\(title,\(p|ul\)+\)>)396 3738 y Fw(Ev)o(ery)19 b(section)h(has)g(a)h
3690
Fr(title)f Fw(element)g(as)g(\002rst)h(subelement.)e(After)h(the)g
3691
(title)h(an)f(arbitrary)f(b)n(ut)h(non-empty)396 3846
3692
y(sequence)f(of)h(inner)g(sections,)g(paragraphs)e(and)h(item)i(lists)g
3693
(follo)n(ws.)f(Note)g(that)g(the)g(inner)g(sections)g(must)g(belong)f
3694
(to)396 3954 y(the)h(ne)o(xt)g(higher)f(section)h(le)n(v)o(el;)g
3695
Fr(sect3)g Fw(elements)f(must)i(not)f(contain)f(inner)g(sections)h
3696
(because)g(there)g(is)h(no)e(ne)o(xt)396 4061 y(higher)g(le)n(v)o(el.)
3697
396 4211 y(Ob)o(viously)-5 b(,)18 b(all)j(three)f(declarations)e(allo)n
3698
(w)j(paragraphs)d(\()p Fr(p)p Fw(\))h(and)h(item)g(lists)i(\()p
3699
Fr(ul)p Fw(\).)e(The)f(de\002nition)g(can)h(be)396 4319
3700
y(simpli\002ed)g(at)h(this)g(point)e(by)h(using)f(a)i(parameter)e
3701
(entity:)396 4499 y Fr(<!ENTITY)44 b(\045)g(p.like)g("p|ul">)396
3702
4693 y(<!ELEMENT)g(sect1)g(\(title,\(sect2|\045p.like;\)+\)>)p
3703
Black 3800 5278 a Fs(20)p Black eop
3705
21 20 bop Black 3028 67 a Fs(Chapter)19 b(1.)h(What)h(is)g(XML?)p
3706
Black 396 579 a Fr(<!ELEMENT)44 b(sect2)g
3707
(\(title,\(sect3|\045p.like;\)+\)>)396 773 y(<!ELEMENT)g(sect3)g
3708
(\(title,\(\045p.like;\)+\)>)396 964 y Fw(Here,)20 b(the)g(entity)g
3709
Fr(p.like)g Fw(is)h(nothing)e(b)n(ut)h(a)g(macro)g(abbre)n(viating)d
3710
(the)j(same)h(sequence)e(of)h(declarations;)f(if)h(ne)n(w)396
3711
1072 y(elements)f(on)h(the)f(same)h(le)n(v)o(el)f(as)h
3712
Fr(p)g Fw(and)f Fr(ul)h Fw(are)f(later)h(added,)e(it)i(is)h(suf)n
3713
(\002cient)e(only)f(to)i(change)e(the)i(entity)f(de\002nition.)396
3714
1180 y(Note)h(that)h(there)e(are)i(some)f(restrictions)f(on)h(the)g
3715
(usage)g(of)g(entities)h(in)f(this)h(conte)o(xt;)e(most)h(important,)e
3716
(entities)396 1288 y(containing)h(a)h(left)h(paranthesis)e(must)h(also)
3717
h(contain)e(the)h(corresponding)d(right)i(paranthesis.)396
3718
1437 y(Note)h(that)h(the)f(entity)g Fr(p.like)g Fw(is)h(a)f
3719
Fs(par)o(ameter)i Fw(entity)-5 b(,)19 b(i.e.)h(the)g(ENTITY)g
3720
(declaration)e(contains)i(a)g(percent)f(sign,)396 1545
3721
y(and)h(the)g(entity)g(is)h(referred)e(to)h(by)g Fr(\045p.like;)p
3722
Fw(.)f(This)h(kind)g(of)f(entity)h(must)h(be)f(used)g(to)g(abbre)n
3723
(viate)e(parts)j(of)f(the)396 1653 y(DTD;)g(the)g Fs(g)o(ener)o(al)f
3724
Fw(entities)h(declared)e(without)h(percent)g(sign)h(and)f(referred)f
3725
(to)i(as)g Fr(&name;)f Fw(are)h(not)f(allo)n(wed)g(in)h(this)396
3726
1761 y(conte)o(xt.)396 1911 y(The)g Fr(title)g Fw(element)g
3727
(speci\002es)g(the)h(title)f(of)g(the)h(section)f(in)g(which)g(it)g
3728
(occurs.)g(The)f(title)i(is)h(gi)n(v)o(en)c(as)j(character)396
3729
2019 y(data,)f(optionally)f(interspersed)f(with)j(line)f(breaks)g(\()p
3730
Fr(br)p Fw(\):)396 2199 y Fr(<!ELEMENT)44 b(title)g(\(#PCDATA|br\)*>)
3731
396 2390 y Fw(Compared)19 b(with)h(the)g Fr(title)g Fs(attrib)n(ute)g
3732
Fw(of)g(the)h Fr(readme)e Fw(element,)h(this)g(element)g(allo)n(ws)g
3733
(inner)g(markup)e(\(i.e.)i Fr(br)p Fw(\))396 2498 y(while)g(attrib)n
3734
(ute)g(v)n(alues)g(do)g(not:)g(It)g(is)h(an)g(error)e(if)h(an)g(attrib)
3735
n(ute)g(v)n(alue)g(contains)f(the)h(left)h(angle)e(brack)o(et)g
3736
Fn(<)i Fw(literally)396 2605 y(such)f(that)g(it)h(is)h(impossible)d(to)
3737
h(include)g(inner)f(elements.)396 2755 y(The)h(paragraph)e(element)h
3738
Fr(p)i Fw(has)f(a)h(structure)e(similar)i(to)f Fr(title)p
3739
Fw(,)g(b)n(ut)g(it)h(allo)n(ws)f(more)g(inner)f(elements:)396
3740
2935 y Fr(<!ENTITY)44 b(\045)g(text)h("br|code|em|footnote|a">)396
3741
3129 y(<!ELEMENT)f(p)g(\(#PCDATA|\045text;\)*>)396 3320
3742
y Fw(Line)20 b(breaks)g(do)f(not)h(ha)n(v)o(e)g(inner)f(structure,)g
3743
(so)i(the)o(y)e(are)h(declared)f(as)i(being)e(empty:)396
3744
3500 y Fr(<!ELEMENT)44 b(br)g(EMPTY>)396 3691 y Fw(This)21
3745
b(means)f(that)g(really)g(nothing)e(is)j(allo)n(wed)f(within)g
3746
Fr(br)p Fw(;)g(you)f(must)i(al)o(w)o(ays)f(write)h Fr(<br></br>)e
3747
Fw(or)h(abbre)n(viated)396 3799 y Fr(<br/>)p Fw(.)396
3748
3949 y(Code)g(samples)h(should)e(be)h(mark)o(ed)f(up)h(by)f(the)h
3749
Fr(code)h Fw(tag;)f(emphasized)f(te)o(xt)h(can)g(be)g(indicated)f(by)h
3750
Fr(em)p Fw(:)396 4129 y Fr(<!ELEMENT)44 b(code)g(\(#PCDATA\)>)396
3751
4323 y(<!ELEMENT)g(em)g(\(#PCDATA|\045text;\)*>)396 4514
3752
y Fw(That)20 b Fr(code)g Fw(elements)g(are)g(not)g(allo)n(wed)g(to)g
3753
(contain)f(further)g(markup)f(while)i Fr(em)h Fw(elements)f(do)g(is)h
3754
(a)f(design)g(decision)396 4622 y(by)g(the)g(author)f(of)h(the)g(DTD.)
3755
396 4772 y(Unordered)e(lists)k(simply)d(consists)i(of)f(one)g(or)g
3756
(more)f(list)i(items,)g(and)e(a)i(list)g(item)g(may)e(contain)g
3757
(paragraph-le)n(v)o(el)396 4879 y(material:)p Black 3800
3758
5278 a Fs(21)p Black eop
3760
22 21 bop Black 3028 67 a Fs(Chapter)19 b(1.)h(What)h(is)g(XML?)p
3761
Black 396 579 a Fr(<!ELEMENT)44 b(ul)g(\(li+\)>)396 773
3762
y(<!ELEMENT)g(li)g(\(\045p.like;\)*>)396 964 y Fw(F)o(ootnotes)19
3763
b(are)h(described)f(by)h(the)g(te)o(xt)g(of)g(the)g(note;)g(this)h(te)o
3764
(xt)f(may)g(contain)f(te)o(xt-le)n(v)o(el)g(markup.)f(There)h(is)i(no)
3765
396 1072 y(mechanism)e(to)i(describe)e(the)h(numbering)e(scheme)h(of)h
3766
(footnotes,)f(or)h(to)g(specify)g(ho)n(w)f(footnote)g(references)f(are)
3767
396 1180 y(printed.)396 1360 y Fr(<!ELEMENT)44 b(footnote)f
3768
(\(#PCDATA|\045text;\)*>)396 1551 y Fw(Hyperlinks)19
3769
b(are)h(written)g(as)h(in)f(HTML.)g(The)g(anchor)f(tag)h(contains)f
3770
(the)h(te)o(xt)g(describing)f(where)h(the)g(link)g(points)g(to,)396
3771
1659 y(and)g(the)g Fr(href)g Fw(attrib)n(ute)g(is)h(the)f(pointer)f
3772
(\(as)i(URL\).)f(There)f(is)j(no)d(w)o(ay)i(to)f(describe)f(locations)h
3773
(of)g("hash)g(marks".)f(If)396 1767 y(the)h(link)g(refers)g(to)g
3774
(another)f Fs(r)m(eadme)h Fw(document,)e(the)i(attrib)n(ute)g
3775
Fr(readmeref)f Fw(should)g(be)h(used)g(instead)g(of)g
3776
Fr(href)p Fw(.)396 1875 y(The)g(reason)g(is)h(that)f(the)g(con)m(v)o
3777
(erted)e(document)g(has)i(usually)g(a)h(dif)n(ferent)d(system)i
3778
(identi\002er)g(\(\002le)h(name\),)d(and)i(the)396 1983
3779
y(link)g(to)h(a)f(con)m(v)o(erted)e(document)g(must)i(be)g(con)m(v)o
3780
(erted,)e(too.)396 2163 y Fr(<!ELEMENT)44 b(a)g(\(#PCDATA\)*>)396
3781
2260 y(<!ATTLIST)g(a)845 2357 y(href)268 b(CDATA)44 b(#IMPLIED)845
3782
2454 y(readmeref)f(CDATA)h(#IMPLIED)396 2552 y(>)396
3783
2742 y Fw(Note)20 b(that)h(although)d(it)j(is)g(only)e(sensible)i(to)f
3784
(specify)g(one)f(of)h(the)g(tw)o(o)h(attrib)n(utes,)f(the)g(DTD)g(has)h
3785
(no)e(means)h(to)396 2850 y(e)o(xpress)g(this)g(restriction.)396
3786
3000 y(So)h(f)o(ar)f(the)g(DTD.)g(Finally)-5 b(,)19 b(here)h(is)h(a)g
3787
(document)d(for)i(it:)396 3180 y Fr(<?xml)44 b(version="1.0")f
3788
(encoding="ISO-8859-1"?>)396 3277 y(<!DOCTYPE)h(readme)f(SYSTEM)h
3789
("readme.dtd">)396 3374 y(<readme)g(title="How)f(to)i(use)f(the)g
3790
(readme)g(converters">)396 3471 y(<sect1>)486 3569 y
3791
(<title>Usage</title>)486 3666 y(<p>)576 3763 y(The)g(<em>readme</em>)e
3792
(converter)i(is)g(invoked)g(on)g(the)h(command)e(line)h(by:)486
3793
3860 y(</p>)486 3957 y(<p>)576 4054 y(<code>readme)e([)j(-text)f(|)h
3794
(-html)f(])g(input.xml</code>)486 4151 y(</p>)486 4248
3795
y(<p>)576 4346 y(Here)g(a)g(list)h(of)f(options:)486
3796
4443 y(</p>)486 4540 y(<ul>)576 4637 y(<li>)665 4734
3797
y(<p><code>-)396 4831 y(text</code>:)f(specifies)g(that)i(ASCII)f
3798
(output)f(should)h(be)h(produced</p>)p Black 3800 5278
3801
23 22 bop Black 3028 67 a Fs(Chapter)19 b(1.)h(What)h(is)g(XML?)p
3802
Black 576 579 a Fr(</li>)576 676 y(<li>)665 773 y(<p><code>-)396
3803
870 y(html</code>:)43 b(specifies)g(that)i(HTML)f(output)g(should)f(be)
3804
i(produced</p>)576 967 y(</li>)486 1065 y(</ul>)486 1162
3805
y(<p>)576 1259 y(The)f(input)g(file)g(must)g(be)h(given)f(on)g(the)h
3806
(command)e(line.)h(The)h(converted)e(output)h(is)576
3807
1356 y(printed)f(to)i(<em>stdout</em>.)486 1453 y(</p>)396
3808
1550 y(</sect1>)396 1647 y(<sect1>)486 1745 y(<title>Author</title>)486
3809
1842 y(<p>)576 1939 y(The)f(program)g(has)g(been)g(written)g(by)576
3810
2036 y(<a)g(href="mailto:Gerd.Stolpmann@darmstadt.ne)o(tsurf.)o(de">Ge)
3811
o(rd)39 b(Stolpmann</a>.)486 2133 y(</p>)396 2230 y(</sect1>)396
3812
2327 y(</readme>)-2 2746 y Fy(Notes)p Black 396 2926
3813
a Fw(1.)p Black 70 w(This)20 b(construct)g(is)h(only)e(allo)n(wed)h
3814
(within)g(the)g(de\002nition)f(of)h(another)e(entity;)i(otherwise)g(e)o
3815
(xtra)f(spaces)i(w)o(ould)529 3034 y(be)f(added)f(\(as)i(e)o(xplained)d
3816
(abo)o(v)o(e\).)g(Such)i(indirection)e(is)j(not)f(recommended.)529
3817
3172 y Fj(Complete)f(e)o(xample:)529 3343 y Fi(<!ENTITY)43
3818
b(\045)e(variant)i("a">)243 b(<!-)42 b(or)f("b")g(->)529
3819
3430 y(<!ENTITY)i(text-a)g("This)f(is)f(text)h(A.">)529
3820
3518 y(<!ENTITY)h(text-b)g("This)f(is)f(text)h(B.">)529
3821
3605 y(<!ENTITY)h(text)f("&text-\045variant)q(;;")q(>)529
3822
3785 y Fj(Y)-8 b(ou)19 b(can)h(no)n(w)f(write)f Fi(&text;)j
3823
Fj(in)e(the)g(document)h(instance,)f(and)h(depending)h(on)e(the)g(v)n
3824
(alue)g(of)g Fi(variant)i Fj(either)e Fi(text-a)i Fj(or)529
3825
3882 y Fi(text-b)g Fj(is)d(inserted.)p Black 3800 5278
3828
24 23 bop Black Black -2 621 a Ft(Chapter)48 b(2.)f(Using)i(PXP)-2
3829
1055 y Fy(2.1.)39 b(V)-9 b(alidation)396 1235 y Fw(The)20
3830
b(parser)g(can)g(be)g(used)g(to)g Fs(validate)f Fw(a)i(document.)d
3831
(This)i(means)g(that)g(all)h(the)f(constraints)g(that)g(must)g(hold)g
3832
(for)f(a)396 1343 y(v)n(alid)h(document)e(are)i(actually)g(check)o(ed.)
3833
f(V)-9 b(alidation)19 b(is)i(the)f(def)o(ault)f(mode)h(of)g(PXP,)g
3834
(i.e.)h(e)n(v)o(ery)d(document)h(is)396 1451 y(v)n(alidated)g(while)i
3835
(it)f(is)i(being)d(parsed.)396 1600 y(In)h(the)g Fr(examples)g
3836
Fw(directory)e(of)i(the)g(distrib)n(ution)f(you)h(\002nd)g(the)g
3837
Fr(pxpvalidate)f Fw(application.)f(It)j(is)g(in)m(v)n(ok)o(ed)d(in)j
3838
(the)396 1708 y(follo)n(wing)e(w)o(ay:)396 1888 y Fr(pxpvalidate)43
3839
b([)i(-wf)f(])h Fo(file)p Fr(...)396 2079 y Fw(The)20
3840
b(\002les)h(mentioned)e(on)g(the)i(command)d(line)i(are)g(v)n
3841
(alidated,)f(and)h(e)n(v)o(ery)e(w)o(arning)h(and)h(e)n(v)o(ery)f
3842
(error)g(messages)h(are)396 2187 y(printed)f(to)i(stderr)-5
3843
b(.)396 2337 y(The)20 b(-wf)g(switch)h(modi\002es)e(the)i(beha)n(viour)
3844
d(such)i(that)g(a)h(well-formedness)d(parser)h(is)i(simulated.)f(In)g
3845
(this)g(mode,)f(the)396 2445 y(ELEMENT)-6 b(,)19 b(A)-9
3846
b(TTLIST)j(,)19 b(and)g(NO)m(T)-8 b(A)f(TION)20 b(declarations)f(of)h
3847
(the)g(DTD)g(are)g(ignored,)e(and)i(only)f(the)i(ENTITY)396
3848
2553 y(declarations)e(will)i(tak)o(e)f(ef)n(fect.)g(This)g(mode)f(is)i
3849
(intended)e(for)h(documents)e(lacking)h(a)i(DTD.)f(Please)h(note)f
3850
(that)g(the)396 2661 y(parser)g(still)h(scans)g(the)f(DTD)g(fully)g
3851
(and)g(will)h(report)e(all)h(errors)g(in)g(the)g(DTD;)h(such)f(checks)f
3852
(are)h(not)g(required)f(by)g(a)396 2769 y(well-formedness)f(parser)-5
3853
b(.)396 2918 y(The)20 b Fr(pxpvalidate)f Fw(application)g(is)i(the)f
3854
(simplest)h(sensible)f(program)e(using)i(PXP,)g(you)g(may)f(consider)g
3855
(it)i(as)396 3026 y("hello)f(w)o(orld")f(program.)-2
3856
3445 y Fy(2.2.)39 b(Ho)n(w)g(to)g(par)n(se)f(a)i(document)d(fr)m(om)i
3857
(an)g(application)396 3624 y Fw(Let)21 b(me)f(\002rst)h(gi)n(v)o(e)e(a)
3858
i(rough)d(o)o(v)o(ervie)n(w)g(of)i(the)h(object)e(model)g(of)h(the)h
3859
(parser)-5 b(.)19 b(The)h(follo)n(wing)f(items)h(are)h(represented)396
3860
3732 y(by)f(objects:)p Black 396 4055 a Fu(\225)p Black
3861
60 w Fs(Documents:)f Fw(The)h(document)e(representation)g(is)j(more)e
3862
(or)h(less)h(the)f(anchor)f(for)g(the)h(application;)f(all)i(accesses)g
3863
(to)479 4163 y(the)f(parsed)g(entities)h(start)f(here.)g(It)g(is)h
3864
(described)e(by)h(the)g(class)h Fr(document)f Fw(contained)e(in)j(the)f
3865
(module)479 4271 y Fr(Pxp_document)p Fw(.)f(Y)-9 b(ou)19
3866
b(can)h(get)h(some)f(global)f(information,)e(such)j(as)h(the)f(XML)h
3867
(declaration)d(the)j(document)479 4379 y(be)o(gins)f(with,)g(the)g(DTD)
3868
g(of)g(the)g(document,)e(global)i(processing)e(instructions,)h(and)h
3869
(most)g(important,)f(the)479 4487 y(document)f(tree.)p
3870
Black 396 4595 a Fu(\225)p Black 60 w Fs(The)j(contents)e(of)h
3871
(documents:)f Fw(The)h(contents)f(ha)n(v)o(e)h(the)g(structure)f(of)h
3872
(a)h(tree:)f(Elements)g(contain)f(other)g(elements)479
3873
4703 y(and)h(te)o(xt)744 4670 y Fg(1)768 4703 y Fw(.)h(The)e(common)g
3874
(type)h(to)g(represent)f(both)g(kinds)h(of)g(content)f(is)i
3875
Fr(node)f Fw(which)g(is)h(a)g(class)g(type)e(that)479
3876
4811 y(uni\002es)h(the)h(properties)d(of)i(elements)g(and)g(character)f
3877
(data.)h(Ev)o(ery)e(node)i(has)g(a)h(list)g(of)f(children)f(\(which)g
3878
(is)i(empty)p Black 3800 5278 a Fs(24)p Black eop
3880
25 24 bop Black 3136 67 a Fs(Chapter)20 b(2.)g(Using)g(PXP)p
3881
Black 479 579 a Fw(if)h(the)f(element)g(is)h(empty)e(or)h(the)g(node)f
3882
(represents)h(te)o(xt\);)f(nodes)h(may)g(ha)n(v)o(e)f(attrib)n(utes;)h
3883
(nodes)g(ha)n(v)o(e)f(al)o(w)o(ays)i(te)o(xt)479 687
3884
y(contents.)d(There)g(are)g(tw)o(o)h(implementations)e(of)h
3885
Fr(node)p Fw(,)h(the)f(class)i Fr(element_impl)d Fw(for)h(elements,)g
3886
(and)g(the)h(class)479 795 y Fr(data_impl)h Fw(for)f(te)o(xt)h(data.)g
3887
(Y)-9 b(ou)20 b(\002nd)f(these)i(classes)g(and)f(class)h(types)f(in)g
3888
(the)g(module)f Fr(Pxp_document)p Fw(,)g(too.)479 944
3889
y(Note)h(that)h(attrib)n(ute)f(lists)h(are)f(represented)f(by)g
3890
(non-class)h(v)n(alues.)p Black 396 1094 a Fu(\225)p
3891
Black 60 w Fs(The)h(node)e(e)n(xtension:)g Fw(F)o(or)h(adv)n(anced)e
3892
(usage,)i(e)n(v)o(ery)e(node)i(of)f(the)i(document)d(may)i(ha)n(v)o(e)f
3893
(an)h(associated)479 1202 y Fs(e)n(xtension)g Fw(which)g(is)h(simply)f
3894
(a)g(second)f(object.)h(This)g(object)g(must)g(ha)n(v)o(e)g(the)g
3895
(three)g(methods)f Fr(clone)p Fw(,)g Fr(node)p Fw(,)h(and)479
3896
1310 y Fr(set_node)f Fw(as)h(bare)f(minimum,)e(b)n(ut)j(you)e(are)i
3897
(free)e(to)i(add)f(methods)f(as)i(you)f(w)o(ant.)g(This)g(is)i(the)e
3898
(preferred)e(w)o(ay)j(to)479 1417 y(add)g(functionality)e(to)i(the)h
3899
(document)d(tree)1746 1384 y Fg(2)1770 1417 y Fw(.)j(The)e(class)j
3900
(type)d Fr(extension)h Fw(is)h(de\002ned)e(in)h Fr(Pxp_document)p
3901
Fw(,)f(too.)p Black 396 1525 a Fu(\225)p Black 60 w Fs(The)i(DTD:)f
3902
Fw(Sometimes)g(it)h(is)g(necessary)e(to)i(access)f(the)h(DTD)f(of)g(a)h
3903
(document;)d(the)i(a)n(v)o(erage)f(application)g(does)479
3904
1633 y(not)h(need)g(this)g(feature.)f(The)h(class)h Fr(dtd)g
3905
Fw(describes)e(DTDs,)i(and)e(mak)o(es)h(it)h(possible)f(to)h(get)f
3906
(representations)e(of)479 1741 y(element,)i(entity)-5
3907
b(,)19 b(and)h(notation)e(declarations)h(as)i(well)g(as)g(processing)e
3908
(instructions)g(contained)f(in)j(the)f(DTD.)479 1849
3909
y(This)g(class,)g(and)f Fr(dtd_element)p Fw(,)g Fr(dtd_notation)p
3910
Fw(,)e(and)i Fr(proc_instruction)f Fw(can)h(be)h(found)e(in)i(the)f
3911
(module)479 1957 y Fr(Pxp_dtd)p Fw(.)h(There)f(are)h(a)h(couple)e(of)h
3912
(classes)h(representing)d(dif)n(ferent)h(kinds)g(of)h(entities;)h
3913
(these)f(can)g(be)g(found)f(in)479 2065 y(the)h(module)f
3914
Fr(Pxp_entity)p Fw(.)396 2214 y(Additionally)-5 b(,)18
3915
b(the)i(follo)n(wing)f(modules)g(play)h(a)g(role:)p Black
3916
396 2447 a Fu(\225)p Black 60 w Fs(Pxp_yacc:)e Fw(Here)i(the)h(main)e
3917
(parsing)h(functions)e(such)i(as)h Fr(parse_document_entity)c
3918
Fw(are)k(located.)e(Some)479 2555 y(additional)g(types)h(and)g
3919
(functions)f(allo)n(w)h(the)g(parser)f(to)i(be)f(con\002gured)e(in)i(a)
3920
h(non-standard)c(w)o(ay)-5 b(.)p Black 396 2663 a Fu(\225)p
3921
Black 60 w Fs(Pxp_types:)19 b Fw(This)h(is)h(a)g(collection)e(of)h
3922
(basic)g(types)g(and)g(e)o(xceptions.)396 2812 y(There)g(are)g(some)g
3923
(further)e(modules)i(that)g(are)g(needed)f(internally)g(b)n(ut)h(are)g
3924
(not)g(part)g(of)g(the)g(API.)396 2962 y(Let)h(the)f(document)e(to)i
3925
(be)h(parsed)e(be)h(stored)g(in)g(a)h(\002le)g(called)f
3926
Fr(doc.xml)p Fw(.)f(The)h(parsing)f(process)h(is)h(started)f(by)396
3927
3070 y(calling)g(the)g(function)396 3250 y Fr(val)45
3928
b(parse_document_entity)c(:)k(config)e(->)i(source)f(->)g('ext)g(spec)h
3929
(->)f('ext)g(document)396 3441 y Fw(de\002ned)19 b(in)i(the)f(module)f
3930
Fr(Pxp_yacc)p Fw(.)g(The)h(\002rst)h(ar)o(gument)d(speci\002es)i(some)g
3931
(global)g(properties)e(of)i(the)g(parser;)g(it)h(is)396
3932
3549 y(recommended)c(to)j(start)g(with)g(the)g Fr(default_config)p
3933
Fw(.)e(The)h(second)g(ar)o(gument)e(determines)i(where)g(the)h
3934
(document)396 3657 y(to)h(be)f(parsed)f(comes)h(from;)f(this)i(may)f
3935
(be)g(a)g(\002le,)h(a)g(channel,)d(or)i(an)g(entity)g(ID.)g(T)-7
3936
b(o)21 b(parse)f Fr(doc.xml)p Fw(,)f(it)i(is)g(suf)n(\002cient)396
3937
3764 y(to)g(pass)f Fr(from_file)44 b("doc.xml")p Fw(.)396
3938
3914 y(The)20 b(third)g(ar)o(gument)e(passes)i(the)h(object)e
3939
(speci\002cation)h(to)g(use.)g(Roughly)f(speaking,)g(it)i(determines)e
3940
(which)g(classes)396 4022 y(implement)g(the)h(node)g(objects)f(of)h
3941
(which)g(element)g(types,)f(and)h(which)g(e)o(xtensions)f(are)h(to)g
3942
(be)g(used.)g(The)g Fr('ext)396 4130 y Fw(polymorphic)d(v)n(ariable)i
3943
(is)j(the)e(type)f(of)h(the)h(e)o(xtension.)d(F)o(or)i(the)g(moment,)f
3944
(let)i(us)f(simply)g(pass)h Fr(default_spec)d Fw(as)396
3945
4238 y(this)j(ar)o(gument,)d(and)h(ignore)g(it.)396 4387
3946
y(So)i(the)f(follo)n(wing)e(e)o(xpression)h(parses)h
3947
Fr(doc.xml)p Fw(:)396 4567 y Fr(open)44 b(Pxp_yacc)396
3948
4664 y(let)h(d)f(=)h(parse_document_entity)c(default_config)i
3949
(\(from_file)g("doc.xml"\))g(de-)396 4762 y(fault_spec)p
3950
Black 3800 5278 a Fs(25)p Black eop
3952
26 25 bop Black 3136 67 a Fs(Chapter)20 b(2.)g(Using)g(PXP)p
3953
Black 396 579 a Fw(Note)g(that)h Fr(default_config)d
3954
Fw(implies)i(that)h(w)o(arnings)e(are)h(collected)g(b)n(ut)g(not)g
3955
(printed.)e(Errors)h(raise)i(one)f(of)g(the)396 687 y(e)o(xception)f
3956
(de\002ned)g(in)h Fr(Pxp_types)p Fw(;)f(to)i(get)f(readable)f(errors)g
3957
(and)h(w)o(arnings)f(catch)h(the)g(e)o(xceptions)f(as)i(follo)n(ws:)396
3958
867 y Fr(class)44 b(warner)g(=)486 964 y(object)576 1061
3959
y(method)f(warn)i(w)f(=)665 1158 y(print_endline)f(\("WARNING:)g(")i(^)
3960
f(w\))486 1256 y(end)396 1353 y(;;)396 1547 y(try)486
3961
1644 y(let)g(config)g(=)h({)f(default_config)f(with)h(warner)g(=)h(new)
3962
f(warner)g(})g(in)486 1741 y(let)g(d)h(=)g(parse_document_entity)c
3963
(config)j(\(from_file)f("doc.xml"\))g(default_spec)486
3964
1838 y(in)576 1935 y(...)396 2033 y(with)531 2130 y(e)h(->)620
3965
2227 y(print_endline)f(\(Pxp_types.string_of_exn)e(e\))396
3966
2418 y Fw(No)n(w)20 b Fr(d)h Fw(is)g(an)f(object)g(of)g(the)g
3967
Fr(document)f Fw(class.)i(If)f(you)g(w)o(ant)g(the)g(node)f(tree,)h
3968
(you)g(can)g(get)g(the)g(root)f(element)h(by)396 2598
3969
y Fr(let)45 b(root)f(=)g(d)h(#)g(root)396 2789 y Fw(and)20
3970
b(if)g(you)g(w)o(ould)f(rather)h(lik)o(e)g(to)g(access)h(the)f(DTD,)g
3971
(determine)f(it)i(by)396 2969 y Fr(let)45 b(dtd)f(=)h(d)f(#)h(dtd)396
3972
3160 y Fw(As)21 b(it)g(is)g(more)f(interesting,)f(let)h(us)h(in)m(v)o
3973
(estigate)e(the)h(node)f(tree)h(no)n(w)-5 b(.)19 b(Gi)n(v)o(en)g(the)i
3974
(root)e(element,)g(it)i(is)h(possible)d(to)396 3268 y(recursi)n(v)o
3975
(ely)f(tra)n(v)o(erse)h(the)h(whole)f(tree.)g(The)g(children)g(of)g(a)h
3976
(node)f Fr(n)h Fw(are)f(returned)f(by)h(the)h(method)e
3977
Fr(sub_nodes)p Fw(,)g(and)396 3376 y(the)i(type)g(of)g(a)h(node)e(is)i
3978
(returned)d(by)i Fr(node_type)p Fw(.)f(This)i(function)d(tra)n(v)o
3979
(erses)i(the)g(tree,)g(and)g(prints)g(the)g(type)f(of)h(each)396
3980
3484 y(node:)396 3664 y Fr(let)45 b(rec)f(print_structure)e(n)j(=)486
3981
3761 y(let)f(ntype)g(=)h(n)g(#)f(node_type)g(in)486 3858
3982
y(match)g(ntype)g(with)576 3955 y(T_element)f(name)h(->)665
3983
4053 y(print_endline)f(\("Element)g(of)i(type)f(")h(^)f(name\);)665
3984
4150 y(let)h(children)e(=)i(n)f(#)h(sub_nodes)e(in)665
3985
4247 y(List.iter)h(print_structure)e(children)486 4344
3986
y(|)j(T_data)e(->)665 4441 y(print_endline)g("Data")486
3987
4538 y(|)i(_)f(->)665 4635 y(\(*)h(Other)f(node)g(types)g(are)g(not)h
3988
(possible)e(unless)h(the)g(parser)g(is)h(configured)800
3989
4733 y(differently.)710 4830 y(*\))p Black 3798 5278
3992
27 26 bop Black 3136 67 a Fs(Chapter)20 b(2.)g(Using)g(PXP)p
3993
Black 665 579 a Fr(assert)44 b(false)396 770 y Fw(Y)-9
3994
b(ou)20 b(can)g(call)g(this)h(function)e(by)396 950 y
3995
Fr(print_structure)43 b(root)396 1141 y Fw(The)20 b(type)g(returned)e
3996
(by)i Fr(node_type)f Fw(is)i(either)f Fr(T_element)43
3997
b(name)21 b Fw(or)e Fr(T_data)p Fw(.)h(The)g Fr(name)g
3998
Fw(of)g(the)g(element)g(type)396 1249 y(is)h(the)g(string)e(included)g
3999
(in)i(the)f(angle)f(brack)o(ets.)h(Note)g(that)g(only)f(elements)h(ha)n
4000
(v)o(e)g(children;)f(data)h(nodes)f(are)h(al)o(w)o(ays)396
4001
1357 y(lea)n(v)o(es)h(of)e(the)i(tree.)396 1506 y(There)f(are)g(some)g
4002
(more)f(methods)g(in)i(order)e(to)h(access)h(a)f(parsed)g(node)f(tree:)
4003
p Black 396 1739 a Fu(\225)p Black 60 w Fr(n)45 b(#)g(parent)p
4004
Fw(:)19 b(Returns)h(the)h(parent)e(node,)g(or)h(raises)h
4005
Fr(Not_found)e Fw(if)h(the)g(node)g(is)h(already)e(the)h(root)p
4006
Black 396 1847 a Fu(\225)p Black 60 w Fr(n)45 b(#)g(root)p
4007
Fw(:)20 b(Returns)g(the)g(root)g(of)f(the)i(node)e(tree.)p
4008
Black 396 1955 a Fu(\225)p Black 60 w Fr(n)45 b(#)g(attribute)e(a)p
4009
Fw(:)21 b(Returns)f(the)g(v)n(alue)f(of)h(the)g(attrib)n(ute)g(with)h
4010
(name)e Fr(a)p Fw(.)i(The)e(method)g(returns)h(a)g(v)n(alue)g(for)479
4011
2063 y(e)n(v)o(ery)f Fs(declar)m(ed)j Fw(attrib)n(ute,)d(independently)
4012
e(of)j(whether)f(the)i(attrib)n(ute)e(instance)h(is)h(de\002ned)e(or)h
4013
(not.)g(If)g(the)479 2170 y(attrib)n(ute)g(is)g(not)f(declared,)f
4014
Fr(Not_found)h Fw(will)h(be)g(raised.)f(\(In)g(well-formedness)f(mode,)
4015
g(e)n(v)o(ery)g(e)o(xisting)h(attrib)n(ute)479 2278 y(is)i(considered)e
4016
(as)i(being)e(implicitly)h(declared)f(with)h(type)g Fr(CDATA)p
4017
Fw(,)f(so)i(you)e(will)i(get)f(either)g Fr(Value)44 b(s)21
4018
b Fw(or)f(an)479 2386 y(e)o(xception)f Fr(Not_found)p
4019
Fw(.\))479 2536 y(The)h(follo)n(wing)f(return)g(v)n(alues)g(are)i
4020
(possible:)f Fr(Value)44 b(s)p Fw(,)20 b Fr(Valuelist)43
4021
b(sl)21 b Fw(,)f(and)g Fr(Implied_value)p Fw(.)e(The)i(\002rst)479
4022
2644 y(tw)o(o)h(v)n(alue)e(types)h(indicate)g(that)g(the)g(attrib)n
4023
(ute)g(v)n(alue)g(is)h(a)n(v)n(ailable,)e(either)h(because)g(there)f
4024
(is)i(a)g(de\002nition)479 2752 y Fo(a)p Fr(=")p Fo(value)p
4025
Fr(")f Fw(in)g(the)g(XML)g(te)o(xt,)g(or)g(because)g(there)f(is)i(a)g
4026
(def)o(ault)e(v)n(alue)h(\(declared)f(in)h(the)g(DTD\).)g(Only)g(if)g
4027
(both)479 2860 y(the)g(instance)g(de\002nition)f(and)h(the)g(def)o
4028
(ault)g(declaration)e(are)i(missing,)g(the)h(latter)f(v)n(alue)f
4029
Fr(Implied_value)g Fw(will)479 2967 y(be)h(returned.)479
4030
3117 y(In)g(the)g(DTD,)h(e)n(v)o(ery)d(attrib)n(ute)i(is)h(typed.)e
4031
(There)h(are)g(single-v)n(alue)e(types)i(\(CD)m(A)-9
4032
b(T)h(A,)20 b(ID,)g(IDREF)-7 b(,)21 b(ENTITY)-11 b(,)479
4033
3225 y(NMT)o(OKEN,)19 b(enumerations\),)f(in)i(which)g(case)g(the)h
4034
(method)d(passes)j Fr(Value)44 b(s)21 b Fw(back,)e(where)h
4035
Fr(s)g Fw(is)h(the)479 3333 y(normalized)e(string)g(v)n(alue)h(of)g
4036
(the)g(attrib)n(ute.)g(The)f(other)h(types)g(\(IDREFS,)g(ENTITIES,)f
4037
(NMT)o(OKENS\))479 3441 y(represent)g(list)j(v)n(alues,)d(and)h(the)g
4038
(parser)g(splits)h(the)f(XML)g(literal)h(into)e(se)n(v)o(eral)h(tok)o
4039
(ens)g(and)f(returns)h(these)g(tok)o(ens)479 3549 y(as)h
4040
Fr(Valuelist)44 b(sl)p Fw(.)479 3698 y(Normalization)19
4041
b(means)h(that)g(entity)g(references)e(\(the)i Fr(&)p
4042
Fo(name)p Fr(;)g Fw(tok)o(ens\))f(and)h(character)f(references)479
4043
3806 y(\()p Fr(&#)p Fo(number)s Fr(;)p Fw(\))g(are)h(replaced)f(by)g
4044
(the)i(te)o(xt)f(the)o(y)f(represent,)g(and)h(that)g(white)g(space)g
4045
(characters)f(are)i(con)m(v)o(erted)479 3914 y(into)f(plain)g(spaces.)p
4046
Black 396 4063 a Fu(\225)p Black 60 w Fr(n)45 b(#)g(data)p
4047
Fw(:)20 b(Returns)g(the)g(character)f(data)h(contained)f(in)h(the)g
4048
(node.)f(F)o(or)h(data)g(nodes,)f(the)h(meaning)f(is)i(ob)o(vious)479
4049
4171 y(as)g(this)g(is)g(the)f(main)g(content)f(of)h(data)g(nodes.)f(F)o
4050
(or)h(element)g(nodes,)f(this)i(method)e(returns)g(the)h(concatenated)
4051
479 4279 y(contents)g(of)g(all)g(inner)g(data)g(nodes.)479
4052
4429 y(Note)g(that)h(entity)f(references)e(included)h(in)h(the)h(te)o
4053
(xt)f(are)g(resolv)o(ed)f(while)h(the)o(y)f(are)h(being)g(parsed;)f
4054
(for)h(e)o(xample)479 4537 y(the)g(te)o(xt)h("a)f(<>)g(b")g(will)
4055
h(be)f(returned)e(as)j("a)g(<>)f(b")g(by)g(this)h(method.)d(Spaces)j
4056
(of)f(data)g(nodes)f(are)h(al)o(w)o(ays)479 4644 y(preserv)o(ed.)e(Ne)n
4057
(wlines)j(are)f(preserv)o(ed,)e(b)n(ut)i(al)o(w)o(ays)g(con)m(v)o
4058
(erted)e(to)i(\\n)h(characters)e(e)n(v)o(en)g(if)i(ne)n(wlines)e(are)i
4059
(encoded)479 4752 y(as)g(\\r\\n)f(or)g(\\r)-5 b(.)21
4060
b(Normally)e(you)g(will)i(ne)n(v)o(er)e(see)i(tw)o(o)f(adjacent)f(data)
4061
i(nodes)e(because)h(the)g(parser)f(collapses)h(all)h(data)p
4062
Black 3797 5278 a Fs(27)p Black eop
4064
28 27 bop Black 3136 67 a Fs(Chapter)20 b(2.)g(Using)g(PXP)p
4065
Black 479 579 a Fw(material)g(at)h(one)e(location)h(into)g(one)f(node.)
4066
g(\(Ho)n(we)n(v)o(er)m(,)f(if)i(you)g(create)g(your)f(o)n(wn)g(tree)h
4067
(or)g(transform)f(the)h(parsed)479 687 y(tree,)g(it)h(is)g(possible)f
4068
(to)h(ha)n(v)o(e)e(adjacent)h(data)g(nodes.\))479 836
4069
y(Note)g(that)h(elements)f(that)g(do)g Fs(not)h Fw(allo)n(w)f(#PCD)m(A)
4070
-9 b(T)h(A)20 b(as)h(content)e(will)i(not)f(ha)n(v)o(e)g(data)g(nodes)f
4071
(as)i(children.)e(This)479 944 y(means)h(that)g(spaces)h(and)f(ne)n
4072
(wlines,)f(the)h(only)g(character)f(material)g(allo)n(wed)h(for)g(such)
4073
f(elements,)h(are)g(silently)479 1052 y(dropped.)396
4074
1243 y(F)o(or)g(e)o(xample,)e(if)i(the)f(task)h(is)h(to)f(print)f(all)h
4075
(contents)f(of)g(elements)h(with)f(type)h("v)n(aluable")e(whose)h
4076
(attrib)n(ute)g("priority")396 1351 y(is)i("1",)f(this)h(function)d
4077
(can)i(help:)396 1531 y Fr(let)45 b(rec)f(print_valuable_prio1)d(n)k(=)
4078
486 1628 y(let)f(ntype)g(=)h(n)g(#)f(node_type)g(in)486
4079
1725 y(match)g(ntype)g(with)576 1823 y(T_element)f("valuable")g(when)h
4080
(n)h(#)g(attribute)e("priority")g(=)i(Value)f("1")g(->)665
4081
1920 y(print_endline)f("Valuable)g(node)h(with)h(priotity)e(1)i
4082
(found:";)665 2017 y(print_endline)e(\(n)h(#)h(data\))486
4083
2114 y(|)g(\(T_element)e(_)h(|)h(T_data\))f(->)665 2211
4084
y(let)h(children)e(=)i(n)f(#)h(sub_nodes)e(in)665 2308
4085
y(List.iter)h(print_valuable_prio1)d(children)486 2405
4086
y(|)k(_)f(->)665 2503 y(assert)g(false)396 2693 y Fw(Y)-9
4087
b(ou)20 b(can)g(call)g(this)h(function)e(by:)396 2874
4088
y Fr(print_valuable_prio1)42 b(root)396 3065 y Fw(If)20
4089
b(you)g(lik)o(e)g(a)h(DSSSL-lik)o(e)f(style,)g(you)g(can)g(mak)o(e)f
4090
(the)h(function)f Fr(process_children)f Fw(e)o(xplicit:)396
4091
3245 y Fr(let)45 b(rec)f(print_valuable_prio1)d(n)k(=)486
4092
3439 y(let)f(process_children)e(n)j(=)576 3536 y(let)f(children)f(=)i
4093
(n)g(#)f(sub_nodes)g(in)576 3633 y(List.iter)f(print_valuable_prio1)e
4094
(children)486 3730 y(in)486 3925 y(let)j(ntype)g(=)h(n)g(#)f(node_type)
4095
g(in)486 4022 y(match)g(ntype)g(with)576 4119 y(T_element)f("valuable")
4096
g(when)h(n)h(#)g(attribute)e("priority")g(=)i(Value)f("1")g(->)665
4097
4216 y(print_endline)f("Valuable)g(node)h(with)h(priority)e(1)i
4098
(found:";)665 4313 y(print_endline)e(\(n)h(#)h(data\))486
4099
4410 y(|)g(\(T_element)e(_)h(|)h(T_data\))f(->)665 4508
4100
y(process_children)e(n)486 4605 y(|)j(_)f(->)665 4702
4101
y(assert)g(false)p Black 3800 5278 a Fs(28)p Black eop
4103
29 28 bop Black 3136 67 a Fs(Chapter)20 b(2.)g(Using)g(PXP)p
4104
Black 396 579 a Fw(So)h(f)o(ar)m(,)e(O'Caml)h(is)i(no)n(w)d(a)i(simple)
4105
f("style-sheet)g(language":)e(Y)-9 b(ou)20 b(can)g(form)f(a)h(big)g
4106
("match")g(e)o(xpression)e(to)396 687 y(distinguish)h(between)h(all)h
4107
(signi\002cant)e(cases,)i(and)f(pro)o(vide)e(dif)n(ferent)g(reactions)i
4108
(on)g(dif)n(ferent)e(conditions.)h(But)h(this)396 795
4109
y(technique)f(has)h(limitations;)g(the)h("match")e(e)o(xpression)g
4110
(tends)h(to)g(get)g(lar)o(ger)f(and)h(lar)o(ger)m(,)e(and)i(it)g(is)i
4111
(dif)n(\002cult)d(to)i(store)396 903 y(intermediate)e(v)n(alues)h(as)h
4112
(there)e(is)j(only)d(one)h(big)f(recursion.)g(Alternati)n(v)o(ely)-5
4113
b(,)18 b(it)j(is)g(also)f(possible)g(to)h(represent)e(the)396
4114
1011 y(v)n(arious)g(cases)i(as)g(classes,)g(and)f(to)g(use)h(dynamic)d
4115
(method)h(lookup)g(to)h(\002nd)g(the)g(appropiate)e(class.)j(The)f(ne)o
4116
(xt)f(section)396 1119 y(e)o(xplains)g(this)i(technique)e(in)h(detail.)
4117
-2 1537 y Fy(2.3.)39 b(Class-based)e(pr)m(ocessing)g(of)j(the)f(node)f
4118
(tree)396 1717 y Fw(By)21 b(def)o(ault,)e(the)h(parsed)g(node)f(tree)h
4119
(consists)h(of)f(objects)g(of)g(the)g(same)g(class;)h(this)g(is)g(a)g
4120
(good)e(design)g(as)i(long)e(as)i(you)396 1825 y(w)o(ant)g(only)e(to)h
4121
(access)h(selected)f(parts)g(of)g(the)h(document.)c(F)o(or)j(comple)o
4122
(x)f(transformations,)e(it)k(may)f(be)g(better)g(to)g(use)396
4123
1933 y(dif)n(ferent)f(classes)i(for)f(objects)g(describing)e(dif)n
4124
(ferent)h(element)g(types.)396 2082 y(F)o(or)h(e)o(xample,)f(if)h(the)g
4125
(DTD)h(declares)e(the)i(element)e(types)h Fr(a)p Fw(,)h
4126
Fr(b)p Fw(,)f(and)g Fr(c)p Fw(,)g(and)g(if)g(the)g(task)h(is)g(to)f
4127
(con)m(v)o(ert)e(an)j(arbitrary)396 2190 y(document)d(into)i(a)h
4128
(printable)e(format,)g(the)h(idea)g(is)h(to)f(de\002ne)g(for)g(e)n(v)o
4129
(ery)f(element)g(type)h(a)g(separate)g(class)h(that)g(has)f(a)396
4130
2298 y(method)f Fr(print)p Fw(.)h(The)g(classes)h(are)f
4131
Fr(eltype_a)p Fw(,)f Fr(eltype_b)p Fw(,)g(and)h Fr(eltype_c)p
4132
Fw(,)f(and)h(e)n(v)o(ery)f(class)i(implements)396 2406
4133
y Fr(print)f Fw(such)g(that)g(elements)g(of)g(the)g(type)g
4134
(corresponding)d(to)j(the)g(class)i(are)e(con)m(v)o(erted)d(to)k(the)f
4135
(output)f(format.)396 2555 y(The)h(parser)g(supports)f(such)h(a)g
4136
(design)g(directly)-5 b(.)19 b(As)i(it)g(is)g(impossible)e(to)i(deri)n
4137
(v)o(e)d(recursi)n(v)o(e)h(classes)i(in)g(O'Caml)3703
4138
2522 y Fg(3)3727 2555 y Fw(,)g(the)396 2663 y(specialized)f(element)f
4139
(classes)j(cannot)d(be)h(formed)f(by)g(simply)h(inheriting)f(from)g
4140
(the)h(b)n(uilt-in)g(classes)h(of)f(the)g(parser)396
4141
2771 y(and)g(adding)f(methods)g(for)g(customized)g(functionality)-5
4142
b(.)18 b(T)-7 b(o)20 b(get)g(around)f(this)h(limitation,)g(e)n(v)o(ery)
4143
f(node)g(of)h(the)396 2879 y(document)e(tree)j(is)g(represented)d(by)i
4144
Fs(two)h Fw(objects,)e(one)h(called)g("the)g(node")f(and)h(containing)e
4145
(the)i(recursi)n(v)o(e)396 2987 y(de\002nition)f(of)h(the)g(tree,)g
4146
(one)g(called)g("the)g(e)o(xtension".)e(Ev)o(ery)h(node)g(object)h(has)
4147
g(a)h(reference)e(to)h(the)g(e)o(xtension,)f(and)396
4148
3095 y(the)h(e)o(xtension)f(has)i(a)f(reference)f(to)h(the)g(node.)f
4149
(The)h(adv)n(antage)e(of)i(this)h(model)e(is)i(that)g(it)g(is)g(no)n(w)
4150
e(possible)h(to)396 3203 y(customize)g(the)g(e)o(xtension)f(without)g
4151
(af)n(fecting)g(the)h(typing)f(constraints)g(of)h(the)h(recursi)n(v)o
4152
(e)d(node)h(de\002nition.)396 3352 y(Ev)o(ery)g(e)o(xtension)g(must)h
4153
(ha)n(v)o(e)g(the)g(three)g(methods)f Fr(clone)p Fw(,)g
4154
Fr(node)p Fw(,)h(and)g Fr(set_node)p Fw(.)f(The)h(method)f
4155
Fr(clone)h Fw(creates)396 3460 y(a)h(deep)e(cop)o(y)h(of)g(the)g(e)o
4156
(xtension)f(object)g(and)h(returns)f(it;)i Fr(node)f
4157
Fw(returns)g(the)g(node)f(object)h(for)f(this)i(e)o(xtension)e(object;)
4158
396 3568 y(and)h Fr(set_node)f Fw(is)i(used)f(to)h(tell)g(the)f(e)o
4159
(xtension)f(object)g(which)h(node)f(is)i(associated)f(with)g(it,)h
4160
(this)g(method)e(is)396 3676 y(automatically)g(called)h(when)g(the)g
4161
(node)f(tree)h(is)h(initialized.)f(The)g(follo)n(wing)e(de\002nition)h
4162
(is)i(a)g(good)e(starting)h(point)396 3784 y(for)g(these)g(methods;)f
4163
(usually)h Fr(clone)g Fw(must)g(be)g(further)f(re\002ned)g(when)h
4164
(instance)g(v)n(ariables)f(are)h(added)f(to)h(the)h(class:)396
4165
3964 y Fr(class)44 b(custom_extension)e(=)486 4061 y(object)i(\(self\))
4166
576 4256 y(val)g(mutable)g(node)g(=)g(\(None)g(:)h(custom_extension)d
4167
(node)i(option\))576 4450 y(method)f(clone)h(=)h({<)g(>})576
4168
4547 y(method)e(node)i(=)665 4644 y(match)f(node)g(with)845
4169
4741 y(None)g(->)934 4838 y(assert)g(false)p Black 3800
4170
5278 a Fs(29)p Black eop
4172
30 29 bop Black 3136 67 a Fs(Chapter)20 b(2.)g(Using)g(PXP)p
4173
Black 755 579 a Fr(|)45 b(Some)f(n)g(->)h(n)576 676 y(method)e
4174
(set_node)h(n)h(=)665 773 y(node)f(<-)h(Some)f(n)486
4175
967 y(end)396 1158 y Fw(This)21 b(part)e(of)h(the)h(e)o(xtension)d(is)j
4176
(usually)f(the)g(same)h(for)e(all)i(classes,)g(so)g(it)g(is)g(a)f(good)
4177
f(idea)h(to)g(consider)396 1266 y Fr(custom_extension)e
4178
Fw(as)j(the)f(super)n(-class)g(of)g(the)h(further)d(class)j
4179
(de\002nitions.)e(Continuining)f(the)j(e)o(xample)d(of)396
4180
1374 y(abo)o(v)o(e,)h(we)h(can)g(de\002ne)g(the)g(element)g(type)f
4181
(classes)j(as)e(follo)n(ws:)396 1554 y Fr(class)44 b(virtual)g
4182
(custom_extension)e(=)486 1652 y(object)i(\(self\))576
4183
1749 y(...)g(clone,)g(node,)g(set_node)f(defined)h(as)g(above)g(...)576
4184
1943 y(method)f(virtual)h(print)g(:)h(out_channel)e(->)h(unit)486
4185
2040 y(end)396 2234 y(class)g(eltype_a)g(=)486 2332 y(object)g
4186
(\(self\))576 2429 y(inherit)f(custom_extension)576 2526
4187
y(method)g(print)h(ch)h(=)g(...)486 2623 y(end)396 2817
4188
y(class)f(eltype_b)g(=)486 2914 y(object)g(\(self\))576
4189
3011 y(inherit)f(custom_extension)576 3109 y(method)g(print)h(ch)h(=)g
4190
(...)486 3206 y(end)396 3400 y(class)f(eltype_c)g(=)486
4191
3497 y(object)g(\(self\))576 3594 y(inherit)f(custom_extension)576
4192
3691 y(method)g(print)h(ch)h(=)g(...)486 3789 y(end)396
4193
3979 y Fw(The)20 b(method)f Fr(print)h Fw(can)g(no)n(w)f(be)i
4194
(implemented)d(for)h(e)n(v)o(ery)g(element)h(type)g(separately)-5
4195
b(.)18 b(Note)i(that)h(you)e(get)h(the)396 4087 y(associated)g(node)f
4196
(by)h(in)m(v)n(oking)396 4268 y Fr(self)44 b(#)h(node)396
4197
4459 y Fw(and)20 b(you)f(get)h(the)h(e)o(xtension)d(object)i(of)g(a)h
4198
(node)e Fr(n)h Fw(by)g(writing)396 4639 y Fr(n)45 b(#)g(extension)396
4199
4830 y Fw(It)21 b(is)g(guaranteed)d(that)p Black 3800
4200
5278 a Fs(30)p Black eop
4202
31 30 bop Black 3136 67 a Fs(Chapter)20 b(2.)g(Using)g(PXP)p
4203
Black 396 579 a Fr(self)44 b(#)h(node)f(#)h(extension)e(==)i(self)396
4204
770 y Fw(al)o(w)o(ays)21 b(holds.)396 919 y(Here)f(are)g(sample)g
4205
(de\002nitions)g(of)g(the)g Fr(print)g Fw(methods:)396
4206
1099 y Fr(class)44 b(eltype_a)g(=)486 1197 y(object)g(\(self\))576
4207
1294 y(inherit)f(custom_extension)576 1391 y(method)g(print)h(ch)h(=)
4208
665 1488 y(\(*)g(Nodes)f(<a>...</a>)f(are)h(only)g(containers:)f(*\))
4209
665 1585 y(output_string)g(ch)h("\(";)665 1682 y(List.iter)755
4210
1779 y(\(fun)g(n)h(->)f(n)h(#)g(extension)e(#)i(print)f(ch\))755
4211
1877 y(\(self)g(#)h(node)f(#)g(sub_nodes\);)665 1974
4212
y(output_string)f(ch)h("\)";)486 2071 y(end)396 2265
4213
y(class)g(eltype_b)g(=)486 2362 y(object)g(\(self\))576
4214
2459 y(inherit)f(custom_extension)576 2556 y(method)g(print)h(ch)h(=)
4215
665 2654 y(\(*)g(Print)f(the)g(value)g(of)h(the)f(CDATA)g(attribute)f
4216
("print":)h(*\))665 2751 y(match)g(self)g(#)h(node)f(#)h(attribute)e
4217
("print")h(with)755 2848 y(Value)g(s)314 b(->)44 b(output_string)f(ch)h
4218
(s)665 2945 y(|)h(Implied_value)e(->)h(output_string)f(ch)h
4219
("<missing>")665 3042 y(|)h(Valuelist)e(l)135 b(->)44
4220
b(assert)g(false)1517 3139 y(\(*)h(not)f(possible)f(because)h(the)g
4221
(att)h(is)f(CDATA)g(*\))486 3236 y(end)396 3431 y(class)g(eltype_c)g(=)
4222
486 3528 y(object)g(\(self\))576 3625 y(inherit)f(custom_extension)576
4223
3722 y(method)g(print)h(ch)h(=)665 3819 y(\(*)g(Print)f(the)g(contents)
4224
g(of)g(this)g(element:)g(*\))665 3916 y(output_string)f(ch)h(\(self)g
4225
(#)h(node)f(#)h(data\))486 4014 y(end)396 4208 y(class)f
4226
(null_extension)f(=)486 4305 y(object)h(\(self\))576
4227
4402 y(inherit)f(custom_extension)576 4499 y(method)g(print)h(ch)h(=)g
4228
(assert)e(false)486 4596 y(end)p Black 3800 5278 a Fs(31)p
4231
32 31 bop Black 3136 67 a Fs(Chapter)20 b(2.)g(Using)g(PXP)p
4232
Black 396 579 a Fw(The)g(remaining)f(task)h(is)h(to)g(con\002gure)d
4233
(the)i(parser)g(such)g(that)g(these)g(e)o(xtension)f(classes)i(are)f
4234
(actually)g(used.)g(Here)396 687 y(another)f(problem)f(arises:)j(It)g
4235
(is)g(not)f(possible)g(to)g(dynamically)e(select)j(the)f(class)h(of)f
4236
(an)g(object)g(to)g(be)h(created.)e(As)396 795 y(w)o(orkaround,)e(PXP)k
4237
(allo)n(ws)g(the)f(user)g(to)g(specify)g Fs(e)n(xemplar)g(objects)g
4238
Fw(for)f(the)h(v)n(arious)g(element)f(types;)h(instead)g(of)396
4239
903 y(creating)f(the)i(nodes)e(of)h(the)g(tree)g(by)g(applying)f(the)h
4240
Fr(new)g Fw(operator)e(the)j(nodes)e(are)h(produced)e(by)i(duplicating)
4241
e(the)396 1011 y(e)o(x)o(emplars.)h(As)h(object)g(duplication)f
4242
(preserv)o(es)g(the)h(class)h(of)f(the)g(object,)f(one)h(can)g(create)g
4243
(fresh)g(objects)g(of)g(e)n(v)o(ery)396 1119 y(class)h(for)f(which)g
4244
(pre)n(viously)e(an)i(e)o(x)o(emplar)e(has)j(been)e(re)o(gistered.)396
4245
1268 y(Ex)o(emplars)g(are)h(meant)g(as)h(objects)f(without)f(contents,)
4246
g(the)h(only)g(interesting)f(thing)g(is)j(that)e(e)o(x)o(emplars)e(are)
4247
396 1376 y(instances)i(of)g(a)h(certain)f(class.)g(The)g(creation)f(of)
4248
h(an)h(e)o(x)o(emplar)d(for)h(an)h(element)g(node)f(can)h(be)g(done)f
4249
(by:)396 1556 y Fr(let)45 b(element_exemplar)d(=)i(new)h(element_impl)e
4250
(extension_exemplar)396 1747 y Fw(And)20 b(a)h(data)f(node)f(e)o(x)o
4251
(emplar)f(is)j(created)f(by:)396 1927 y Fr(let)45 b(data_exemplar)d(=)j
4252
(new)f(data_impl)g(extension_exemplar)396 2118 y Fw(The)20
4253
b(classes)h Fr(element_impl)e Fw(and)h Fr(data_impl)f
4254
Fw(are)h(de\002ned)f(in)i(the)f(module)f Fr(Pxp_document)p
4255
Fw(.)f(The)396 2226 y(constructors)h(initialize)h(the)g(fresh)g
4256
(objects)g(as)h(empty)e(objects,)h(i.e.)g(without)g(children,)e
4257
(without)i(data)g(contents,)f(and)396 2334 y(so)i(on.)e(The)h
4258
Fr(extension_exemplar)e Fw(is)j(the)f(initial)h(e)o(xtension)e(object)g
4259
(the)h(e)o(x)o(emplars)f(are)h(associated)g(with.)396
4260
2483 y(Once)g(the)g(e)o(x)o(emplars)f(are)h(created)f(and)h(stored)g
4261
(some)n(where)f(\(e.g.)g(in)h(a)h(hash)f(table\),)f(you)h(can)g(tak)o
4262
(e)g(an)g(e)o(x)o(emplar)396 2591 y(and)g(create)g(a)g(concrete)f
4263
(instance)h(\(with)g(contents\))f(by)h(duplicating)e(it.)j(As)g(user)f
4264
(of)g(the)g(parser)g(you)f(are)h(normally)396 2699 y(not)g(concerned)e
4265
(with)i(this)h(as)g(this)g(is)g(part)f(of)g(the)g(internal)f(logic)h
4266
(of)g(the)g(parser)m(,)f(b)n(ut)h(as)h(background)c(kno)n(wledge)h(it)
4267
396 2807 y(is)j(w)o(orthwhile)e(to)i(mention)e(that)h(the)g(tw)o(o)h
4268
(methods)e Fr(create_element)f Fw(and)i Fr(create_data)f
4269
Fw(actually)g(perform)396 2915 y(the)h(duplication)f(of)g(the)i(e)o(x)o
4270
(emplar)d(for)h(which)h(the)o(y)f(are)h(in)m(v)n(ok)o(ed,)e
4271
(additionally)g(apply)i(modi\002cations)e(to)j(the)f(clone,)396
4272
3023 y(and)g(\002nally)g(return)f(the)h(ne)n(w)g(object.)f(Moreo)o(v)o
4273
(er)m(,)f(the)i(e)o(xtension)e(object)i(is)h(copied,)e(too,)h(and)f
4274
(the)i(ne)n(w)f(node)f(object)396 3131 y(is)i(associated)f(with)g(the)g
4275
(fresh)g(e)o(xtension)e(object.)i(Note)g(that)g(this)g(is)h(the)f
4276
(reason)g(why)f(e)n(v)o(ery)g(e)o(xtension)f(object)i(must)396
4277
3239 y(ha)n(v)o(e)g(a)g Fr(clone)g Fw(method.)396 3388
4278
y(The)g(con\002guration)e(of)i(the)g(set)h(of)f(e)o(x)o(emplars)e(is)j
4279
(passed)f(to)h(the)f Fr(parse_document_entity)d Fw(function)i(as)i
4280
(third)396 3496 y(ar)o(gument.)d(In)i(our)f(e)o(xample,)g(this)h(ar)o
4281
(gument)e(can)i(be)g(set)h(up)f(as)h(follo)n(ws:)396
4282
3676 y Fr(let)45 b(spec)f(=)486 3774 y(make_spec_from_alist)576
4283
3871 y(~data_exemplar:)535 b(\(new)44 b(data_impl)g(\(new)g
4284
(null_extension\)\))576 3968 y(~default_element_exemplar:)c(\(new)k
4285
(element_impl)f(\(new)h(null_extension\)\))576 4065 y(~element_alist:)
4286
710 4162 y([)h("a",)89 b(new)44 b(element_impl)f(\(new)h(eltype_a\);)
4287
800 4259 y("b",)89 b(new)44 b(element_impl)f(\(new)h(eltype_b\);)800
4288
4356 y("c",)89 b(new)44 b(element_impl)f(\(new)h(eltype_c\);)710
4289
4454 y(])576 4551 y(\(\))396 4742 y Fw(The)20 b Fr(~element_alist)f
4290
Fw(function)f(ar)o(gument)g(de\002nes)i(the)g(mapping)e(from)h(element)
4291
h(types)g(to)g(e)o(x)o(emplars)f(as)396 4850 y(associati)n(v)o(e)h
4292
(list.)h(The)f(ar)o(gument)e Fr(~data_exemplar)g Fw(speci\002es)j(the)f
4293
(e)o(x)o(emplar)e(for)i(data)g(nodes,)f(and)h(the)p Black
4294
3800 5278 a Fs(32)p Black eop
4296
33 32 bop Black 3136 67 a Fs(Chapter)20 b(2.)g(Using)g(PXP)p
4297
Black 396 579 a Fr(~default_element_exemplar)d Fw(is)k(used)f(whene)n
4298
(v)o(er)e(the)i(parser)g(\002nds)g(an)g(element)g(type)f(for)h(which)g
4299
(the)396 687 y(associati)n(v)o(e)g(list)h(does)f(not)g(de\002ne)g(an)g
4300
(e)o(x)o(emplar)-5 b(.)396 836 y(The)20 b(con\002guration)e(is)j(no)n
4301
(w)e(complete.)g(Y)-9 b(ou)20 b(can)g(still)h(use)g(the)f(same)g
4302
(parsing)f(functions,)g(only)g(the)h(initialization)g(is)396
4303
944 y(a)h(bit)f(dif)n(ferent.)f(F)o(or)g(e)o(xample,)g(call)i(the)f
4304
(parser)f(by:)396 1124 y Fr(let)45 b(d)f(=)h(parse_document_entity)c
4305
(default_config)i(\(from_file)g("doc.xml"\))g(spec)396
4306
1315 y Fw(Note)20 b(that)h(the)f(resulting)f(document)f
4307
Fr(d)j Fw(has)f(a)h(usable)f(type;)g(especially)f(the)i
4308
Fr(print)f Fw(method)e(we)j(added)e(is)i(visible.)396
4309
1423 y(So)g(you)e(can)h(print)g(your)e(document)h(by)396
4310
1603 y Fr(d)45 b(#)g(root)f(#)g(extension)g(#)g(print)g(stdout)396
4311
1836 y Fw(This)21 b(object-oriented)c(approach)h(looks)i(rather)f
4312
(complicated;)g(this)h(is)i(mostly)d(caused)h(by)g(w)o(orking)e(around)
4313
h(some)396 1944 y(problems)g(of)h(the)g(strict)h(typing)e(system)h(of)g
4314
(O'Caml.)g(Some)g(auxiliary)f(concepts)g(such)h(as)h(e)o(xtensions)e
4315
(were)396 2052 y(needed,)g(b)n(ut)h(the)g(practical)g(consequences)e
4316
(are)i(lo)n(w)-5 b(.)20 b(In)g(the)g(ne)o(xt)f(section,)h(one)g(of)g
4317
(the)g(e)o(xamples)f(of)h(the)396 2160 y(distrib)n(ution)f(is)i(e)o
4318
(xplained,)d(a)j(con)m(v)o(erter)d(from)h Fs(r)m(eadme)h
4319
Fw(documents)e(to)i(HTML.)-2 2578 y Fy(2.4.)39 b(Example:)f(An)h(HTML)f
4320
(bac)m(kend)g(f)m(or)h(the)g Fe(readme)44 b Fy(DTD)396
4321
2758 y Fw(The)20 b(con)m(v)o(erter)e(from)h Fs(r)m(eadme)h
4322
Fw(documents)e(to)i(HTML)g(documents)f(follo)n(ws)h(strictly)g(the)g
4323
(approach)e(to)j(de\002ne)e(one)396 2866 y(class)i(per)f(element)g
4324
(type.)f(The)h(HTML)g(code)g(is)h(similar)f(to)g(the)h
4325
Fs(r)m(eadme)e Fw(source,)g(because)h(of)g(this)h(most)f(elements)396
4326
2974 y(can)g(be)g(con)m(v)o(erted)e(in)i(the)g(follo)n(wing)f(w)o(ay:)h
4327
(Gi)n(v)o(en)g(the)g(input)f(element)396 3154 y Fr(<e>content</e>)396
4328
3345 y Fw(the)h(con)m(v)o(ersion)e(te)o(xt)i(is)h(the)f(concatenation)e
4329
(of)i(a)h(computed)d(pre\002x,)h(the)h(recursi)n(v)o(ely)f(con)m(v)o
4330
(erted)e(content,)i(and)h(a)396 3453 y(computed)e(suf)n(\002x.)396
4331
3602 y(Only)i(one)g(element)f(type)h(cannot)f(be)h(handled)f(by)h(this)
4332
g(scheme:)g Fr(footnote)p Fw(.)f(F)o(ootnotes)g(are)h(collected)g
4333
(while)g(the)o(y)396 3710 y(are)g(found)f(in)h(the)g(input)g(te)o(xt,)g
4334
(and)f(the)o(y)h(are)g(printed)f(after)h(the)g(main)g(te)o(xt)g(has)g
4335
(been)g(con)m(v)o(erted)d(and)j(printed.)-2 4038 y Fq(2.4.1.)35
4336
b(Header)396 4278 y Fr(open)44 b(Pxp_types)396 4375 y(open)g
4337
(Pxp_document)396 4473 y(open)g(Pxp_dtd.Entity)p Black
4338
3800 5278 a Fs(33)p Black eop
4340
34 33 bop Black 3136 67 a Fs(Chapter)20 b(2.)g(Using)g(PXP)p
4341
Black -2 583 a Fq(2.4.2.)35 b(T)-7 b(ype)34 b(dec)n(larations)396
4342
823 y Fr(class)44 b(type)g(footnote_printer)f(=)486 920
4343
y(object)576 1017 y(method)g(footnote_to_html)g(:)h(store_type)f(-)p
4344
Fp(>)i Fr(out_channel)e(-)p Fp(>)h Fr(unit)486 1114 y(end)396
4345
1309 y(and)h(store_type)e(=)486 1406 y(object)576 1503
4346
y(method)g(alloc_footnote)g(:)i(footnote_printer)d(-)p
4347
Fp(>)i Fr(int)576 1600 y(method)f(print_footnotes)g(:)h(out_channel)f
4348
(-)p Fp(>)i Fr(unit)486 1697 y(end)396 1794 y(;;)-2 2247
4349
y Fq(2.4.3.)35 b(Class)g Fd(store)396 2415 y Fw(The)20
4350
b Fr(store)g Fw(is)h(a)g(container)d(for)i(footnotes.)f(Y)-9
4351
b(ou)19 b(can)h(add)g(a)g(footnote)f(by)h(in)m(v)n(oking)e
4352
Fr(alloc_footnote)p Fw(;)g(the)396 2523 y(ar)o(gument)g(is)j(an)f
4353
(object)g(of)g(the)g(class)h Fr(footnote_printer)p Fw(,)d(the)i(method)
4354
f(returns)g(the)i(number)d(of)i(the)g(footnote.)396 2631
4355
y(The)g(interesting)f(property)f(of)i(a)h(footnote)d(is)k(that)e(it)h
4356
(can)f(be)g(con)m(v)o(erted)d(to)k(HTML,)e(so)i(a)g Fr
4357
(footnote_printer)d Fw(is)396 2739 y(an)i(object)g(with)g(a)h(method)e
4358
Fr(footnote_to_html)p Fw(.)f(The)i(class)h Fr(footnote)e
4359
Fw(which)h(is)h(de\002ned)e(belo)n(w)h(has)g(a)396 2846
4360
y(compatible)f(method)g Fr(footnote_to_html)f Fw(such)i(that)g(objects)
4361
g(created)f(from)h(it)h(can)f(be)g(used)g(as)396 2954
4362
y Fr(footnote_printer)p Fw(s.)396 3104 y(The)g(other)f(method,)g
4363
Fr(print_footnotes)f Fw(prints)i(the)g(footnotes)f(as)i(de\002nition)e
4364
(list,)i(and)f(is)h(typically)e(in)m(v)n(ok)o(ed)396
4365
3212 y(after)h(the)g(main)g(material)g(of)g(the)g(page)g(has)g(already)
4366
f(been)h(printed.)e(Ev)o(ery)h(item)h(of)g(the)h(list)g(is)g(printed)e
4367
(by)396 3320 y Fr(footnote_to_html)p Fw(.)396 3541 y
4368
Fr(class)44 b(store)g(=)486 3638 y(object)g(\(self\))576
4369
3833 y(val)g(mutable)g(footnotes)f(=)i(\()f([])h(:)f(\(int)h(*)f
4370
(footnote_printer\))e(list)i(\))576 3930 y(val)g(mutable)g
4371
(next_footnote_number)d(=)k(1)576 4124 y(method)e(alloc_footnote)g(n)i
4372
(=)665 4221 y(let)g(number)e(=)i(next_footnote_number)d(in)665
4373
4318 y(next_footnote_number)g Fp(<)p Fr(-)i(number+1;)665
4374
4416 y(footnotes)g Fp(<)p Fr(-)g(footnotes)f(@)i([)g(number,)e(n)i(];)
4375
665 4513 y(number)576 4707 y(method)e(print_footnotes)g(ch)h(=)665
4376
4804 y(if)h(footnotes)e Fp(<>)h Fr([])h(then)f(begin)p
4377
Black 3800 5278 a Fs(34)p Black eop
4379
35 34 bop Black 3136 67 a Fs(Chapter)20 b(2.)g(Using)g(PXP)p
4380
Black 396 579 a Fr(output_string)43 b(ch)h(")p Fp(<)p
4381
Fr(hr)g(align=left)g(noshade=noshade)e(width=\\"30\045\\")p
4382
Fp(>)p Fr(\\n";)396 676 y(output_string)h(ch)h(")p Fp(<)p
4383
Fr(dl)p Fp(>)p Fr(\\n";)396 773 y(List.iter)486 870 y(\(fun)g(\(_,n\))g
4384
(-)p Fp(>)620 967 y Fr(n)h(#)g(footnote_to_html)d(\(self)i(:)h
4385
(#store_type)e(:)p Fp(>)h Fr(store_type\))f(ch\))486
4386
1065 y(footnotes;)396 1162 y(output_string)g(ch)h(")p
4387
Fp(<)p Fr(/dl)p Fp(>)p Fr(\\n";)665 1259 y(end)486 1453
4388
y(end)396 1550 y(;;)-2 2003 y Fq(2.4.4.)35 b(Function)f
4389
Fd(escape_html)396 2171 y Fw(This)21 b(function)d(con)m(v)o(erts)h(the)
4390
h(characters)f Fn(<)p Fw(,)h Fn(>)p Fw(,)g(&,)g(and)g(")h(to)f(their)g
4391
(HTML)g(representation.)e(F)o(or)h(e)o(xample,)396 2279
4392
y Fr(escape_html)43 b(")p Fp(<>)p Fr(")h(=)h("<>")p
4393
Fw(.)19 b(Other)g(characters)h(are)g(left)g(unchanged.)396
4394
2459 y Fr(let)45 b(escape_html)e(s)h(=)486 2556 y
4395
(Str.global_substitute)576 2653 y(\(Str.regexp)f(")p
4396
Fp(<)p Fr(\\\\|)p Fp(>)p Fr(\\\\|&\\\\|\\""\))576 2750
4397
y(\(fun)h(s)g(-)p Fp(>)665 2847 y Fr(match)g(Str.matched_string)e(s)j
4398
(with)755 2944 y(")p Fp(<)p Fr(")f(-)p Fp(>)h Fr("<")665
4399
3042 y(|)g(")p Fp(>)p Fr(")f(-)p Fp(>)h Fr(">")665
4400
3139 y(|)g("&")f(-)p Fp(>)h Fr("&")665 3236 y(|)g("\\"")f(-)p
4401
Fp(>)g Fr(""")665 3333 y(|)h(_)g(-)p Fp(>)f Fr(assert)g(false\))
4402
576 3430 y(s)396 3527 y(;;)-2 3980 y Fq(2.4.5.)35 b(Vir)r(tual)f(c)n
4403
(lass)h Fd(shared)396 4148 y Fw(This)21 b(virtual)e(class)i(is)g(the)g
4404
(abstract)f(superclass)g(of)f(the)i(e)o(xtension)d(classes)k(sho)n(wn)d
4405
(belo)n(w)-5 b(.)19 b(It)i(de\002nes)f(the)g(standard)396
4406
4255 y(methods)f Fr(clone)p Fw(,)h Fr(node)p Fw(,)g(and)g
4407
Fr(set_node)p Fw(,)f(and)g(declares)h(the)g(type)g(of)g(the)g(virtual)g
4408
(method)e Fr(to_html)p Fw(.)i(This)396 4363 y(method)f(recursi)n(v)o
4409
(ely)f(tra)n(v)o(erses)i(the)g(whole)g(element)g(tree,)g(and)f(prints)h
4410
(the)g(con)m(v)o(erted)e(HTML)i(code)f(to)i(the)f(output)396
4411
4471 y(channel)f(passed)h(as)h(second)f(ar)o(gument.)d(The)j(\002rst)h
4412
(ar)o(gument)d(is)j(the)f(reference)f(to)h(the)g(global)f
4413
Fr(store)h Fw(object)g(which)396 4579 y(collects)h(the)f(footnotes.)396
4414
4759 y Fr(class)44 b(virtual)g(shared)g(=)486 4857 y(object)g(\(self\))
4415
p Black 3800 5278 a Fs(35)p Black eop
4417
36 35 bop Black 3136 67 a Fs(Chapter)20 b(2.)g(Using)g(PXP)p
4418
Black 576 676 a Fr(\(*)44 b(--)h(default_ext)e(--)h(*\))576
4419
870 y(val)g(mutable)g(node)g(=)g(\(None)g(:)h(shared)f(node)g(option\))
4420
576 1065 y(method)f(clone)h(=)h({)p Fp(<)f(>)p Fr(})576
4421
1162 y(method)f(node)i(=)665 1259 y(match)f(node)g(with)845
4422
1356 y(None)g(-)p Fp(>)934 1453 y Fr(assert)g(false)755
4423
1550 y(|)h(Some)f(n)g(-)p Fp(>)h Fr(n)576 1647 y(method)e(set_node)h(n)
4424
h(=)665 1745 y(node)f Fp(<)p Fr(-)h(Some)f(n)576 1939
4425
y(\(*)g(--)h(virtual)e(--)i(*\))576 2133 y(method)e(virtual)h(to_html)g
4426
(:)g(store)g(-)p Fp(>)h Fr(out_channel)e(-)p Fp(>)h Fr(unit)486
4427
2327 y(end)396 2424 y(;;)-2 2877 y Fq(2.4.6.)35 b(Class)g
4428
Fd(only_data)396 3045 y Fw(This)21 b(class)g(de\002nes)f
4429
Fr(to_html)f Fw(such)h(that)h(the)f(character)f(data)h(of)g(the)g
4430
(current)f(node)g(is)i(con)m(v)o(erted)d(to)i(HTML.)g(Note)396
4431
3153 y(that)h Fr(self)f Fw(is)h(an)f(e)o(xtension)f(object,)g
4432
Fr(self)44 b(#)h(node)20 b Fw(is)h(the)f(node)f(object,)h(and)f
4433
Fr(self)45 b(#)f(node)g(#)h(data)20 b Fw(returns)396
4434
3261 y(the)g(character)f(data)h(of)g(the)h(node.)396
4435
3441 y Fr(class)44 b(only_data)g(=)486 3538 y(object)g(\(self\))576
4436
3635 y(inherit)f(shared)576 3829 y(method)g(to_html)h(store)g(ch)h(=)
4437
665 3927 y(output_string)e(ch)h(\(escape_html)f(\(self)h(#)h(node)f(#)h
4438
(data\)\))486 4024 y(end)396 4121 y(;;)-2 4573 y Fq(2.4.7.)35
4439
b(Class)g Fd(readme)396 4741 y Fw(This)21 b(class)g(con)m(v)o(erts)d
4440
(elements)i(of)g(type)g Fr(readme)g Fw(to)g(HTML.)g(Such)f(an)h
4441
(element)g(is)h(\(by)f(de\002nition\))e(al)o(w)o(ays)j(the)396
4442
4849 y(root)f(element)f(of)h(the)g(document.)e(First,)j(the)f(HTML)g
4443
(header)f(is)j(printed;)d(the)h Fr(title)g Fw(attrib)n(ute)f(of)h(the)h
4444
(element)p Black 3798 5278 a Fs(36)p Black eop
4446
37 36 bop Black 3136 67 a Fs(Chapter)20 b(2.)g(Using)g(PXP)p
4447
Black 396 579 a Fw(determines)f(the)i(title)f(of)g(the)h(HTML)f(page.)f
4448
(Some)h(aspects)g(of)g(the)g(HTML)g(page)g(can)g(be)g(con\002gured)e
4449
(by)h(setting)396 687 y(certain)h(parameter)f(entities,)h(for)g(e)o
4450
(xample)e(the)i(background)d(color)m(,)i(the)h(te)o(xt)g(color)m(,)f
4451
(and)h(link)g(colors.)f(After)h(the)396 795 y(header)m(,)f(the)h
4452
Fr(body)g Fw(tag,)g(and)g(the)g(headline)f(ha)n(v)o(e)g(been)h
4453
(printed,)f(the)h(contents)f(of)h(the)g(page)g(are)g(con)m(v)o(erted)e
4454
(by)396 903 y(in)m(v)n(oking)g Fr(to_html)i Fw(on)g(all)g(children)f
4455
(of)h(the)g(current)f(node)g(\(which)h(is)h(the)f(root)f(node\).)g
4456
(Then,)g(the)h(footnotes)f(are)396 1011 y(appended)f(to)j(this)f(by)g
4457
(telling)g(the)g(global)f Fr(store)h Fw(object)g(to)g(print)g(the)g
4458
(footnotes.)f(Finally)-5 b(,)19 b(the)h(end)g(tags)g(of)g(the)396
4459
1119 y(HTML)g(pages)g(are)g(printed.)396 1268 y(This)h(class)g(is)g(an)
4460
f(e)o(xample)f(ho)n(w)g(to)i(access)g(the)f(v)n(alue)f(of)h(an)g
4461
(attrib)n(ute:)g(The)g(v)n(alue)g(is)h(determined)d(by)i(in)m(v)n
4462
(oking)396 1376 y Fr(self)44 b(#)h(node)f(#)h(attribute)e("title")p
4463
Fw(.)20 b(As)h(this)f(attrib)n(ute)g(has)g(been)g(declared)f(as)i(CD)m
4464
(A)-9 b(T)h(A)20 b(and)g(as)h(being)396 1484 y(required,)d(the)j(v)n
4465
(alue)e(has)i(al)o(w)o(ays)f(the)g(form)g Fr(Value)44
4466
b(s)20 b Fw(where)g Fr(s)g Fw(is)h(the)g(string)e(v)n(alue)h(of)g(the)g
4467
(attrib)n(ute.)396 1633 y(Y)-9 b(ou)20 b(can)g(also)g(see)h(ho)n(w)f
4468
(entity)g(contents)f(can)h(be)g(accessed.)g(A)h(parameter)e(entity)g
4469
(object)h(can)g(be)g(look)o(ed)f(up)h(by)396 1741 y Fr(self)44
4470
b(#)h(node)f(#)h(dtd)f(#)h(par_entity)e("name")p Fw(,)20
4471
b(and)f(by)h(in)m(v)n(oking)e Fr(replacement_text)g Fw(the)i(v)n(alue)g
4472
(of)396 1849 y(the)g(entity)g(is)h(returned)e(after)h(inner)f
4473
(parameter)g(and)g(character)g(entities)i(ha)n(v)o(e)f(been)f
4474
(processed.)g(Note)h(that)g(you)396 1957 y(must)g(use)h
4475
Fr(gen_entity)e Fw(instead)h(of)g Fr(par_entity)f Fw(to)h(access)h
4476
(general)e(entities.)396 2179 y Fr(class)44 b(readme)g(=)486
4477
2276 y(object)g(\(self\))576 2373 y(inherit)f(shared)576
4478
2567 y(method)g(to_html)h(store)g(ch)h(=)665 2664 y(\(*)g(output)f
4479
(header)f(*\))665 2762 y(output_string)396 2859 y(ch)i(")p
4480
Fp(<)p Fr(!DOCTYPE)e(HTML)h(PUBLIC)g(\\"-//W3C//DTD)e(HTML)j(3.2)f
4481
(Final//EN\\")p Fp(>)p Fr(";)665 2956 y(output_string)396
4482
3053 y(ch)h(")p Fp(<)p Fr(!-)f(WARNING!)f(This)h(is)h(a)g(generated)e
4483
(file,)h(do)g(not)h(edit!)f(-)p Fp(>)p Fr(\\n";)665 3150
4484
y(let)h(title)f(=)396 3247 y(match)g(self)g(#)h(node)f(#)h(attribute)e
4485
("title")h(with)576 3344 y(Value)g(s)g(-)p Fp(>)h Fr(s)486
4486
3442 y(|)g(_)f(-)p Fp(>)h Fr(assert)e(false)665 3539
4487
y(in)665 3636 y(let)i(html_header)e(=)396 3733 y(try)i
4488
(replacement_text)576 3830 y(\(self)f(#)g(node)g(#)h(dtd)f(#)h
4489
(par_entity)e("readme:html:header"\))396 3927 y(with)h(WF_error)g(_)h
4490
(-)p Fp(>)f Fr("")g(in)665 4024 y(let)h(html_trailer)d(=)396
4491
4121 y(try)j(replacement_text)576 4219 y(\(self)f(#)g(node)g(#)h(dtd)f
4492
(#)h(par_entity)e("readme:html:trailer"\))396 4316 y(with)h(WF_error)g
4493
(_)h(-)p Fp(>)f Fr("")g(in)665 4413 y(let)h(html_bgcolor)d(=)396
4494
4510 y(try)j(replacement_text)576 4607 y(\(self)f(#)g(node)g(#)h(dtd)f
4495
(#)h(par_entity)e("readme:html:bgcolor"\))396 4704 y(with)h(WF_error)g
4496
(_)h(-)p Fp(>)f Fr("white")g(in)665 4801 y(let)h(html_textcolor)d(=)p
4497
Black 3797 5278 a Fs(37)p Black eop
4499
38 37 bop Black 3136 67 a Fs(Chapter)20 b(2.)g(Using)g(PXP)p
4500
Black 396 579 a Fr(try)45 b(replacement_text)576 676
4501
y(\(self)f(#)g(node)g(#)h(dtd)f(#)h(par_entity)e
4502
("readme:html:textcolor"\))396 773 y(with)h(WF_error)g(_)h(-)p
4503
Fp(>)f Fr("")g(in)665 870 y(let)h(html_alinkcolor)d(=)396
4504
967 y(try)j(replacement_text)576 1065 y(\(self)f(#)g(node)g(#)h(dtd)f
4505
(#)h(par_entity)e("readme:html:alinkcolor"\))396 1162
4506
y(with)h(WF_error)g(_)h(-)p Fp(>)f Fr("")g(in)665 1259
4507
y(let)h(html_vlinkcolor)d(=)396 1356 y(try)j(replacement_text)576
4508
1453 y(\(self)f(#)g(node)g(#)h(dtd)f(#)h(par_entity)e
4509
("readme:html:vlinkcolor"\))396 1550 y(with)h(WF_error)g(_)h(-)p
4510
Fp(>)f Fr("")g(in)665 1647 y(let)h(html_linkcolor)d(=)396
4511
1745 y(try)j(replacement_text)576 1842 y(\(self)f(#)g(node)g(#)h(dtd)f
4512
(#)h(par_entity)e("readme:html:linkcolor"\))396 1939
4513
y(with)h(WF_error)g(_)h(-)p Fp(>)f Fr("")g(in)665 2036
4514
y(let)h(html_background)d(=)396 2133 y(try)j(replacement_text)576
4515
2230 y(\(self)f(#)g(node)g(#)h(dtd)f(#)h(par_entity)e
4516
("readme:html:background"\))396 2327 y(with)h(WF_error)g(_)h(-)p
4517
Fp(>)f Fr("")g(in)665 2522 y(output_string)f(ch)h(")p
4518
Fp(<)p Fr(html)p Fp(><)p Fr(header)p Fp(><)p Fr(title)p
4519
Fp(>)p Fr(\\n";)665 2619 y(output_string)f(ch)h(\(escape_html)f
4520
(title\);)665 2716 y(output_string)g(ch)h(")p Fp(<)p
4521
Fr(/title)p Fp(><)p Fr(/header)p Fp(>)p Fr(\\n";)665
4522
2813 y(output_string)f(ch)h(")p Fp(<)p Fr(body)g(";)665
4523
2910 y(List.iter)396 3007 y(\(fun)g(\(name,value\))f(-)p
4524
Fp(>)531 3104 y Fr(if)h(value)g Fp(<>)h Fr("")f(then)620
4525
3202 y(output_string)f(ch)i(\(name)f(^)g("=\\"")g(^)h(escape_html)e
4526
(value)h(^)h("\\")f("\)\))396 3299 y([)h("bgcolor",)178
4527
b(html_bgcolor;)486 3396 y("text",)313 b(html_textcolor;)486
4528
3493 y("link",)g(html_linkcolor;)486 3590 y("alink",)268
4529
b(html_alinkcolor;)486 3687 y("vlink",)g(html_vlinkcolor;)396
4530
3784 y(];)665 3882 y(output_string)43 b(ch)h(")p Fp(>)p
4531
Fr(\\n";)665 3979 y(output_string)f(ch)h(html_header;)665
4532
4076 y(output_string)f(ch)h(")p Fp(<)p Fr(h1)p Fp(>)p
4533
Fr(";)665 4173 y(output_string)f(ch)h(\(escape_html)f(title\);)665
4534
4270 y(output_string)g(ch)h(")p Fp(<)p Fr(/h1)p Fp(>)p
4535
Fr(\\n";)665 4367 y(\(*)h(process)e(main)i(content:)e(*\))665
4536
4464 y(List.iter)396 4561 y(\(fun)h(n)h(-)p Fp(>)f Fr(n)h(#)g
4537
(extension)e(#)i(to_html)e(store)h(ch\))396 4659 y(\(self)g(#)h(node)f
4538
(#)h(sub_nodes\);)665 4756 y(\(*)g(now)f(process)g(footnotes)f(*\))665
4539
4853 y(store)h(#)h(print_footnotes)d(ch;)p Black 3800
4540
5278 a Fs(38)p Black eop
4542
39 38 bop Black 3136 67 a Fs(Chapter)20 b(2.)g(Using)g(PXP)p
4543
Black 665 579 a Fr(\(*)45 b(trailer)e(*\))665 676 y(output_string)g(ch)
4544
h(html_trailer;)665 773 y(output_string)f(ch)h(")p Fp(<)p
4545
Fr(/html)p Fp(>)p Fr(\\n";)486 967 y(end)396 1065 y(;;)-2
4546
1517 y Fq(2.4.8.)35 b(Classes)h Fd(section)p Fq(,)31
4547
b Fd(sect1)p Fq(,)g Fd(sect2)p Fq(,)g(and)j Fd(sect3)396
4548
1685 y Fw(As)21 b(the)f(con)m(v)o(ersion)e(process)i(is)h(v)o(ery)e
4549
(similar)m(,)h(the)g(con)m(v)o(ersion)d(classes)22 b(of)e(the)g(three)g
4550
(section)f(le)n(v)o(els)i(are)f(deri)n(v)o(ed)396 1793
4551
y(from)f(the)i(more)e(general)g Fr(section)h Fw(class.)h(The)e(HTML)h
4552
(code)g(of)g(the)g(section)g(le)n(v)o(els)g(only)f(dif)n(fers)h(in)g
4553
(the)g(type)g(of)396 1901 y(the)g(headline,)f(and)h(because)f(of)h
4554
(this)h(the)f(classes)i(describing)c(the)i(section)g(le)n(v)o(els)g
4555
(can)g(be)h(computed)d(by)i(replacing)396 2009 y(the)g(class)i(ar)o
4556
(gument)17 b Fr(the_tag)j Fw(of)g Fr(section)g Fw(by)f(the)i(HTML)e
4557
(name)h(of)g(the)g(headline)f(tag.)396 2158 y(Section)h(elements)g(are)
4558
g(con)m(v)o(erted)e(to)i(HTML)g(by)g(printing)e(a)j(headline)e(and)h
4559
(then)f(con)m(v)o(erting)f(the)i(contents)f(of)h(the)396
4560
2266 y(element)g(recursi)n(v)o(ely)-5 b(.)18 b(More)h(precisely)-5
4561
b(,)19 b(the)h(\002rst)h(sub-element)e(is)i(al)o(w)o(ays)f(a)h
4562
Fr(title)f Fw(element,)f(and)h(the)g(other)396 2374 y(elements)g(are)g
4563
(the)g(contents)g(of)g(the)g(section.)g(This)g(structure)f(is)j
4564
(declared)c(in)j(the)f(DTD,)g(and)g(it)h(is)g(guaranteed)d(that)396
4565
2482 y(the)i(document)f(matches)g(the)i(DTD.)f(Because)g(of)g(this)h
4566
(the)f(title)h(node)e(can)h(be)g(separated)f(from)g(the)h(rest)h
4567
(without)f(an)o(y)396 2590 y(checks.)396 2739 y(Both)g(the)h(title)g
4568
(node,)e(and)g(the)h(body)f(nodes)h(are)g(then)f(con)m(v)o(erted)f(to)i
4569
(HTML)g(by)g(calling)g Fr(to_html)f Fw(on)h(them.)396
4570
2961 y Fr(class)44 b(section)g(the_tag)g(=)486 3058 y(object)g
4571
(\(self\))576 3155 y(inherit)f(shared)576 3350 y(val)h(tag)g(=)h
4572
(the_tag)576 3544 y(method)e(to_html)h(store)g(ch)h(=)665
4573
3641 y(let)g(sub_nodes)e(=)i(self)f(#)g(node)h(#)f(sub_nodes)g(in)665
4574
3738 y(match)g(sub_nodes)g(with)486 3835 y(title_node)f(::)i(rest)f(-)p
4575
Fp(>)576 3932 y Fr(output_string)e(ch)j(\(")p Fp(<)p
4576
Fr(")f(^)g(tag)h(^)f(")p Fp(>)p Fr(\\n"\);)576 4029 y(title_node)f(#)h
4577
(extension)g(#)g(to_html)g(store)g(ch;)576 4127 y(output_string)e(ch)j
4578
(\("\\n)p Fp(<)p Fr(/")e(^)i(tag)f(^)h(")p Fp(>)p Fr("\);)576
4579
4224 y(List.iter)665 4321 y(\(fun)f(n)h(-)p Fp(>)f Fr(n)h(#)g
4580
(extension)e(#)i(to_html)e(store)h(ch\))665 4418 y(rest)396
4581
4515 y(|)h(_)g(-)p Fp(>)576 4612 y Fr(assert)e(false)486
4582
4709 y(end)396 4807 y(;;)p Black 3800 5278 a Fs(39)p
4585
40 39 bop Black 3136 67 a Fs(Chapter)20 b(2.)g(Using)g(PXP)p
4586
Black 396 676 a Fr(class)44 b(sect1)g(=)h(section)f("h1";;)396
4587
773 y(class)g(sect2)g(=)h(section)f("h3";;)396 870 y(class)g(sect3)g(=)
4588
h(section)f("h4";;)-2 1323 y Fq(2.4.9.)35 b(Classes)h
4589
Fd(map_tag)p Fq(,)31 b Fd(p)p Fq(,)i Fd(em)p Fq(,)f Fd(ul)p
4590
Fq(,)h Fd(li)396 1491 y Fw(Se)n(v)o(eral)20 b(element)f(types)h(are)g
4591
(con)m(v)o(erted)e(to)i(HTML)g(by)g(simply)g(mapping)e(them)i(to)g
4592
(corresponding)d(HTML)396 1599 y(element)j(types.)g(The)f(class)j
4593
Fr(map_tag)d Fw(implements)g(this,)i(and)f(the)g(class)h(ar)o(gument)d
4594
Fr(the_target_tag)396 1707 y Fw(determines)h(the)i(tag)f(name)f(to)i
4595
(map)e(to.)h(The)g(output)f(consists)i(of)f(the)g(start)h(tag,)f(the)g
4596
(recursi)n(v)o(ely)e(con)m(v)o(erted)g(inner)396 1814
4597
y(elements,)i(and)g(the)g(end)f(tag.)396 1995 y Fr(class)44
4598
b(map_tag)g(the_target_tag)e(=)486 2092 y(object)i(\(self\))576
4599
2189 y(inherit)f(shared)576 2383 y(val)h(target_tag)f(=)i
4600
(the_target_tag)576 2577 y(method)e(to_html)h(store)g(ch)h(=)665
4601
2675 y(output_string)e(ch)h(\(")p Fp(<)p Fr(")g(^)h(target_tag)e(^)i(")
4602
p Fp(>)p Fr(\\n"\);)665 2772 y(List.iter)396 2869 y(\(fun)f(n)h(-)p
4603
Fp(>)f Fr(n)h(#)g(extension)e(#)i(to_html)e(store)h(ch\))396
4604
2966 y(\(self)g(#)h(node)f(#)h(sub_nodes\);)665 3063
4605
y(output_string)e(ch)h(\("\\n)p Fp(<)p Fr(/")g(^)h(target_tag)e(^)h(")p
4606
Fp(>)p Fr("\);)486 3160 y(end)396 3257 y(;;)396 3452
4607
y(class)g(p)h(=)g(map_tag)e("p";;)396 3549 y(class)h(em)h(=)f(map_tag)g
4608
("b";;)396 3646 y(class)g(ul)h(=)f(map_tag)g("ul";;)396
4609
3743 y(class)g(li)h(=)f(map_tag)g("li";;)-2 4196 y Fq(2.4.10.)36
4610
b(Class)f Fd(br)396 4363 y Fw(Element)20 b(of)g(type)f
4611
Fr(br)i Fw(are)f(mapped)f(to)h(the)g(same)g(HTML)g(type.)g(Note)g(that)
4612
g(HTML)g(forbids)f(the)h(end)g(tag)g(of)g Fr(br)p Fw(.)396
4613
4544 y Fr(class)44 b(br)h(=)486 4641 y(object)f(\(self\))576
4614
4738 y(inherit)f(shared)p Black 3800 5278 a Fs(40)p Black
4617
41 40 bop Black 3136 67 a Fs(Chapter)20 b(2.)g(Using)g(PXP)p
4618
Black 576 579 a Fr(method)43 b(to_html)h(store)g(ch)h(=)665
4619
676 y(output_string)e(ch)h(")p Fp(<)p Fr(br)p Fp(>)p
4620
Fr(\\n";)665 773 y(List.iter)396 870 y(\(fun)g(n)h(-)p
4621
Fp(>)f Fr(n)h(#)g(extension)e(#)i(to_html)e(store)h(ch\))396
4622
967 y(\(self)g(#)h(node)f(#)h(sub_nodes\);)486 1065 y(end)396
4623
1162 y(;;)-2 1614 y Fq(2.4.11.)36 b(Class)f Fd(code)396
4624
1782 y Fw(The)20 b Fr(code)g Fw(type)g(is)h(con)m(v)o(erted)d(to)i(a)h
4625
Fr(pre)f Fw(section)g(\(preformatted)d(te)o(xt\).)i(As)i(the)g(meaning)
4626
d(of)i(tabs)h(is)g(unspeci\002ed)e(in)396 1890 y(HTML,)h(tabs)g(are)h
4627
(e)o(xpanded)c(to)k(spaces.)396 2070 y Fr(class)44 b(code)g(=)486
4628
2167 y(object)g(\(self\))576 2264 y(inherit)f(shared)576
4629
2459 y(method)g(to_html)h(store)g(ch)h(=)665 2556 y(let)g(data)f(=)g
4630
(self)h(#)f(node)g(#)h(data)f(in)665 2653 y(\(*)h(convert)e(tabs)i(*\))
4631
665 2750 y(let)g(l)f(=)h(String.length)e(data)h(in)665
4632
2847 y(let)h(rec)f(preprocess)f(i)i(column)f(=)396 2944
4633
y(\(*)h(this)f(is)g(very)h(ineffective)e(but)h(comprehensive:)e(*\))396
4634
3042 y(if)j(i)f Fp(<)h Fr(l)g(then)486 3139 y(match)f(data.[i])f(with)
4635
665 3236 y('\\t')h(-)p Fp(>)396 3333 y Fr(let)h(n)f(=)h(8)g(-)f
4636
(\(column)g(mod)g(8\))h(in)396 3430 y(String.make)e(n)i(')g(')f(^)h
4637
(preprocess)e(\(i+1\))h(\(column)g(+)g(n\))576 3527 y(|)g('\\n')g(-)p
4638
Fp(>)396 3624 y Fr("\\n")g(^)h(preprocess)e(\(i+1\))h(0)576
4639
3721 y(|)g(c)h(-)p Fp(>)396 3819 y Fr(String.make)e(1)i(c)g(^)f
4640
(preprocess)f(\(i+1\))h(\(column)g(+)h(1\))396 3916 y(else)486
4641
4013 y("")665 4110 y(in)665 4207 y(output_string)e(ch)h(")p
4642
Fp(<)p Fr(p)p Fp(><)p Fr(pre)p Fp(>)p Fr(";)665 4304
4643
y(output_string)f(ch)h(\(escape_html)f(\(preprocess)g(0)i(0\)\);)665
4644
4401 y(output_string)e(ch)h(")p Fp(<)p Fr(/pre)p Fp(><)p
4645
Fr(/p)p Fp(>)p Fr(";)486 4596 y(end)396 4693 y(;;)p Black
4646
3800 5278 a Fs(41)p Black eop
4648
42 41 bop Black 3136 67 a Fs(Chapter)20 b(2.)g(Using)g(PXP)p
4649
Black -2 583 a Fq(2.4.12.)36 b(Class)f Fd(a)396 751 y
4650
Fw(Hyperlinks,)19 b(e)o(xpressed)g(by)g(the)i Fr(a)f
4651
Fw(element)g(type,)f(are)h(con)m(v)o(erted)e(to)i(the)g(HTML)g
4652
Fr(a)h Fw(type.)e(If)i(the)f(tar)o(get)f(of)h(the)396
4653
859 y(hyperlink)e(is)j(gi)n(v)o(en)d(by)i Fr(href)p Fw(,)g(the)g(URL)g
4654
(of)g(this)g(attrib)n(ute)g(can)g(be)g(used)g(directly)-5
4655
b(.)18 b(Alternati)n(v)o(ely)-5 b(,)18 b(the)i(tar)o(get)f(can)h(be)396
4656
967 y(gi)n(v)o(en)f(by)h Fr(readmeref)f Fw(in)i(which)e(case)i(the)f
4657
(".html")g(suf)n(\002x)f(must)i(be)f(added)f(to)h(the)g(\002le)h(name.)
4658
396 1116 y(Note)f(that)h(within)f Fr(a)g Fw(only)g(#PCD)m(A)-9
4659
b(T)h(A)20 b(is)h(allo)n(wed,)e(so)i(the)f(contents)f(can)h(be)g(con)m
4660
(v)o(erted)e(directly)h(by)h(applying)396 1224 y Fr(escape_html)f
4661
Fw(to)i(the)f(character)f(data)h(contents.)396 1404 y
4662
Fr(class)44 b(a)h(=)486 1501 y(object)f(\(self\))576
4663
1598 y(inherit)f(shared)576 1793 y(method)g(to_html)h(store)g(ch)h(=)
4664
665 1890 y(output_string)e(ch)h(")p Fp(<)p Fr(a)h(";)665
4665
1987 y(let)g(href)f(=)396 2084 y(match)g(self)g(#)h(node)f(#)h
4666
(attribute)e("href")h(with)576 2181 y(Value)g(v)g(-)p
4667
Fp(>)h Fr(escape_html)e(v)486 2278 y(|)i(Valuelist)e(_)i(-)p
4668
Fp(>)f Fr(assert)g(false)486 2376 y(|)h(Implied_value)d(-)p
4669
Fp(>)665 2473 y Fr(begin)i(match)g(self)g(#)h(node)f(#)h(attribute)e
4670
("readmeref")g(with)486 2570 y(Value)h(v)h(-)p Fp(>)f
4671
Fr(escape_html)f(v)i(^)f(".html")396 2667 y(|)h(Valuelist)e(_)i(-)p
4672
Fp(>)f Fr(assert)g(false)396 2764 y(|)h(Implied_value)e(-)p
4673
Fp(>)576 2861 y Fr("")665 2958 y(end)665 3055 y(in)665
4674
3153 y(if)i(href)f Fp(<>)g Fr("")h(then)396 3250 y(output_string)e(ch)h
4675
(\("href=\\"")88 b(^)45 b(href)f(^)h("\\""\);)665 3347
4676
y(output_string)e(ch)h(")p Fp(>)p Fr(";)665 3444 y(output_string)f(ch)h
4677
(\(escape_html)f(\(self)h(#)h(node)f(#)h(data\)\);)665
4678
3541 y(output_string)e(ch)h(")p Fp(<)p Fr(/a)p Fp(>)p
4679
Fr(";)486 3735 y(end)396 3833 y(;;)-2 4285 y Fq(2.4.13.)36
4680
b(Class)f Fd(footnote)396 4453 y Fw(The)20 b Fr(footnote)g
4681
Fw(class)h(has)f(tw)o(o)h(methods:)e Fr(to_html)g Fw(to)i(con)m(v)o
4682
(ert)d(the)i(footnote)f(reference)f(to)i(HTML,)g(and)396
4683
4561 y Fr(footnote_to_html)e Fw(to)j(con)m(v)o(ert)d(the)i(footnote)f
4684
(te)o(xt)h(itself.)p Black 3800 5278 a Fs(42)p Black
4687
43 42 bop Black 3136 67 a Fs(Chapter)20 b(2.)g(Using)g(PXP)p
4688
Black 396 579 a Fw(The)g(footnote)f(reference)f(is)j(con)m(v)o(erted)d
4689
(to)i(a)h(local)f(hyperlink;)e(more)h(precisely)-5 b(,)19
4690
b(to)h(tw)o(o)h(anchor)d(tags)j(which)e(are)396 687 y(connected)g(with)
4691
h(each)g(other)-5 b(.)19 b(The)h(te)o(xt)g(anchor)f(points)h(to)g(the)g
4692
(footnote)f(anchor)m(,)f(and)h(the)i(footnote)d(anchor)h(points)396
4693
795 y(to)i(the)f(te)o(xt)g(anchor)-5 b(.)396 944 y(The)20
4694
b(footnote)f(must)h(be)g(allocated)f(in)i(the)f Fr(store)g
4695
Fw(object.)f(By)i(allocating)e(the)h(footnote,)f(you)g(get)h(the)g
4696
(number)f(of)396 1052 y(the)h(footnote,)f(and)g(the)i(te)o(xt)f(of)f
4697
(the)i(footnote)d(is)j(stored)f(until)g(the)g(end)g(of)g(the)g(HTML)g
4698
(page)f(is)j(reached)c(when)i(the)396 1160 y(footnotes)f(can)h(be)g
4699
(printed.)f(The)h Fr(to_html)f Fw(method)g(stores)i(simply)e(the)i
4700
(object)e(itself,)i(such)f(that)g(the)396 1268 y Fr(footnote_to_html)e
4701
Fw(method)h(is)i(in)m(v)n(ok)o(ed)e(on)g(the)i(same)f(object)g(that)g
4702
(encountered)d(the)k(footnote.)396 1417 y(The)f Fr(to_html)g
4703
Fw(only)f(allocates)h(the)h(footnote,)d(and)h(prints)h(the)g(reference)
4704
f(anchor)m(,)f(b)n(ut)i(it)h(does)f(not)g(print)g(nor)396
4705
1525 y(con)m(v)o(ert)e(the)j(contents)e(of)h(the)g(note.)g(This)g(is)h
4706
(deferred)d(until)j(the)f(footnotes)e(actually)i(get)g(printed,)f(i.e.)
4707
h(the)g(recursi)n(v)o(e)396 1633 y(call)h(of)f Fr(to_html)f
4708
Fw(on)h(the)g(sub)g(nodes)g(is)h(done)e(by)h Fr(footnote_to_html)p
4709
Fw(.)396 1783 y(Note)g(that)h(this)f(technique)f(does)h(not)g(w)o(ork)f
4710
(if)i(you)e(mak)o(e)h(another)f(footnote)f(within)i(a)h(footnote;)d
4711
(the)i(second)396 1891 y(footnote)f(gets)h(allocated)g(b)n(ut)g(not)g
4712
(printed.)396 2112 y Fr(class)44 b(footnote)g(=)486 2209
4713
y(object)g(\(self\))576 2307 y(inherit)f(shared)576 2501
4714
y(val)h(mutable)g(footnote_number)e(=)j(0)576 2695 y(method)e(to_html)h
4715
(store)g(ch)h(=)665 2792 y(let)g(number)e(=)396 2889
4716
y(store)h(#)h(alloc_footnote)d(\(self)i(:)h(#shared)f(:)p
4717
Fp(>)g Fr(footnote_printer\))e(in)665 2987 y(let)j(foot_anchor)e(=)396
4718
3084 y("footnote")g(^)i(string_of_int)e(number)h(in)665
4719
3181 y(let)h(text_anchor)e(=)396 3278 y("textnote")g(^)i(string_of_int)
4720
e(number)h(in)665 3375 y(footnote_number)f Fp(<)p Fr(-)h(number;)665
4721
3472 y(output_string)f(ch)h(\()h(")p Fp(<)p Fr(a)f(name=\\"")g(^)g
4722
(text_anchor)f(^)i("\\")f(href=\\"#")g(^)441 3569 y(foot_anchor)f(^)i
4723
("\\")p Fp(>)p Fr([")e(^)i(string_of_int)e(number)h(^)441
4724
3667 y("])p Fp(<)p Fr(/a)p Fp(>)p Fr(")g(\))576 3861
4725
y(method)f(footnote_to_html)g(store)h(ch)g(=)665 3958
4726
y(\(*)h(prerequisite:)d(we)j(are)f(in)h(a)f(definition)g(list)g
4727
Fp(<)p Fr(dl)p Fp(>)p Fr(...)p Fp(<)p Fr(/dl)p Fp(>)e
4728
Fr(*\))665 4055 y(let)j(foot_anchor)e(=)396 4152 y("footnote")g(^)i
4729
(string_of_int)e(footnote_number)f(in)665 4249 y(let)j(text_anchor)e(=)
4730
396 4346 y("textnote")g(^)i(string_of_int)e(footnote_number)f(in)665
4731
4444 y(output_string)h(ch)h(\(")p Fp(<)p Fr(dt)p Fp(><)p
4732
Fr(a)g(name=\\"")f(^)i(foot_anchor)e(^)h("\\")h(href=\\"#")e(^)396
4733
4541 y(text_anchor)g(^)i("\\")p Fp(>)p Fr([")f(^)g(string_of_int)f
4734
(footnote_number)f(^)396 4638 y("])p Fp(<)p Fr(/a)p Fp(><)p
4735
Fr(/dt)p Fp(>)p Fr(\\n)p Fp(<)p Fr(dd)p Fp(>)p Fr("\);)665
4736
4735 y(List.iter)396 4832 y(\(fun)i(n)h(-)p Fp(>)f Fr(n)h(#)g
4737
(extension)e(#)i(to_html)e(store)h(ch\))p Black 3800
4738
5278 a Fs(43)p Black eop
4740
44 43 bop Black 3136 67 a Fs(Chapter)20 b(2.)g(Using)g(PXP)p
4741
Black 396 579 a Fr(\(self)44 b(#)h(node)f(#)h(sub_nodes\);)665
4742
676 y(output_string)e(ch)h(\("\\n)p Fp(<)p Fr(/dd)p Fp(>)p
4743
Fr("\))486 870 y(end)396 967 y(;;)-2 1420 y Fq(2.4.14.)36
4744
b(The)d(speci\002cation)j(of)e(the)f(document)i(model)396
4745
1588 y Fw(This)21 b(code)e(sets)i(up)f(the)g(hash)g(table)g(that)h
4746
(connects)e(element)h(types)g(with)g(the)g(e)o(x)o(emplars)f(of)h(the)g
4747
(e)o(xtension)f(classes)396 1696 y(that)i(con)m(v)o(ert)d(the)i
4748
(elements)g(to)g(HTML.)396 1876 y Fr(open)44 b(Pxp_yacc)396
4749
2070 y(let)h(tag_map)e(=)486 2167 y(make_spec_from_alist)576
4750
2264 y(~data_exemplar:\(new)e(data_impl)j(\(new)g(only_data\)\))576
4751
2362 y(~default_element_exemplar:\(new)39 b(element_impl)k(\(new)h
4752
(no_markup\)\))576 2459 y(~element_alist:)665 2556 y([)h("readme",)e
4753
(\(new)h(element_impl)f(\(new)h(readme\)\);)396 2653
4754
y("sect1",)89 b(\(new)44 b(element_impl)f(\(new)h(sect1\)\);)396
4755
2750 y("sect2",)89 b(\(new)44 b(element_impl)f(\(new)h(sect2\)\);)396
4756
2847 y("sect3",)89 b(\(new)44 b(element_impl)f(\(new)h(sect3\)\);)396
4757
2944 y("title",)89 b(\(new)44 b(element_impl)f(\(new)h(no_markup\)\);)
4758
396 3042 y("p",)269 b(\(new)44 b(element_impl)f(\(new)h(p\)\);)396
4759
3139 y("br",)224 b(\(new)44 b(element_impl)f(\(new)h(br\)\);)396
4760
3236 y("code",)134 b(\(new)44 b(element_impl)f(\(new)h(code\)\);)396
4761
3333 y("em",)224 b(\(new)44 b(element_impl)f(\(new)h(em\)\);)396
4762
3430 y("ul",)224 b(\(new)44 b(element_impl)f(\(new)h(ul\)\);)396
4763
3527 y("li",)224 b(\(new)44 b(element_impl)f(\(new)h(li\)\);)396
4764
3624 y("footnote",)f(\(new)h(element_impl)f(\(new)h(footnote)g(:)h
4765
(#shared)e(:)p Fp(>)i Fr(shared\)\);)396 3721 y("a",)269
4766
b(\(new)44 b(element_impl)f(\(new)h(a\)\);)665 3819 y(])576
4767
3916 y(\(\))396 4013 y(;;)-2 4515 y Fy(Notes)p Black
4768
396 4694 a Fw(1.)p Black 70 w(Elements)20 b(may)g(also)g(contain)f
4769
(processing)g(instructions.)g(Unlik)o(e)h(other)f(document)g(models,)g
4770
(PXP)i(separates)529 4802 y(processing)e(instructions)g(from)g(the)i
4771
(rest)f(of)g(the)g(te)o(xt)g(and)g(pro)o(vides)e(a)j(second)e(interf)o
4772
(ace)h(to)g(access)h(them)p Black 3800 5278 a Fs(44)p
4775
45 44 bop Black 3136 67 a Fs(Chapter)20 b(2.)g(Using)g(PXP)p
4776
Black 529 579 a Fw(\(method)f Fr(pinstr)p Fw(\).)g(Ho)n(we)n(v)o(er)m
4777
(,)f(there)h(is)j(a)e(parser)g(option)f(\()p Fr(enable_pinstr_nodes)p
4778
Fw(\))e(which)i(changes)g(the)529 687 y(beha)n(viour)f(of)i(the)g
4779
(parser)g(such)g(that)g(e)o(xtra)g(nodes)f(for)h(processing)e
4780
(instructions)i(are)g(included)e(into)i(the)h(tree.)529
4781
825 y Fj(Furthermore,)e(the)g(tree)g(does)g(normally)h(not)f(contain)h
4782
(nodes)g(for)e(XML)h(comments;)h(the)o(y)f(are)g(ignored)h(by)f(def)o
4783
(ault.)g(Again,)529 923 y(there)g(is)g(an)g(option)h(\()p
4784
Fi(enable_comment_nodes)p Fj(\))25 b(changing)c(this.)p
4785
Black 396 1072 a Fw(2.)p Black 70 w(Due)f(to)h(the)f(typing)f(system)h
4786
(it)h(is)g(more)e(or)h(less)i(impossible)d(to)i(deri)n(v)o(e)d(recursi)
4787
n(v)o(e)h(classes)i(in)g(O'Caml.)f(T)-7 b(o)20 b(get)529
4788
1180 y(around)e(this,)j(it)g(is)g(common)d(practice)i(to)g(put)g(the)g
4789
(modi\002able)f(or)h(e)o(xtensible)f(part)h(of)g(recursi)n(v)o(e)f
4790
(objects)h(into)529 1288 y(parallel)g(objects.)p Black
4791
396 1437 a(3.)p Black 70 w(The)g(problem)e(is)k(that)e(the)g(subclass)h
4792
(is)g(usually)e(not)h(a)h(subtype)e(in)h(this)h(case)f(because)g
4793
(O'Caml)g(has)h(a)529 1545 y(contra)n(v)n(ariant)d(subtyping)g(rule.)p
4794
Black 3800 5278 a Fs(45)p Black eop
4796
46 45 bop Black Black -2 621 a Ft(Chapter)48 b(3.)f(The)h(objects)g
4797
(representing)g(the)-2 845 y(document)396 1093 y Fs(This)21
4798
b(description)e(might)h(be)g(out-of-date)o(.)e(See)i(the)g(module)f
4799
(interface)h(\002les)g(for)h(updated)d(information.)-2
4800
1470 y Fy(3.1.)39 b(The)g Fc(document)44 b Fy(c)m(lass)396
4801
1722 y Fr(class)g([)h('ext)f(])h(document)e(:)486 1819
4802
y(Pxp_types.collect_warnings)d(->)486 1916 y(object)576
4803
2013 y(method)j(init_xml_version)g(:)h(string)g(->)h(unit)576
4804
2111 y(method)e(init_root)h(:)g('ext)h(node)f(->)g(unit)576
4805
2305 y(method)f(xml_version)g(:)i(string)576 2402 y(method)e
4806
(xml_standalone)g(:)i(bool)576 2499 y(method)e(dtd)i(:)f(dtd)576
4807
2596 y(method)f(root)i(:)f('ext)g(node)576 2791 y(method)f(encoding)h
4808
(:)h(Pxp_types.rep_encoding)576 2985 y(method)e(add_pinstr)h(:)g
4809
(proc_instruction)e(->)j(unit)576 3082 y(method)e(pinstr)h(:)h(string)f
4810
(->)g(proc_instruction)e(list)576 3179 y(method)h(pinstr_names)g(:)i
4811
(string)f(list)576 3373 y(method)f(write)h(:)h(Pxp_types.output_stream)
4812
c(->)k(Pxp_types.encoding)c(->)k(unit)486 3568 y(end)396
4813
3665 y(;;)396 3856 y Fw(The)20 b(methods)f(be)o(ginning)f(with)i
4814
Fr(init_)g Fw(are)g(only)g(for)f(internal)h(use)g(of)g(the)g(parser)-5
4815
b(.)p Black 396 4088 a Fu(\225)p Black 60 w Fr(xml_version)p
4816
Fw(:)19 b(returns)h(the)g(v)o(ersion)f(string)h(at)g(the)g(be)o
4817
(ginning)e(of)i(the)g(document.)e(F)o(or)i(e)o(xample,)f("1.0")g(is)479
4818
4196 y(returned)g(if)h(the)g(document)f(be)o(gins)g(with)h
4819
Fp(<)p Fr(?xml)44 b(version="1.0"?)p Fp(>)p Fw(.)p Black
4820
396 4304 a Fu(\225)p Black 60 w Fr(xml_standalone)p Fw(:)19
4821
b(returns)g(the)h(boolean)f(v)n(alue)g(of)h Fr(standalone)f
4822
Fw(declaration)g(in)h(the)h(XML)f(declaration.)e(If)479
4823
4412 y(the)i Fr(standalone)g Fw(attrib)n(ute)f(is)i(missing,)f
4824
Fr(false)g Fw(is)h(returned.)p Black 396 4520 a Fu(\225)p
4825
Black 60 w Fr(dtd)p Fw(:)g(returns)e(a)i(reference)d(to)i(the)h(global)
4826
e(DTD)h(object.)p Black 396 4628 a Fu(\225)p Black 60
4827
w Fr(root)p Fw(:)g(returns)g(a)g(reference)f(to)h(the)g(root)g
4828
(element.)p Black 396 4736 a Fu(\225)p Black 60 w Fr(encoding)p
4829
Fw(:)g(returns)f(the)h(internal)g(encoding)e(of)i(the)g(document.)e
4830
(This)i(means)g(that)g(all)h(strings)f(of)g(which)g(the)479
4831
4844 y(document)e(consists)j(are)f(encoded)f(in)h(this)h(character)e
4832
(set.)p Black 3798 5278 a Fs(46)p Black eop
4834
47 46 bop Black 2225 67 a Fs(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr)
4835
m(esenting)g(the)g(document)p Black Black 396 579 a Fu(\225)p
4836
Black 60 w Fr(pinstr)p Fw(:)g(returns)f(the)i(processing)d
4837
(instructions)i(outside)f(the)h(DTD)h(and)e(outside)h(the)g(root)g
4838
(element.)f(The)479 687 y(ar)o(gument)f(passed)i(to)h(the)f(method)f
4839
(names)g(a)i Fs(tar)m(g)o(et)q Fw(,)g(and)e(the)h(method)f(returns)g
4840
(all)i(instructions)e(with)i(this)g(tar)o(get.)479 795
4841
y(The)f(tar)o(get)f(is)j(the)e(\002rst)h(w)o(ord)e(inside)h
4842
Fp(<)p Fr(?)h Fw(and)e Fr(?)p Fp(>)p Fw(.)p Black 396
4843
903 a Fu(\225)p Black 60 w Fr(pinstr_names)p Fw(:)g(returns)g(the)i
4844
(names)e(of)h(the)h(processing)d(instructions)p Black
4845
396 1011 a Fu(\225)p Black 60 w Fr(add_pinstr)p Fw(:)h(adds)h(another)f
4846
(processing)g(instruction.)f(This)j(method)e(is)i(used)f(by)f(the)h
4847
(parser)g(itself)h(to)f(enter)g(the)479 1119 y(instructions)f(returned)
4848
g(by)h Fr(pinstr)p Fw(,)f(b)n(ut)h(you)g(can)g(also)g(enter)g
4849
(additional)f(instructions.)p Black 396 1226 a Fu(\225)p
4850
Black 60 w Fr(write)p Fw(:)h(writes)h(the)f(document)e(to)j(the)f
4851
(passed)g(stream)g(as)h(XML)f(te)o(xt)g(using)g(the)g(passed)g(\(e)o
4852
(xternal\))e(encoding.)479 1334 y(The)i(generated)f(te)o(xt)h(is)h(al)o
4853
(w)o(ays)f(v)n(alid)g(XML)g(and)g(can)g(be)g(parsed)g(by)f(PXP;)i(ho)n
4854
(we)n(v)o(er)m(,)d(the)i(te)o(xt)g(is)h(badly)479 1442
4855
y(formatted)e(\(this)h(is)h(not)f(a)h(pretty)e(printer\).)-2
4856
1861 y Fy(3.2.)39 b(The)g(c)m(lass)g(type)g Fc(node)396
4857
2041 y Fv(Signatur)o(e:.)60 b Fw(From)20 b Fr(Pxp_document)p
4858
Fw(:)396 2221 y Fr(class)44 b(type)g([)h('ext)f(])h(node)f(=)486
4859
2318 y(object)g(\('self\))576 2415 y(constraint)f('ext)h(=)h('ext)f
4860
(node)g(#extension)576 2609 y(\(*)g Fo(General)g(observers)f
4861
Fr(*\))576 2804 y(method)g(extension)h(:)g('ext)576 2901
4862
y(method)f(dtd)i(:)f(dtd)576 2998 y(method)f(encoding)h(:)h
4863
(Pxp_types.rep_encoding)576 3095 y(method)e(parent)h(:)h('ext)f(node)
4864
576 3192 y(method)f(root)i(:)f('ext)g(node)576 3289 y(method)f
4865
(sub_nodes)h(:)g('ext)h(node)f(list)576 3386 y(method)f(iter_nodes)h(:)
4866
g(\('ext)g(node)g(-)p Fp(>)h Fr(unit\))f(-)p Fp(>)g Fr(unit)576
4867
3484 y(method)f(iter_nodes_sibl)g(:)889 3581 y(\('ext)h(node)h(option)e
4868
(-)p Fp(>)i Fr('ext)f(node)g(-)p Fp(>)g Fr('ext)h(node)f(option)g(-)p
4869
Fp(>)g Fr(unit\))g(-)396 3678 y Fp(>)h Fr(unit)576 3775
4870
y(method)e(previous_node)g(:)i('ext)f(node)576 3872 y(method)f
4871
(next_node)h(:)g('ext)h(node)576 3969 y(method)e(nth_node)h(:)h(int)f
4872
(-)p Fp(>)g Fr('ext)g(node)576 4066 y(method)f(node_type)h(:)g
4873
(node_type)576 4164 y(method)f(node_position)g(:)i(int)576
4874
4261 y(method)e(node_path)h(:)g(int)h(list)576 4358 y(method)e(data)i
4875
(:)f(string)576 4455 y(method)f(position)h(:)h(\(string)e(*)i(int)f(*)h
4876
(int\))576 4552 y(method)e(comment)h(:)h(string)f(option)576
4877
4649 y(method)f(pinstr)h(:)h(string)f(-)p Fp(>)g Fr(proc_instruction)e
4878
(list)576 4746 y(method)h(pinstr_names)g(:)i(string)f(list)576
4879
4843 y(method)f(write)h(:)h(Pxp_types.output_stream)c(->)k
4880
(Pxp_types.encoding)c(->)k(unit)p Black 3797 5278 a Fs(47)p
4883
48 47 bop Black 2225 67 a Fs(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr)
4884
m(esenting)g(the)g(document)p Black 576 676 a Fr(\(*)44
4885
b Fo(Attribute)f(observers)h Fr(*\))576 870 y(method)f(attribute)h(:)g
4886
(string)g(-)p Fp(>)h Fr(Pxp_types.att_value)576 967 y(method)e
4887
(required_string_attribute)e(:)k(string)f(-)p Fp(>)g
4888
Fr(string)576 1065 y(method)f(optional_string_attribute)e(:)k(string)f
4889
(-)p Fp(>)g Fr(string)g(option)576 1162 y(method)f
4890
(required_list_attribute)e(:)k(string)f(-)p Fp(>)g Fr(string)g(list)576
4891
1259 y(method)f(optional_list_attribute)e(:)k(string)f(-)p
4892
Fp(>)g Fr(string)g(list)576 1356 y(method)f(attribute_names)g(:)h
4893
(string)g(list)576 1453 y(method)f(attribute_type)g(:)i(string)e(-)p
4894
Fp(>)i Fr(Pxp_types.att_type)576 1550 y(method)e(attributes)h(:)g
4895
(\(string)g(*)h(Pxp_types.att_value\))c(list)576 1647
4896
y(method)i(id_attribute_name)f(:)j(string)576 1745 y(method)e
4897
(id_attribute_value)f(:)j(string)576 1842 y(method)e
4898
(idref_attribute_names)f(:)i(string)576 1939 y(method)f
4899
(attributes_as_nodes)f(:)j('ext)f(node)g(list)576 2133
4900
y(\(*)g Fo(Mutating)g(methods)f Fr(*\))576 2327 y(method)g(append_node)
4901
g(:)i('ext)f(node)g(-)p Fp(>)h Fr(unit)576 2424 y(method)e
4902
(insert_nodes)g(:)i(?pos:int)e(-)p Fp(>)i Fr('ext)f(node)g(list)g(-)p
4903
Fp(>)h Fr(unit)576 2522 y(method)e(delete)h(:)h(unit)576
4904
2619 y(method)e(delete_nodes)g(:)i(?pos:int)e(-)p Fp(>)i
4905
Fr(?len:int)e(-)p Fp(>)i Fr(unit)f(-)p Fp(>)g Fr(unit)576
4906
2716 y(method)f(set_nodes)h(:)g('ext)h(node)f(list)g(-)p
4907
Fp(>)g Fr(unit)576 2813 y(method)f(set_attributes)g(:)i(\(string)e(*)i
4908
(Pxp_types.att_value\))c(list)k(-)p Fp(>)f Fr(unit)576
4909
2910 y(method)f(set_attribute)g(:)i(\(string)e(*)i
4910
(Pxp_types.att_value\))d(list)i(->)g(unit)576 3007 y(method)f
4911
(reset_attribute)g(:)h(string)g(->)h(unit)576 3104 y(method)e
4912
(set_comment)g(:)i(string)f(option)g(-)p Fp(>)g Fr(unit)576
4913
3202 y(method)f(set_data)h(:)h(string)e(-)p Fp(>)i Fr(unit)576
4914
3299 y(method)e(add_pinstr)h(:)g(proc_instruction)e(-)p
4915
Fp(>)j Fr(unit)576 3396 y(\(*)f(DEPRECATED:)f(add_node,)g
4916
(quick_set_attributes)f(*\))576 3590 y(\(*)i Fo(Cloning)g(methods)f
4917
Fr(*\))576 3784 y(method)g(orphaned_clone)g(:)i('self)576
4918
3882 y(method)e(orphaned_flat_clone)f(:)j('self)576 3979
4919
y(method)e(create_element)g(:)1024 4076 y
4920
(?name_pool_for_attribute_values:Pxp_typ)o(es.poo)o(l)c(-)p
4921
Fp(>)1024 4173 y Fr(?position:\(string)j(*)j(int)f(*)h(int\))f(-)p
4922
Fp(>)1024 4270 y Fr(?valcheck:bool)e(-)p Fp(>)1024 4367
4923
y Fr(?att_values:\(\(string)f(*)k(Pxp_types.att_value\))d(list\))i(-)p
4924
Fp(>)1024 4464 y Fr(dtd)g(-)p Fp(>)h Fr(node_type)e(-)p
4925
Fp(>)h Fr(\(string)g(*)h(string\))e(list)h(-)p Fp(>)1203
4926
4561 y Fr('ext)g(node)576 4659 y(method)f(create_data)g(:)i(dtd)f(-)p
4927
Fp(>)h Fr(string)f(-)p Fp(>)g Fr('ext)g(node)576 4756
4928
y(\(*)g(REMOVED:)g(keep_always_whitespace_mode)c(*\))p
4929
Black 3800 5278 a Fs(48)p Black eop
4931
49 48 bop Black 2225 67 a Fs(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr)
4932
m(esenting)g(the)g(document)p Black 531 579 a Fr(\(*)44
4933
b Fo(Validating)f(methods)h Fr(*\))576 773 y(method)f
4934
(classify_data_node)f(:)j('ext)f(node)g(-)p Fp(>)h Fr
4935
(data_node_classification)576 870 y(method)e(validate_contents)f(:)1024
4936
967 y(?use_dfa:bool)h(-)p Fp(>)h Fr(?check_data_nodes:bool)d(-)p
4937
Fp(>)j Fr(unit)h(-)p Fp(>)f Fr(unit)576 1065 y(method)f
4938
(validate_attlist)g(:)h(unit)g(-)p Fp(>)h Fr(unit)576
4939
1162 y(method)e(validate)h(:)h(unit)f(-)p Fp(>)g Fr(unit)576
4940
1259 y(method)f(complement_attlist)f(:)j(unit)f(-)p Fp(>)g
4941
Fr(unit)576 1453 y(\(*)g(DEPRECATED:)f(local_validate)g(*\))576
4942
1745 y(\(*)h Fo(Namespace)f(methods)h Fr(*\))576 1939
4943
y(method)f(normprefix)h(:)g(string)576 2036 y(method)f(localname)h(:)g
4944
(string)576 2133 y(method)f(namespace_uri)g(:)i(string)576
4945
2230 y(method)e(namespace_manager)f(:)j(namespace_manager)576
4946
2327 y(method)e(namespace_info)g(:)i('ext)f(namespace_info)576
4947
2522 y(\(*)g(...)g(Internal)g(methods)g(are)g(undocumented.)f(*\))486
4948
2716 y(end)396 2813 y(;;)-2 3224 y Fq(3.2.1.)35 b(The)f(principal)g
4949
(structure)g(of)f(document)h(trees)396 3392 y Fw(In)20
4950
b(a)h(document)d(parsed)h(with)i(the)f(def)o(ault)f(parser)h(settings)h
4951
(e)n(v)o(ery)d(node)h(represents)h(either)g(an)g(element)f(or)h(a)396
4952
3500 y(character)f(data)h(section.)g(There)f(are)h(tw)o(o)h(classes)g
4953
(implementing)d(the)i(tw)o(o)h(aspects)f(of)g(nodes:)g
4954
Fr(element_impl)396 3608 y Fw(and)g Fr(data_impl)p Fw(.)f(There)g(are)h
4955
(con\002gurations)e(which)i(allo)n(w)g(more)f(node)h(types)g(to)g(be)g
4956
(created,)f(in)i(particular)396 3716 y(processing)e(instruction)g
4957
(nodes,)g(comment)g(nodes,)g(and)h(super)f(root)h(nodes,)f(b)n(ut)h
4958
(these)h(are)f(discussed)g(later)-5 b(.)20 b(Note)396
4959
3824 y(that)h(you)e(can)h(al)o(w)o(ays)g(add)g(these)g(e)o(xtra)g(node)
4960
f(types)h(yourself)f(to)h(the)g(node)g(tree)g(no)g(matter)f(what)i(the)
4961
f(parser)396 3932 y(con\002guration)e(speci\002es.)396
4962
4081 y(The)i(follo)n(wing)f(\002gure)g(\()p Fs(A)h(tr)m(ee)h(with)g
4963
(element)f(nodes,)f(data)g(nodes,)h(and)f(attrib)n(utes)p
4964
Fw(\))h(sho)n(ws)g(an)g(e)o(xample)f(ho)n(w)h(a)396 4189
4965
y(tree)g(is)i(constructed)c(from)h(element)h(and)f(data)i(nodes.)e(The)
4966
h(circular)f(areas)h(represent)f(element)h(nodes)f(whereas)h(the)396
4967
4297 y(o)o(v)n(als)f(denote)f(data)i(nodes.)e(Only)h(elements)g(may)g
4968
(ha)n(v)o(e)g(subnodes;)f(data)h(nodes)g(are)g(al)o(w)o(ays)h(lea)n(v)o
4969
(es)f(of)h(the)f(tree.)g(The)396 4405 y(subnodes)g(of)h(an)g(element)g
4970
(can)g(be)g(either)g(element)f(or)h(data)g(nodes;)g(in)g(both)f(cases)i
4971
(the)g(O'Caml)f(objects)g(storing)f(the)396 4513 y(nodes)h(ha)n(v)o(e)f
4972
(the)i(class)g(type)e Fr(node)p Fw(.)396 4662 y(Attrib)n(utes)h(\(the)g
4973
(clouds)g(in)g(the)g(picture\))f(are)h(not)g(directly)g(inte)o(grated)e
4974
(into)i(the)g(tree;)h(there)e(is)i(al)o(w)o(ays)g(an)f(e)o(xtra)g(link)
4975
396 4770 y(to)h(the)f(attrib)n(ute)g(list.)h(This)f(is)h(also)g(true)f
4976
(for)f(processing)g(instructions)g(\(not)h(sho)n(wn)f(in)h(the)h
4977
(picture\).)d(This)j(means)396 4878 y(that)g(there)e(are)h(separated)g
4978
(access)g(methods)g(for)f(attrib)n(utes)h(and)g(processing)f
4979
(instructions)g(contained)f(in)j(the)p Black 3800 5278
4982
50 49 bop Black 2225 67 a Fs(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr)
4983
m(esenting)g(the)g(document)p Black 396 579 a Fw(element)g(node.)f(In)h
4984
(particular)m(,)e(you)h(can)h(call)h(the)f Fr(attribute)f
4985
Fw(method)g(on)h(an)g(element)g(node)f(to)h(get)g(the)h(v)n(alue)e(of)
4986
396 687 y(an)h(attrib)n(ute,)g(and)g(you)f(can)h(call)h(the)f
4987
Fr(pinstr)f Fw(method)g(to)i(get)f(the)g(v)n(alue)g(of)f(a)i
4988
(processing)e(instruction.)g(Note)h(that)396 795 y(there)g(are)g(also)h
4989
(attrib)n(ute)e Fs(nodes)h Fw(and)f(processing)g(instruction)g
4990
Fs(nodes)p Fw(;)h(these)g(are)g(e)o(xtra)g(node)f(types)h(modifying)e
4991
(the)396 903 y(basic)j(model)e(discussed)h(here;)g(see)g(belo)n(w)g
4992
(for)g(details.)396 1135 y Fv(Figur)o(e)g(3-1.)f(A)i(tr)o(ee)e(with)i
4993
(element)f(nodes,)h(data)e(nodes,)i(and)f(attrib)n(utes)396
4995
currentpoint currentpoint translate 1 1 scale neg exch neg exch translate
4996
396 3135 a @beginspecial 0 @llx 0 @lly 329 @urx
4997
218 @ury 3290 @rwi @setspecial
4998
%%BeginDocument: pic/node_term.ps
4999
%!PS-Adobe-2.0 EPSF-2.0
5000
%%Title: src/pic/node_term.fig
5001
%%Creator: fig2dev Version 3.2 Patchlevel 1
5002
%%CreationDate: Thu Jul 5 00:54:02 2001
5003
%%For: gerd@ice (Gerd Stolpmann)
5004
%%Orientation: Portrait
5005
%%BoundingBox: 0 0 329 218
5009
%%Magnification: 0.8000
5011
/$F2psDict 200 dict def
5013
$F2psDict /mtrx matrix put
5014
/col-1 {0 setgray} bind def
5015
/col0 {0.000 0.000 0.000 srgb} bind def
5016
/col1 {0.000 0.000 1.000 srgb} bind def
5017
/col2 {0.000 1.000 0.000 srgb} bind def
5018
/col3 {0.000 1.000 1.000 srgb} bind def
5019
/col4 {1.000 0.000 0.000 srgb} bind def
5020
/col5 {1.000 0.000 1.000 srgb} bind def
5021
/col6 {1.000 1.000 0.000 srgb} bind def
5022
/col7 {1.000 1.000 1.000 srgb} bind def
5023
/col8 {0.000 0.000 0.560 srgb} bind def
5024
/col9 {0.000 0.000 0.690 srgb} bind def
5025
/col10 {0.000 0.000 0.820 srgb} bind def
5026
/col11 {0.530 0.810 1.000 srgb} bind def
5027
/col12 {0.000 0.560 0.000 srgb} bind def
5028
/col13 {0.000 0.690 0.000 srgb} bind def
5029
/col14 {0.000 0.820 0.000 srgb} bind def
5030
/col15 {0.000 0.560 0.560 srgb} bind def
5031
/col16 {0.000 0.690 0.690 srgb} bind def
5032
/col17 {0.000 0.820 0.820 srgb} bind def
5033
/col18 {0.560 0.000 0.000 srgb} bind def
5034
/col19 {0.690 0.000 0.000 srgb} bind def
5035
/col20 {0.820 0.000 0.000 srgb} bind def
5036
/col21 {0.560 0.000 0.560 srgb} bind def
5037
/col22 {0.690 0.000 0.690 srgb} bind def
5038
/col23 {0.820 0.000 0.820 srgb} bind def
5039
/col24 {0.500 0.190 0.000 srgb} bind def
5040
/col25 {0.630 0.250 0.000 srgb} bind def
5041
/col26 {0.750 0.380 0.000 srgb} bind def
5042
/col27 {1.000 0.500 0.500 srgb} bind def
5043
/col28 {1.000 0.630 0.630 srgb} bind def
5044
/col29 {1.000 0.750 0.750 srgb} bind def
5045
/col30 {1.000 0.880 0.880 srgb} bind def
5046
/col31 {1.000 0.840 0.000 srgb} bind def
5050
-1.0 251.0 translate
5053
/cp {closepath} bind def
5054
/ef {eofill} bind def
5055
/gr {grestore} bind def
5056
/gs {gsave} bind def
5058
/rs {restore} bind def
5059
/l {lineto} bind def
5060
/m {moveto} bind def
5061
/rm {rmoveto} bind def
5062
/n {newpath} bind def
5063
/s {stroke} bind def
5065
/slc {setlinecap} bind def
5066
/slj {setlinejoin} bind def
5067
/slw {setlinewidth} bind def
5068
/srgb {setrgbcolor} bind def
5069
/rot {rotate} bind def
5070
/sc {scale} bind def
5071
/sd {setdash} bind def
5072
/ff {findfont} bind def
5073
/sf {setfont} bind def
5074
/scf {scalefont} bind def
5075
/sw {stringwidth} bind def
5076
/tr {translate} bind def
5077
/tnt {dup dup currentrgbcolor
5078
4 -2 roll dup 1 exch sub 3 -1 roll mul add
5079
4 -2 roll dup 1 exch sub 3 -1 roll mul add
5080
4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
5082
/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
5083
4 -2 roll mul srgb} bind def
5084
/reencdict 12 dict def /ReEncode { reencdict begin
5085
/newcodesandnames exch def /newfontname exch def /basefontname exch def
5086
/basefontdict basefontname findfont def /newfont basefontdict maxlength dict def
5087
basefontdict { exch dup /FID ne { dup /Encoding eq
5088
{ exch dup length array copy newfont 3 1 roll put }
5089
{ exch newfont 3 1 roll put } ifelse } { pop pop } ifelse } forall
5090
newfont /FontName newfontname put newcodesandnames aload pop
5091
128 1 255 { newfont /Encoding get exch /.notdef put } for
5092
newcodesandnames length 2 idiv { newfont /Encoding get 3 1 roll put } repeat
5093
newfontname newfont definefont pop end } def
5095
8#200 /grave 8#201 /acute 8#202 /circumflex 8#203 /tilde
5096
8#204 /macron 8#205 /breve 8#206 /dotaccent 8#207 /dieresis
5097
8#210 /ring 8#211 /cedilla 8#212 /hungarumlaut 8#213 /ogonek 8#214 /caron
5098
8#220 /dotlessi 8#230 /oe 8#231 /OE
5099
8#240 /space 8#241 /exclamdown 8#242 /cent 8#243 /sterling
5100
8#244 /currency 8#245 /yen 8#246 /brokenbar 8#247 /section 8#250 /dieresis
5101
8#251 /copyright 8#252 /ordfeminine 8#253 /guillemotleft 8#254 /logicalnot
5102
8#255 /endash 8#256 /registered 8#257 /macron 8#260 /degree 8#261 /plusminus
5103
8#262 /twosuperior 8#263 /threesuperior 8#264 /acute 8#265 /mu 8#266 /paragraph
5104
8#267 /periodcentered 8#270 /cedilla 8#271 /onesuperior 8#272 /ordmasculine
5105
8#273 /guillemotright 8#274 /onequarter 8#275 /onehalf
5106
8#276 /threequarters 8#277 /questiondown 8#300 /Agrave 8#301 /Aacute
5107
8#302 /Acircumflex 8#303 /Atilde 8#304 /Adieresis 8#305 /Aring
5108
8#306 /AE 8#307 /Ccedilla 8#310 /Egrave 8#311 /Eacute
5109
8#312 /Ecircumflex 8#313 /Edieresis 8#314 /Igrave 8#315 /Iacute
5110
8#316 /Icircumflex 8#317 /Idieresis 8#320 /Eth 8#321 /Ntilde 8#322 /Ograve
5111
8#323 /Oacute 8#324 /Ocircumflex 8#325 /Otilde 8#326 /Odieresis 8#327 /multiply
5112
8#330 /Oslash 8#331 /Ugrave 8#332 /Uacute 8#333 /Ucircumflex
5113
8#334 /Udieresis 8#335 /Yacute 8#336 /Thorn 8#337 /germandbls 8#340 /agrave
5114
8#341 /aacute 8#342 /acircumflex 8#343 /atilde 8#344 /adieresis 8#345 /aring
5115
8#346 /ae 8#347 /ccedilla 8#350 /egrave 8#351 /eacute
5116
8#352 /ecircumflex 8#353 /edieresis 8#354 /igrave 8#355 /iacute
5117
8#356 /icircumflex 8#357 /idieresis 8#360 /eth 8#361 /ntilde 8#362 /ograve
5118
8#363 /oacute 8#364 /ocircumflex 8#365 /otilde 8#366 /odieresis 8#367 /divide
5119
8#370 /oslash 8#371 /ugrave 8#372 /uacute 8#373 /ucircumflex
5120
8#374 /udieresis 8#375 /yacute 8#376 /thorn 8#377 /ydieresis] def
5121
/Helvetica-Bold /Helvetica-Bold-iso isovec ReEncode
5122
/Helvetica /Helvetica-iso isovec ReEncode
5123
/Helvetica-Oblique /Helvetica-Oblique-iso isovec ReEncode
5126
/startangle exch def
5131
/savematrix mtrx currentmatrix def
5132
x y tr xrad yrad sc 0 0 1 startangle endangle arc
5134
savematrix setmatrix
5137
/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
5138
/$F2psEnd {$F2psEnteredState restore end} def
5143
n -1000 5962 m -1000 -1000 l 7537 -1000 l 7537 5962 l cp clip
5147
n 1770 2700 m 1665 2700 1665 3045 105 arcto 4 {pop} repeat
5148
1665 3150 2730 3150 105 arcto 4 {pop} repeat
5149
2835 3150 2835 2805 105 arcto 4 {pop} repeat
5150
2835 2700 1770 2700 105 arcto 4 {pop} repeat
5151
cp gs col7 0.75 shd ef gr gs col0 s gr
5153
n 2250 1125 225 225 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr
5156
n 1575 2025 225 225 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr
5159
n 2925 2025 225 225 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr
5162
n 900 2925 242 242 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr
5165
n 420 3825 m 315 3825 315 4170 105 arcto 4 {pop} repeat
5166
315 4275 1380 4275 105 arcto 4 {pop} repeat
5167
1485 4275 1485 3930 105 arcto 4 {pop} repeat
5168
1485 3825 420 3825 105 arcto 4 {pop} repeat
5169
cp gs col7 0.75 shd ef gr gs col0 s gr
5171
n 2085 1275 m 1582 1807 l gs col0 s gr
5173
n 2407 1297 m 2940 1800 l gs col0 s gr
5175
n 1417 2190 m 900 2692 l gs col0 s gr
5177
n 1740 2190 m 2257 2700 l gs col0 s gr
5179
n 892 3180 m 892 3825 l gs col0 s gr
5181
n 45 675 m 6525 675 l 6525 4950 l 45 4950 l cp gs col0 s gr
5183
n 2250 3600 m 2263 3597 l 2277 3594 l 2293 3592 l 2309 3589 l 2326 3586 l
5184
2344 3583 l 2362 3580 l 2381 3578 l 2399 3575 l 2418 3572 l
5185
2436 3569 l 2454 3566 l 2471 3563 l 2488 3561 l 2504 3558 l
5186
2520 3555 l 2537 3552 l 2555 3548 l 2571 3545 l 2588 3541 l
5187
2604 3537 l 2621 3533 l 2637 3528 l 2653 3524 l 2669 3520 l
5188
2684 3517 l 2700 3514 l 2715 3512 l 2730 3510 l 2745 3510 l
5189
2762 3511 l 2777 3512 l 2793 3514 l 2807 3517 l 2821 3520 l
5190
2835 3524 l 2849 3528 l 2863 3532 l 2877 3537 l 2893 3542 l
5191
2908 3548 l 2925 3555 l 2938 3561 l 2951 3568 l 2965 3575 l
5192
2978 3584 l 2992 3593 l 3007 3602 l 3021 3612 l 3035 3623 l
5193
3050 3633 l 3064 3643 l 3079 3652 l 3093 3661 l 3108 3670 l
5194
3122 3677 l 3136 3684 l 3150 3690 l 3166 3696 l 3182 3701 l
5195
3198 3706 l 3214 3710 l 3230 3713 l 3246 3716 l 3263 3719 l
5196
3279 3721 l 3295 3724 l 3311 3726 l 3327 3729 l 3343 3731 l
5197
3359 3733 l 3375 3735 l 3391 3736 l 3407 3737 l 3423 3738 l
5198
3439 3738 l 3455 3738 l 3471 3738 l 3488 3737 l 3504 3737 l
5199
3520 3736 l 3536 3736 l 3552 3735 l 3568 3735 l 3584 3735 l
5200
3600 3735 l 3616 3735 l 3632 3735 l 3648 3734 l 3663 3734 l
5201
3678 3733 l 3693 3732 l 3708 3731 l 3723 3730 l 3739 3729 l
5202
3755 3729 l 3771 3729 l 3788 3730 l 3806 3732 l 3825 3735 l
5203
3840 3738 l 3856 3741 l 3874 3745 l 3892 3749 l 3911 3753 l
5204
3931 3757 l 3951 3762 l 3972 3767 l 3993 3772 l 4014 3777 l
5205
4034 3782 l 4054 3787 l 4072 3793 l 4089 3799 l 4105 3805 l
5206
4119 3811 l 4130 3818 l 4140 3825 l 4150 3835 l 4157 3846 l
5207
4161 3858 l 4163 3870 l 4164 3883 l 4163 3897 l 4161 3911 l
5208
4159 3925 l 4156 3939 l 4154 3952 l 4151 3966 l 4148 3979 l
5209
4144 3992 l 4140 4005 l 4135 4018 l 4128 4031 l 4121 4045 l
5210
4112 4058 l 4104 4073 l 4095 4087 l 4085 4101 l 4075 4116 l
5211
4065 4129 l 4055 4143 l 4043 4155 l 4032 4166 l 4019 4176 l
5212
4005 4185 l 3992 4192 l 3978 4197 l 3963 4202 l 3947 4206 l
5213
3930 4210 l 3913 4213 l 3896 4216 l 3878 4218 l 3861 4220 l
5214
3843 4222 l 3825 4224 l 3807 4226 l 3789 4228 l 3771 4229 l
5215
3753 4230 l 3735 4230 l 3717 4230 l 3698 4228 l 3678 4226 l
5216
3659 4224 l 3639 4220 l 3619 4216 l 3598 4212 l 3578 4208 l
5217
3557 4203 l 3536 4199 l 3516 4195 l 3496 4191 l 3477 4189 l
5218
3457 4187 l 3438 4185 l 3420 4185 l 3402 4185 l 3384 4186 l
5219
3367 4188 l 3350 4190 l 3333 4193 l 3317 4196 l 3301 4200 l
5220
3285 4203 l 3269 4207 l 3253 4211 l 3237 4214 l 3220 4218 l
5221
3203 4221 l 3186 4224 l 3168 4227 l 3150 4230 l 3132 4233 l
5222
3113 4236 l 3094 4239 l 3074 4242 l 3055 4246 l 3035 4249 l
5223
3015 4253 l 2995 4257 l 2974 4260 l 2954 4264 l 2934 4267 l
5224
2914 4270 l 2894 4272 l 2874 4274 l 2855 4275 l 2835 4275 l
5225
2815 4275 l 2795 4274 l 2775 4272 l 2755 4270 l 2734 4268 l
5226
2713 4265 l 2692 4262 l 2671 4259 l 2650 4256 l 2630 4252 l
5227
2609 4249 l 2590 4245 l 2571 4242 l 2553 4238 l 2536 4234 l
5228
2520 4230 l 2503 4225 l 2487 4219 l 2473 4213 l 2460 4207 l
5229
2448 4200 l 2437 4192 l 2426 4185 l 2415 4178 l 2404 4170 l
5230
2393 4163 l 2380 4157 l 2368 4151 l 2354 4145 l 2340 4140 l
5231
2325 4135 l 2310 4131 l 2294 4128 l 2277 4125 l 2260 4122 l
5232
2243 4120 l 2225 4118 l 2208 4115 l 2191 4113 l 2174 4110 l
5233
2158 4107 l 2143 4104 l 2128 4100 l 2115 4095 l 2101 4089 l
5234
2087 4083 l 2074 4076 l 2061 4070 l 2049 4063 l 2037 4056 l
5235
2025 4049 l 2014 4042 l 2004 4034 l 1995 4025 l 1987 4016 l
5236
1980 4005 l 1975 3993 l 1972 3980 l 1971 3965 l 1970 3949 l
5237
1971 3932 l 1972 3915 l 1973 3898 l 1974 3881 l 1976 3865 l
5238
1977 3850 l 1978 3837 l 1980 3825 l 1983 3812 l 1986 3801 l
5239
1990 3792 l 1994 3784 l 1998 3776 l 2003 3768 l 2008 3761 l
5240
2013 3752 l 2019 3744 l 2025 3735 l 2032 3726 l 2040 3717 l
5241
2048 3707 l 2057 3698 l 2066 3688 l 2075 3678 l 2084 3669 l
5242
2094 3660 l 2104 3652 l 2115 3645 l 2127 3639 l 2138 3633 l
5243
2150 3628 l 2162 3624 l 2174 3620 l 2186 3617 l 2200 3613 l
5244
2214 3609 l 2231 3604 l cp gs col0 s gr
5246
n 3645 1080 m 3660 1077 l 3677 1074 l 3694 1071 l 3713 1068 l 3733 1065 l
5247
3754 1063 l 3775 1060 l 3798 1058 l 3820 1056 l 3843 1053 l
5248
3866 1051 l 3889 1049 l 3912 1047 l 3934 1045 l 3955 1043 l
5249
3976 1041 l 3996 1039 l 4015 1038 l 4033 1036 l 4050 1035 l
5250
4071 1034 l 4090 1033 l 4109 1032 l 4127 1032 l 4144 1031 l
5251
4161 1031 l 4177 1031 l 4193 1031 l 4209 1031 l 4225 1031 l
5252
4241 1031 l 4257 1032 l 4273 1032 l 4289 1033 l 4304 1034 l
5253
4320 1035 l 4337 1037 l 4354 1039 l 4371 1041 l 4387 1044 l
5254
4403 1047 l 4419 1050 l 4435 1053 l 4450 1057 l 4466 1060 l
5255
4481 1063 l 4497 1067 l 4513 1071 l 4529 1075 l 4545 1080 l
5256
4561 1085 l 4577 1091 l 4592 1097 l 4607 1103 l 4622 1110 l
5257
4637 1118 l 4651 1125 l 4666 1132 l 4681 1140 l 4697 1147 l
5258
4713 1153 l 4731 1159 l 4750 1165 l 4770 1170 l 4787 1174 l
5259
4804 1177 l 4823 1180 l 4842 1182 l 4863 1184 l 4884 1186 l
5260
4906 1188 l 4928 1189 l 4950 1190 l 4972 1192 l 4994 1193 l
5261
5016 1195 l 5037 1197 l 5058 1200 l 5077 1203 l 5096 1206 l
5262
5113 1210 l 5130 1215 l 5148 1221 l 5165 1228 l 5181 1235 l
5263
5197 1242 l 5212 1250 l 5228 1259 l 5243 1267 l 5257 1276 l
5264
5272 1285 l 5286 1294 l 5299 1303 l 5312 1312 l 5324 1322 l
5265
5336 1331 l 5346 1340 l 5355 1350 l 5365 1363 l 5373 1378 l
5266
5380 1392 l 5386 1408 l 5390 1424 l 5394 1440 l 5398 1456 l
5267
5401 1472 l 5402 1488 l 5403 1502 l 5403 1517 l 5400 1530 l
5268
5395 1543 l 5389 1555 l 5381 1568 l 5372 1580 l 5363 1592 l
5269
5354 1604 l 5343 1616 l 5331 1627 l 5318 1638 l 5303 1648 l
5270
5286 1657 l 5265 1665 l 5251 1669 l 5235 1673 l 5219 1677 l
5271
5201 1680 l 5182 1683 l 5162 1685 l 5141 1688 l 5119 1690 l
5272
5097 1692 l 5075 1694 l 5053 1696 l 5030 1697 l 5008 1699 l
5273
4986 1701 l 4964 1703 l 4943 1704 l 4921 1706 l 4901 1707 l
5274
4880 1709 l 4860 1710 l 4840 1711 l 4819 1712 l 4799 1713 l
5275
4779 1713 l 4758 1713 l 4738 1714 l 4717 1714 l 4697 1714 l
5276
4676 1714 l 4655 1714 l 4635 1714 l 4614 1714 l 4594 1714 l
5277
4573 1714 l 4553 1713 l 4533 1713 l 4513 1713 l 4494 1712 l
5278
4474 1711 l 4455 1710 l 4434 1709 l 4413 1707 l 4392 1705 l
5279
4372 1703 l 4351 1701 l 4331 1698 l 4311 1695 l 4291 1692 l
5280
4271 1690 l 4251 1687 l 4231 1684 l 4211 1681 l 4191 1678 l
5281
4172 1675 l 4152 1673 l 4133 1670 l 4114 1668 l 4095 1665 l
5282
4074 1662 l 4053 1659 l 4033 1657 l 4012 1654 l 3992 1651 l
5283
3972 1648 l 3951 1645 l 3931 1643 l 3911 1640 l 3891 1637 l
5284
3872 1634 l 3852 1631 l 3833 1628 l 3815 1626 l 3797 1623 l
5285
3780 1620 l 3761 1617 l 3743 1614 l 3725 1611 l 3708 1608 l
5286
3692 1605 l 3675 1602 l 3659 1600 l 3643 1597 l 3627 1594 l
5287
3612 1591 l 3597 1587 l 3582 1584 l 3568 1580 l 3555 1575 l
5288
3541 1569 l 3527 1563 l 3514 1556 l 3501 1550 l 3489 1543 l
5289
3477 1536 l 3465 1529 l 3454 1522 l 3444 1514 l 3435 1505 l
5290
3427 1496 l 3420 1485 l 3415 1473 l 3412 1460 l 3411 1445 l
5291
3410 1430 l 3411 1414 l 3412 1397 l 3413 1380 l 3414 1364 l
5292
3416 1348 l 3417 1333 l 3418 1318 l 3420 1305 l 3423 1290 l
5293
3425 1275 l 3428 1261 l 3431 1247 l 3434 1233 l 3437 1220 l
5294
3442 1207 l 3447 1194 l 3455 1182 l 3465 1170 l 3474 1162 l
5295
3483 1155 l 3493 1148 l 3504 1141 l 3515 1134 l 3526 1127 l
5296
3538 1121 l 3550 1114 l 3563 1108 l 3577 1102 l 3591 1096 l
5297
3607 1090 l 3625 1085 l cp gs col0 s gr
5299
n 2475 1215 m 2477 1217 l 2482 1221 l 2491 1229 l 2503 1239 l 2517 1252 l
5300
2534 1267 l 2552 1282 l 2570 1296 l 2588 1310 l 2605 1322 l
5301
2621 1332 l 2638 1342 l 2655 1350 l 2669 1356 l 2684 1362 l
5302
2700 1368 l 2717 1374 l 2734 1380 l 2752 1386 l 2770 1392 l
5303
2789 1398 l 2808 1403 l 2827 1409 l 2846 1415 l 2865 1420 l
5304
2884 1425 l 2902 1429 l 2920 1433 l 2937 1436 l 2954 1438 l
5305
2970 1440 l 2988 1441 l 3006 1441 l 3024 1440 l 3041 1439 l
5306
3059 1437 l 3076 1434 l 3094 1431 l 3111 1428 l 3129 1425 l
5307
3146 1421 l 3162 1417 l 3179 1414 l 3195 1409 l 3211 1405 l
5308
3226 1400 l 3240 1395 l 3256 1388 l 3271 1380 l 3287 1370 l
5309
3304 1358 l 3322 1344 l 3340 1329 l 3359 1314 l 3376 1299 l
5310
3391 1286 l 3404 1275 l 3412 1267 l 3418 1262 l 3420 1260 l gs col0 s gr
5312
n 1125 3060 m 1126 3063 l 1127 3068 l 1129 3078 l 1132 3093 l 1136 3112 l
5313
1141 3135 l 1146 3162 l 1153 3190 l 1159 3219 l 1166 3248 l
5314
1173 3275 l 1180 3301 l 1187 3324 l 1193 3345 l 1200 3364 l
5315
1207 3381 l 1215 3397 l 1224 3414 l 1234 3429 l 1245 3444 l
5316
1256 3459 l 1267 3473 l 1279 3486 l 1291 3499 l 1304 3512 l
5317
1316 3525 l 1329 3537 l 1342 3550 l 1355 3562 l 1368 3574 l
5318
1382 3585 l 1396 3596 l 1410 3607 l 1425 3617 l 1441 3626 l
5319
1457 3635 l 1473 3644 l 1490 3653 l 1507 3661 l 1524 3669 l
5320
1542 3677 l 1559 3685 l 1577 3692 l 1595 3700 l 1613 3706 l
5321
1631 3713 l 1649 3718 l 1668 3723 l 1687 3727 l 1704 3730 l
5322
1723 3732 l 1743 3733 l 1764 3734 l 1788 3734 l 1814 3733 l
5323
1841 3732 l 1869 3731 l 1898 3729 l 1926 3727 l 1952 3725 l
5324
1975 3724 l 1993 3722 l 2008 3721 l 2017 3721 l 2022 3720 l
5325
2025 3720 l gs col0 s gr
5326
/Helvetica-iso ff 180.00 scf sf
5328
gs 1 -1 sc (attributes:) col0 sh gr
5329
/Helvetica-iso ff 180.00 scf sf
5331
gs 1 -1 sc ("att" -> Value "apple") col0 sh gr
5332
/Helvetica-iso ff 180.00 scf sf
5334
gs 1 -1 sc (attributes:) col0 sh gr
5335
/Helvetica-Oblique-iso ff 180.00 scf sf
5337
gs 1 -1 sc (<a att="apple"><b><a att="orange">An orange</a>Cherries</b><c/></a>) col0 sh gr
5338
/Helvetica-iso ff 180.00 scf sf
5340
gs 1 -1 sc ("att" -> Value "orange") col0 sh gr
5341
/Helvetica-Bold-iso ff 180.00 scf sf
5343
gs 1 -1 sc ("Cherries") col0 sh gr
5344
/Helvetica-Bold-iso ff 180.00 scf sf
5346
gs 1 -1 sc ("An orange") col0 sh gr
5347
/Helvetica-Bold-iso ff 180.00 scf sf
5349
gs 1 -1 sc (<a>) col0 sh gr
5350
/Helvetica-Bold-iso ff 180.00 scf sf
5352
gs 1 -1 sc (<b>) col0 sh gr
5353
/Helvetica-Bold-iso ff 180.00 scf sf
5355
gs 1 -1 sc (<c>) col0 sh gr
5356
/Helvetica-Bold-iso ff 180.00 scf sf
5358
gs 1 -1 sc (<a>) col0 sh gr
5363
@endspecial 396 3135 a
5364
currentpoint currentpoint translate 1 1 div 1 1 div scale neg exch
5366
396 3135 a 357 x Fw(Only)g(elements,)g(and)f
5367
(data)h(sections,)g(and)g(if)h(con\002gured,)c(processing)i
5368
(instructions)g(and)h(comments,)f(can)h(occur)f(in)396
5369
3600 y(the)h(document)e(tree.)h(It)h(is)g(impossible)f(to)h(add)f
5370
(entity)h(references)e(to)i(the)f(tree;)h(if)g(the)g(parser)f(\002nds)g
5371
(such)h(a)g(reference,)396 3708 y(not)g(the)g(reference)f(as)i(such)f
5372
(b)n(ut)g(the)g(referenced)e(te)o(xt)i(\(i.e.)g(the)g(tree)g
5373
(representing)f(the)h(structured)f(te)o(xt\))g(is)i(included)396
5374
3816 y(into)f(the)g(tree.)396 3965 y(Note)g(that)h(the)f(parser)f
5375
(collapses)i(as)g(much)e(data)h(material)g(into)g(one)f(data)h(node)f
5376
(as)i(possible)f(such)g(that)g(there)g(are)396 4073 y(normally)f(ne)n
5377
(v)o(er)g(tw)o(o)h(adjacent)f(data)i(nodes.)e(This)h(in)m(v)n(ariant)f
5378
(is)i(enforced)d(e)n(v)o(en)h(if)i(data)f(material)f(is)j(included)c
5379
(by)396 4181 y(entity)i(references)f(or)h(CD)m(A)-9 b(T)h(A)20
5380
b(sections,)g(or)g(if)h(a)f(data)g(sequence)f(is)j(interrupted)c(by)h
5381
(comments.)g(So)i Fr(a)44 b(&)g(b)396 4289 y Fp(<)p
5382
Fr(-)h(comment)e(-)p Fp(>)i Fr(c)f Fp(<)p Fr(![CDATA[)g
5383
Fp(<>)g Fr(d]])p Fp(>)20 b Fw(is)h(represented)d(by)i(only)g(one)f
5384
(data)h(node,)f(for)h(instance.)396 4397 y(Ho)n(we)n(v)o(er)m(,)e(you)i
5385
(can)g(create)g(document)e(trees)i(manually)f(which)h(break)f(this)i
5386
(in)m(v)n(ariant;)d(it)j(is)g(only)f(the)g(w)o(ay)g(the)396
5387
4505 y(parser)g(forms)f(the)h(tree.)396 4654 y(The)g(attrib)n(utes)g
5388
(of)g(elements)g(are)g(not)g(part)g(of)g(the)g(document)e(tree,)i(i.e.)
5389
g(the)h Fr(sub_nodes)e Fw(method)g(ne)n(v)o(er)f(returns)396
5390
4762 y(attrib)n(ute)i(nodes.)f(Normally)-5 b(,)19 b(attrib)n(utes)h
5391
(are)g(not)g(represented)e(as)j(nodes,)e(b)n(ut)h(as)h(pairs)f
5392
Fr(string)44 b(*)h(att_value)19 b Fw(of)396 4870 y(names)h(and)g(v)n
5393
(alues.)f(Here,)h Fr(att_value)f Fw(is)j(a)e(con)m(v)o(entional)d(v)n
5394
(ariant)i(type.)h(There)f(are)h(lots)h(of)f(access)h(methods)e(for)p
5395
Black 3800 5278 a Fs(50)p Black eop
5397
51 50 bop Black 2225 67 a Fs(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr)
5398
m(esenting)g(the)g(document)p Black 396 579 a Fw(attrib)n(utes,)g(see)h
5399
(belo)n(w.)e(It)i(is)g(optionally)d(possible)i(to)h(wrap)e(the)h
5400
(attrib)n(utes)h(as)g(nodes)e(\(method)396 687 y Fr
5401
(attributes_as_nodes)p Fw(\),)e(b)n(ut)j(e)n(v)o(en)g(in)g(this)h(case)
5402
f(the)h(attrib)n(utes)f(are)g(outside)f(the)i(re)o(gular)d(document)g
5403
(tree.)396 836 y(Normally)-5 b(,)19 b(the)h(processing)f(instructions)g
5404
(are)h(also)g(not)g(included)f(into)h(the)g(document)e(tree.)i(The)o(y)
5405
f(are)i(considered)396 944 y(as)g(an)f(e)o(xtra)g(property)e(of)i(the)g
5406
(element)g(containing)e(them,)h(and)h(can)g(be)g(retrie)n(v)o(ed)f(by)g
5407
(the)i Fr(pinstr)e Fw(method)g(of)h(the)396 1052 y(element)g(node.)f
5408
(If)h(this)h(w)o(ay)f(of)g(handling)e(processing)h(instructions)g(is)i
5409
(not)f(e)o(xact)g(enough,)e(the)i(parser)f(can)396 1160
5410
y(optionally)g(create)h(processing)f(instruction)f(nodes)i(that)g(are)g
5411
(re)o(gular)f(members)g(of)h(the)g(document)e(tree.)396
5412
1393 y Fv(Figur)o(e)i(3-2.)f(Nodes)h(ar)o(e)g(doubly)g(link)o(ed)i(tr)o
5414
currentpoint currentpoint translate 1 1 scale neg exch neg exch translate
5415
396 2350 a @beginspecial 0 @llx 0 @lly
5416
283 @urx 93 @ury 2830 @rwi @setspecial
5417
%%BeginDocument: pic/node_general.ps
5418
%!PS-Adobe-2.0 EPSF-2.0
5419
%%Title: src/pic/node_general.fig
5420
%%Creator: fig2dev Version 3.2 Patchlevel 1
5421
%%CreationDate: Thu Jul 5 00:54:02 2001
5422
%%For: gerd@ice (Gerd Stolpmann)
5423
%%Orientation: Portrait
5424
%%BoundingBox: 0 0 283 93
5428
%%Magnification: 0.8000
5430
/$F2psDict 200 dict def
5432
$F2psDict /mtrx matrix put
5433
/col-1 {0 setgray} bind def
5434
/col0 {0.000 0.000 0.000 srgb} bind def
5435
/col1 {0.000 0.000 1.000 srgb} bind def
5436
/col2 {0.000 1.000 0.000 srgb} bind def
5437
/col3 {0.000 1.000 1.000 srgb} bind def
5438
/col4 {1.000 0.000 0.000 srgb} bind def
5439
/col5 {1.000 0.000 1.000 srgb} bind def
5440
/col6 {1.000 1.000 0.000 srgb} bind def
5441
/col7 {1.000 1.000 1.000 srgb} bind def
5442
/col8 {0.000 0.000 0.560 srgb} bind def
5443
/col9 {0.000 0.000 0.690 srgb} bind def
5444
/col10 {0.000 0.000 0.820 srgb} bind def
5445
/col11 {0.530 0.810 1.000 srgb} bind def
5446
/col12 {0.000 0.560 0.000 srgb} bind def
5447
/col13 {0.000 0.690 0.000 srgb} bind def
5448
/col14 {0.000 0.820 0.000 srgb} bind def
5449
/col15 {0.000 0.560 0.560 srgb} bind def
5450
/col16 {0.000 0.690 0.690 srgb} bind def
5451
/col17 {0.000 0.820 0.820 srgb} bind def
5452
/col18 {0.560 0.000 0.000 srgb} bind def
5453
/col19 {0.690 0.000 0.000 srgb} bind def
5454
/col20 {0.820 0.000 0.000 srgb} bind def
5455
/col21 {0.560 0.000 0.560 srgb} bind def
5456
/col22 {0.690 0.000 0.690 srgb} bind def
5457
/col23 {0.820 0.000 0.820 srgb} bind def
5458
/col24 {0.500 0.190 0.000 srgb} bind def
5459
/col25 {0.630 0.250 0.000 srgb} bind def
5460
/col26 {0.750 0.380 0.000 srgb} bind def
5461
/col27 {1.000 0.500 0.500 srgb} bind def
5462
/col28 {1.000 0.630 0.630 srgb} bind def
5463
/col29 {1.000 0.750 0.750 srgb} bind def
5464
/col30 {1.000 0.880 0.880 srgb} bind def
5465
/col31 {1.000 0.840 0.000 srgb} bind def
5469
-22.0 126.0 translate
5472
/cp {closepath} bind def
5473
/ef {eofill} bind def
5474
/gr {grestore} bind def
5475
/gs {gsave} bind def
5477
/rs {restore} bind def
5478
/l {lineto} bind def
5479
/m {moveto} bind def
5480
/rm {rmoveto} bind def
5481
/n {newpath} bind def
5482
/s {stroke} bind def
5484
/slc {setlinecap} bind def
5485
/slj {setlinejoin} bind def
5486
/slw {setlinewidth} bind def
5487
/srgb {setrgbcolor} bind def
5488
/rot {rotate} bind def
5489
/sc {scale} bind def
5490
/sd {setdash} bind def
5491
/ff {findfont} bind def
5492
/sf {setfont} bind def
5493
/scf {scalefont} bind def
5494
/sw {stringwidth} bind def
5495
/tr {translate} bind def
5496
/tnt {dup dup currentrgbcolor
5497
4 -2 roll dup 1 exch sub 3 -1 roll mul add
5498
4 -2 roll dup 1 exch sub 3 -1 roll mul add
5499
4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
5501
/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
5502
4 -2 roll mul srgb} bind def
5505
/startangle exch def
5510
/savematrix mtrx currentmatrix def
5511
x y tr xrad yrad sc 0 0 1 startangle endangle arc
5513
savematrix setmatrix
5516
/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
5517
/$F2psEnd {$F2psEnteredState restore end} def
5522
n -1000 3487 m -1000 -1000 l 7042 -1000 l 7042 3487 l cp clip
5526
n 3825 2025 229 229 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr
5529
n 4500 2025 225 225 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr
5532
n 3825 1125 225 225 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr
5535
n 3150 2025 225 225 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr
5539
3543 1345 m 3645 1275 l 3588 1385 l 3677 1284 l 3632 1244 l cp
5541
n 3180 1800 m 3645 1275 l gs col7 0.75 shd ef gr gs col0 s gr gr
5544
n 3543 1345 m 3645 1275 l 3588 1385 l 3565 1365 l 3543 1345 l cp gs col7 1.00 shd ef gr col0 s
5547
3184 1745 m 3082 1815 l 3139 1705 l 3050 1807 l 3095 1846 l cp
5549
n 3615 1207 m 3082 1815 l gs col7 0.75 shd ef gr gs col0 s gr gr
5552
n 3184 1745 m 3082 1815 l 3139 1705 l 3161 1725 l 3184 1745 l cp gs 0.00 setgray ef gr col0 s
5555
3825 1470 m 3855 1350 l 3885 1470 l 3885 1335 l 3825 1335 l cp
5557
n 3855 1792 m 3855 1350 l gs col7 0.75 shd ef gr gs col0 s gr gr
5560
n 3825 1470 m 3855 1350 l 3885 1470 l 3855 1470 l 3825 1470 l cp gs col7 1.00 shd ef gr col0 s
5563
3810 1687 m 3780 1807 l 3750 1687 l 3750 1822 l 3810 1822 l cp
5565
n 3780 1350 m 3780 1807 l gs col7 0.75 shd ef gr gs col0 s gr gr
5568
n 3810 1687 m 3780 1807 l 3750 1687 l 3780 1687 l 3810 1687 l cp gs 0.00 setgray ef gr col0 s
5571
4311 1750 m 4350 1867 l 4261 1782 l 4333 1896 l 4383 1864 l cp
5573
n 3990 1297 m 4350 1867 l gs col7 0.75 shd ef gr gs col0 s gr gr
5576
n 4311 1750 m 4350 1867 l 4261 1782 l 4286 1766 l 4311 1750 l cp gs 0.00 setgray ef gr col0 s
5579
4062 1353 m 4020 1237 l 4112 1320 l 4037 1208 l 3987 1241 l cp
5581
n 4402 1807 m 4020 1237 l gs col7 0.75 shd ef gr gs col0 s gr gr
5584
n 4062 1353 m 4020 1237 l 4112 1320 l 4087 1337 l 4062 1353 l cp gs col7 1.00 shd ef gr col0 s
5586
n 450 675 m 6030 675 l 6030 2475 l 450 2475 l cp gs col0 s gr
5587
/Courier ff 180.00 scf sf
5589
gs 1 -1 sc (x # sub_nodes = [y1;y2;y3]) col0 sh gr
5590
/Courier ff 180.00 scf sf
5592
gs 1 -1 sc (y1 # parent = x) col0 sh gr
5593
/Courier ff 180.00 scf sf
5595
gs 1 -1 sc (y2 # parent = x) col0 sh gr
5596
/Courier ff 180.00 scf sf
5598
gs 1 -1 sc (y3 # parent = x) col0 sh gr
5599
/Courier ff 180.00 scf sf
5601
gs 1 -1 sc (x) col0 sh gr
5602
/Courier ff 180.00 scf sf
5604
gs 1 -1 sc (y1) col0 sh gr
5605
/Courier ff 180.00 scf sf
5607
gs 1 -1 sc (y2) col0 sh gr
5608
/Courier ff 180.00 scf sf
5610
gs 1 -1 sc (y3) col0 sh gr
5615
@endspecial 396 2350 a
5616
currentpoint currentpoint translate 1 1 div 1 1 div scale neg exch
5618
396 2350 a 357 x Fw(The)e(node)f(tree)h(has)h
5619
(links)f(in)g(both)g(directions:)f(Ev)o(ery)g(node)g(has)h(a)h(link)f
5620
(to)g(its)i(parent)d(\(if)h(an)o(y\),)f(and)g(it)i(has)g(links)f(to)396
5621
2815 y(the)g(subnodes)f(\(see)i(\002gure)e Fs(Nodes)h(ar)m(e)h(doubly)d
5622
(link)o(ed)i(tr)m(ees)p Fw(\).)h(Ob)o(viously)-5 b(,)18
5623
b(this)i(doubly-link)o(ed)d(structure)396 2923 y(simpli\002es)k(the)f
5624
(na)n(vigation)e(in)j(the)f(tree;)g(b)n(ut)g(has)h(also)f(some)g
5625
(consequences)f(for)g(the)h(possible)g(operations)f(on)h(trees.)396
5626
3073 y(Because)h(e)n(v)o(ery)d(node)i(must)g(ha)n(v)o(e)f(at)i(most)f
5627
Fs(one)g Fw(parent)f(node,)g(operations)g(are)h(ille)o(gal)g(if)g(the)o
5628
(y)f(violate)h(this)396 3181 y(condition.)e(The)i(follo)n(wing)f
5629
(\002gure)g(\()p Fs(A)h(node)g(can)f(only)h(be)g(added)f(if)i(it)g(is)g
5630
(a)f(r)l(oot)q Fw(\))g(sho)n(ws)h(on)e(the)i(left)f(side)h(that)f(node)
5631
396 3289 y Fr(y)h Fw(is)g(added)e(to)h Fr(x)h Fw(as)g(ne)n(w)f(subnode)
5632
e(which)i(is)h(allo)n(wed)f(because)f Fr(y)i Fw(does)f(not)g(ha)n(v)o
5633
(e)f(a)i(parent)e(yet.)h(The)g(right)f(side)i(of)396
5634
3397 y(the)f(picture)g(illustrates)g(what)h(w)o(ould)e(happen)g(if)h
5635
Fr(y)h Fw(had)e(a)i(parent)e(node;)g(this)i(is)g(ille)o(gal)f(because)f
5636
Fr(y)i Fw(w)o(ould)e(ha)n(v)o(e)h(tw)o(o)396 3504 y(parents)g(after)g
5637
(the)g(operation.)p Black 3800 5278 a Fs(51)p Black eop
5639
52 51 bop Black 2225 67 a Fs(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr)
5640
m(esenting)g(the)g(document)p Black 396 579 a Fv(Figur)o(e)g(3-3.)f(A)i
5641
(node)f(can)g(only)g(be)h(added)g(if)f(it)h(is)g(a)f(r)o(oot)396
5643
currentpoint currentpoint translate 1 1 scale neg exch neg exch translate
5644
396 1820 a @beginspecial 0 @llx 0 @lly 422 @urx
5645
127 @ury 4220 @rwi @setspecial
5646
%%BeginDocument: pic/node_add.ps
5647
%!PS-Adobe-2.0 EPSF-2.0
5648
%%Title: src/pic/node_add.fig
5649
%%Creator: fig2dev Version 3.2 Patchlevel 1
5650
%%CreationDate: Thu Jul 5 00:54:02 2001
5651
%%For: gerd@ice (Gerd Stolpmann)
5652
%%Orientation: Portrait
5653
%%BoundingBox: 0 0 422 127
5657
%%Magnification: 0.8000
5659
/$F2psDict 200 dict def
5661
$F2psDict /mtrx matrix put
5662
/col-1 {0 setgray} bind def
5663
/col0 {0.000 0.000 0.000 srgb} bind def
5664
/col1 {0.000 0.000 1.000 srgb} bind def
5665
/col2 {0.000 1.000 0.000 srgb} bind def
5666
/col3 {0.000 1.000 1.000 srgb} bind def
5667
/col4 {1.000 0.000 0.000 srgb} bind def
5668
/col5 {1.000 0.000 1.000 srgb} bind def
5669
/col6 {1.000 1.000 0.000 srgb} bind def
5670
/col7 {1.000 1.000 1.000 srgb} bind def
5671
/col8 {0.000 0.000 0.560 srgb} bind def
5672
/col9 {0.000 0.000 0.690 srgb} bind def
5673
/col10 {0.000 0.000 0.820 srgb} bind def
5674
/col11 {0.530 0.810 1.000 srgb} bind def
5675
/col12 {0.000 0.560 0.000 srgb} bind def
5676
/col13 {0.000 0.690 0.000 srgb} bind def
5677
/col14 {0.000 0.820 0.000 srgb} bind def
5678
/col15 {0.000 0.560 0.560 srgb} bind def
5679
/col16 {0.000 0.690 0.690 srgb} bind def
5680
/col17 {0.000 0.820 0.820 srgb} bind def
5681
/col18 {0.560 0.000 0.000 srgb} bind def
5682
/col19 {0.690 0.000 0.000 srgb} bind def
5683
/col20 {0.820 0.000 0.000 srgb} bind def
5684
/col21 {0.560 0.000 0.560 srgb} bind def
5685
/col22 {0.690 0.000 0.690 srgb} bind def
5686
/col23 {0.820 0.000 0.820 srgb} bind def
5687
/col24 {0.500 0.190 0.000 srgb} bind def
5688
/col25 {0.630 0.250 0.000 srgb} bind def
5689
/col26 {0.750 0.380 0.000 srgb} bind def
5690
/col27 {1.000 0.500 0.500 srgb} bind def
5691
/col28 {1.000 0.630 0.630 srgb} bind def
5692
/col29 {1.000 0.750 0.750 srgb} bind def
5693
/col30 {1.000 0.880 0.880 srgb} bind def
5694
/col31 {1.000 0.840 0.000 srgb} bind def
5698
-33.0 171.0 translate
5701
/cp {closepath} bind def
5702
/ef {eofill} bind def
5703
/gr {grestore} bind def
5704
/gs {gsave} bind def
5706
/rs {restore} bind def
5707
/l {lineto} bind def
5708
/m {moveto} bind def
5709
/rm {rmoveto} bind def
5710
/n {newpath} bind def
5711
/s {stroke} bind def
5713
/slc {setlinecap} bind def
5714
/slj {setlinejoin} bind def
5715
/slw {setlinewidth} bind def
5716
/srgb {setrgbcolor} bind def
5717
/rot {rotate} bind def
5718
/sc {scale} bind def
5719
/sd {setdash} bind def
5720
/ff {findfont} bind def
5721
/sf {setfont} bind def
5722
/scf {scalefont} bind def
5723
/sw {stringwidth} bind def
5724
/tr {translate} bind def
5725
/tnt {dup dup currentrgbcolor
5726
4 -2 roll dup 1 exch sub 3 -1 roll mul add
5727
4 -2 roll dup 1 exch sub 3 -1 roll mul add
5728
4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
5730
/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
5731
4 -2 roll mul srgb} bind def
5734
/startangle exch def
5739
/savematrix mtrx currentmatrix def
5740
x y tr xrad yrad sc 0 0 1 startangle endangle arc
5742
savematrix setmatrix
5745
/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
5746
/$F2psEnd {$F2psEnteredState restore end} def
5751
n -1000 4387 m -1000 -1000 l 10012 -1000 l 10012 4387 l cp clip
5755
n 6141 1350 242 229 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr
5758
n 6141 2250 242 229 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr
5761
n 5426 2250 242 229 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr
5764
n 6856 2250 242 229 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr
5767
n 7571 2925 242 229 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr
5770
n 8524 2925 242 229 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr
5773
n 8047 2250 242 229 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr
5776
n 1866 1350 242 229 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr
5779
n 1866 2250 242 229 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr
5782
n 1151 2250 242 229 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr
5785
n 2581 2250 242 229 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr
5788
n 3296 2925 242 229 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr
5791
n 4249 2925 242 229 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr
5794
n 3772 2250 242 229 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr
5797
n 8325 1350 242 229 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr
5801
5507 1945 m 5402 2017 l 5460 1904 l 5369 2008 l 5415 2049 l cp
5803
n 5910 1440 m 5402 2017 l gs col7 0.75 shd ef gr gs col0 s gr gr
5806
n 5507 1945 m 5402 2017 l 5460 1904 l 5484 1924 l 5507 1945 l cp gs 0.00 setgray ef gr col0 s
5809
6134 1902 m 6101 2025 l 6072 1901 l 6070 2039 l 6132 2041 l cp
5811
n 6109 1590 m 6101 2025 l gs col7 0.75 shd ef gr gs col0 s gr gr
5814
n 6134 1902 m 6101 2025 l 6072 1901 l 6103 1901 l 6134 1902 l cp gs 0.00 setgray ef gr col0 s
5817
6649 1952 m 6697 2070 l 6599 1989 l 6681 2100 l 6731 2064 l cp
5819
n 6307 1537 m 6697 2070 l gs col7 0.75 shd ef gr gs col0 s gr gr
5822
n 6649 1952 m 6697 2070 l 6599 1989 l 6624 1970 l 6649 1952 l cp gs 0.00 setgray ef gr col0 s
5825
7696 2606 m 7602 2692 l 7645 2572 l 7568 2687 l 7619 2722 l cp
5827
n 7832 2347 m 7602 2692 l gs col7 0.75 shd ef gr gs col0 s gr gr
5830
n 7696 2606 m 7602 2692 l 7645 2572 l 7671 2589 l 7696 2606 l cp gs 0.00 setgray ef gr col0 s
5833
8306 2632 m 8349 2752 l 8255 2666 l 8332 2782 l 8383 2747 l cp
5835
n 8150 2452 m 8349 2752 l gs col7 0.75 shd ef gr gs col0 s gr gr
5838
n 8306 2632 m 8349 2752 l 8255 2666 l 8281 2649 l 8306 2632 l cp gs 0.00 setgray ef gr col0 s
5841
5853 1564 m 5958 1492 l 5899 1605 l 5991 1501 l 5945 1460 l cp
5843
n 5490 2017 m 5958 1492 l gs col7 0.75 shd ef gr gs col0 s gr gr
5846
n 5853 1564 m 5958 1492 l 5899 1605 l 5876 1584 l 5853 1564 l cp gs col7 1.00 shd ef gr col0 s
5849
6140 1698 m 6173 1575 l 6201 1699 l 6204 1561 l 6142 1559 l cp
5851
n 6164 2010 m 6173 1575 l gs col7 0.75 shd ef gr gs col0 s gr gr
5854
n 6140 1698 m 6173 1575 l 6201 1699 l 6170 1699 l 6140 1698 l cp gs col7 1.00 shd ef gr col0 s
5857
6404 1588 m 6355 1470 l 6454 1551 l 6371 1440 l 6321 1476 l cp
5859
n 6768 2025 m 6355 1470 l gs col7 0.75 shd ef gr gs col0 s gr gr
5862
n 6404 1588 m 6355 1470 l 6454 1551 l 6429 1569 l 6404 1588 l cp gs col7 1.00 shd ef gr col0 s
5865
7784 2499 m 7880 2415 l 7835 2534 l 7914 2420 l 7863 2385 l cp
5867
n 7673 2715 m 7880 2415 l gs col7 0.75 shd ef gr gs col0 s gr gr
5870
n 7784 2499 m 7880 2415 l 7835 2534 l 7810 2517 l 7784 2499 l cp gs col7 1.00 shd ef gr col0 s
5873
8263 2535 m 8222 2415 l 8315 2502 l 8240 2386 l 8188 2419 l cp
5875
n 8412 2707 m 8222 2415 l gs col7 0.75 shd ef gr gs col0 s gr gr
5878
n 8263 2535 m 8222 2415 l 8315 2502 l 8289 2519 l 8263 2535 l cp gs col7 1.00 shd ef gr col0 s
5881
1232 1945 m 1127 2017 l 1185 1904 l 1094 2008 l 1140 2049 l cp
5883
n 1635 1440 m 1127 2017 l gs col7 0.75 shd ef gr gs col0 s gr gr
5886
n 1232 1945 m 1127 2017 l 1185 1904 l 1209 1924 l 1232 1945 l cp gs 0.00 setgray ef gr col0 s
5889
1859 1902 m 1826 2025 l 1797 1901 l 1795 2039 l 1857 2041 l cp
5891
n 1834 1590 m 1826 2025 l gs col7 0.75 shd ef gr gs col0 s gr gr
5894
n 1859 1902 m 1826 2025 l 1797 1901 l 1828 1902 l 1859 1902 l cp gs 0.00 setgray ef gr col0 s
5897
2374 1952 m 2422 2070 l 2324 1989 l 2406 2100 l 2456 2064 l cp
5899
n 2032 1537 m 2422 2070 l gs col7 0.75 shd ef gr gs col0 s gr gr
5902
n 2374 1952 m 2422 2070 l 2324 1989 l 2349 1970 l 2374 1952 l cp gs 0.00 setgray ef gr col0 s
5905
3421 2606 m 3327 2692 l 3370 2572 l 3293 2687 l 3344 2722 l cp
5907
n 3557 2347 m 3327 2692 l gs col7 0.75 shd ef gr gs col0 s gr gr
5910
n 3421 2606 m 3327 2692 l 3370 2572 l 3396 2589 l 3421 2606 l cp gs 0.00 setgray ef gr col0 s
5913
4031 2632 m 4074 2752 l 3980 2666 l 4057 2782 l 4108 2747 l cp
5915
n 3875 2452 m 4074 2752 l gs col7 0.75 shd ef gr gs col0 s gr gr
5918
n 4031 2632 m 4074 2752 l 3980 2666 l 4006 2649 l 4031 2632 l cp gs 0.00 setgray ef gr col0 s
5921
1578 1564 m 1683 1492 l 1624 1605 l 1716 1501 l 1670 1460 l cp
5923
n 1215 2017 m 1683 1492 l gs col7 0.75 shd ef gr gs col0 s gr gr
5926
n 1578 1564 m 1683 1492 l 1624 1605 l 1601 1584 l 1578 1564 l cp gs col7 1.00 shd ef gr col0 s
5929
1865 1698 m 1898 1575 l 1926 1699 l 1929 1561 l 1867 1559 l cp
5931
n 1889 2010 m 1898 1575 l gs col7 0.75 shd ef gr gs col0 s gr gr
5934
n 1865 1698 m 1898 1575 l 1926 1699 l 1895 1698 l 1865 1698 l cp gs col7 1.00 shd ef gr col0 s
5937
2129 1588 m 2080 1470 l 2179 1551 l 2096 1440 l 2046 1476 l cp
5939
n 2493 2025 m 2080 1470 l gs col7 0.75 shd ef gr gs col0 s gr gr
5942
n 2129 1588 m 2080 1470 l 2179 1551 l 2154 1569 l 2129 1588 l cp gs col7 1.00 shd ef gr col0 s
5945
3509 2499 m 3605 2415 l 3560 2534 l 3639 2420 l 3588 2385 l cp
5947
n 3398 2715 m 3605 2415 l gs col7 0.75 shd ef gr gs col0 s gr gr
5950
n 3509 2499 m 3605 2415 l 3560 2534 l 3535 2517 l 3509 2499 l cp gs col7 1.00 shd ef gr col0 s
5953
3988 2535 m 3947 2415 l 4040 2502 l 3965 2386 l 3913 2419 l cp
5955
n 4137 2707 m 3947 2415 l gs col7 0.75 shd ef gr gs col0 s gr gr
5958
n 3988 2535 m 3947 2415 l 4040 2502 l 4014 2519 l 3988 2535 l cp gs col7 1.00 shd ef gr col0 s
5961
n 6387 1372 m 8023 2017 l gs col7 0.75 shd ef gr gs col0 s gr [] 0 sd
5963
n 4950 900 m 9000 900 l 9000 3375 l 4950 3375 l cp gs col0 s gr
5966
n 2112 1372 m 3748 2017 l gs col7 0.75 shd ef gr gs col0 s gr [] 0 sd
5968
n 675 900 m 4725 900 l 4725 3375 l 675 3375 l cp gs col0 s gr
5971
8119 1904 m 8055 2010 l 8061 1886 l 8022 2016 l 8079 2033 l cp
5973
n 8197 1545 m 8055 2010 l gs col0 s gr gr
5976
n 8119 1904 m 8055 2010 l 8061 1886 l 8090 1895 l 8119 1904 l cp gs 0.00 setgray ef gr col0 s
5979
8214 1695 m 8280 1590 l 8271 1713 l 8313 1585 l 8256 1566 l cp
5981
n 8137 2025 m 8280 1590 l gs col0 s gr gr
5984
n 8214 1695 m 8280 1590 l 8271 1713 l 8243 1704 l 8214 1695 l cp gs col7 1.00 shd ef gr col0 s
5988
7687 2205 m 7502 2333 l 7594 2129 l 7410 2351 l 7503 2428 l cp
5990
n 7875 1500 m 7620 1965 l 7845 1920 l 7485 2355 l gs col0 s gr gr
5994
n 7687 2205 m 7502 2333 l 7594 2129 l 7618 2195 l 7687 2205 l cp gs 0.00 setgray ef gr col0 s
5995
/Courier-Bold ff 195.00 scf sf
5997
gs 1 -1 sc (x) col0 sh gr
5998
/Courier-Bold ff 195.00 scf sf
6000
gs 1 -1 sc (y) col0 sh gr
6001
/Courier-Bold ff 195.00 scf sf
6003
gs 1 -1 sc (x) col0 sh gr
6004
/Courier-Bold ff 195.00 scf sf
6006
gs 1 -1 sc (y) col0 sh gr
6007
/Courier ff 180.00 scf sf
6009
gs 1 -1 sc (x # append_node y) col0 sh gr
6010
/Courier ff 180.00 scf sf
6012
gs 1 -1 sc (x # append_node y) col0 sh gr
6017
@endspecial 396 1820 a
6018
currentpoint currentpoint translate 1 1 div 1 1 div scale neg exch
6020
396 1820 a 357 x Fw(The)g("remo)o(v)o(e")e
6021
(operation)g(simply)i(remo)o(v)o(es)f(the)h(links)g(between)g(tw)o(o)g
6022
(nodes.)f(In)h(the)g(picture)g(\()p Fs(A)g(r)m(emo)o(ved)g(node)396
6023
2285 y(becomes)g(the)g(r)l(oot)g(of)h(the)f(subtr)m(ee)p
6024
Fw(\))g(the)g(node)f Fr(x)i Fw(is)g(deleted)e(from)h(the)g(list)h(of)f
6025
(subnodes)f(of)h Fr(y)p Fw(.)g(After)g(that,)g Fr(x)396
6026
2393 y Fw(becomes)g(the)g(root)f(of)h(the)g(subtree)g(starting)g(at)g
6027
(this)h(node.)396 2625 y Fv(Figur)o(e)f(3-4.)f(A)i(r)o(emo)o(v)o(ed)e
6028
(node)i(becomes)f(the)g(r)o(oot)f(of)h(the)h(subtr)o(ee)396
6030
currentpoint currentpoint translate 1 1 scale neg exch neg exch translate
6031
396 3958 a @beginspecial 0 @llx 0 @lly 388 @urx
6032
138 @ury 3880 @rwi @setspecial
6033
%%BeginDocument: pic/node_delete.ps
6034
%!PS-Adobe-2.0 EPSF-2.0
6035
%%Title: src/pic/node_delete.fig
6036
%%Creator: fig2dev Version 3.2 Patchlevel 1
6037
%%CreationDate: Thu Jul 5 00:54:02 2001
6038
%%For: gerd@ice (Gerd Stolpmann)
6039
%%Orientation: Portrait
6040
%%BoundingBox: 0 0 388 138
6044
%%Magnification: 0.8000
6046
/$F2psDict 200 dict def
6048
$F2psDict /mtrx matrix put
6049
/col-1 {0 setgray} bind def
6050
/col0 {0.000 0.000 0.000 srgb} bind def
6051
/col1 {0.000 0.000 1.000 srgb} bind def
6052
/col2 {0.000 1.000 0.000 srgb} bind def
6053
/col3 {0.000 1.000 1.000 srgb} bind def
6054
/col4 {1.000 0.000 0.000 srgb} bind def
6055
/col5 {1.000 0.000 1.000 srgb} bind def
6056
/col6 {1.000 1.000 0.000 srgb} bind def
6057
/col7 {1.000 1.000 1.000 srgb} bind def
6058
/col8 {0.000 0.000 0.560 srgb} bind def
6059
/col9 {0.000 0.000 0.690 srgb} bind def
6060
/col10 {0.000 0.000 0.820 srgb} bind def
6061
/col11 {0.530 0.810 1.000 srgb} bind def
6062
/col12 {0.000 0.560 0.000 srgb} bind def
6063
/col13 {0.000 0.690 0.000 srgb} bind def
6064
/col14 {0.000 0.820 0.000 srgb} bind def
6065
/col15 {0.000 0.560 0.560 srgb} bind def
6066
/col16 {0.000 0.690 0.690 srgb} bind def
6067
/col17 {0.000 0.820 0.820 srgb} bind def
6068
/col18 {0.560 0.000 0.000 srgb} bind def
6069
/col19 {0.690 0.000 0.000 srgb} bind def
6070
/col20 {0.820 0.000 0.000 srgb} bind def
6071
/col21 {0.560 0.000 0.560 srgb} bind def
6072
/col22 {0.690 0.000 0.690 srgb} bind def
6073
/col23 {0.820 0.000 0.820 srgb} bind def
6074
/col24 {0.500 0.190 0.000 srgb} bind def
6075
/col25 {0.630 0.250 0.000 srgb} bind def
6076
/col26 {0.750 0.380 0.000 srgb} bind def
6077
/col27 {1.000 0.500 0.500 srgb} bind def
6078
/col28 {1.000 0.630 0.630 srgb} bind def
6079
/col29 {1.000 0.750 0.750 srgb} bind def
6080
/col30 {1.000 0.880 0.880 srgb} bind def
6081
/col31 {1.000 0.840 0.000 srgb} bind def
6085
-78.0 205.0 translate
6088
/cp {closepath} bind def
6089
/ef {eofill} bind def
6090
/gr {grestore} bind def
6091
/gs {gsave} bind def
6093
/rs {restore} bind def
6094
/l {lineto} bind def
6095
/m {moveto} bind def
6096
/rm {rmoveto} bind def
6097
/n {newpath} bind def
6098
/s {stroke} bind def
6100
/slc {setlinecap} bind def
6101
/slj {setlinejoin} bind def
6102
/slw {setlinewidth} bind def
6103
/srgb {setrgbcolor} bind def
6104
/rot {rotate} bind def
6105
/sc {scale} bind def
6106
/sd {setdash} bind def
6107
/ff {findfont} bind def
6108
/sf {setfont} bind def
6109
/scf {scalefont} bind def
6110
/sw {stringwidth} bind def
6111
/tr {translate} bind def
6112
/tnt {dup dup currentrgbcolor
6113
4 -2 roll dup 1 exch sub 3 -1 roll mul add
6114
4 -2 roll dup 1 exch sub 3 -1 roll mul add
6115
4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
6117
/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
6118
4 -2 roll mul srgb} bind def
6121
/startangle exch def
6126
/savematrix mtrx currentmatrix def
6127
x y tr xrad yrad sc 0 0 1 startangle endangle arc
6129
savematrix setmatrix
6132
/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
6133
/$F2psEnd {$F2psEnteredState restore end} def
6138
n -1000 5062 m -1000 -1000 l 10237 -1000 l 10237 5062 l cp clip
6142
n 2700 2700 229 229 0 360 DrawEllipse gs col7 0.50 shd ef gr gs col0 s gr
6145
n 2250 3600 229 229 0 360 DrawEllipse gs col7 0.50 shd ef gr gs col0 s gr
6148
n 3150 3600 229 229 0 360 DrawEllipse gs col7 0.50 shd ef gr gs col0 s gr
6152
2322 3272 m 2235 3360 l 2271 3242 l 2202 3358 l 2253 3388 l cp
6154
n 2535 2857 m 2235 3360 l gs col0 s gr gr
6157
n 2322 3272 m 2235 3360 l 2271 3242 l 2296 3257 l 2322 3272 l cp gs 0.00 setgray ef gr col0 s
6160
2978 3298 m 3000 3420 l 2924 3323 l 2979 3446 l 3034 3421 l cp
6162
n 2782 2932 m 3000 3420 l gs col0 s gr gr
6165
n 2978 3298 m 3000 3420 l 2924 3323 l 2951 3310 l 2978 3298 l cp gs 0.00 setgray ef gr col0 s
6168
2500 2998 m 2587 2910 l 2552 3029 l 2620 2912 l 2569 2882 l cp
6170
n 2317 3367 m 2587 2910 l gs col0 s gr gr
6173
n 2500 2998 m 2587 2910 l 2552 3029 l 2526 3013 l 2500 2998 l cp gs col7 1.00 shd ef gr col0 s
6176
2864 3009 m 2842 2887 l 2918 2984 l 2863 2861 l 2808 2886 l cp
6178
n 3060 3375 m 2842 2887 l gs col0 s gr gr
6181
n 2864 3009 m 2842 2887 l 2918 2984 l 2891 2997 l 2864 3009 l cp gs col7 1.00 shd ef gr col0 s
6183
n 2700 1800 229 229 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr
6186
n 2025 2700 229 229 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr
6189
n 3375 2700 229 229 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr
6192
n 6345 1800 229 229 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr
6195
n 5670 2700 229 229 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr
6198
n 7020 2700 229 229 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr
6201
n 8325 1800 229 229 0 360 DrawEllipse gs col7 0.50 shd ef gr gs col0 s gr
6204
n 7875 2700 229 229 0 360 DrawEllipse gs col7 0.50 shd ef gr gs col0 s gr
6207
n 8775 2700 229 229 0 360 DrawEllipse gs col7 0.50 shd ef gr gs col0 s gr
6211
2707 2152 m 2737 2032 l 2767 2152 l 2767 2017 l 2707 2017 l cp
6213
n 2737 2460 m 2737 2032 l gs col0 s gr gr
6216
n 2707 2152 m 2737 2032 l 2767 2152 l 2737 2152 l 2707 2152 l cp gs col7 1.00 shd ef gr col0 s
6219
2692 2347 m 2662 2467 l 2632 2347 l 2632 2482 l 2692 2482 l cp
6221
n 2662 2032 m 2662 2467 l gs col0 s gr gr
6224
n 2692 2347 m 2662 2467 l 2632 2347 l 2662 2347 l 2692 2347 l cp gs 0.00 setgray ef gr col0 s
6228
n 4050 2610 m 4725 2610 l gs col0 s gr
6230
n 4050 2745 m 4725 2745 l gs col0 s gr
6233
n 4500 2385 m 4950 2655 l 4500 2970 l gs col0 s gr
6239
2125 2394 m 2025 2467 l 2078 2355 l 1992 2459 l 2039 2498 l cp
6241
n 2490 1905 m 2025 2467 l gs col0 s gr gr
6244
n 2125 2394 m 2025 2467 l 2078 2355 l 2101 2375 l 2125 2394 l cp gs 0.00 setgray ef gr col0 s
6247
3158 2426 m 3202 2542 l 3109 2461 l 3186 2571 l 3235 2537 l cp
6249
n 2827 2002 m 3202 2542 l gs col0 s gr gr
6252
n 3158 2426 m 3202 2542 l 3109 2461 l 3134 2443 l 3158 2426 l cp gs 0.00 setgray ef gr col0 s
6255
2436 2039 m 2535 1965 l 2482 2077 l 2568 1972 l 2521 1934 l cp
6257
n 2115 2475 m 2535 1965 l gs col0 s gr gr
6260
n 2436 2039 m 2535 1965 l 2482 2077 l 2459 2058 l 2436 2039 l cp gs col7 1.00 shd ef gr col0 s
6263
2916 2073 m 2872 1957 l 2965 2038 l 2888 1928 l 2839 1962 l cp
6265
n 3255 2505 m 2872 1957 l gs col0 s gr gr
6268
n 2916 2073 m 2872 1957 l 2965 2038 l 2941 2055 l 2916 2073 l cp gs col7 1.00 shd ef gr col0 s
6271
5770 2394 m 5670 2467 l 5723 2355 l 5637 2459 l 5684 2498 l cp
6273
n 6135 1905 m 5670 2467 l gs col0 s gr gr
6276
n 5770 2394 m 5670 2467 l 5723 2355 l 5746 2375 l 5770 2394 l cp gs 0.00 setgray ef gr col0 s
6279
6803 2426 m 6847 2542 l 6754 2461 l 6831 2571 l 6880 2537 l cp
6281
n 6472 2002 m 6847 2542 l gs col0 s gr gr
6284
n 6803 2426 m 6847 2542 l 6754 2461 l 6779 2443 l 6803 2426 l cp gs 0.00 setgray ef gr col0 s
6287
6081 2039 m 6180 1965 l 6127 2077 l 6213 1972 l 6166 1934 l cp
6289
n 5760 2475 m 6180 1965 l gs col0 s gr gr
6292
n 6081 2039 m 6180 1965 l 6127 2077 l 6104 2058 l 6081 2039 l cp gs col7 1.00 shd ef gr col0 s
6295
6561 2073 m 6517 1957 l 6610 2038 l 6533 1928 l 6484 1962 l cp
6297
n 6900 2505 m 6517 1957 l gs col0 s gr gr
6300
n 6561 2073 m 6517 1957 l 6610 2038 l 6586 2055 l 6561 2073 l cp gs col7 1.00 shd ef gr col0 s
6303
7947 2372 m 7860 2460 l 7896 2342 l 7827 2458 l 7878 2488 l cp
6305
n 8160 1957 m 7860 2460 l gs col0 s gr gr
6308
n 7947 2372 m 7860 2460 l 7896 2342 l 7921 2357 l 7947 2372 l cp gs 0.00 setgray ef gr col0 s
6311
8603 2398 m 8625 2520 l 8549 2423 l 8604 2546 l 8659 2521 l cp
6313
n 8407 2032 m 8625 2520 l gs col0 s gr gr
6316
n 8603 2398 m 8625 2520 l 8549 2423 l 8576 2410 l 8603 2398 l cp gs 0.00 setgray ef gr col0 s
6319
8125 2098 m 8212 2010 l 8177 2129 l 8245 2012 l 8194 1982 l cp
6321
n 7942 2467 m 8212 2010 l gs col0 s gr gr
6324
n 8125 2098 m 8212 2010 l 8177 2129 l 8151 2113 l 8125 2098 l cp gs col7 1.00 shd ef gr col0 s
6327
8489 2109 m 8467 1987 l 8543 2084 l 8488 1961 l 8433 1986 l cp
6329
n 8685 2475 m 8467 1987 l gs col0 s gr gr
6332
n 8489 2109 m 8467 1987 l 8543 2084 l 8516 2097 l 8489 2109 l cp gs col7 1.00 shd ef gr col0 s
6333
/Courier ff 180.00 scf sf
6335
gs 1 -1 sc (x # remove\(\)) col0 sh gr
6340
n 2595 2362 m 2820 2137 l gs col0 s gr
6342
n 2595 2137 m 2820 2362 l gs col0 s gr
6347
n 1575 1350 m 9225 1350 l 9225 4050 l 1575 4050 l cp gs col0 s gr
6348
/Courier-Bold ff 180.00 scf sf
6350
gs 1 -1 sc (x) col0 sh gr
6351
/Courier-Bold ff 180.00 scf sf
6353
gs 1 -1 sc (x) col0 sh gr
6354
/Courier-Bold ff 180.00 scf sf
6356
gs 1 -1 sc (y) col0 sh gr
6357
/Courier-Bold ff 180.00 scf sf
6359
gs 1 -1 sc (y) col0 sh gr
6364
@endspecial 396 3958 a
6365
currentpoint currentpoint translate 1 1 div 1 1 div scale neg exch
6367
396 3958 a 357 x Fw(It)f(is)h(also)e(possible)h
6368
(to)f(mak)o(e)h(a)g(clone)e(of)i(a)g(subtree;)f(illustrated)g(in)h
6369
Fs(The)f(clone)g(of)h(a)f(subtr)m(ee)p Fw(.)h(In)f(this)h(case,)g(the)f
6370
(clone)396 4423 y(is)i(a)g(cop)o(y)e(of)h(the)g(original)f(subtree)h(e)
6371
o(xcept)f(that)h(it)h(is)h(no)d(longer)g(a)i(subnode.)d(Because)i
6372
(cloning)f(ne)n(v)o(er)g(k)o(eeps)h(the)396 4531 y(connection)e(to)j
6373
(the)f(parent,)f(the)h(clones)g(are)g(called)g Fs(orphaned)r
6374
Fw(.)p Black 3800 5278 a Fs(52)p Black eop
6376
53 52 bop Black 2225 67 a Fs(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr)
6377
m(esenting)g(the)g(document)p Black 396 579 a Fv(Figur)o(e)g(3-5.)f
6378
(The)i(clone)f(of)g(a)g(subtr)o(ee)396 1912 y
6379
currentpoint currentpoint translate 1 1 scale neg exch neg exch translate
6381
a @beginspecial 0 @llx 0 @lly 388 @urx 138 @ury 3880
6383
%%BeginDocument: pic/node_clone.ps
6384
%!PS-Adobe-2.0 EPSF-2.0
6385
%%Title: src/pic/node_clone.fig
6386
%%Creator: fig2dev Version 3.2 Patchlevel 1
6387
%%CreationDate: Thu Jul 5 00:54:02 2001
6388
%%For: gerd@ice (Gerd Stolpmann)
6389
%%Orientation: Portrait
6390
%%BoundingBox: 0 0 388 138
6394
%%Magnification: 0.8000
6396
/$F2psDict 200 dict def
6398
$F2psDict /mtrx matrix put
6399
/col-1 {0 setgray} bind def
6400
/col0 {0.000 0.000 0.000 srgb} bind def
6401
/col1 {0.000 0.000 1.000 srgb} bind def
6402
/col2 {0.000 1.000 0.000 srgb} bind def
6403
/col3 {0.000 1.000 1.000 srgb} bind def
6404
/col4 {1.000 0.000 0.000 srgb} bind def
6405
/col5 {1.000 0.000 1.000 srgb} bind def
6406
/col6 {1.000 1.000 0.000 srgb} bind def
6407
/col7 {1.000 1.000 1.000 srgb} bind def
6408
/col8 {0.000 0.000 0.560 srgb} bind def
6409
/col9 {0.000 0.000 0.690 srgb} bind def
6410
/col10 {0.000 0.000 0.820 srgb} bind def
6411
/col11 {0.530 0.810 1.000 srgb} bind def
6412
/col12 {0.000 0.560 0.000 srgb} bind def
6413
/col13 {0.000 0.690 0.000 srgb} bind def
6414
/col14 {0.000 0.820 0.000 srgb} bind def
6415
/col15 {0.000 0.560 0.560 srgb} bind def
6416
/col16 {0.000 0.690 0.690 srgb} bind def
6417
/col17 {0.000 0.820 0.820 srgb} bind def
6418
/col18 {0.560 0.000 0.000 srgb} bind def
6419
/col19 {0.690 0.000 0.000 srgb} bind def
6420
/col20 {0.820 0.000 0.000 srgb} bind def
6421
/col21 {0.560 0.000 0.560 srgb} bind def
6422
/col22 {0.690 0.000 0.690 srgb} bind def
6423
/col23 {0.820 0.000 0.820 srgb} bind def
6424
/col24 {0.500 0.190 0.000 srgb} bind def
6425
/col25 {0.630 0.250 0.000 srgb} bind def
6426
/col26 {0.750 0.380 0.000 srgb} bind def
6427
/col27 {1.000 0.500 0.500 srgb} bind def
6428
/col28 {1.000 0.630 0.630 srgb} bind def
6429
/col29 {1.000 0.750 0.750 srgb} bind def
6430
/col30 {1.000 0.880 0.880 srgb} bind def
6431
/col31 {1.000 0.840 0.000 srgb} bind def
6435
-78.0 205.0 translate
6438
/cp {closepath} bind def
6439
/ef {eofill} bind def
6440
/gr {grestore} bind def
6441
/gs {gsave} bind def
6443
/rs {restore} bind def
6444
/l {lineto} bind def
6445
/m {moveto} bind def
6446
/rm {rmoveto} bind def
6447
/n {newpath} bind def
6448
/s {stroke} bind def
6450
/slc {setlinecap} bind def
6451
/slj {setlinejoin} bind def
6452
/slw {setlinewidth} bind def
6453
/srgb {setrgbcolor} bind def
6454
/rot {rotate} bind def
6455
/sc {scale} bind def
6456
/sd {setdash} bind def
6457
/ff {findfont} bind def
6458
/sf {setfont} bind def
6459
/scf {scalefont} bind def
6460
/sw {stringwidth} bind def
6461
/tr {translate} bind def
6462
/tnt {dup dup currentrgbcolor
6463
4 -2 roll dup 1 exch sub 3 -1 roll mul add
6464
4 -2 roll dup 1 exch sub 3 -1 roll mul add
6465
4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
6467
/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
6468
4 -2 roll mul srgb} bind def
6471
/startangle exch def
6476
/savematrix mtrx currentmatrix def
6477
x y tr xrad yrad sc 0 0 1 startangle endangle arc
6479
savematrix setmatrix
6482
/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
6483
/$F2psEnd {$F2psEnteredState restore end} def
6488
n -1000 5062 m -1000 -1000 l 10237 -1000 l 10237 5062 l cp clip
6492
n 2700 1800 229 229 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr
6495
n 2025 2700 229 229 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr
6498
n 3375 2700 229 229 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr
6501
n 6345 1800 229 229 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr
6504
n 5670 2700 229 229 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr
6507
n 7020 2700 229 229 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr
6510
n 8325 1800 229 229 0 360 DrawEllipse gs col7 0.50 shd ef gr gs col0 s gr
6513
n 7875 2700 229 229 0 360 DrawEllipse gs col7 0.50 shd ef gr gs col0 s gr
6516
n 8775 2700 229 229 0 360 DrawEllipse gs col7 0.50 shd ef gr gs col0 s gr
6519
n 6345 2700 229 229 0 360 DrawEllipse gs col7 0.50 shd ef gr gs col0 s gr
6522
n 5895 3600 229 229 0 360 DrawEllipse gs col7 0.50 shd ef gr gs col0 s gr
6525
n 6795 3600 229 229 0 360 DrawEllipse gs col7 0.50 shd ef gr gs col0 s gr
6528
n 2700 2700 229 229 0 360 DrawEllipse gs col7 0.50 shd ef gr gs col0 s gr
6531
n 2250 3600 229 229 0 360 DrawEllipse gs col7 0.50 shd ef gr gs col0 s gr
6534
n 3150 3600 229 229 0 360 DrawEllipse gs col7 0.50 shd ef gr gs col0 s gr
6539
n 4050 2610 m 4725 2610 l gs col0 s gr
6541
n 4050 2745 m 4725 2745 l gs col0 s gr
6544
n 4500 2385 m 4950 2655 l 4500 2970 l gs col0 s gr
6550
2125 2394 m 2025 2467 l 2078 2355 l 1992 2459 l 2039 2498 l cp
6552
n 2490 1905 m 2025 2467 l gs col0 s gr gr
6555
n 2125 2394 m 2025 2467 l 2078 2355 l 2101 2375 l 2125 2394 l cp gs 0.00 setgray ef gr col0 s
6558
3158 2426 m 3202 2542 l 3109 2461 l 3186 2571 l 3235 2537 l cp
6560
n 2827 2002 m 3202 2542 l gs col0 s gr gr
6563
n 3158 2426 m 3202 2542 l 3109 2461 l 3134 2443 l 3158 2426 l cp gs 0.00 setgray ef gr col0 s
6566
2436 2039 m 2535 1965 l 2482 2077 l 2568 1972 l 2521 1934 l cp
6568
n 2115 2475 m 2535 1965 l gs col0 s gr gr
6571
n 2436 2039 m 2535 1965 l 2482 2077 l 2459 2058 l 2436 2039 l cp gs col7 1.00 shd ef gr col0 s
6574
2916 2073 m 2872 1957 l 2965 2038 l 2888 1928 l 2839 1962 l cp
6576
n 3255 2505 m 2872 1957 l gs col0 s gr gr
6579
n 2916 2073 m 2872 1957 l 2965 2038 l 2941 2055 l 2916 2073 l cp gs col7 1.00 shd ef gr col0 s
6582
5770 2394 m 5670 2467 l 5723 2355 l 5637 2459 l 5684 2498 l cp
6584
n 6135 1905 m 5670 2467 l gs col0 s gr gr
6587
n 5770 2394 m 5670 2467 l 5723 2355 l 5746 2375 l 5770 2394 l cp gs 0.00 setgray ef gr col0 s
6590
6803 2426 m 6847 2542 l 6754 2461 l 6831 2571 l 6880 2537 l cp
6592
n 6472 2002 m 6847 2542 l gs col0 s gr gr
6595
n 6803 2426 m 6847 2542 l 6754 2461 l 6779 2443 l 6803 2426 l cp gs 0.00 setgray ef gr col0 s
6598
6081 2039 m 6180 1965 l 6127 2077 l 6213 1972 l 6166 1934 l cp
6600
n 5760 2475 m 6180 1965 l gs col0 s gr gr
6603
n 6081 2039 m 6180 1965 l 6127 2077 l 6104 2058 l 6081 2039 l cp gs col7 1.00 shd ef gr col0 s
6606
6561 2073 m 6517 1957 l 6610 2038 l 6533 1928 l 6484 1962 l cp
6608
n 6900 2505 m 6517 1957 l gs col0 s gr gr
6611
n 6561 2073 m 6517 1957 l 6610 2038 l 6586 2055 l 6561 2073 l cp gs col7 1.00 shd ef gr col0 s
6614
7947 2372 m 7860 2460 l 7896 2342 l 7827 2458 l 7878 2488 l cp
6616
n 8160 1957 m 7860 2460 l gs col0 s gr gr
6619
n 7947 2372 m 7860 2460 l 7896 2342 l 7921 2357 l 7947 2372 l cp gs 0.00 setgray ef gr col0 s
6622
8603 2398 m 8625 2520 l 8549 2423 l 8604 2546 l 8659 2521 l cp
6624
n 8407 2032 m 8625 2520 l gs col0 s gr gr
6627
n 8603 2398 m 8625 2520 l 8549 2423 l 8576 2410 l 8603 2398 l cp gs 0.00 setgray ef gr col0 s
6630
8125 2098 m 8212 2010 l 8177 2129 l 8245 2012 l 8194 1982 l cp
6632
n 7942 2467 m 8212 2010 l gs col0 s gr gr
6635
n 8125 2098 m 8212 2010 l 8177 2129 l 8151 2113 l 8125 2098 l cp gs col7 1.00 shd ef gr col0 s
6638
8489 2109 m 8467 1987 l 8543 2084 l 8488 1961 l 8433 1986 l cp
6640
n 8685 2475 m 8467 1987 l gs col0 s gr gr
6643
n 8489 2109 m 8467 1987 l 8543 2084 l 8516 2097 l 8489 2109 l cp gs col7 1.00 shd ef gr col0 s
6646
6352 2152 m 6382 2032 l 6412 2152 l 6412 2017 l 6352 2017 l cp
6648
n 6382 2460 m 6382 2032 l gs col0 s gr gr
6651
n 6352 2152 m 6382 2032 l 6412 2152 l 6382 2152 l 6352 2152 l cp gs col7 1.00 shd ef gr col0 s
6654
6337 2347 m 6307 2467 l 6277 2347 l 6277 2482 l 6337 2482 l cp
6656
n 6307 2032 m 6307 2467 l gs col0 s gr gr
6659
n 6337 2347 m 6307 2467 l 6277 2347 l 6307 2347 l 6337 2347 l cp gs 0.00 setgray ef gr col0 s
6662
5967 3272 m 5880 3360 l 5916 3242 l 5847 3358 l 5898 3388 l cp
6664
n 6180 2857 m 5880 3360 l gs col0 s gr gr
6667
n 5967 3272 m 5880 3360 l 5916 3242 l 5941 3257 l 5967 3272 l cp gs 0.00 setgray ef gr col0 s
6670
6623 3298 m 6645 3420 l 6569 3323 l 6624 3446 l 6679 3421 l cp
6672
n 6427 2932 m 6645 3420 l gs col0 s gr gr
6675
n 6623 3298 m 6645 3420 l 6569 3323 l 6596 3310 l 6623 3298 l cp gs 0.00 setgray ef gr col0 s
6678
6145 2998 m 6232 2910 l 6197 3029 l 6265 2912 l 6214 2882 l cp
6680
n 5962 3367 m 6232 2910 l gs col0 s gr gr
6683
n 6145 2998 m 6232 2910 l 6197 3029 l 6171 3013 l 6145 2998 l cp gs col7 1.00 shd ef gr col0 s
6686
6509 3009 m 6487 2887 l 6563 2984 l 6508 2861 l 6453 2886 l cp
6688
n 6705 3375 m 6487 2887 l gs col0 s gr gr
6691
n 6509 3009 m 6487 2887 l 6563 2984 l 6536 2997 l 6509 3009 l cp gs col7 1.00 shd ef gr col0 s
6694
2707 2152 m 2737 2032 l 2767 2152 l 2767 2017 l 2707 2017 l cp
6696
n 2737 2460 m 2737 2032 l gs col0 s gr gr
6699
n 2707 2152 m 2737 2032 l 2767 2152 l 2737 2152 l 2707 2152 l cp gs col7 1.00 shd ef gr col0 s
6702
2692 2347 m 2662 2467 l 2632 2347 l 2632 2482 l 2692 2482 l cp
6704
n 2662 2032 m 2662 2467 l gs col0 s gr gr
6707
n 2692 2347 m 2662 2467 l 2632 2347 l 2662 2347 l 2692 2347 l cp gs 0.00 setgray ef gr col0 s
6710
2322 3272 m 2235 3360 l 2271 3242 l 2202 3358 l 2253 3388 l cp
6712
n 2535 2857 m 2235 3360 l gs col0 s gr gr
6715
n 2322 3272 m 2235 3360 l 2271 3242 l 2296 3257 l 2322 3272 l cp gs 0.00 setgray ef gr col0 s
6718
2978 3298 m 3000 3420 l 2924 3323 l 2979 3446 l 3034 3421 l cp
6720
n 2782 2932 m 3000 3420 l gs col0 s gr gr
6723
n 2978 3298 m 3000 3420 l 2924 3323 l 2951 3310 l 2978 3298 l cp gs 0.00 setgray ef gr col0 s
6726
2500 2998 m 2587 2910 l 2552 3029 l 2620 2912 l 2569 2882 l cp
6728
n 2317 3367 m 2587 2910 l gs col0 s gr gr
6731
n 2500 2998 m 2587 2910 l 2552 3029 l 2526 3013 l 2500 2998 l cp gs col7 1.00 shd ef gr col0 s
6734
2864 3009 m 2842 2887 l 2918 2984 l 2863 2861 l 2808 2886 l cp
6736
n 3060 3375 m 2842 2887 l gs col0 s gr gr
6739
n 2864 3009 m 2842 2887 l 2918 2984 l 2891 2997 l 2864 3009 l cp gs col7 1.00 shd ef gr col0 s
6741
n 1575 1350 m 9225 1350 l 9225 4050 l 1575 4050 l cp gs col0 s gr
6742
/Courier-Bold ff 180.00 scf sf
6744
gs 1 -1 sc (y) col0 sh gr
6745
/Courier-Bold ff 180.00 scf sf
6747
gs 1 -1 sc (y) col0 sh gr
6748
/Courier-Bold ff 180.00 scf sf
6750
gs 1 -1 sc (x) col0 sh gr
6751
/Courier-Bold ff 180.00 scf sf
6753
gs 1 -1 sc (x) col0 sh gr
6754
/Courier ff 180.00 scf sf
6756
gs 1 -1 sc (let x' =) col0 sh gr
6757
/Courier ff 180.00 scf sf
6759
gs 1 -1 sc (x # orphaned_clone) col0 sh gr
6760
/Courier-Bold ff 180.00 scf sf
6762
gs 1 -1 sc (x') col0 sh gr
6767
@endspecial 396 1912 a
6768
currentpoint currentpoint translate 1 1 div 1 1 div scale neg exch
6770
396 1912 a -2 2489 a Fq(3.2.2.)35
6771
b(Optional)f(f)o(eatures)396 2657 y Fv(P)o(arser)20 b
6772
(con\002guration:.)f Fw(As)i(already)e(pointed)f(out,)i(the)g(parser)g
6773
(does)g(only)f(create)h(element)g(and)f(data)h(nodes)g(by)396
6774
2765 y(def)o(ault.)f(The)h(con\002guration)e(of)i(the)g(parser)g(can)g
6775
(be)g(controlled)e(by)i(the)g Fr(config)g Fw(record)f(\(see)h(the)g
6776
(module)396 2873 y Fr(Pxp_yacc)p Fw(\).)f(There)g(are)i(a)f(number)f
6777
(of)g(optional)g(features)h(that)g(change)f(the)h(w)o(ay)g(the)h
6778
(document)d(trees)i(are)h(formed.)396 3022 y(Note)f(that)h(the)f
6779
(parser)f(con\002guration)f(only)h(controls)h(the)g(parser)-5
6780
b(.)20 b(If)g(you)f(create)h(trees)g(of)g(your)f(o)n(wn,)h(you)f(can)
6781
396 3130 y(simply)h(add)g(all)g(the)h(additional)e(node)g(types)h(to)g
6782
(the)g(tree)g(without)g(needing)f(to)h(enable)f(these)i(features.)396
6783
3279 y(The)f(so-called)g(super)f(root)h(node)f(is)i(an)f(e)o(xtra)g
6784
(node)f(at)h(the)h(top)e(of)h(the)h(parsed)e(tree.)h(Normally)-5
6785
b(,)18 b(the)j(top)e(node)h(of)f(the)396 3387 y(tree)h(is)i(the)e
6786
(outermost)f(element.)g(By)i(setting)f(the)g(option)f
6787
Fr(enable_super_root_node)e Fw(the)j(parser)g(creates)g(trees)396
6788
3495 y(with)h(an)f(arti\002cial)g(top)g(node,)f(the)h(super)g(root)f
6789
(node;)h(the)g(outermost)f(element)g(of)h(the)g(document)e(is)k(one)d
6790
(of)h(the)396 3603 y(children)f(of)h(this)h(node.)e(The)g(other)h
6791
(children)f(are)h(the)g(comments)f(and)h(processing)f(instructions)g
6792
(at)h(top)g(le)n(v)o(el)g(\(if)396 3711 y(such)g(node)f(types)h(are)g
6793
(to)h(be)f(created,)f(too\).)396 3861 y(The)h(option)f
6794
Fr(enable_comment_nodes)e Fw(lets)22 b(the)e(parser)f(add)h(comment)f
6795
(nodes)g(when)h(it)h(parses)f(comments.)f(By)396 3968
6796
y(def)o(ault,)g(the)i(parser)e(beha)n(v)o(es)h(as)g(if)h(the)f
6797
(comments)f(were)h(non-e)o(xistent.)e(The)i(contents)f(of)h(comments)f
6798
(can)h(be)396 4076 y(queried)f(using)h(the)g Fr(comment)f
6799
Fw(method.)396 4226 y(The)h(option)f Fr(enable_pinstr_nodes)f
6800
Fw(changes)h(the)h(w)o(ay)g(processing)f(instructions)g(are)h(added)f
6801
(to)i(the)396 4334 y(document.)d(Instead)i(of)g(appending)d(such)j
6802
(instructions)f(to)i(their)f(containing)e(elements)i(as)h(additional)e
6803
(properties,)396 4442 y(this)i(mode)e(forces)h(the)g(parser)g(to)g
6804
(create)g(real)g(nodes)f(for)h(them.)g(\(...\))396 4591
6805
y(By)h(def)o(ault,)e(the)h(parser)g(does)g(not)g(create)g(data)g(nodes)
6806
f(for)h(ignorable)e(whitespace.)h(The)h(XML)g(standard)g(allo)n(ws)396
6807
4699 y(that)h(elements)e(contain)h(whitespace)f(characters)g(e)n(v)o
6808
(en)h(if)g(the)o(y)g(are)g(declared)f(not)h(to)g(contain)f(character)g
6809
(data.)396 4807 y(Because)i(of)f(this,)g(the)g(parser)g(considers)f
6810
(such)h(whitespace)g(as)h(ignorable)d(detail)i(of)g(the)g(XML)h
6811
(instance,)e(and)h(drops)p Black 3800 5278 a Fs(53)p
6814
54 53 bop Black 2225 67 a Fs(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr)
6815
m(esenting)g(the)g(document)p Black 396 579 a Fw(the)g(characters)f
6816
(silently)-5 b(.)19 b(Y)-9 b(ou)19 b(can)g(change)g(this)h(by)f
6817
(setting)h Fr(drop_ignorable_whitespace)c Fw(to)k Fr(false)p
6818
Fw(;)f(in)h(this)396 687 y(case,)g(e)n(v)o(ery)e(character)g(of)h(the)g
6819
(XML)h(instance)f(will)h(be)f(accepted)g(by)g(the)g(parser)g(and)g
6820
(will)h(be)f(added)f(to)i(a)g(data)f(node)396 795 y(of)h(the)g
6821
(document)f(tree.)396 944 y(By)i(def)o(ault,)e(the)h(parser)g(creates)g
6822
(elements)g(with)g(an)g(annotation)e(about)h(the)i(location)e(in)h(the)
6823
g(XML)g(source)g(\002le.)g(Y)-9 b(ou)396 1052 y(can)20
6824
b(query)f(this)i(location)e(by)h(calling)g(the)g(method)f
6825
Fr(position)p Fw(.)g(As)i(this)f(requires)g(a)g(lot)h(of)f(memory)-5
6826
b(,)17 b(it)k(is)g(possible)396 1160 y(to)g(turn)e(this)i(of)n(f)e(by)h
6827
(setting)g Fr(store_element_positions)d Fw(to)j Fr(false)p
6828
Fw(.)396 1310 y(There)g(are)g(a)g(number)f(of)h(further)e
6829
(con\002guration)g(options;)h(ho)n(we)n(v)o(er)m(,)f(these)i(options)f
6830
(do)h(not)g(change)f(the)h(structure)396 1417 y(of)g(the)g(document)f
6831
(tree.)h(See)g(XXX.)396 1567 y Fv(Optional)g(featur)o(es)f(of)h
6832
(nodes:.)g Fw(Another)f(optional)g(feature)g(is)i(the)f(creation)f(of)h
6833
(attrib)n(ute)g(nodes.)f(This)i(may)e(be)396 1675 y(required)f(if)i
6834
(you)e(w)o(ant)i(to)f(ha)n(v)o(e)g(data)h(structures)e(that)i(contain)e
6835
(attrib)n(utes)i(together)e(with)i(other)e(types)h(of)h(nodes.)e(The)
6836
396 1783 y(method)h Fr(attributes_as_nodes)f Fw(returns)h(the)h(attrib)
6837
n(utes)g(wrapped)f(into)h(node)f(objects.)h(Note)g(that)g(these)g
6838
(nodes)396 1891 y(are)g(read-only)-5 b(.)396 2040 y Fv(V)d(alidation)20
6839
b(options:.)g Fw(The)f(document)g(nodes)g(contain)g(the)h(routines)g(v)
6840
n(alidating)e(the)j(document)d(body)-5 b(.)18 b(Of)i(course,)396
6841
2148 y(the)g(v)n(alidation)f(checks)h(depend)e(on)i(what)g(is)h(stored)
6842
f(in)g(the)h(DTD)f(object.)f(Note)i(that)f(you)f(al)o(w)o(ays)i(need)e
6843
(a)i(DTD)396 2256 y(object,)f(e)n(v)o(en)f(if)h(you)g(run)f(the)h
6844
(parser)g(in)g(well-formedness)e(mode;)i(this)g(mode)g(is)h(simply)e(a)
6845
i(property)d(of)i(the)g(DTD)396 2364 y(object.)396 2513
6846
y(Especially)-5 b(,)19 b(the)h(DTD)h(object)e(contains)h(the)g
6847
(declarations)f(of)h(elements,)g(attrib)n(ute)f(lists,)j(entities,)e
6848
(and)g(notations.)396 2621 y(Furthermore,)e(the)i(DTD)g(kno)n(ws)g
6849
(whether)f(the)h(document)e(is)k(\003agged)d(as)i("standalone".)d(As)j
6850
(a)g(real)f(e)o(xtension)e(to)396 2729 y(classic)j(XML)g(processing,)d
6851
(the)i(DTD)h(may)e(specify)h(a)h(mix)f(mode)f(between)g("v)n(alidating)
6852
g(mode")g(and)396 2837 y("well-formedness)f(mode".)h(It)i(is)g
6853
(possible)f(to)g(allo)n(w)g(non-declared)d(elements)j(in)g(the)h
6854
(document,)d(b)n(ut)i(to)g(check)396 2945 y(declared)f(elements)h
6855
(against)g(their)g(declaration)e(at)j(the)f(same)g(time.)h(Moreo)o(v)o
6856
(er)m(,)c(there)i(is)i(a)g(similar)f(feature)g(for)396
6857
3053 y(attrib)n(ute)g(lists;)i(you)d(can)h(allo)n(w)g(non-declared)d
6858
(attrib)n(utes)j(and)g(check)f(declared)g(attrib)n(utes.)h(\(W)-7
6859
b(ell,)21 b(the)f(whole)g(truth)396 3161 y(is)h(that)g(the)f(parser)f
6860
(w)o(orks)h(al)o(w)o(ays)h(in)f(this)h(mix)f(mode,)f(and)h(that)g(the)g
6861
("v)n(alidating)f(mode")g(and)g(the)396 3269 y("well-formedness)f
6862
(mode")h(are)h(only)g(the)g(e)o(xtremes)f(of)h(the)g(mix)g(mode.\))-2
6863
3638 y Fq(3.2.3.)35 b(Namespaces)396 3806 y Fw(Since)20
6864
b(v)o(ersion)f(1.1,)h(PXP)h(supports)e(namespaces.)g(In)h(order)f(to)h
6865
(simplify)g(the)g(handling)e(of)i(namespace-a)o(w)o(are)396
6866
3914 y(documents)f(PXP)i(applies)f(a)g(transformation)e(to)i(the)g
6867
(document)f(which)g(is)i(called)f("pre\002x)g(normalization".)d(This)
6868
396 4022 y(transformation)h(ensures)i(that)g(e)n(v)o(ery)f(namespace)g
6869
(pre\002x)g(uniquely)f(identi\002es)j(a)f(namespace)f(throughout)e(the)
6870
396 4130 y(whole)j(document.)e(F)o(or)i(an)g(introduction)d(into)j
6871
(this)h(transformation,)c(see)k(XXX.)396 4279 y(The)f(important)f
6872
(thing)g(here)h(is)h(that)f(the)g(impact)g(of)g(namespaces)f(on)h(the)g
6873
(representation)e(of)i(documents)f(is)396 4387 y(minimal.)h(F)o(or)f
6874
(elements)h(contained)f(in)h(namespaces,)f(the)h(method)f
6875
Fr(node_type)g Fw(will)i(return)e(a)i(type)f Fr(T_element)396
6876
4495 y(")p Fo(normprefix)t Fr(:)p Fo(localname)p Fr(")d
6877
Fw(where)j Fo(normprefix)j Fw(is)e(the)g(normalized)d(pre\002x)h(and)h
6878
Fo(localname)f Fw(is)i(the)f(local)396 4603 y(name)g(of)g(the)g
6879
(element)g(type)f(within)h(the)g(namespace.)f(As)i(the)f(normalized)f
6880
(pre\002x)g Fs(identi\002es)h Fw(the)g(namespace,)f(it)h(is)396
6881
4711 y(often)g(not)f(necessary)h(to)g(determine)f(the)h(namespace)f
6882
(URI)i(of)f(the)g(namespace;)f(the)h(element)g(types)g(are)g(still)h
6883
(simple)396 4819 y(strings)f(which)g(simpli\002es)h(programming)c(a)j
6884
(lot.)p Black 3800 5278 a Fs(54)p Black eop
6886
55 54 bop Black 2225 67 a Fs(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr)
6887
m(esenting)g(the)g(document)p Black 396 579 a Fw(The)g(same)g(applies)g
6888
(to)h(attrib)n(utes.)f(Attrib)n(ute)g(names)f(are)i(no)n(w)e(either)h
6889
(string)g(containing)e(a)j(colon)e(lik)o(e)396 687 y(")p
6890
Fm(normprefix)5 b Fw(:)p Fm(localname)p Fw(",)17 b(or)j(the)o(y)f(are)h
6891
(strings)g(without)g(colons.)f(In)h(the)g(\002rst)h(case,)f(the)h
6892
(attrib)n(ute)e(belongs)396 795 y(to)g(the)g(namespace)e(identi\002ed)h
6893
(by)g(the)h(normalized)e(pre\002x,)h(and)g(in)h(the)f(latter)h(case,)g
6894
(the)g(attrib)n(ute)f(is)i(locally)e(de\002ned.)396 944
6895
y(Note)i(that)h(the)f(pre\002x)f(normalization)f(is)j(a)g(parser)f
6896
(option)f(which)g(can)h(be)g(switched)g(on)g(by)g(setting)396
6897
1052 y Fr(enable_namespace_processing)c Fw(to)21 b Fr(true)p
6898
Fw(.)f(If)g(you)f(create)h(XML)g(trees)h(on)e(your)g(o)n(wn,)h(it)h(is)
6899
g(your)e(task)h(to)396 1160 y(ensure)g(that)g(the)g(pre\002x)o(es)g
6900
(are)g(normalized.)396 1310 y(There)g(are)g(special)g(namespace-a)o(w)o
6901
(are)e(implementations)g(of)i(the)g Fr(node)g Fw(class)h(type)f(which)g
6902
(de\002ne)f(additional)396 1417 y(namespace)g(methods)g(lik)o(e)i
6903
Fr(namespace_uri)p Fw(.)d(It)j(is)g(recommended)c(to)j(use)h(these)f
6904
(implementations)e(although)h(it)396 1525 y(is)i(not)f(strictly)h
6905
(necessary)-5 b(.)396 1675 y(Furthermore,)18 b(there)i(is)h(a)f(rather)
6906
g(e)o(xperimental)e(feature)h Fr(enable_namespace_info)p
6907
Fw(.)e(This)j(mak)o(es)g(the)g(parser)396 1783 y(store)g(information)e
6908
(about)h(the)i(namespace)e(declarations)g(into)g(the)i(namespace_info)c
6909
(object.)i(Ho)n(we)n(v)o(er)m(,)f(these)j(data)396 1891
6910
y(are)f(incompatible)f(with)h(the)g(rest)h(of)f(the)g(document)e
6911
(representation,)g(and)i(it)h(is)g(lik)o(ely)f(that)g(this)h(feature)e
6912
(will)i(be)396 1999 y(modi\002ed)e(in)i(the)f(future.)f(\(It)h(is)h
6913
(possible)f(to)g(let)h(the)f(namespace_info)d(object)j(create)g
6914
(namespace)f(nodes)g(for)h(the)396 2107 y(containing)f(element.)g
6915
(Currently)-5 b(,)18 b(these)j(namespace)e(nodes)g(re\003ect)h(the)g
6916
(declaration)f(of)h(namespaces)f(before)g(the)396 2214
6917
y(pre\002x)g(normalization)f(w)o(as)j(applied;)e(I)h(am)g(going)f(to)h
6918
(change)e(this)j(such)f(that)g(the)o(y)f(re\003ect)h(the)g(declaration)
6919
e(after)i(the)396 2322 y(normalization.\))-2 2692 y Fq(3.2.4.)35
6920
b(T)-7 b(ypes)p Black 396 3039 a Fu(\225)p Black 60 w
6921
Fv(T)h(ype:.)20 b Fb(node_type)479 3188 y Fv(Signatur)o(e:.)479
6922
3327 y Fr(type)44 b(node_type)g(=)659 3424 y(T_element)f(of)h(string)
6923
569 3521 y(|)h(T_data)569 3619 y(|)g(T_super_root)1074
6924
b(\(*)44 b(XPath)g(calls)g(them)g(sim-)479 3716 y(ply)h(root)f(nodes)g
6925
(*\))569 3813 y(|)h(T_pinstr)e(of)i(string)806 b(\(*)44
6926
b(The)g(string)g(is)h(the)f(tar-)479 3910 y(get)h(of)f(the)g(PI)h(*\))
6927
569 4007 y(|)g(T_comment)569 4104 y(|)g(T_none)569 4201
6928
y(|)g(T_attribute)e(of)h(string)447 b(\(*)45 b(The)f(string)g(is)h(the)
6929
f(name)g(of)h(the)f(at-)479 4298 y(tribute)g(*\))569
6930
4396 y(|)h(T_namespace)e(of)h(string)537 b(\(*)45 b(The)f(string)g(is)g
6931
(the)h(namespace)e(srcpre-)479 4493 y(fix)i(*\))479 4684
6932
y Fv(Description:.)20 b Fw(This)g(type)g(enumerates)f(the)h(possible)g
6933
(node)f(types:)p Black 3800 5278 a Fs(55)p Black eop
6935
56 55 bop Black 2225 67 a Fs(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr)
6936
m(esenting)g(the)g(document)p Black Black 479 579 a Fa(\225)p
6937
Black 62 w Fr(T_element)44 b(name)20 b Fw(:)h(The)e(node)h(is)h(an)f
6938
(element)f(and)h(has)g(element)g(type)g Fr(name)p Black
6939
479 687 a Fa(\225)p Black 62 w Fr(T_data)g Fw(:)h(The)f(node)f(is)i(a)g
6940
(data)f(node)p Black 479 795 a Fa(\225)p Black 62 w Fr(T_super_root)f
6941
Fw(:)i(The)f(node)f(is)i(a)g(super)e(root)h(node)p Black
6942
479 903 a Fa(\225)p Black 62 w Fr(T_pinstr)44 b(name)20
6943
b Fw(:)h(The)f(node)f(contains)g(a)i(processing)e(instruction)g(with)h
6944
(tar)o(get)f Fr(name)p Black 479 1011 a Fa(\225)p Black
6945
62 w Fr(T_comment)h Fw(:)g(The)g(node)f(is)j(a)e(comment)p
6946
Black 479 1119 a Fa(\225)p Black 62 w Fr(T_attribute)43
6947
b(name)20 b Fw(:)h(The)f(node)f(contains)h(an)g(attrib)n(ute)g(called)g
6948
Fr(name)p Black 479 1226 a Fa(\225)p Black 62 w Fr(T_namespace)43
6949
b(prefix)20 b Fw(:)h(The)f(node)f(identi\002es)h(a)h(namespace)e(for)g
6950
(the)h Fr(prefix)p Black 479 1334 a Fa(\225)p Black 62
6951
w Fr(T_none)g Fw(:)h(This)f(is)h(a)g("bottom)e(v)n(alue")g(used)h(if)h
6952
(there)e(is)j(no)d(reasonable)g(type.)p Black 396 1525
6953
a Fu(\225)p Black 60 w Fv(T)-6 b(ype:.)20 b Fb
6954
(data_node_classification)479 1675 y Fv(Signatur)o(e:.)479
6955
1813 y Fr(type)44 b(data_node_classification)d(=)659
6956
1911 y(CD_normal)569 2008 y(|)k(CD_other)569 2105 y(|)g(CD_empty)569
6957
2202 y(|)g(CD_ignorable)569 2299 y(|)g(CD_error)e(of)i(exn)479
6958
2490 y Fv(Description:.)20 b Fw(This)g(type)g(enumerates)f(the)h
6959
(result)g(v)n(alues)g(of)g(the)g(method)f Fr(classify_data_node)f
6960
Fw(.)i(See)h(the)479 2598 y(description)e(of)h(this)h(method.)p
6961
Black 396 2747 a Fu(\225)p Black 60 w Fv(T)-6 b(ype:.)20
6962
b Fb(att_value)479 2897 y Fv(Signatur)o(e:.)479 3036
6963
y Fr(type)44 b(att_value)g(=)659 3133 y(Value)g(of)g(string)569
6964
3230 y(|)h(Valuelist)e(of)h(string)g(list)569 3327 y(|)h(Implied_value)
6965
479 3518 y Fv(Description:.)20 b Fw(Enumerates)f(the)h(possible)g(v)n
6966
(alues)f(of)h(an)h(attrib)n(ute:)p Black 479 3750 a Fa(\225)p
6967
Black 62 w Fr(Value)44 b(s)21 b Fw(:)g(The)f(attrib)n(ute)f(is)j
6968
(declared)c(as)j(a)g(non-list)e(type,)h(or)g(the)g(attrib)n(ute)g(is)h
6969
(undeclared;)d(and)i(the)562 3858 y(attrib)n(ute)g(is)h(either)f
6970
(de\002ned)f(with)i(v)n(alue)e Fr("s")h Fw(,)h(or)f(it)h(is)g(missing)f
6971
(b)n(ut)g(has)h(the)f(def)o(ault)f(v)n(alue)h Fr(s)g
6972
Fw(.)p Black 479 3966 a Fa(\225)p Black 62 w Fr(Valuelist)44
6973
b([s1;...;sk)19 b Fw(]:)h(The)g(attrib)n(ute)g(is)h(declared)e(as)i(a)f
6974
(list)i(type,)d(and)h(the)g(attrib)n(ute)g(is)h(either)562
6975
4074 y(de\002ned)e(with)i(v)n(alue)e Fr("s1)45 b(...)f(sk")20
6976
b Fw(,)h(or)f(it)h(is)g(missing)f(b)n(ut)g(has)g(the)h(def)o(ault)e(v)n
6977
(alue)h Fr("s1)44 b(...)g(sk")21 b Fw(.)f(The)562 4182
6978
y(components)e(of)i(the)g(list)i(must)e(be)g(separated)f(by)h
6979
(whitespace.)p Black 479 4290 a Fa(\225)p Black 62 w
6980
Fr(Implied_value)f Fw(:)i(The)f(attrib)n(ute)f(is)i(declared)e(without)
6981
h(def)o(ault)f(v)n(alue,)h(and)f(there)h(is)h(no)f(de\002nition)f(for)h
6982
(the)562 4398 y(attrib)n(ute.)p Black 396 4589 a Fu(\225)p
6983
Black 60 w Fv(T)-6 b(ype:.)20 b Fr('ext)44 b Fb(node)479
6984
4738 y Fv(Signatur)o(e:.)479 4877 y Fr(class)g(type)g('ext)h(node)f(=)g
6985
(object)g(...)h(end)p Black 3798 5278 a Fs(56)p Black
6988
57 56 bop Black 2225 67 a Fs(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr)
6989
m(esenting)g(the)g(document)p Black 479 579 a Fv(Description:.)g
6990
Fw(This)g(is)h(the)g(common)d(class)j(type)f(of)g(all)g(classes)i
6991
(representing)c(nodes.)479 728 y(Not)j(all)f(classes)i(implement)d(all)
6992
h(methods.)f(As)i(the)f(type)g(system)h(of)e(O'Caml)i(demands)e(that)h
6993
(there)g(must)g(be)479 836 y(al)o(w)o(ays)h(a)g(method)d(de\002nition)h
6994
(for)h(all)h(methods)e(of)h(the)g(type,)f(methods)h(will)h(raise)f(the)
6995
g(e)o(xception)479 944 y Fr(Method_not_applicable)e Fw(if)i(the)o(y)f
6996
(are)i(called)f(on)f(a)i(class)g(not)f(supporting)e(them.)h(The)h(e)o
6997
(xception)479 1052 y Fr(Namespace_method_not_applicable)c
6998
Fw(is)21 b(reserv)o(ed)e(for)g(the)h(special)h(case)f(that)h(a)f
6999
(namespace)f(method)g(is)479 1160 y(in)m(v)n(ok)o(ed)g(on)h(a)g(class)h
7000
(that)g(does)e(not)h(support)f(namespaces.)479 1310 y
7001
Fv(See)i(also:.)e Fw(Signature)g(of)h(class)i(type)d(node)-2
7002
1762 y Fq(3.2.5.)35 b(The)f(methods)g(of)f(the)h(c)n(lass)h(type)f
7003
Fd(node)396 1930 y Fv(General)20 b(obser)o(v)o(ers)g(.)p
7004
Black 396 2217 a Fu(\225)p Black 60 w Fv(Method:.)g Fr(obj)44
7005
b(#)h Fb(extension)479 2367 y Fv(Signatur)o(e:.)659 2505
7006
y Fr(method)e(extension)h(:)g('ext)479 2696 y Fv(Description:.)20
7007
b Fw(Returns)g(the)g(e)o(xtension)f(object)h(of)f(the)i(node)e(object)g
7008
Fr(obj)i Fw(.)479 2846 y Fv(Domain:.)f Fw(Applicable)f(to)h(element,)g
7009
(data,)f(comment,)g(processing)g(instruction,)f(and)i(super)g(root)f
7010
(nodes.)p Black 396 2995 a Fu(\225)p Black 60 w Fv(Method:.)h
7011
Fr(obj)44 b(#)h Fb(dtd)479 3144 y Fv(Signatur)o(e:.)659
7012
3283 y Fr(method)e(dtd)i(:)f(dtd)479 3474 y Fv(Description:.)20
7013
b Fw(Returns)g(the)g(DTD.)479 3623 y Fv(Domain:.)g Fw(All)h(node)e
7014
(types.)h(Note)g(\(1\))f(that)i(e)o(x)o(emplars)d(need)i(not)f(to)i(ha)
7015
n(v)o(e)e(an)h(associated)g(DTD,)h(in)f(which)g(case)479
7016
3731 y(this)h(method)e(f)o(ails.)h(\(2\))g(Ev)o(en)f(in)h
7017
(well-formedness)f(mode)g(e)n(v)o(ery)g(node)g(has)h(a)h(DTD)f(object;)
7018
g(this)h(object)479 3839 y(speci\002es)g(well-formedness)d(mode.)p
7019
Black 396 3989 a Fu(\225)p Black 60 w Fv(Method:.)i Fr(obj)44
7020
b(#)h Fb(encoding)479 4138 y Fv(Signatur)o(e:.)659 4277
7021
y Fr(method)e(encoding)h(:)h(Pxp_types.rep_encoding)479
7022
4468 y Fv(Description:.)20 b Fw(Get)h(the)f(encoding)e(which)i(is)h(al)
7023
o(w)o(ays)f(the)g(same)h(as)g(the)f(encoding)e(of)i(the)g(DTD.)g(See)h
7024
(also)479 4576 y(method)e Fr(dtd)h Fw(.)h(\(Note:)f(This)g(method)f(f)o
7025
(ails,)i(too,)e(if)i(no)e(DTD)i(is)g(present.\))479 4725
7026
y Fv(Domain:.)f Fw(All)h(node)e(types.)h(Note)g(that)g(e)o(x)o(emplars)
7027
e(need)i(not)g(to)g(ha)n(v)o(e)g(an)g(associated)g(DTD,)g(in)g(which)g
7028
(case)h(this)479 4833 y(method)e(f)o(ails.)p Black 3797
7029
5278 a Fs(57)p Black eop
7031
58 57 bop Black 2225 67 a Fs(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr)
7032
m(esenting)g(the)g(document)p Black Black 396 579 a Fu(\225)p
7033
Black 60 w Fv(Method:.)g Fr(obj)44 b(#)h Fb(parent)479
7034
728 y Fv(Signatur)o(e:.)659 867 y Fr(method)e(parent)h(:)h('ext)f(node)
7035
479 1058 y Fv(Description:.)20 b Fw(Get)h(the)f(parent)f(node,)g(or)h
7036
(raise)g Fr(Not_found)g Fw(if)g(this)h(node)e(is)i(a)g(root)e(node.)g
7037
(F)o(or)h(attrib)n(ute)g(and)479 1166 y(namespace)f(nodes,)g(the)i
7038
(parent)e(is)i(arti\002cially)f(de\002ned)f(as)i(the)f(element)g(to)g
7039
(which)g(these)g(nodes)g(apply)-5 b(.)479 1315 y Fv(Domain:.)20
7040
b Fw(All)h(node)e(types.)p Black 396 1465 a Fu(\225)p
7041
Black 60 w Fv(Method:.)h Fr(obj)44 b(#)h Fb(root)479
7042
1614 y Fv(Signatur)o(e:.)659 1753 y Fr(method)e(root)i(:)f('ext)g(node)
7043
479 1944 y Fv(Description:.)20 b Fw(Gets)h(the)f(root)g(node)f(of)h
7044
(the)g(tree.)g(Ev)o(ery)f(node)g(is)i(contained)d(in)j(a)f(tree)h(with)
7045
f(a)h(root,)e(so)h(this)479 2052 y(method)f(al)o(w)o(ays)i(succeeds.)e
7046
(Note)h(that)h(this)f(method)f(searches)h(the)g(root,)g(which)f(costs)i
7047
(time)g(proportional)c(to)j(the)479 2160 y(length)g(of)g(the)g(path)f
7048
(to)i(the)f(root.)479 2309 y Fv(Domain:.)g Fw(All)h(node)e(types.)p
7049
Black 396 2459 a Fu(\225)p Black 60 w Fv(Method:.)h Fr(obj)44
7050
b(#)h Fb(sub_nodes)479 2608 y Fv(Signatur)o(e:.)659 2747
7051
y Fr(method)e(sub_nodes)h(:)g('ext)h(node)f(list)479
7052
2938 y Fv(Description:.)20 b Fw(Returns)g(the)g(re)o(gular)f(children)g
7053
(of)g(the)i(node)e(as)i(list.)g(Only)f(Elements,)f(data)h(nodes,)f
7054
(comments,)479 3045 y(and)h(processing)f(instructions)g(can)h(occur)f
7055
(in)h(this)h(list;)h(attrib)n(utes)e(and)f(namespace)g(nodes)h(are)g
7056
(not)g(considered)e(as)479 3153 y(re)o(gular)h(nodes,)g(and)h(super)f
7057
(root)h(nodes)f(can)h(only)g(be)g(root)f(nodes)h(and)f(will)i(ne)n(v)o
7058
(er)e(be)h(children)f(of)h(another)f(node.)479 3261 y(The)h(returned)f
7059
(list)i(is)g(al)o(w)o(ays)g(empty)e(if)h Fr(obj)h Fw(is)g(a)f(data)g
7060
(node,)f(comment,)g(processing)g(instruction,)f(attrib)n(ute,)i(or)479
7061
3369 y(namespace.)479 3519 y Fv(Domain:.)g Fw(All)h(node)e(types.)p
7062
Black 396 3668 a Fu(\225)p Black 60 w Fv(Method:.)h Fr(obj)44
7063
b(#)h Fb(iter_nodes)e Fr(f)479 3818 y Fv(Signatur)o(e:.)659
7064
3956 y Fr(method)g(iter_nodes)h(:)g(\('ext)g(node)g(-)p
7065
Fp(>)h Fr(unit\))f(-)p Fp(>)g Fr(unit)479 4147 y Fv(Description:.)20
7066
b Fw(Iterates)g(o)o(v)o(er)f(the)h(re)o(gular)f(children)f(of)i
7067
Fr(obj)h Fw(,)f(and)g(calls)h(the)f(function)e Fr(f)j
7068
Fw(for)e(e)n(v)o(ery)g(child)h(ch:)g Fr(f)479 4255 y(ch)h
7069
Fw(.)f(The)g(re)o(gular)f(children)g(are)h(the)g(nodes)f(returned)g(by)
7070
g Fr(sub_nodes)h Fw(,)g(see)h(there)f(for)f(an)h(e)o(xplanation.)479
7071
4405 y Fv(Domain:.)g Fw(All)h(node)e(types.)479 4554
7072
y Fv(See)i(also:.)e Fs(Iter)o(ator)o(s)p Black 396 4703
7073
a Fu(\225)p Black 60 w Fv(Method:.)h Fr(obj)44 b(#)h
7074
Fb(iter_nodes_sibl)d Fr(f)479 4853 y Fv(Signatur)o(e:.)p
7075
Black 3800 5278 a Fs(58)p Black eop
7077
59 58 bop Black 2225 67 a Fs(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr)
7078
m(esenting)g(the)g(document)p Black 659 579 a Fr(method)43
7079
b(iter_nodes_sibl)g(:)748 676 y(\('ext)h(node)g(option)g(-)p
7080
Fp(>)h Fr('ext)f(node)g(-)p Fp(>)g Fr('ext)h(node)f(option)f(-)p
7081
Fp(>)i Fr(unit\))f(-)p Fp(>)g Fr(unit)479 867 y Fv(Description:.)20
7082
b Fw(Iterates)g(o)o(v)o(er)f(the)h(re)o(gular)f(children)f(of)i
7083
Fr(obj)h Fw(,)f(and)g(calls)h(the)f(function)e Fr(f)j
7084
Fw(for)e(e)n(v)o(ery)g(child:)h Fr(f)479 975 y(pred)44
7085
b(ch)h(succ)20 b Fw(.)p Black 479 1207 a Fa(\225)p Black
7086
62 w Fr(ch)h Fw(is)g(the)f(child)p Black 479 1315 a Fa(\225)p
7087
Black 62 w Fr(pred)g Fw(is)i Fr(None)e Fw(if)g(the)g(child)g(is)h(the)f
7088
(\002rst)h(in)g(the)f(list,)h(and)f Fr(Some)44 b(p)20
7089
b Fw(otherwise;)g Fr(p)h Fw(is)g(the)f(predecessor)e(of)i
7090
Fr(ch)p Black 479 1423 a Fa(\225)p Black 62 w Fr(succ)g
7091
Fw(is)i Fr(None)e Fw(if)g(the)g(child)g(is)h(the)f(last)h(in)g(the)f
7092
(list,)h(and)f Fr(Some)44 b(s)20 b Fw(otherwise;)g Fr(s)h
7093
Fw(is)g(the)f(successor)g(of)g Fr(ch)479 1573 y Fw(The)g(re)o(gular)f
7094
(children)g(are)h(the)g(nodes)f(returned)g(by)h Fr(sub_nodes)f
7095
Fw(,)h(see)h(there)f(for)f(an)h(e)o(xplanation.)479 1722
7096
y Fv(Domain:.)g Fw(All)h(node)e(types.)479 1872 y Fv(See)i(also:.)e
7097
Fs(Iter)o(ator)o(s)p Black 396 2021 a Fu(\225)p Black
7098
60 w Fv(Method:.)h Fr(obj)44 b(#)h Fb(previous_node)479
7099
2170 y Fv(Signatur)o(e:.)659 2309 y Fr(method)e(previous_node)g(:)i
7100
('ext)f(node)479 2500 y Fv(Description:.)20 b Fw(Returns)g(the)g
7101
(predecessor)f(of)h Fr(obj)g Fw(in)g(the)g(list)i(of)e(re)o(gular)e
7102
(children)h(of)h(the)g(parent,)f(or)h(raise)479 2608
7103
y Fr(Not_found)f Fw(if)h(this)g(node)e(is)j(the)e(\002rst)i(child.)e
7104
(This)g(is)i(equi)n(v)n(alent)d(to)h Fr(obj)45 b(#)f(parent)g(#)h
7105
(nth_node)e(\(obj)h(#)479 2716 y(node_position)f(-)i(1\))20
7106
b Fw(.)479 2865 y Fv(Domain:.)g Fw(All)h(node)e(types.)p
7107
Black 396 3015 a Fu(\225)p Black 60 w Fv(Method:.)h Fr(obj)44
7108
b(#)h Fb(next_node)479 3164 y Fv(Signatur)o(e:.)659 3303
7109
y Fr(method)e(next_node)h(:)g('ext)h(node)479 3494 y
7110
Fv(Description:.)20 b Fw(Returns)g(the)g(successor)g(of)g
7111
Fr(obj)g Fw(in)h(the)f(list)h(of)f(re)o(gular)f(children)f(of)i(the)h
7112
(parent,)d(or)i(raise)479 3602 y Fr(Not_found)g Fw(if)g(this)h(node)e
7113
(is)i(the)f(last)h(child.)f(This)g(is)h(equi)n(v)n(alent)e(to)h
7114
Fr(obj)44 b(#)h(parent)f(#)h(nth_node)e(\(obj)h(#)479
7115
3710 y(node_position)f(+)i(1\))20 b Fw(.)479 3859 y Fv(Domain:.)g
7116
Fw(All)h(node)e(types.)p Black 396 4009 a Fu(\225)p Black
7117
60 w Fv(Method:.)h Fr(obj)44 b(#)h Fb(nth_node)f Fr(n)479
7118
4158 y Fv(Signatur)o(e:.)659 4297 y Fr(method)f(nth_node)h(:)h(int)f(-)
7119
p Fp(>)g Fr('ext)g(node)479 4488 y Fv(Description:.)19
7120
b Fw(Returns)g(the)h(n-th)f(re)o(gular)f(child)h(of)g
7121
Fr(obj)g Fw(,)h Fr(n)45 b Fp(>)p Fr(=)f(0)20 b Fw(.)g(Raises)h
7122
Fr(Not_found)d Fw(if)i(the)g(inde)o(x)e Fr(n)i Fw(is)g(out)479
7123
4596 y(of)g(the)g(v)n(alid)g(range.)479 4745 y Fv(Domain:.)g
7124
Fw(All)h(node)e(types.)p Black 3800 5278 a Fs(59)p Black
7127
60 59 bop Black 2225 67 a Fs(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr)
7128
m(esenting)g(the)g(document)p Black Black 396 579 a Fu(\225)p
7129
Black 60 w Fv(Method:.)g Fr(obj)44 b(#)h Fb(node_type)479
7130
728 y Fv(Signatur)o(e:.)659 867 y Fr(method)e(node_type)h(:)g
7131
(node_type)479 1058 y Fv(Description:.)20 b Fw(Returns)g(the)g(type)g
7132
(of)g Fr(obj)g Fw(:)p Black 479 1290 a Fa(\225)p Black
7133
62 w Fr(T_element)44 b(t)20 b Fw(:)h(The)f(node)f(is)i(an)f(element)g
7134
(with)g(type)g Fr(t)p Black 479 1398 a Fa(\225)p Black
7135
62 w Fr(T_data)g Fw(:)h(The)f(node)f(is)i(a)g(data)f(node)p
7136
Black 479 1506 a Fa(\225)p Black 62 w Fr(T_comment)g
7137
Fw(:)g(The)g(node)f(is)j(a)e(comment)f(node)p Black 479
7138
1614 a Fa(\225)p Black 62 w Fr(T_pinstr)44 b(n)20 b Fw(:)h(The)f(node)f
7139
(is)i(a)g(processing)e(instruction)g(with)h(tar)o(get)f
7140
Fr(n)p Black 479 1722 a Fa(\225)p Black 62 w Fr(T_super_root)g
7141
Fw(:)i(The)f(node)f(is)i(a)g(super)e(root)h(node)p Black
7142
479 1830 a Fa(\225)p Black 62 w Fr(T_attribute)43 b(n)21
7143
b Fw(:)g(The)f(node)f(is)i(an)f(attrib)n(ute)g(with)g(name)g
7144
Fr(n)p Black 479 1938 a Fa(\225)p Black 62 w Fr(T_namespace)43
7145
b(p)21 b Fw(:)g(The)f(node)f(is)i(a)f(namespace)f(with)i(pre\002x)e
7146
Fr(p)479 2129 y Fv(Domain:.)h Fw(All)h(node)e(types.)p
7147
Black 396 2278 a Fu(\225)p Black 60 w Fv(Method:.)h Fr(obj)44
7148
b(#)h Fb(node_position)479 2428 y Fv(Signatur)o(e:.)659
7149
2566 y Fr(method)e(node_position)g(:)i(int)479 2757 y
7150
Fv(Description:.)19 b Fw(Returns)h(the)g(position)f(of)g
7151
Fr(obj)h Fw(among)e(all)i(children)f(of)g(the)h(parent)e(node.)h
7152
(Positions)h(are)f(counted)479 2865 y(from)g(0.)h(There)g(are)g(se)n(v)
7153
o(eral)f(cases:)p Black 479 3098 a Fa(\225)p Black 62
7154
w Fw(The)h(re)o(gular)f(nodes)g(get)h(positions)g(from)f(0)h(to)h(l-1)f
7155
(where)f(l)i(is)g(the)g(length)e(of)h(the)g(list)h(of)f(re)o(gular)f
7156
(children.)p Black 479 3206 a Fa(\225)p Black 62 w Fw(Attrib)n(ute)h
7157
(nodes)g(and)f(namespace)g(nodes)h(are)g(irre)o(gular)e(nodes,)h(which)
7158
h(means)g(here)g(that)g(their)g(positions)f(are)562 3314
7159
y(counted)g(seperately)-5 b(.)19 b(All)h(attrib)n(ute)g(nodes)g(ha)n(v)
7160
o(e)f(positions)h(from)f(0)h(to)h(m-1;)e(all)i(namespace)e(nodes)g(ha)n
7161
(v)o(e)562 3422 y(positions)h(from)f(0)h(to)h(n-1.)p
7162
Black 479 3530 a Fa(\225)p Black 62 w Fw(If)f Fr(obj)h
7163
Fw(is)g(a)f(root,)g(this)g(method)f(raises)i Fr(Not_found)479
7164
3720 y Fv(Domain:.)f Fw(All)h(node)e(types.)p Black 396
7165
3870 a Fu(\225)p Black 60 w Fv(Method:.)h Fr(obj)44 b(#)h
7166
Fb(node_path)479 4019 y Fv(Signatur)o(e:.)659 4158 y
7167
Fr(method)e(node_path)h(:)g(int)h(list)479 4349 y Fv(Description:.)20
7168
b Fw(Returns)g(the)g(list)h(of)f(node)f(positions)h(describing)f(the)h
7169
(location)f(of)h(this)h(node)e(in)h(the)h(whole)e(tree.)479
7170
4457 y(The)h(list)h(describes)f(the)g(path)g(from)f(the)h(root)g(node)f
7171
(do)n(wn)g(to)i(this)f(node;)f(the)i(\002rst)g(path)e(element)h(is)h
7172
(the)f(inde)o(x)f(of)479 4565 y(the)h(child)g(of)g(the)g(root,)g(the)g
7173
(second)f(path)h(element)f(is)j(the)e(inde)o(x)f(of)h(the)g(child)g(of)
7174
g(the)g(child,)f(and)h(so)h(on,)e(and)h(the)479 4673
7175
y(last)h(path)f(element)g(is)h(the)f(inde)o(x)f(of)h(this)h(node.)e
7176
(The)g(method)g(returns)h Fr([)g Fw(])g(if)h(this)g(node)e(is)i(the)f
7177
(root)g(node.)p Black 3800 5278 a Fs(60)p Black eop
7179
61 60 bop Black 2225 67 a Fs(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr)
7180
m(esenting)g(the)g(document)p Black 479 579 a Fw(Attrib)n(ute)g(and)g
7181
(namespace)f(nodes)g(are)h(not)g(part)g(of)g(the)g(re)o(gular)f(tree,)h
7182
(so)g(there)g(is)h(a)g(special)f(rule)g(for)f(them.)479
7183
687 y(Attrib)n(ute)h(nodes)g(of)g(an)g(element)f(node)g
7184
Fr(x)i Fw(ha)n(v)o(e)f(the)g(node)f(path)h Fr(x)44 b(#)h(node_path)e(@)
7185
i([-1;)f(p)21 b Fw(])f(where)g Fr(p)g Fw(is)479 795 y(the)g(position)g
7186
(of)g(the)g(attrib)n(ute)g(node.)f(Namespace)g(nodes)g(of)h(an)h
7187
(element)e(node)g Fr(x)i Fw(ha)n(v)o(e)e(the)i(node)e(path)h
7188
Fr(x)44 b(#)479 903 y(node_path)g(@)g([-2;)g(p)21 b Fw(])f(where)g
7189
Fr(p)h Fw(is)g(the)f(position)f(of)h(the)g(namespace)f(node.)g(\(This)h
7190
(de\002nition)f(respects)h(the)479 1011 y(document)e(order)-5
7191
b(.\))479 1160 y Fv(Domain:.)20 b Fw(All)h(node)e(types.)p
7192
Black 396 1310 a Fu(\225)p Black 60 w Fv(Method:.)h Fr(obj)44
7193
b(#)h Fb(data)479 1459 y Fv(Signatur)o(e:.)659 1598 y
7194
Fr(method)e(data)i(:)f(string)479 1789 y Fv(Description:.)20
7195
b Fw(This)g(method)f(returns)g(what)i(is)g(considered)d(as)j(the)f
7196
(data)g(of)g(the)g(node)g(which)f(depends)g(on)h(the)479
7197
1896 y(node)f(type:)p Black 479 2129 a Fa(\225)p Black
7198
62 w Fw(Data)i(nodes:)e(the)i(method)d(returns)i(the)g(character)f
7199
(string)h(the)g(node)f(represents)p Black 479 2237 a
7200
Fa(\225)p Black 62 w Fw(Element)h(nodes,)f(super)g(root)h(nodes:)f(the)
7201
h(method)f(returns)g(the)h(concatenated)e(character)h(strings)h(of)g
7202
(all)h(\(direct)562 2345 y(or)f(indirect\))f(data)h(nodes)g(belo)n(w)f
7203
Fr(obj)p Black 479 2453 a Fa(\225)p Black 62 w Fw(Comment)h(nodes:)f
7204
(the)h(method)f(returns)g(the)i(comment)d(string)i(\(without)f
7205
(delimiters\),)h(or)g(it)g(raises)h(Not_found)562 2561
7206
y(if)g(the)f(comment)f(string)h(is)h(not)f(set)p Black
7207
479 2669 a Fa(\225)p Black 62 w Fw(Processing)g(instructions:)f(the)h
7208
(method)f(returns)g(the)i(data)f(part)g(of)f(the)i(instruction,)d(or)i
7209
("")h(if)f(the)g(data)h(part)e(is)562 2777 y(missing)p
7210
Black 479 2884 a Fa(\225)p Black 62 w Fw(Attrib)n(ute)h(nodes:)g(the)g
7211
(method)f(returns)g(the)h(attrib)n(ute)g(v)n(alue)g(as)g(string,)g(or)g
7212
(it)h(raises)g Fr(Not_found)e Fw(if)h(the)562 2992 y(attrib)n(ute)g(is)
7213
h(implied.)p Black 479 3100 a Fa(\225)p Black 62 w Fw(Namespace)f
7214
(nodes:)f(the)h(method)f(returns)h(the)g(namespace)f(URI)479
7215
3291 y Fv(Domain:.)h Fw(All)h(node)e(types.)p Black 396
7216
3441 a Fu(\225)p Black 60 w Fv(Method:.)h Fr(obj)44 b(#)h
7217
Fb(position)479 3590 y Fv(Signatur)o(e:.)659 3729 y Fr(method)e
7218
(position)h(:)h(\(string)e(*)i(int)f(*)h(int\))479 3920
7219
y Fv(Description:.)20 b Fw(Returns)g(a)h(triple)f Fr
7220
(\(entity,line,pos\))d Fw(describing)i(the)h(location)g(of)f(the)i
7221
(element)e(in)i(the)479 4028 y(original)e(XML)i(te)o(xt.)e(This)i
7222
(triple)f(is)h(only)e(a)n(v)n(ailable)h(for)g(elements,)f(and)h(only)f
7223
(if)i(the)f(parser)f(has)i(been)479 4136 y(con\002gured)d(to)i(store)h
7224
(positions)e(\(see)i(parser)e(option)g Fr(store_element_positions)e
7225
Fw(\).)j(If)g(a)n(v)n(ailable,)g Fr(entity)479 4244 y
7226
Fw(describes)g(the)g(entity)g(where)g(the)g(element)f(occurred,)f
7227
Fr(line)i Fw(is)i(the)e(line)g(number)e Fp(>)p Fr(=)45
7228
b(1)20 b Fw(,)h(and)f Fr(pos)g Fw(is)h(the)f(byte)479
7229
4351 y(position)g(of)g(the)g(\002rst)h(character)e(of)h(the)g(element)f
7230
(in)i(the)f(line.)479 4501 y(If)g(una)n(v)n(ailable,)f(the)h(method)f
7231
(will)i(return)e(the)h(triple)g Fr(\("?",0,0\))f Fw(.)479
7232
4650 y Fv(Domain:.)h Fw(All)g(node)f(types.)h(Note)g(that)g(the)g
7233
(method)f(will)h(al)o(w)o(ays)h(return)e Fr(\("?",0,0\))g
7234
Fw(for)g(non-element)f(nodes.)p Black 396 4800 a Fu(\225)p
7235
Black 60 w Fv(Method:.)i Fr(obj)44 b(#)h Fb(comment)p
7236
Black 3800 5278 a Fs(61)p Black eop
7238
62 61 bop Black 2225 67 a Fs(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr)
7239
m(esenting)g(the)g(document)p Black 479 579 a Fv(Signatur)o(e:.)659
7240
718 y Fr(method)43 b(comment)h(:)h(string)f(option)479
7241
909 y Fv(Description:.)20 b Fw(Returns)g Fr(Some)44 b(text)20
7242
b Fw(if)h(the)f(node)f(is)i(a)g(comment)e(node)g(and)g(if)i
7243
Fr(text)f Fw(is)h(the)f(comment)f(string)479 1016 y(\(without)g(the)i
7244
(delimiters)e Fp(<)p Fr(-)i Fw(and)e Fr(-)p Fp(>)i Fw(\).)f(Otherwise,)
7245
g Fr(None)g Fw(is)h(passed)f(back.)479 1166 y(Note:)h(The)e
7246
Fr(data)h Fw(method)f(also)i(returns)e(the)h(comment)f(string,)h(b)n
7247
(ut)g(it)h(raises)g Fr(Not_found)e Fw(if)h(the)h(string)e(is)j(not)479
7248
1274 y(a)n(v)n(ailable.)479 1423 y Fv(Domain:.)e Fw(All)h(node)e
7249
(types.)h(Note)g(that)g(the)g(method)f(will)i(al)o(w)o(ays)g(return)e
7250
Fr(None)h Fw(for)f(non-comment)e(nodes.)p Black 396 1573
7251
a Fu(\225)p Black 60 w Fv(Method:.)j Fr(obj)44 b(#)h
7252
Fb(pinstr)f Fr(n)479 1722 y Fv(Signatur)o(e:.)659 1861
7253
y Fr(method)f(pinstr)h(:)h(string)f(-)p Fp(>)g Fr(proc_instruction)e
7254
(list)479 2052 y Fv(Description:.)20 b Fw(Returns)g(all)h(processing)e
7255
(instructions)g(that)h(are)g(directly)g(contained)e(in)i
7256
Fr(obj)h Fw(and)e(that)i(ha)n(v)o(e)e(a)479 2160 y(tar)o(get)h
7257
(speci\002cation)f(of)h Fr(n)h Fw(.)479 2309 y Fv(Domain:.)f
7258
Fw(All)h(node)e(types.)h(Ho)n(we)n(v)o(er)m(,)e(this)i(method)f(is)i
7259
(only)f(reasonable)e(for)i(processing)f(instruction)g(nodes,)479
7260
2417 y(and)h(for)f(elements;)h(for)g(all)h(other)e(node)g(types)h(the)h
7261
(method)d(will)j(return)e(the)h(empty)g(list.)h(Note)f(that)g(the)g
7262
(parser)479 2525 y(can)g(be)g(con\002gured)e(such)i(that)g(it)h
7263
(creates)g(processing)d(instruction)h(nodes)h(or)g(not;)g(in)g(the)g
7264
(\002rst)h(case,)g(only)e(the)479 2633 y(processing)g(instruction)g
7265
(nodes)g(contain)h(processing)e(instruction,)h(in)i(the)f(latter)g
7266
(case,)g(only)g(the)g(elements)479 2741 y(embracing)e(the)j
7267
(instructions)e(contain)g(them.)p Black 396 2890 a Fu(\225)p
7268
Black 60 w Fv(Method:.)h Fr(obj)44 b(#)h Fb(pinstr_names)479
7269
3040 y Fv(Signatur)o(e:.)659 3178 y Fr(method)e(pinstr_names)g(:)i
7270
(string)f(list)479 3369 y Fv(Description:.)20 b Fw(Returns)g(the)g(tar)
7271
o(gets)g(of)g(all)g(processing)f(instructions)g(that)i(are)f(directly)f
7272
(contained)g(in)h Fr(obj)g Fw(.)479 3519 y Fv(Domain:.)g
7273
Fw(All)h(node)e(types.)h(Ho)n(we)n(v)o(er)m(,)e(this)i(method)f(is)i
7274
(only)f(reasonable)e(for)i(processing)f(instruction)g(nodes,)479
7275
3627 y(and)h(for)f(elements;)h(for)g(all)h(other)e(node)g(types)h(the)h
7276
(method)d(will)j(return)e(the)h(empty)g(list.)h(Note)f(that)g(the)g
7277
(parser)479 3735 y(can)g(be)g(con\002gured)e(such)i(that)g(it)h
7278
(creates)g(processing)d(instruction)h(nodes)h(or)g(not;)g(in)g(the)g
7279
(\002rst)h(case,)g(only)e(the)479 3843 y(processing)g(instruction)g
7280
(nodes)g(contain)h(processing)e(instruction,)h(in)i(the)f(latter)g
7281
(case,)g(only)g(the)g(elements)479 3950 y(embracing)e(the)j
7282
(instructions)e(contain)g(them.)p Black 396 4100 a Fu(\225)p
7283
Black 60 w Fv(Method:.)h Fr(obj)44 b(#)h Fb(write)f Fr(~prefixes)f
7284
(stream)h(enc)479 4249 y Fv(Signatur)o(e:.)659 4388 y
7285
Fr(method)f(write)h(:)1062 4485 y(?prefixes:string)e(list)i(-)p
7286
Fp(>)703 4582 y Fr(?default:string)f(-)p Fp(>)1062 4679
7287
y Fr(Pxp_types.output_stream)e(-)p Fp(>)j Fr(Pxp_types.encoding)e(-)p
7288
Fp(>)j Fr(unit)p Black 3800 5278 a Fs(62)p Black eop
7290
63 62 bop Black 2225 67 a Fs(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr)
7291
m(esenting)g(the)g(document)p Black 479 579 a Fv(Description:.)g
7292
Fw(Write)h(the)f(contents)f(of)h(this)h(node)e(and)h(the)g(subtrees)g
7293
(to)g(the)g(passed)g Fr(stream)g Fw(encoded)f(as)h Fr(enc)h
7294
Fw(.)479 687 y(The)f(generated)f(output)g(is)i(again)e(XML.)h(The)g
7295
(output)f(style)h(is)h(rather)f(compact)f(and)g(should)h(not)f(be)i
7296
(considered)479 795 y(as)g("pretty)f(printing".)479 944
7297
y(Option)g Fr(~prefixes)f Fw(:)i(The)f(class)h Fr
7298
(namespace_element_impl)c Fw(interprets)i(this)i(option)e(and)g(passes)
7299
i(it)479 1052 y(recursi)n(v)o(ely)e(to)h(subordinate)e(in)m(v)n
7300
(ocations)h(of)h Fr(write)f Fw(.)i(The)f(meaning)f(is)i(that)f(the)g
7301
(normpre\002x)o(es)e(enumerated)g(by)479 1160 y(this)j(list)g(ha)n(v)o
7302
(e)f(already)f(been)g(declared)g(by)h(surrounding)d(elements.)j(The)g
7303
(option)f(def)o(aults)g(to)i([])f(forcing)e(the)479 1268
7304
y(method)h(to)h(output)f(all)i(necessary)f(pre\002x)f(declarations.)479
7305
1417 y(Option)h Fr(~default)f Fw(:)i(Speci\002es)f(the)h(normpre\002x)c
7306
(that)k(becomes)e(the)h(def)o(ault)g(namespace)f(in)h(the)g(output.)479
7307
1567 y(KNO)m(WN)h(B)o(UG:)h(comment)c(nodes)i(are)g(not)g(printed.)479
7308
1716 y Fv(Domain:.)g Fw(All)h(re)o(gular)d(node)h(types)h(\(elements,)g
7309
(data)g(nodes,)f(comments,)g(processing)g(instructions,)g(super)g(root)
7310
479 1824 y(nodes\).)396 2057 y Fv(Attrib)n(ute)h(obser)o(v)o(ers)h(.)p
7311
Black 396 2289 a Fu(\225)p Black 60 w Fv(Method:.)f Fr(obj)44
7312
b(#)h Fb(attribute)e Fr(name)479 2439 y Fv(Signatur)o(e:.)659
7313
2577 y Fr(method)g(attribute)h(:)g(string)g(-)p Fp(>)h
7314
Fr(Pxp_types.att_value)479 2768 y Fv(Description:.)20
7315
b Fw(Returns)g(the)g(v)n(alue)g(of)g(the)g(attrib)n(ute)g
7316
Fr(name)g Fw(.)479 2918 y(If)g(the)h(parser)e(is)i(in)g(v)n(alidating)d
7317
(mode,)h(the)i(method)d(is)j(able)g(to)f(return)f(v)n(alues)h(for)f
7318
(declared)g(attrib)n(utes,)h(and)g(it)479 3026 y(raises)h
7319
Fr(Not_found)e Fw(for)h(an)o(y)f(undeclared)f(attrib)n(ute.)i(Note)g
7320
(that)g(it)h(e)n(v)o(en)e(returns)h(a)g(v)n(alue)g(if)g(the)g(attrib)n
7321
(ute)g(is)479 3133 y(actually)g(missing)g(b)n(ut)g(is)h(declared)e(as)i
7322
Fr(#IMPLIED)f Fw(or)g(has)g(a)h(def)o(ault)e(v)n(alue.)479
7323
3283 y(If)h(the)f(parser)g(\(more)g(precisely)-5 b(,)18
7324
b(the)i(DTD)f(object\))g(is)i(in)e(well-formedness)f(mode,)g(the)i
7325
(method)e(is)j(able)e(to)h(return)479 3391 y(v)n(alues)g(for)g
7326
(de\002ned)f(attrib)n(utes,)h(and)f(it)i(raises)g Fr(Not_found)e
7327
Fw(for)h(an)o(y)f(unkno)n(wn)f(attrib)n(ute)i(name.)479
7328
3540 y(Possible)h(return)e(v)n(alues)h(are:)p Black 479
7329
3773 a Fa(\225)p Black 62 w Fr(Implied_value)f Fw(:)i(The)f(attrib)n
7330
(ute)f(has)i(been)e(declared)g(with)i(the)f(k)o(e)o(yw)o(ord)e
7331
Fr(#IMPLIED)i Fw(,)g(and)g(the)g(attrib)n(ute)562 3881
7332
y(de\002nition)f(is)i(missing)g(in)f(the)g(attrib)n(ute)g(list)h(of)f
7333
(the)g(element.)p Black 479 3989 a Fa(\225)p Black 62
7334
w Fr(Value)44 b(s)21 b Fw(:)g(The)f(attrib)n(ute)f(has)i(been)e
7335
(declared)g(as)i(type)f Fr(CDATA)g Fw(,)g(as)h Fr(ID)g
7336
Fw(,)f(as)h Fr(IDREF)f Fw(,)g(as)h Fr(ENTITY)f Fw(,)h(or)f(as)562
7337
4097 y Fr(NMTOKEN)g Fw(,)g(or)g(as)h(enumeration)d(or)i(notation,)f
7338
(and)g(one)h(of)g(the)g(tw)o(o)g(conditions)f(holds:)h(\(1\))f(The)h
7339
(attrib)n(ute)562 4204 y(v)n(alue)g(is)h(de\002ned)e(in)h(the)h(attrib)
7340
n(ute)e(list)j(in)e(which)g(case)g(this)h(v)n(alue)f(is)h(returned)d
7341
(in)i(the)h(string)f Fr(s)g Fw(.)h(\(2\))e(The)562 4312
7342
y(attrib)n(ute)h(has)h(been)e(omitted,)g(and)h(the)g(DTD)g(declares)g
7343
(the)g(attrib)n(ute)g(with)h(a)f(def)o(ault)g(v)n(alue.)f(The)h(def)o
7344
(ault)562 4420 y(v)n(alue)g(is)h(returned)d(in)j Fr(s)f
7345
Fw(.)562 4570 y(Summarized,)e Fr(Value)44 b(s)21 b Fw(is)g(returned)e
7346
(for)g(non-implied,)f(non-list)h(attrib)n(ute)h(v)n(alues.)562
7347
4719 y(Furthermore,)e Fr(Value)44 b(s)20 b Fw(is)i(returned)c(for)h
7348
(non-declared)f(attrib)n(utes)i(if)g(the)g(DTD)h(object)e(allo)n(ws)i
7349
(this,)f(for)562 4827 y(instance,)g(if)g(the)h(DTD)f(object)g
7350
(speci\002es)g(well-formedness)e(mode.)p Black 3800 5278
7353
64 63 bop Black 2225 67 a Fs(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr)
7354
m(esenting)g(the)g(document)p Black Black 479 579 a Fa(\225)p
7355
Black 62 w Fr(Valuelist)44 b(l)19 b Fw(:)h(The)e(attrib)n(ute)h(has)g
7356
(been)g(declared)e(as)j(type)f Fr(IDREFS)f Fw(,)i(as)f
7357
Fr(ENTITIES)g Fw(,)g(or)g Fr(NMTOKENS)f Fw(,)h(and)562
7358
687 y(one)h(of)g(the)g(tw)o(o)h(conditions)d(holds:)i(\(1\))g(The)f
7359
(attrib)n(ute)h(v)n(alue)g(is)h(de\002ned)e(in)h(the)h(attrib)n(ute)e
7360
(list)j(in)e(which)g(case)562 795 y(the)h(space-separated)d(tok)o(ens)h
7361
(of)h(the)h(v)n(alue)e(are)h(returned)f(in)h(the)g(string)g(list)h
7362
Fr(l)g Fw(.)f(\(2\))g(The)g(attrib)n(ute)g(has)g(been)562
7363
903 y(omitted,)g(and)f(the)h(DTD)h(declares)e(the)i(attrib)n(ute)e
7364
(with)i(a)f(def)o(ault)g(v)n(alue.)f(The)h(def)o(ault)g(v)n(alue)f(is)i
7365
(returned)e(in)h Fr(l)g Fw(.)562 1052 y(Summarized,)e
7366
Fr(Valuelist)44 b(l)20 b Fw(is)i(returned)c(for)h(all)i(list-type)f
7367
(attrib)n(ute)g(v)n(alues.)479 1243 y(Note)g(that)h(before)e(the)h
7368
(attrib)n(ute)g(v)n(alue)f(is)i(returned,)d(the)j(v)n(alue)e(is)i
7369
(normalized.)d(This)j(means)e(that)i(ne)n(wlines)f(are)479
7370
1351 y(con)m(v)o(erted)e(to)i(spaces,)g(and)g(that)g(references)f(to)h
7371
(character)f(entities)i(\(i.e.)f Fr(&#n;)g Fw(\))g(and)g(general)f
7372
(entities)i(\(i.e.)479 1459 y Fr(&name;)f Fw(\))g(are)h(e)o(xpanded;)c
7373
(if)k(necessary)-5 b(,)19 b(the)h(e)o(xpansion)e(is)j(performed)d
7374
(recursi)n(v)o(ely)-5 b(.)479 1608 y Fv(Domain:.)20 b
7375
Fw(All)h(node)e(types.)h(Ho)n(we)n(v)o(er)m(,)e(only)h(elements)h(and)g
7376
(attrib)n(ute)f(nodes)h(will)h(return)e(v)n(alues,)g(all)i(other)479
7377
1716 y(node)e(types)h(al)o(w)o(ays)h(raise)g Fr(Not_found)e
7378
Fw(.)p Black 396 1866 a Fu(\225)p Black 60 w Fv(Method:.)h
7379
Fr(obj)44 b(#)h Fb(required_string_attribute)c Fr(name)479
7380
2015 y Fv(Signatur)o(e:.)659 2154 y Fr(method)i
7381
(required_string_attribute)e(:)k(string)f(-)p Fp(>)g
7382
Fr(string)479 2345 y Fv(Description:.)18 b Fw(Returns)h(the)g(v)n(alue)
7383
f(of)g(the)h(attrib)n(ute)f Fr(name)h Fw(as)g(string,)f(i.e.)h(if)g
7384
(the)g(v)n(alue)f(of)g(the)h(attrib)n(ute)f(is)i Fr(Value)479
7385
2453 y(s)h Fw(,)f(this)h(method)e(will)i(return)e(simply)h
7386
Fr(s)g Fw(,)h(and)e(if)i(the)f(v)n(alue)g(is)h Fr(Valuelist)43
7387
b(l)21 b Fw(,)f(this)h(method)e(will)i(return)e(the)479
7388
2561 y(elements)h(of)g Fr(l)h Fw(separated)e(by)h(spaces.)g(If)g(the)g
7389
(attrib)n(ute)g(v)n(alue)f(is)j Fr(Implied_value)c Fw(,)j(the)f(method)
7390
f(will)i(f)o(ail.)479 2710 y Fv(Domain:.)f Fw(All)h(node)e(types.)h(Ho)
7391
n(we)n(v)o(er)m(,)e(only)h(elements)h(and)g(attrib)n(ute)f(nodes)h
7392
(will)h(return)e(v)n(alues,)g(all)i(other)479 2818 y(node)e(types)h(al)
7393
o(w)o(ays)h(f)o(ail.)p Black 396 2967 a Fu(\225)p Black
7394
60 w Fv(Method:.)f Fr(obj)44 b(#)h Fb(optional_string_attribute)c
7395
Fr(name)479 3117 y Fv(Signatur)o(e:.)659 3256 y Fr(method)i
7396
(optional_string_attribute)e(:)k(string)f(-)p Fp(>)g
7397
Fr(string)g(option)479 3446 y Fv(Description:.)20 b Fw(Returns)g(the)g
7398
(v)n(alue)g(of)g(the)g(attrib)n(ute)g Fr(name)g Fw(as)h(optional)d
7399
(string,)i(i.e.)g(if)h(the)f(v)n(alue)f(of)h(the)h(attrib)n(ute)479
7400
3554 y(is)g Fr(Value)44 b(s)21 b Fw(,)g(this)f(method)f(will)i(return)e
7401
Fr(Some)44 b(s)21 b Fw(,)f(and)g(if)g(the)h(v)n(alue)e(is)i
7402
Fr(Valuelist)44 b(l)20 b Fw(,)h(this)f(method)f(will)479
7403
3662 y(return)g Fr(Some)44 b(s)21 b Fw(where)f Fr(s)g
7404
Fw(consists)h(of)f(the)g(concatenated)e(elements)i(of)g
7405
Fr(l)h Fw(separated)e(by)h(spaces.)g(If)g(the)g(attrib)n(ute)479
7406
3770 y(v)n(alue)g(is)h Fr(Implied_value)d Fw(,)j(the)f(method)f(will)i
7407
(return)e Fr(None)h Fw(.)479 3920 y Fv(Domain:.)g Fw(All)h(node)e
7408
(types.)h(Ho)n(we)n(v)o(er)m(,)e(only)h(elements)h(and)g(attrib)n(ute)f
7409
(nodes)h(will)h(return)e Fr(Some)h Fw(v)n(alues,)f(all)479
7410
4028 y(other)h(node)f(types)h(al)o(w)o(ays)g(return)f
7411
Fr(None)i Fw(.)p Black 396 4177 a Fu(\225)p Black 60
7412
w Fv(Method:.)f Fr(obj)44 b(#)h Fb(required_list_attribute)c
7413
Fr(name)479 4327 y Fv(Signatur)o(e:.)659 4465 y Fr(method)i
7414
(required_list_attribute)e(:)k(string)f(-)p Fp(>)g Fr(string)g(list)479
7415
4656 y Fv(Description:.)20 b Fw(Returns)g(the)g(v)n(alue)g(of)g(the)g
7416
(attrib)n(ute)g Fr(name)g Fw(as)h(string)e(list,)i(i.e.)g(if)f(the)g(v)
7417
n(alue)g(of)g(the)g(attrib)n(ute)g(is)479 4764 y Fr(Valuelist)44
7418
b(l)20 b Fw(,)h(this)f(method)f(will)i(return)e(simply)h
7419
Fr(l)h Fw(,)f(and)g(if)g(the)g(v)n(alue)g(is)h Fr(Value)44
7420
b(s)21 b Fw(,)f(this)h(method)e(will)479 4872 y(return)g(the)i
7421
(one-element)d(list)j Fr([s)f Fw(].)g(If)h(the)f(attrib)n(ute)g(v)n
7422
(alue)f(is)i Fr(Implied_value)e Fw(,)h(the)g(method)f(will)i(f)o(ail.)p
7423
Black 3800 5278 a Fs(64)p Black eop
7425
65 64 bop Black 2225 67 a Fs(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr)
7426
m(esenting)g(the)g(document)p Black 479 579 a Fv(Domain:.)g
7427
Fw(All)h(node)e(types.)h(Ho)n(we)n(v)o(er)m(,)e(only)h(elements)h(and)g
7428
(attrib)n(ute)f(nodes)h(will)h(return)e(v)n(alues,)g(all)i(other)479
7429
687 y(node)e(types)h(al)o(w)o(ays)h(f)o(ail.)p Black
7430
396 836 a Fu(\225)p Black 60 w Fv(Method:.)f Fr(obj)44
7431
b(#)h Fb(required_list_attribute)c Fr(name)479 986 y
7432
Fv(Signatur)o(e:.)659 1124 y Fr(method)i(optional_list_attribute)e(:)k
7433
(string)f(-)p Fp(>)g Fr(string)g(list)479 1315 y Fv(Description:.)20
7434
b Fw(Returns)g(the)g(v)n(alue)g(of)g(the)g(attrib)n(ute)g
7435
Fr(name)g Fw(as)h(string)e(list,)i(i.e.)g(if)f(the)g(v)n(alue)g(of)g
7436
(the)g(attrib)n(ute)g(is)479 1423 y Fr(Valuelist)44 b(l)20
7437
b Fw(,)h(this)f(method)f(will)i(return)e(simply)h Fr(l)h
7438
Fw(,)f(and)g(if)g(the)g(v)n(alue)g(is)h Fr(Value)44 b(s)21
7439
b Fw(,)f(this)h(method)e(will)479 1531 y(return)g(the)i(one-element)d
7440
(list)j Fr([s)f Fw(].)g(If)h(the)f(attrib)n(ute)g(v)n(alue)f(is)i
7441
Fr(Implied_value)e Fw(,)h(the)g(method)f(will)i(return)e(the)479
7442
1639 y(empty)h(list)h Fr([)f Fw(].)479 1789 y Fv(Domain:.)g
7443
Fw(All)h(node)e(types.)h(Ho)n(we)n(v)o(er)m(,)e(only)h(elements)h(and)g
7444
(attrib)n(ute)f(nodes)h(will)h(return)e(non-empty)e(v)n(alues,)479
7445
1896 y(all)k(other)e(node)h(types)g(al)o(w)o(ays)g(return)f(the)h
7446
(empty)g(list.)p Black 396 2046 a Fu(\225)p Black 60
7447
w Fv(Method:.)g Fr(obj)44 b(#)h Fb(attribute_names)479
7448
2195 y Fv(Signatur)o(e:.)659 2334 y Fr(method)e(attribute_names)g(:)h
7449
(string)g(list)479 2525 y Fv(Description:.)20 b Fw(Returns)g(the)g
7450
(list)h(of)f(all)h(attrib)n(ute)f(names)g(of)g(this)g(element.)g(In)g
7451
(v)n(alidating)e(mode,)h(this)i(list)g(is)479 2633 y(simply)f(the)g
7452
(list)i(of)e(declared)e(attrib)n(utes.)i(In)g(well-formedness)e(mode,)h
7453
(this)i(list)g(is)g(the)g(list)g(of)f(de\002ned)f(attrib)n(utes.)479
7454
2782 y Fv(Domain:.)h Fw(All)h(node)e(types.)h(Ho)n(we)n(v)o(er)m(,)e
7455
(only)h(elements)h(and)g(attrib)n(ute)f(nodes)h(will)h(return)e(a)h
7456
(non-empty)e(list,)j(all)479 2890 y(other)f(node)f(types)h(al)o(w)o
7457
(ays)g(return)f(the)i(empty)e(list.)p Black 396 3040
7458
a Fu(\225)p Black 60 w Fv(Method:.)h Fr(obj)44 b(#)h
7459
Fb(attribute_type)e Fr(name)479 3189 y Fv(Signatur)o(e:.)659
7460
3328 y Fr(method)g(attribute_type)g(:)i(string)e(-)p
7461
Fp(>)i Fr(Pxp_types.att_type)479 3519 y Fv(Description:.)20
7462
b Fw(Returns)g(the)g(type)g(of)g(the)g(attrib)n(ute)g
7463
Fr(name)g Fw(.)g(If)g(the)h(attrib)n(ute)e(is)j(declared,)c(the)i
7464
(declared)f(type)h(is)479 3627 y(returned.)e(If)i(the)h(attrib)n(ute)e
7465
(is)j(de\002ned)d(b)n(ut)h(undeclared,)e(the)i(type)g
7466
Fr(A_cdata)f Fw(will)i(be)f(returned.)e(\(The)i(module)479
7467
3735 y Fr(Pxp_types)g Fw(contains)f(the)h(Caml)h(type)f(of)f(attrib)n
7468
(ute)h(types.\))g(This)g(method)f(raises)i Fr(Not_found)e
7469
Fw(if)h(the)h(attrib)n(ute)479 3843 y(is)g(unkno)n(wn.)479
7470
3992 y Fv(Domain:.)f Fw(All)h(node)e(types.)h(Ho)n(we)n(v)o(er)m(,)e
7471
(only)h(elements)h(and)g(attrib)n(ute)f(nodes)h(will)h(return)e(v)n
7472
(alues,)g(all)i(other)479 4100 y(node)e(types)h(al)o(w)o(ays)h(raise)g
7473
Fr(Not_found)e Fw(.)p Black 396 4249 a Fu(\225)p Black
7474
60 w Fv(Method:.)h Fr(obj)44 b(#)h Fb(attributes)479
7475
4399 y Fv(Signatur)o(e:.)659 4537 y Fr(method)e(attributes)h(:)g
7476
(\(string)g(*)h(Pxp_types.att_value\))c(list)479 4728
7477
y Fv(Description:.)20 b Fw(Returns)g(the)g(list)h(of)f
7478
Fr(\(name,value\))f Fw(pairs)h(describing)f(all)i(attrib)n(utes)f
7479
(\(declared)e(attrib)n(utes)479 4836 y(plus)i(de\002ned)g(attrib)n
7480
(utes\).)p Black 3800 5278 a Fs(65)p Black eop
7482
66 65 bop Black 2225 67 a Fs(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr)
7483
m(esenting)g(the)g(document)p Black 479 579 a Fv(Domain:.)g
7484
Fw(All)h(node)e(types.)h(Ho)n(we)n(v)o(er)m(,)e(only)h(elements)h(and)g
7485
(attrib)n(ute)f(nodes)h(will)h(return)e(non-empty)e(v)n(alues,)479
7486
687 y(all)k(other)e(node)h(types)g(al)o(w)o(ays)g(return)f(the)h(empty)
7487
g(list.)p Black 396 836 a Fu(\225)p Black 60 w Fv(Method:.)g
7488
Fr(obj)44 b(#)h Fb(id_attribute_name)479 986 y Fv(Signatur)o(e:.)659
7489
1124 y Fr(method)e(id_attribute_name)f(:)j(string)479
7490
1315 y Fv(Description:.)20 b Fw(Returns)g(the)g(name)g(of)g(the)g(\(at)
7491
g(most)g(one\))g(attrib)n(ute)f(being)h(declared)f(as)i(type)e
7492
Fr(ID)i Fw(.)f(The)g(method)479 1423 y(raises)h Fr(Not_found)e
7493
Fw(if)i(there)f(is)h(no)e(declared)g Fr(ID)i Fw(attrib)n(ute)f(for)f
7494
(the)h(element)g(type.)479 1573 y Fv(Domain:.)g Fw(All)h(node)e(types.)
7495
h(Ho)n(we)n(v)o(er)m(,)e(only)h(elements)h(and)g(attrib)n(ute)f(nodes)h
7496
(will)h(return)e(names,)g(all)i(other)479 1681 y(node)e(types)h(al)o(w)
7497
o(ays)h(raise)g Fr(Not_found)e Fw(.)p Black 396 1830
7498
a Fu(\225)p Black 60 w Fv(Method:.)h Fr(obj)44 b(#)h
7499
Fb(id_attribute_value)479 1979 y Fv(Signatur)o(e:.)659
7500
2118 y Fr(method)e(id_attribute_value)f(:)j(string)479
7501
2309 y Fv(Description:.)20 b Fw(Returns)g(the)g(string)g(v)n(alue)g(of)
7502
f(the)i(\(at)f(most)g(one\))f(attrib)n(ute)h(being)g(declared)e(as)j
7503
(type)f Fr(ID)h Fw(.)f(The)479 2417 y(method)f(raises)i
7504
Fr(Not_found)e Fw(if)i(there)e(is)i(no)f(declared)f Fr(ID)i
7505
Fw(attrib)n(ute)e(for)h(the)g(element)g(type.)479 2566
7506
y Fv(Domain:.)g Fw(All)h(node)e(types.)h(Ho)n(we)n(v)o(er)m(,)e(only)h
7507
(elements)h(and)g(attrib)n(ute)f(nodes)h(will)h(return)e(names,)g(all)i
7508
(other)479 2674 y(node)e(types)h(al)o(w)o(ays)h(raise)g
7509
Fr(Not_found)e Fw(.)p Black 396 2824 a Fu(\225)p Black
7510
60 w Fv(Method:.)h Fr(obj)44 b(#)h Fb(idref_attribute_names)479
7511
2973 y Fv(Signatur)o(e:.)659 3112 y Fr(method)e(idref_attribute_names)f
7512
(:)i(string)g(list)479 3303 y Fv(Description:.)20 b Fw(Returns)g(the)g
7513
(names)g(of)g(the)g(attrib)n(utes)g(being)f(declared)g(as)i(type)f
7514
Fr(IDREF)g Fw(or)g Fr(IDREFS)g Fw(.)479 3452 y Fv(Domain:.)g
7515
Fw(All)h(node)e(types.)h(Ho)n(we)n(v)o(er)m(,)e(only)h(elements)h(and)g
7516
(attrib)n(ute)f(nodes)h(will)h(return)e(names,)g(all)i(other)479
7517
3560 y(node)e(types)h(al)o(w)o(ays)h(return)e(the)h(empty)g(list.)p
7518
Black 396 3710 a Fu(\225)p Black 60 w Fv(Method:.)g Fr(obj)44
7519
b(#)h Fb(attributes_as_nodes)479 3859 y Fv(Signatur)o(e:.)659
7520
3998 y Fr(method)e(attributes_as_nodes)f(:)j('ext)f(node)g(list)479
7521
4189 y Fv(Description:.)20 b Fw(Returns)g(all)h(attrib)n(utes)f(\(i.e.)
7522
g(declared)f(plus)h(de\002ned)f(attrib)n(utes\))h(as)h(a)f(list)h(of)f
7523
(attrib)n(ute)g(nodes)479 4297 y(with)h(node)e(type)h
7524
Fr(T_attribute)43 b(name)20 b Fw(.)479 4446 y(This)h(method)d(should)i
7525
(be)g(used)g(if)g(it)h(is)g(required)e(for)g(typing)g(reasons)h(that)g
7526
(the)g(attrib)n(utes)g(ha)n(v)o(e)g(also)h(type)e Fr(node)h
7527
Fw(.)479 4554 y(A)h(common)d(e)o(xample)h(are)h(sets)i(that)e(may)g
7528
(both)f(contain)g(elements)h(and)g(attrib)n(utes,)f(as)i(the)o(y)f(are)
7529
g(used)g(in)g(the)479 4662 y(XP)o(ath)g(language.)p Black
7530
3798 5278 a Fs(66)p Black eop
7532
67 66 bop Black 2225 67 a Fs(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr)
7533
m(esenting)g(the)g(document)p Black 479 579 a Fw(The)g(attrib)n(ute)g
7534
(nodes)f(are)i(read-only;)c(an)o(y)j(call)h(to)f(a)g(method)f
7535
(modifying)f(their)i(contents)f(will)i(raise)479 687
7536
y Fr(Method_not_applicable)d Fw(.)i(In)g(order)f(to)h(get)g(the)h(v)n
7537
(alue)e(of)h(such)g(an)g(attrib)n(ute)g(node)f Fr(anode)h
7538
Fw(,)g(one)g(can)479 795 y(in)m(v)n(ok)o(e)f(the)h(method)f
7539
Fr(attribute)g Fw(:)479 944 y Fr(anode)44 b(#)h(attribute)e(name)479
7540
1094 y Fw(where)20 b Fr(name)g Fw(is)h(the)f(name)g(of)g(the)g(attrib)n
7541
(ute)g(represented)e(by)i Fr(anode)g Fw(.)g(This)h(will)g(return)e(the)
7542
h(attrib)n(ute)g(v)n(alue)f(as)479 1202 y Fr(att_value)h
7543
Fw(.)g(Of)g(course,)g(the)g(other)f(attrib)n(ute)h(observ)o(ers)f(can)h
7544
(be)g(applied)f(as)i(well.)f(Furthermore,)e(the)i(method)479
7545
1310 y Fr(data)g Fw(will)h(return)e(the)i(attrib)n(ute)e(v)n(alue)h(as)
7546
h(string.)e(Ho)n(we)n(v)o(er)m(,)f(e)n(v)o(ery)h(attrib)n(ute)h(node)f
7547
(only)h(contains)f(the)h(v)n(alue)g(of)479 1417 y(the)g(one)g(attrib)n
7548
(ute)g(it)h(represents,)e(and)h(it)g(does)g(not)g(mak)o(e)g(sense)h(to)
7549
f(pass)h(names)f(of)f(other)h(attrib)n(utes)g(to)g(the)479
7550
1525 y(observ)o(er)f(methods.)479 1675 y(The)h(attrib)n(ute)g(nodes)f
7551
(li)n(v)o(e)h(outside)f(of)h(the)g(re)o(gular)e(XML)i(tree,)g(and)g
7552
(the)o(y)f(are)h(not)f(considered)g(as)h(children)f(of)h(the)479
7553
1783 y(element)g(node.)f(Ho)n(we)n(v)o(er)m(,)f(the)i(element)g(node)f
7554
(is)i(the)f(parent)f(node)h(of)f(the)i(attrib)n(ute)e(nodes)h(\(i.e.)g
7555
(the)479 1891 y(children/parent)e(relationship)g(is)k(asymmetric\).)479
7556
2040 y(The)e(method)f Fr(attributes_as_nodes)f Fw(computes)g(the)j
7557
(list)g(of)f(attrib)n(ute)g(nodes)f(when)h(it)h(is)g(\002rst)g(in)m(v)n
7558
(ok)o(ed,)d(and)479 2148 y(it)j(will)g(return)e(the)h(same)h(list)g
7559
(again)e(in)i(subsequent)d(in)m(v)n(ocations.)479 2297
7560
y Fv(Domain:.)i Fw(This)g(method)f(is)i(only)e(applicable)g(to)i
7561
(elements.)396 2530 y Fv(Mutating)f(methods)h(.)f Fw(The)g(follo)n
7562
(wing)f(methods)g(may)g(be)i(used)e(to)i(modify)d(the)j(XML)f(tree.)g
7563
(These)g(methods)f(do)396 2638 y(not)h(v)n(alidate)g(the)g(changes,)f
7564
(and)g(the)i(result)f(may)g(be)g(in)m(v)n(alid.)p Black
7565
396 2870 a Fu(\225)p Black 60 w Fv(Method:.)g Fr(obj)44
7566
b(#)h Fb(append_node)e Fr(n)479 3020 y Fv(Signatur)o(e:.)659
7567
3158 y Fr(method)g(append_node)g(:)i('ext)f(node)g(-)p
7568
Fp(>)h Fr(unit)479 3349 y Fv(Description:.)20 b Fw(Adds)g(the)g(node)f
7569
Fr(n)i Fw(to)f(the)g(list)i(of)e(children)e(of)i Fr(obj)h
7570
Fw(.)f(The)g(method)f(e)o(xpects)g(that)i Fr(n)f Fw(is)h(a)g(root,)e
7571
(and)479 3457 y(it)i(requires)e(that)i Fr(n)f Fw(and)g
7572
Fr(obj)g Fw(share)g(the)g(same)h(DTD.)479 3607 y(Note:)g(This)f(method)
7573
f(does)h(not)f(check)h(whether)f(the)h(modi\002ed)f(XML)h(tree)h(is)g
7574
(still)g(v)n(alid.)479 3756 y Fv(Domain:.)f Fw(This)g(method)f(is)i
7575
(only)e(applicable)g(to)i(element)e(nodes.)479 3906 y
7576
Fv(See)i(also:.)e Fs(A)i(node)e(can)h(only)f(be)i(added)d(if)j(it)g(is)
7577
g(a)f(r)l(oot)p Black 396 4055 a Fu(\225)p Black 60 w
7578
Fv(Method:.)g Fr(obj)44 b(#)h Fb(insert_nodes)e Fr(~pos)h(nl)479
7579
4204 y Fv(Signatur)o(e:.)659 4343 y Fr(method)f(insert_nodes)g(:)i
7580
(?pos:int)e(-)p Fp(>)i Fr('ext)f(node)g(list)g(-)p Fp(>)h
7581
Fr(unit)479 4534 y Fv(Description:.)20 b Fw(Inserts)g(the)g(list)h(of)f
7582
(nodes)g Fr(nl)g Fw(in-place)f(into)h(the)h(list)g(of)f(children)f(of)g
7583
Fr(obj)i Fw(.)f(The)g(insertion)f(is)479 4642 y(performed)f(at)j
7584
(position)e Fr(pos)h Fw(,)h(i.e.)f(in)g(the)g(modi\002ed)f(list)j(of)e
7585
(children,)e(the)i(\002rst)h(element)f(of)g Fr(nl)g Fw(will)h(ha)n(v)o
7586
(e)479 4750 y(position)f Fr(pos)g Fw(.)g(If)g(the)h(optional)e(ar)o
7587
(gument)e Fr(pos)k Fw(is)g(not)f(passed)g(to)g(the)g(method,)f(the)h
7588
(list)h Fr(nl)g Fw(is)g(appended)d(to)i(the)479 4858
7589
y(list)i(of)d(children.)p Black 3797 5278 a Fs(67)p Black
7592
68 67 bop Black 2225 67 a Fs(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr)
7593
m(esenting)g(the)g(document)p Black 479 579 a Fw(The)g(method)f
7594
(requires)g(that)h(all)h(elements)f(of)g(the)g(list)h
7595
Fr(nl)g Fw(are)f(roots,)g(and)f(that)i(all)f(elements)g(and)g
7596
Fr(obj)g Fw(share)g(the)479 687 y(same)h(DTD.)479 836
7597
y(Note:)g(This)f(method)f(does)h(not)f(check)h(whether)f(the)h
7598
(modi\002ed)f(XML)h(tree)h(is)g(still)g(v)n(alid.)479
7599
986 y Fv(Domain:.)f Fw(Elements.)p Black 396 1135 a Fu(\225)p
7600
Black 60 w Fv(Method:.)g Fr(obj)44 b(#)h Fb(remove)f
7601
Fr(\(\))479 1285 y Fv(Signatur)o(e:.)659 1423 y Fr(method)f(remove)h(:)
7602
h(unit)f(-)p Fp(>)g Fr(unit)479 1614 y Fv(Description:.)20
7603
b Fw(Remo)o(v)o(es)f Fr(obj)h Fw(from)g(the)g(tree.)g(After)g(this)g
7604
(operation,)e Fr(obj)j Fw(is)g(no)f(longer)e(the)j(child)f(of)f(the)479
7605
1722 y(former)g(f)o(ather)g(node,)g(i.e.)i(it)f(does)g(neither)g(occur)
7606
f(in)h(the)g(former)f(f)o(ather')-5 b(s)20 b(list)h(of)f(children)f
7607
(nor)g(is)j(the)e(former)479 1830 y(f)o(ather)g(the)g(parent)f(of)h
7608
Fr(obj)g Fw(.)h(The)f(node)f Fr(obj)h Fw(becomes)f(orphaned.)479
7609
1979 y(If)h Fr(obj)h Fw(is)g(already)e(a)h(root,)g Fr(remove)f
7610
Fw(does)h(nothing.)479 2129 y(Note:)h(This)f(method)f(does)h(not)f
7611
(check)h(whether)f(the)h(modi\002ed)f(XML)h(tree)h(is)g(still)g(v)n
7612
(alid.)479 2278 y Fv(Domain:.)f Fw(Elements,)f(comments,)g(processing)g
7613
(instructions,)g(data)h(nodes,)f(super)h(root)f(nodes.)479
7614
2428 y Fv(See)i(also:.)e Fs(A)i(r)m(emo)o(ved)f(node)f(becomes)g(the)i
7615
(r)l(oot)f(of)g(the)h(subtr)m(ee)p Black 396 2577 a Fu(\225)p
7616
Black 60 w Fv(Method:.)f Fr(obj)44 b(#)h Fb(remove_nodes)e
7617
Fr(~pos)h(~len)g(\(\))479 2727 y Fv(Signatur)o(e:.)659
7618
2865 y Fr(method)f(remove_nodes)g(:)i(?pos:int)e(-)p
7619
Fp(>)i Fr(?len:int)e(-)p Fp(>)i Fr(unit)f(-)p Fp(>)g
7620
Fr(unit)479 3056 y Fv(Description:.)20 b Fw(Remo)o(v)o(es)f(the)h
7621
(speci\002ed)g(nodes)g(from)f(the)h(list)h(of)f(children)f(of)h
7622
Fr(obj)g Fw(.)h(The)f(method)e(deletes)j(the)479 3164
7623
y(nodes)f(from)f(position)g Fr(pos)h Fw(to)h Fr(pos+len-1)e
7624
Fw(.)i(The)e(optional)g(ar)o(gument)f Fr(pos)i Fw(def)o(aults)g(to)h
7625
(0.)f(The)f(optional)479 3272 y(ar)o(gument)f Fr(len)i
7626
Fw(def)o(aults)g(to)g(the)h(length)e(of)h(the)g(children)f(list.)479
7627
3422 y(Note:)i(This)f(method)f(does)h(not)f(check)h(whether)f(the)h
7628
(modi\002ed)f(XML)h(tree)h(is)g(still)g(v)n(alid.)479
7629
3571 y Fv(Domain:.)f Fw(Elements.)p Black 396 3720 a
7630
Fu(\225)p Black 60 w Fv(Method:.)g Fr(obj)44 b(#)h Fb(set_nodes)e
7631
Fr(l)479 3870 y Fv(Signatur)o(e:.)659 4009 y Fr(method)g(set_nodes)h(:)
7632
g('ext)h(node)f(list)g(-)p Fp(>)g Fr(unit)479 4200 y
7633
Fv(Description:.)19 b Fw(Sets)i(the)f(list)h(of)e(children)f(to)i
7634
Fr(l)g Fw(.)g(It)g(is)h(required)d(that)h(e)n(v)o(ery)g(member)f(of)h
7635
Fr(l)i Fw(is)f(either)f(a)i(root)e(or)g(w)o(as)479 4307
7636
y(already)g(a)i(children)e(of)h(this)g(node)g(before)e(the)j(method)d
7637
(call,)j(and)e(it)i(is)g(required)e(that)h(all)h(members)e(and)h(the)
7638
479 4415 y(current)f(object)h(share)g(the)g(same)g(DTD.)479
7639
4565 y(F)o(ormer)f(children)g(which)h(are)g(not)g(members)f(of)h
7640
Fr(l)g Fw(are)g(remo)o(v)o(ed)e(from)h(the)i(tree)f(and)f(get)i
7641
(orphaned)c(\(see)k(method)479 4673 y Fr(remove)f Fw(\).)479
7642
4822 y(Note:)h(This)f(method)f(does)h(not)f(check)h(whether)f(the)h
7643
(modi\002ed)f(XML)h(tree)h(is)g(still)g(v)n(alid.)p Black
7644
3800 5278 a Fs(68)p Black eop
7646
69 68 bop Black 2225 67 a Fs(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr)
7647
m(esenting)g(the)g(document)p Black 479 579 a Fv(Domain:.)g
7648
Fw(Elements.)p Black 396 728 a Fu(\225)p Black 60 w Fv(Method:.)g
7649
Fr(obj)44 b(#)h Fb(set_attributes)e Fr(al)479 878 y Fv(Signatur)o(e:.)
7650
659 1016 y Fr(method)g(set_attributes)g(:)i(\(string)e(*)i
7651
(Pxp_types.att_value\))c(list)k(-)p Fp(>)f Fr(unit)479
7652
1207 y Fv(Description:.)20 b Fw(Sets)h(the)f(attrib)n(utes)g(of)g(this)
7653
h(element)f(to)g Fr(al)g Fw(.)479 1357 y(Note)g(that)f(this)h(method)e
7654
(does)h(not)g(add)g(missing)g(attrib)n(utes)g(that)h(are)f(declared)f
7655
(in)i(the)f(DTD.)g(It)h(also)g(ne)n(v)o(er)e(rejects)479
7656
1465 y(undeclared)g(attrib)n(utes.)i(The)g(passed)g(v)n(alues)g(are)g
7657
(not)g(check)o(ed.)479 1614 y(Note:)h(This)f(method)f(does)h(not)f
7658
(check)h(whether)f(the)h(modi\002ed)f(XML)h(tree)h(is)g(still)g(v)n
7659
(alid.)479 1764 y Fv(Domain:.)f Fw(Elements.)p Black
7660
396 1913 a Fu(\225)p Black 60 w Fv(Method:.)g Fr(obj)44
7661
b(#)h Fb(set_attribute)e Fr(~force)h(n)g(v)479 2063 y
7662
Fv(Signatur)o(e:.)659 2201 y Fr(method)f(set_attribute)g(:)i
7663
(?force:bool)e(-)p Fp(>)h Fr(string)g(-)p Fp(>)g Fr
7664
(Pxp_types.att_value)e(-)479 2298 y Fp(>)j Fr(unit)479
7665
2489 y Fv(Description:.)20 b Fw(Sets)h(the)f(attrib)n(ute)g
7666
Fr(n)h Fw(of)f(this)g(element)g(to)g(the)g(v)n(alue)g
7667
Fr(v)h Fw(.)f(By)h(def)o(ault,)e(it)i(is)g(required)d(that)j(the)479
7668
2597 y(attrib)n(ute)f Fr(n)h Fw(has)f(already)f(some)h(v)n(alue.)f(If)i
7669
(you)e(pass)i(~force:true,)d(the)i(attrib)n(ute)g(is)h(added)e(to)h
7670
(the)g(attrib)n(ute)g(list)h(if)479 2705 y(it)g(is)g(missing.)479
7671
2855 y(Note:)g(This)f(method)f(does)h(not)f(check)h(whether)f(the)h
7672
(modi\002ed)f(XML)h(tree)h(is)g(still)g(v)n(alid.)479
7673
3004 y Fv(Domain:.)f Fw(Elements.)p Black 396 3153 a
7674
Fu(\225)p Black 60 w Fv(Method:.)g Fr(obj)44 b(#)h Fb(reset_attribute)d
7675
Fr(n)479 3303 y Fv(Signatur)o(e:.)659 3442 y Fr(method)h
7676
(reset_attribute)g(:)h(string)g(-)p Fp(>)h Fr(unit)479
7677
3632 y Fv(Description:.)20 b Fw(If)g(the)g(attrib)n(ute)g
7678
Fr(n)h Fw(is)g(a)f(declared)f(attrib)n(ute,)h(it)h(is)g(set)g(to)f(its)
7679
h(def)o(ault)f(v)n(alue,)f(or)h(to)479 3740 y Fr(Implied_value)f
7680
Fw(if)h(there)g(is)h(no)f(def)o(ault)f(\(the)h(latter)h(is)g(performed)
7681
c(e)n(v)o(en)i(if)i(the)f(attrib)n(ute)g(is)h Fr(#REQUIRED)e
7682
Fw(\).)i(If)479 3848 y(the)f(attrib)n(ute)g(is)h(an)g(undeclared)d
7683
(attrib)n(ute,)h(it)i(is)g(remo)o(v)o(ed)d(from)h(the)h(attrib)n(ute)g
7684
(list.)479 3998 y(The)g(idea)g(of)g(this)h(method)e(is)i(to)f(simulate)
7685
g(what)g(had)g(happened)e(if)i Fr(n)h Fw(had)f(not)f(been)h(de\002ned)f
7686
(in)i(the)f(attrib)n(ute)g(list)479 4106 y(of)g(the)f(XML)h(element.)f
7687
(In)g(v)n(alidating)f(mode,)h(the)h(parser)f(w)o(ould)g(ha)n(v)o(e)g
7688
(chosen)f(the)i(def)o(ault)f(v)n(alue)g(if)h(possible,)f(or)479
7689
4214 y Fr(Implied_value)g Fw(otherwise,)g(and)h(in)g(well-formedness)e
7690
(mode,)h(the)h(attrib)n(ute)g(w)o(ould)g(be)g(simply)g(missing)g(in)479
7691
4322 y(the)g(attrib)n(ute)g(list.)479 4471 y(Note:)h(It)f(is)h
7692
(intentionally)e(not)g(possible)h(to)h(remo)o(v)o(e)d(a)j(declared)e
7693
(attrib)n(ute.)g(\(Ho)n(we)n(v)o(er)m(,)f(you)h(can)h(remo)o(v)o(e)e
7694
(it)j(by)479 4579 y(calling)f(set_attrib)n(utes,)g(b)n(ut)g(this)h(w)o
7695
(ould)e(be)h(v)o(ery)f(inef)n(\002cient.\))479 4728 y(Note:)i(This)f
7696
(method)f(does)h(not)f(check)h(whether)f(the)h(modi\002ed)f(XML)h(tree)
7697
h(is)g(still)g(v)n(alid.)479 4878 y Fv(Domain:.)f Fw(Elements.)p
7698
Black 3800 5278 a Fs(69)p Black eop
7700
70 69 bop Black 2225 67 a Fs(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr)
7701
m(esenting)g(the)g(document)p Black Black 396 579 a Fu(\225)p
7702
Black 60 w Fv(Method:.)g Fr(obj)44 b(#)h Fb(set_comment)e
7703
Fr(c)479 728 y Fv(Signatur)o(e:.)659 867 y Fr(method)g(set_comment)g(:)
7704
i(string)f(option)g(-)p Fp(>)g Fr(unit)479 1058 y Fv(Description:.)20
7705
b Fw(Sets)h(the)f(comment)f(string)h(contained)e(in)j(comment)e(nodes,)
7706
g(if)h Fr(c)45 b(=)g(Some)f(s)20 b Fw(.)h(Otherwise,)f(this)479
7707
1166 y(method)f(remo)o(v)o(es)g(the)h(comment)f(string)g(\()i
7708
Fr(c)45 b(=)f(None)20 b Fw(\).)479 1315 y(Note)g(that)h(the)f(comment)f
7709
(string)h(must)g(not)g(include)f(the)h(delimiters)g Fp(<)p
7710
Fr(-)g Fw(and)g Fr(-)p Fp(>)g Fw(.)h(Furthermore,)c(it)k(must)f(not)479
7711
1423 y(contain)f(an)o(y)h(character)f(or)h(character)f(sequence)g(that)
7712
h(are)g(forbidden)e(in)i(comments,)f(such)h(as)h Fr("-")f
7713
Fw(.)g(Ho)n(we)n(v)o(er)m(,)479 1531 y(this)h(method)e(does)h(not)g
7714
(check)f(this)i(condition.)479 1681 y Fv(Domain:.)f Fw(Comment)f
7715
(nodes.)p Black 396 1830 a Fu(\225)p Black 60 w Fv(Method:.)h
7716
Fr(obj)44 b(#)h Fb(set_data)f Fr(s)479 1979 y Fv(Signatur)o(e:.)659
7717
2118 y Fr(method)f(set_data)h(:)h(string)e(-)p Fp(>)i
7718
Fr(unit)479 2309 y Fv(Description:.)20 b Fw(This)g(method)f(sets)i(the)
7719
g(character)e(string)g(contained)g(in)h(data)g(nodes.)479
7720
2459 y(Note:)h(This)f(method)f(does)h(not)f(check)h(whether)f(the)h
7721
(modi\002ed)f(XML)h(tree)h(is)g(still)g(v)n(alid.)479
7722
2608 y Fv(Domain:.)f Fw(Data)g(nodes.)p Black 396 2757
7723
a Fu(\225)p Black 60 w Fv(Method:.)g Fr(obj)44 b(#)h
7724
Fb(add_pinstr)e Fr(pi)479 2907 y Fv(Signatur)o(e:.)659
7725
3045 y Fr(method)g(add_pinstr)h(:)g(proc_instruction)e(-)p
7726
Fp(>)j Fr(unit)479 3236 y Fv(Description:.)20 b Fw(Adds)g(the)g
7727
(processing)f(instruction)g Fr(pi)h Fw(to)h(the)f(set)h(of)f
7728
(processing)f(instructions)g(contained)f(in)479 3344
7729
y Fr(obj)j Fw(.)f(If)g Fr(obj)g Fw(is)h(an)g(element)e(node,)g(you)g
7730
(can)h(add)g(an)o(y)f(number)g(of)h(processing)f(instructions.)g(If)h
7731
Fr(obj)g Fw(is)h(a)479 3452 y(processing)e(instruction)g(node,)g(you)g
7732
(can)h(put)g(at)h(most)f(one)g(processing)e(instruction)h(into)h(this)h
7733
(node.)479 3602 y Fv(Domain:.)f Fw(Elements,)f(and)h(processing)f
7734
(instruction)g(nodes.)396 3834 y Fv(Cloning)h(methods)h(.)p
7735
Black 396 4067 a Fu(\225)p Black 60 w Fv(Method:.)f Fr(obj)44
7736
b(#)h Fb(orphaned_clone)479 4216 y Fv(Signatur)o(e:.)659
7737
4355 y Fr(method)e(orphaned_clone)g(:)i('self)479 4546
7738
y Fv(Description:.)20 b Fw(Returns)g(a)h(clone)e(of)h(the)g(node)f(and)
7739
h(the)g(complete)f(tree)i(belo)n(w)e(this)i(node)e(\(deep)g(clone\).)g
7740
(The)479 4654 y(clone)h(does)g(not)g(ha)n(v)o(e)f(a)i(parent)e(\(i.e.)h
7741
(the)g(reference)f(to)h(the)g(parent)f(node)h(is)h(not)f(cloned\).)e
7742
(While)j(cop)o(ying)d(the)479 4762 y(subtree)i(strings)g(are)g
7743
(skipped;)f(normally)g(the)h(original)f(tree)h(and)g(the)g(cop)o(y)f
7744
(tree)i(share)f(strings.)f(Extension)p Black 3800 5278
7747
71 70 bop Black 2225 67 a Fs(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr)
7748
m(esenting)g(the)g(document)p Black 479 579 a Fw(objects)g(are)g
7749
(cloned)f(by)h(in)m(v)n(oking)e(the)i Fr(clone)g Fw(method)f(on)h(the)g
7750
(original)f(objects;)h(ho)n(w)g(much)f(of)h(the)g(e)o(xtension)479
7751
687 y(objects)g(is)h(cloned)e(depends)g(on)h(the)g(implemention)e(of)i
7752
(this)h(method.)479 836 y Fv(Domain:.)f Fw(All)h(node)e(types.)479
7753
986 y Fv(See)i(also:.)e Fs(The)i(clone)e(of)i(a)f(subtr)m(ee)p
7754
Black 396 1135 a Fu(\225)p Black 60 w Fv(Method:.)g Fr(obj)44
7755
b(#)h Fb(orphaned_flat_clone)479 1285 y Fv(Signatur)o(e:.)659
7756
1423 y Fr(method)e(orphaned_flat_clone)f(:)j('self)479
7757
1614 y Fv(Description:.)20 b Fw(return)f(a)i(clone)e(of)h(this)h
7758
(element)e(where)h(all)h(subnodes)d(are)j(omitted.)e(The)h(type)f(of)h
7759
(the)g(node,)f(and)479 1722 y(the)h(attrib)n(utes)h(are)f(the)g(same)g
7760
(as)h(in)g(the)f(original)f(node.)g(The)h(clone)f(has)i(no)e(parent.)
7761
479 1872 y Fv(Domain:.)h Fw(All)h(node)e(types.)p Black
7762
396 2021 a Fu(\225)p Black 60 w Fv(Method:.)h Fr(obj)44
7763
b(#)h Fb(create_element)e Fr(~name_pool_for_attribute_values)c
7764
(~position)479 2129 y(~valcheck)44 b(~att_values)f(dtd)h(ntype)g
7765
(att_list)479 2278 y Fv(Signatur)o(e:.)659 2417 y Fr(method)f
7766
(create_element)g(:)1062 2514 y
7767
(?name_pool_for_attribute_values:Pxp_type)o(s.pool)38
7768
b(-)p Fp(>)1062 2611 y Fr(?position:\(string)k(*)j(int)f(*)h(int\))f(-)
7769
p Fp(>)703 2708 y Fr(?valcheck:bool)f(-)p Fp(>)268 b
7770
Fr(\(*)45 b(default:)e(true)i(*\))703 2806 y(?att_values:\(\(string)d
7771
(*)j(Pxp_types.att_value\))c(list\))j(-)p Fp(>)1062 2903
7772
y Fr(dtd)g(-)p Fp(>)h Fr(node_type)e(-)p Fp(>)i Fr(\(string)e(*)i
7773
(string\))f(list)g(-)p Fp(>)g Fr('ext)g(node)479 3094
7774
y Fv(Description:.)20 b Fw(Returns)g(a)h(\003at)f(cop)o(y)g(of)g(this)g
7775
(element)g(node)f(with)h(the)h(follo)n(wing)d(modi\002cations:)p
7776
Black 479 3326 a Fa(\225)p Black 62 w Fw(The)i(DTD)h(is)g(set)g(to)f
7777
Fr(dtd)p Black 479 3434 a Fa(\225)p Black 62 w Fw(The)g(node)f(type)h
7778
(is)h(set)g(to)f Fr(ntype)g Fw(\(which)g(must)g(be)g
7779
Fr(T_element)43 b(name)20 b Fw(\))p Black 479 3542 a
7780
Fa(\225)p Black 62 w Fw(The)g(attrib)n(ute)g(list)h(is)g(set)g(to)g
7781
(the)f(concatenation)e(of)i Fr(att_list)f Fw(and)h Fr(att_values)f
7782
Fw(;)i Fr(att_list)e Fw(passes)562 3650 y(attrib)n(ute)h(v)n(alues)g
7783
(as)h(strings)f(while)g Fr(att_values)f Fw(passes)i(attrib)n(ute)f(v)n
7784
(alues)g(as)h(type)e Fr(att_value)p Black 479 3758 a
7785
Fa(\225)p Black 62 w Fw(The)h(cop)o(y)f(does)h(not)g(ha)n(v)o(e)g
7786
(children)f(nor)g(a)i(parent)p Black 479 3866 a Fa(\225)p
7787
Black 62 w Fw(The)f(cop)o(y)f(does)h(not)g(contain)f(processing)g
7788
(instructions.)p Black 479 3974 a Fa(\225)p Black 62
7789
w Fw(The)h(position)f(triple)i(is)g(set)g(to)f Fr(position)479
7790
4123 y Fw(Note)g(that)h(the)f(e)o(xtension)f(object)g(is)i(copied,)e
7791
(too.)479 4273 y(If)h Fr(valcheck)44 b(=)g(true)21 b
7792
Fw(\(the)e(def)o(ault\),)g(it)i(is)g(check)o(ed)e(whether)g(the)i
7793
(element)e(type)h(e)o(xists)h(and)e(whether)g(the)479
7794
4380 y(passed)h(attrib)n(utes)g(match)g(the)g(declared)f(attrib)n(ute)h
7795
(list.)h(Missing)f(attrib)n(utes)h(are)f(automatically)e(added,)h(if)
7796
479 4488 y(possible.)h(If)g Fr(valcheck)43 b(=)i(false)20
7797
b Fw(,)h(an)o(y)e(element)h(type)f(and)h(an)o(y)f(attrib)n(utes)h(are)h
7798
(accepted.)479 4638 y(If)f(a)h Fr(name_pool_for_attribute_values)16
7799
b Fw(is)21 b(passed,)f(the)g(attrib)n(ute)g(v)n(alues)f(in)i
7800
Fr(att_list)e Fw(are)h(put)g(into)479 4746 y(this)h(pool.)p
7801
Black 3800 5278 a Fs(71)p Black eop
7803
72 71 bop Black 2225 67 a Fs(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr)
7804
m(esenting)g(the)g(document)p Black 479 579 a Fw(The)g(optional)f(ar)o
7805
(guments)f(ha)n(v)o(e)i(the)g(follo)n(wing)f(def)o(aults:)p
7806
Black 479 811 a Fa(\225)p Black 62 w Fr
7807
(~name_pool_for_attribute_values)d Fw(:)21 b(No)f(pool)f(is)i(used)p
7808
Black 479 919 a Fa(\225)p Black 62 w Fr(~position)f Fw(:)g(The)g
7809
(position)g(is)h(not)f(a)n(v)n(ailable)f(in)i(the)f(cop)o(y)p
7810
Black 479 1027 a Fa(\225)p Black 62 w Fr(~valcheck)g
7811
Fw(:)g(f)o(alse)p Black 479 1135 a Fa(\225)p Black 62
7812
w Fr(~att_values)f Fw(:)i(empty)479 1326 y Fv(Domain:.)f
7813
Fw(Elements.)479 1476 y Fv(See)h(also:.)e Fw(Create)i(element)f(node)p
7814
Black 396 1625 a Fu(\225)p Black 60 w Fv(Method:.)g Fr(obj)44
7815
b(#)h Fb(create_data)e Fr(dtd)h(cdata)479 1774 y Fv(Signatur)o(e:.)659
7816
1913 y Fr(method)f(create_data)g(:)i(dtd)f(-)p Fp(>)h
7817
Fr(string)f(-)p Fp(>)g Fr('ext)g(node)479 2104 y Fv(Description:.)20
7818
b Fw(Returns)g(a)h(\003at)f(cop)o(y)g(of)g(this)g(data)g(node)g(with)g
7819
(the)g(follo)n(wing)f(modi\002cations:)p Black 479 2336
7820
a Fa(\225)p Black 62 w Fw(The)h(DTD)h(is)g(set)g(to)f
7821
Fr(dtd)p Black 479 2444 a Fa(\225)p Black 62 w Fw(The)g(character)f
7822
(string)h(is)h(set)g(to)f Fr(cdata)479 2594 y Fw(Note)g(that)h(the)f(e)
7823
o(xtension)f(object)g(is)i(copied,)e(too.)479 2743 y
7824
Fv(Domain:.)h Fw(Data)g(nodes.)479 2893 y Fv(See)h(also:.)p
7825
Black 396 3042 a Fu(\225)p Black 60 w Fv(Method:.)f Fr(obj)44
7826
b(#)h Fb(create_other)e Fr(~position)g(dtd)i(ntype)479
7827
3192 y Fv(Signatur)o(e:.)659 3330 y Fr(method)e(create_other)g(:)1062
7828
3427 y(?position:\(string)f(*)j(int)f(*)h(int\))f(-)p
7829
Fp(>)1062 3525 y Fr(dtd)g(-)p Fp(>)h Fr(node_type)e(-)p
7830
Fp(>)i Fr('ext)f(node)479 3715 y Fv(Description:.)20
7831
b Fw(Returns)g(a)h(\003at)f(cop)o(y)g(of)g(this)g(node)g(with)g(the)g
7832
(follo)n(wing)f(modi\002cation:)p Black 479 3948 a Fa(\225)p
7833
Black 62 w Fw(The)h(DTD)h(is)g(set)g(to)f Fr(dtd)p Black
7834
479 4056 a Fa(\225)p Black 62 w Fw(The)g(position)f(triple)i(is)g(set)g
7835
(to)f Fr(position)479 4205 y Fw(Note)g(that)h(the)f(e)o(xtension)f
7836
(object)g(is)i(copied,)e(too.)479 4355 y(The)h(passed)g(node)f(type)h
7837
Fr(ntype)g Fw(must)g(match)g(the)g(node)f(type)h(of)g
7838
Fr(obj)g Fw(.)479 4504 y Fv(Domain:.)g Fw(Super)f(root)h(nodes,)f
7839
(processing)g(instruction)g(nodes,)g(comment)g(nodes)396
7840
4737 y Fv(V)-8 b(alidating)20 b(methods)h(.)f Fw(The)g(follo)n(wing)f
7841
(methods)g(v)n(alidate)g(nodes.)p Black 3800 5278 a Fs(72)p
7844
73 72 bop Black 2225 67 a Fs(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr)
7845
m(esenting)g(the)g(document)p Black Black 396 579 a Fu(\225)p
7846
Black 60 w Fv(Method:.)g Fr(obj)44 b(#)h Fb(classify_data_node)d
7847
Fr(n)479 728 y Fv(Signatur)o(e:.)659 867 y Fr(method)h
7848
(classify_data_node)f(:)j('ext)f(node)g(-)p Fp(>)h Fr
7849
(data_node_classification)479 1058 y Fv(Description:.)20
7850
b Fw(Classi\002es)i(the)e(passed)g(data)g(node)f Fr(n)i
7851
Fw(,)g(and)e(returns)h(whether)f(it)i(is)g(reasonable)d(to)j(append)d
7852
(the)479 1166 y(data)i(node)g(to)g(the)g(list)h(of)f(subnodes)f
7853
(\(using)g Fr(append_node)g Fw(\).)h(The)g(follo)n(wing)f(return)g(v)n
7854
(alues)h(are)g(possible:)p Black 479 1398 a Fa(\225)p
7855
Black 62 w Fr(CD_normal)g Fw(:)g(Adding)f Fr(n)i Fw(does)f(not)g
7856
(violate)f(an)o(y)h(v)n(alidation)e(constraint)p Black
7857
479 1506 a Fa(\225)p Black 62 w Fr(CD_other)i Fw(:)h
7858
Fr(n)f Fw(is)h(not)f(a)h(data)f(node)p Black 479 1614
7859
a Fa(\225)p Black 62 w Fr(CD_empty)g Fw(:)h(The)e(element)h
7860
Fr(obj)g Fw(is)h(declared)e(as)i Fr(EMTPY)f Fw(,)h(and)e
7861
Fr(n)i Fw(contains)e(the)i(empty)e(string.)h(It)g(is)h(allo)n(wed)562
7862
1722 y(to)g(append)d Fr(n)j Fw(b)n(ut)f(it)h(does)f(not)g(mak)o(e)f
7863
(sense)p Black 479 1830 a Fa(\225)p Black 62 w Fr(CD_ignorable)g
7864
Fw(:)i(The)f(element)f Fr(obj)i Fw(is)g(declared)e(such)h(that)g(it)h
7865
(is)g(forbidden)c(to)k(put)f(character)f(data)h(into)g(it.)562
7866
1938 y(Ho)n(we)n(v)o(er)m(,)e(the)j(node)e Fr(n)h Fw(only)g(contains)f
7867
(white)h(space)h(which)e(is)i(allo)n(wed)f(as)h(an)f(e)o(xception)e(to)
7868
j(this)f(rule.)g(This)562 2046 y(means)g(that)g(it)h(is)h(allo)n(wed)d
7869
(to)h(append)f Fr(n)h Fw(b)n(ut)h Fr(n)f Fw(w)o(ould)g(not)g(contain)f
7870
(an)o(y)g(information)f(e)o(xcept)h(formatting)562 2154
7871
y(hints.)p Black 479 2262 a Fa(\225)p Black 62 w Fr(CD_error)44
7872
b(e)20 b Fw(:)h(It)g(is)g(an)f(error)f(to)h(append)f
7873
Fr(n)h Fw(.)h(The)f(e)o(xception)e Fr(e)j Fw(,)f(usually)g(a)g
7874
Fr(Validation_error)f Fw(,)562 2370 y(contains)h(details)g(about)g(the)
7875
g(problem.)479 2519 y(Note)g(that)h(the)f(method)f(al)o(w)o(ays)h
7876
(returns)g(and)f(ne)n(v)o(er)g(raises)i(an)f(e)o(xception.)479
7877
2669 y Fv(Domain:.)g Fw(Elements.)p Black 396 2818 a
7878
Fu(\225)p Black 60 w Fv(Method:.)g Fr(obj)44 b(#)h Fb
7879
(validate_contents)d Fr(?use_dfa)i(?check_data_nodes)e(\(\))479
7880
2967 y Fv(Signatur)o(e:.)659 3106 y Fr(method)h(validate_contents)f(:)
7881
1107 3203 y(?use_dfa:bool)h(-)p Fp(>)h Fr(?check_data_nodes:bool)d(-)p
7882
Fp(>)j Fr(unit)h(-)p Fp(>)f Fr(unit)479 3394 y Fv(Description:.)20
7883
b Fw(Checks)g(that)g(the)h(subnodes)d(of)i(this)h(element)f(match)f
7884
(the)h(declared)f(content)h(model)f(of)h(this)479 3502
7885
y(element.)g(The)f(method)g(returns)h Fr(\(\))g Fw(if)h(the)f(element)f
7886
(is)i(okay)-5 b(,)19 b(and)h(it)h(raises)f(an)g(e)o(xception)f(if)h(an)
7887
g(error)f(is)j(found)479 3610 y(\(in)e(most)h(cases)f
7888
Fr(Validation_error)f Fw(\).)479 3759 y(This)i(check)e(is)i(al)o(w)o
7889
(ays)g(performed)c(by)j(the)g(parser)m(,)f(such)h(that)h(softw)o(are)e
7890
(that)i(only)e(reads)h(parsed)f(XML)i(trees)479 3867
7891
y(needs)f(not)g(call)h(this)f(method.)f(Ho)n(we)n(v)o(er)m(,)f(if)i
7892
(softw)o(are)g(modi\002es)g(the)g(tree)g(itself,)h(an)f(in)m(v)n
7893
(ocation)e(of)i(this)h(method)479 3975 y(ensures)f(that)g(the)h(v)n
7894
(alidation)d(constraints)i(about)f(content)g(models)h(are)g
7895
(ful\002lled.)479 4125 y(Note)g(that)h(the)f(check)f(is)i(not)f
7896
(performed)e(recursi)n(v)o(ely)-5 b(.)p Black 479 4399
7897
a Fa(\225)p Black 62 w Fw(Option)20 b Fr(~use_dfa)f Fw(:)i(If)f(true,)g
7898
(the)g(deterministic)f(\002nite)i(automaton)d(of)i(re)o(ge)o(xp)e
7899
(content)h(models)h(is)h(used)f(for)562 4507 y(v)n(alidation,)f(if)h(a)
7900
n(v)n(ailable.)g(Def)o(aults)g(to)g(f)o(alse.)p Black
7901
479 4615 a Fa(\225)p Black 62 w Fw(Option)g Fr(~check_data_nodes)e
7902
Fw(:)i(If)g(true,)g(it)h(is)g(check)o(ed)e(whether)g(data)h(nodes)g
7903
(only)f(occur)g(at)i(v)n(alid)562 4723 y(positions.)f(If)g(f)o(alse,)g
7904
(these)h(checks)e(are)h(left)h(out.)e(Def)o(aults)i(to)f(true.)f
7905
(\(Usually)-5 b(,)20 b(the)g(parser)f(turns)h(this)h(feature)562
7906
4830 y(of)n(f)f(because)f(the)i(parser)e(already)g(performs)g(a)h
7907
(similar)h(check.\))p Black 3800 5278 a Fs(73)p Black
7910
74 73 bop Black 2225 67 a Fs(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr)
7911
m(esenting)g(the)g(document)p Black 562 579 a Fw(See)h
7912
Fr(classify_data_node)d Fw(for)h(details)i(about)e(what)h(is)h(check)o
7913
(ed.)479 811 y(In)f(pre)n(vious)f(releases)h(of)g(PXP)-9
7914
b(,)21 b(this)g(method)d(w)o(as)j(called)f Fr(local_validate)f
7915
Fw(.)479 961 y Fv(Domain:.)h Fw(All)h(node)e(types.)h(Ho)n(we)n(v)o(er)
7916
m(,)e(there)h(are)h(only)g(real)g(checks)g(for)f(elements;)h(for)g
7917
(other)f(nodes,)g(this)479 1069 y(method)g(is)i(a)g(no-op.)p
7918
Black 396 1218 a Fu(\225)p Black 60 w Fv(Method:.)f Fr(obj)44
7919
b(#)h Fb(validate_attlist)d Fr(\(\))479 1368 y Fv(Signatur)o(e:.)659
7920
1506 y Fr(method)h(validate_attlist)g(:)h(unit)g(-)p
7921
Fp(>)h Fr(unit)479 1697 y Fv(Description:.)20 b Fw(Checks)g(whether)f
7922
(the)h(attrib)n(ute)g(list)i(of)d(the)i(element)e Fr(obj)i
7923
Fw(matches)e(the)i(declared)d(attrib)n(ute)i(list.)479
7924
1805 y(The)g(method)f(returns)g Fr(\(\))i Fw(if)f(the)g(attrib)n(ute)g
7925
(list)h(is)h(formed)c(correctly)-5 b(,)18 b(and)i(it)h(raises)g(an)f(e)
7926
o(xception)e(\(usually)h(a)479 1913 y Fr(Validation_error)f
7927
Fw(\))j(if)f(there)g(is)h(an)f(error)-5 b(.)479 2063
7928
y(This)21 b(check)e(is)i(implicitly)f(performed)d(by)j
7929
Fr(create_element)f Fw(unless)h(the)g(option)f Fr(~valcheck:false)f
7930
Fw(has)479 2170 y(been)i(passed.)g(This)g(means)g(that)g(it)h(is)g
7931
(usually)f(not)g(necessary)f(to)h(call)h(this)g(method;)e(ho)n(we)n(v)o
7932
(er)m(,)e(if)k(the)f(attrib)n(ute)479 2278 y(list)i(has)e(been)f
7933
(changed)g(by)h Fr(set_attributes)e Fw(or)i(if)g Fr(~valcheck:false)f
7934
Fw(is)i(in)f(ef)n(fect,)g(the)g(in)m(v)n(ocation)e(of)479
7935
2386 y(this)j(method)e(ensures)h(the)g(v)n(alidity)f(of)h(the)g(attrib)
7936
n(ute)g(list.)479 2536 y(Note)g(that)h(the)f(method)f(complains)g
7937
(about)g(missing)h(attrib)n(utes)g(e)n(v)o(en)f(if)i(these)f(attrib)n
7938
(utes)g(ha)n(v)o(e)g(been)f(declared)479 2644 y(with)h(a)f(def)o(ault)f
7939
(v)n(alue)h(or)g(as)g(being)f Fr(#IMPLIED)h Fw(;)h(this)f(method)f
7940
(only)g(checks)h(the)g(attrib)n(utes)g(b)n(ut)g(does)g(not)f(modify)479
7941
2752 y(the)i(attrib)n(ute)g(list.)h(If)f(you)g(kno)n(w)f(that)h(attrib)
7942
n(utes)g(are)g(missing)g(and)g(you)f(w)o(ant)i(to)f(add)g(them)f
7943
(automatically)g(just)479 2860 y(as)i Fr(create_element)e
7944
Fw(does,)g(you)h(can)g(call)g Fr(complement_attlist)e
7945
Fw(before)h(doing)g(this)h(check.)479 3009 y Fv(Domain:.)g
7946
Fw(All)h(node)e(types.)h(Ho)n(we)n(v)o(er)m(,)e(for)h(non-element)f
7947
(nodes)h(this)i(check)f(is)h(a)f(no-op.)p Black 396 3158
7948
a Fu(\225)p Black 60 w Fv(Method:.)g Fr(obj)44 b(#)h
7949
Fb(validate)f Fr(\(\))479 3308 y Fv(Signatur)o(e:.)659
7950
3446 y Fr(method)f(validate)h(:)h(unit)f(-)p Fp(>)g Fr(unit)479
7951
3637 y Fv(Description:.)19 b Fw(Calls)i Fr(validate_contents)d
7952
Fw(and)h Fr(validate_attlist)e Fw(,)j(and)g(ensures)f(that)h(this)g
7953
(element)f(is)479 3745 y(locally)h(v)n(alid.)g(The)f(method)g(returns)g
7954
Fr(\(\))i Fw(if)f(the)h(element)e(is)i(v)n(alid,)f(and)f(raises)i(an)f
7955
(e)o(xception)f(otherwise.)479 3895 y Fv(Domain:.)h Fw(All)h(node)e
7956
(types.)h(Ho)n(we)n(v)o(er)m(,)e(for)h(non-element)f(nodes)h(this)i
7957
(check)f(is)h(a)f(no-op.)p Black 396 4044 a Fu(\225)p
7958
Black 60 w Fv(Method:.)g Fr(obj)44 b(#)h Fb(complement_attlist)d
7959
Fr(\(\))479 4194 y Fv(Signatur)o(e:.)659 4332 y Fr(method)h
7960
(complement_attlist)f(:)j(unit)f(-)p Fp(>)g Fr(unit)479
7961
4523 y Fv(Description:.)20 b Fw(Adds)g(attrib)n(utes)g(that)g(are)g
7962
(declared)f(in)i(the)f(DTD)g(b)n(ut)g(are)h(currently)d(missing:)i
7963
Fr(#IMPLIED)479 4631 y Fw(attrib)n(utes)g(are)h(added)e(with)h
7964
Fr(Implied_value)e Fw(,)j(and)f(if)g(there)g(is)h(a)g(def)o(ault)e(v)n
7965
(alue)h(for)f(an)h(attrib)n(ute,)g(this)g(v)n(alue)g(is)479
7966
4739 y(added.)f Fr(#REQUIRED)g Fw(attrib)n(utes)h(are)h(set)g(to)f
7967
Fr(Implied_value)e Fw(,)j(too.)p Black 3800 5278 a Fs(74)p
7970
75 74 bop Black 2225 67 a Fs(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr)
7971
m(esenting)g(the)g(document)p Black 479 579 a Fw(It)h(is)g(only)e
7972
(necessary)h(to)g(call)h(this)f(method)f(if)i(the)f(element)g(is)h
7973
(created)e(with)h(~v)n(alcheck:f)o(alse,)f(or)h(the)g(attrib)n(ute)479
7974
687 y(list)i(has)e(been)f(modi\002ed,)g(and)h(the)g(element)g(must)g
7975
(be)g(v)n(alidated.)479 836 y Fv(Domain:.)g Fw(Elements.)396
7976
1069 y Fv(Namespace)g(methods)g(.)g Fw(The)f(follo)n(wing)f(methods)g
7977
(are)i(about)f(namespaces.)f(The)o(y)h(are)g(only)g(a)n(v)n(ailable)g
7978
(if)h(the)g(class)396 1177 y(supports)f(namespaces,)g(otherwise)h(you)f
7979
(get)h(a)h Fr(Namespace_method_not_applicable)16 b Fw(e)o(xception.)i
7980
(See)396 1285 y(XXX.)p Black 396 1517 a Fu(\225)p Black
7981
60 w Fv(Method:.)i Fr(obj)44 b(#)h Fb(normprefix)479
7982
1667 y Fv(Signatur)o(e:.)659 1805 y Fr(method)e(normprefix)h(:)g
7983
(string)479 1996 y Fv(Description:.)20 b Fw(F)o(or)g(namespace-a)o(w)o
7984
(are)d(implementations)i(of)h(the)g(node)f(class,)i(this)g(method)d
7985
(returns)i(the)479 2104 y(normalized)f(pre\002x)g(of)h(the)g(element)g
7986
(or)g(attrib)n(ute.)f(If)h(the)g(object)g(does)g(not)g(ha)n(v)o(e)f(a)i
7987
(pre\002x,)e("")i(will)g(be)f(passed)479 2212 y(back.)479
7988
2361 y(The)g(normalized)e(pre\002x)i(is)h(the)f(part)g(of)g(the)g(name)
7989
g(before)f(the)h(colon.)f(It)h(is)h(normalized)e(because)g(the)h
7990
(parser)479 2469 y(ensures)g(that)g(e)n(v)o(ery)f(pre\002x)h
7991
(corresponds)d(only)j(to)g(one)g(namespace.)f(Note)h(that)g(the)g
7992
(pre\002x)g(can)g(be)g(dif)n(ferent)e(than)479 2577 y(in)j(the)f
7993
(parsed)f(XML)i(source)e(because)g(the)i(normalization)d(step)i(needs)g
7994
(to)g(change)f(the)h(pre\002x)g(to)g(a)n(v)n(oid)g(pre\002x)479
7995
2685 y(con\003icts.)479 2835 y Fv(Domain:.)g Fw(Elements)g(and)f
7996
(attrib)n(utes)h(supporting)e(namespaces.)p Black 396
7997
2984 a Fu(\225)p Black 60 w Fv(Method:.)i Fr(obj)44 b(#)h
7998
Fb(localname)479 3133 y Fv(Signatur)o(e:.)659 3272 y
7999
Fr(method)e(localname)h(:)g(string)479 3463 y Fv(Description:.)20
8000
b Fw(F)o(or)g(namespace-a)o(w)o(are)d(implementations)i(of)h(the)g
8001
(node)f(class,)i(this)g(method)d(returns)i(the)g(local)479
8002
3571 y(part)g(of)g(the)g(name)g(of)g(the)g(element)g(or)f(attrib)n
8003
(ute.)479 3720 y(The)h(local)g(name)g(is)h(the)f(part)g(of)g(the)g
8004
(name)g(after)g(the)g(colon,)f(or)h(the)g(whole)g(name)f(if)i(there)e
8005
(is)i(no)f(colon.)479 3870 y Fv(Domain:.)g Fw(Elements)g(and)f(attrib)n
8006
(utes)h(supporting)e(namespaces.)p Black 396 4019 a Fu(\225)p
8007
Black 60 w Fv(Method:.)i Fr(obj)44 b(#)h Fb(namespace_uri)479
8008
4169 y Fv(Signatur)o(e:.)659 4307 y Fr(method)e(namespace_uri)g(:)i
8009
(string)479 4498 y Fv(Description:.)20 b Fw(F)o(or)g(namespace-a)o(w)o
8010
(are)d(implementations)i(of)h(the)g(node)f(class,)i(this)g(method)d
8011
(returns)i(the)479 4606 y(namespace)f(URI)i(of)f(the)g(element,)f
8012
(attrib)n(ute)h(or)g(namespace.)f(It)h(is)h(required)e(that)h(a)h
8013
(namespace)e(manager)f(is)479 4714 y(a)n(v)n(ailable.)p
8014
Black 3800 5278 a Fs(75)p Black eop
8016
76 75 bop Black 2225 67 a Fs(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr)
8017
m(esenting)g(the)g(document)p Black 479 579 a Fw(If)g(the)h(node)e
8018
(does)h(not)f(ha)n(v)o(e)h(a)h(namespace)e(pre\002x,)g(and)h(there)f
8019
(is)i(no)f(def)o(ault)g(namespace,)e(this)j(method)e(returns)479
8020
687 y("".)479 836 y(The)h(namespace)f(URI)i(is)g(the)f(unique)f(name)g
8021
(of)h(the)h(namespace.)479 986 y Fv(Domain:.)f Fw(Elements)g(and)f
8022
(attrib)n(utes)h(supporting)e(namespaces;)i(furthermore)d(namespace)i
8023
(nodes.)p Black 396 1135 a Fu(\225)p Black 60 w Fv(Method:.)h
8024
Fr(obj)44 b(#)h Fb(namespace_manager)479 1285 y Fv(Signatur)o(e:.)659
8025
1423 y Fr(method)e(namespace_manager)f(:)j(namespace_manager)479
8026
1614 y Fv(Description:.)20 b Fw(F)o(or)g(namespace-a)o(w)o(are)d
8027
(implementations)i(of)h(the)g(node)f(class,)i(this)g(method)d(returns)i
8028
(the)479 1722 y(namespace)f(manager)-5 b(.)19 b(If)h(the)g(namespace)f
8029
(manager)g(has)h(not)g(been)g(set,)g(the)h(e)o(xception)d
8030
Fr(Not_found)h Fw(is)i(raised.)479 1872 y(The)f(namespace)f(manager)g
8031
(is)i(an)f(object)g(that)g(holds)g(the)g(mapping)e(from)h(namespace)g
8032
(pre\002x)o(es)h(to)g(namespace)479 1979 y(URIs,)h(and)f(vice)g(v)o
8033
(ersa.)f(It)i(is)g(contained)d(in)j(the)f(DTD.)479 2129
8034
y Fv(Domain:.)g Fw(Elements)g(and)f(attrib)n(utes)h(supporting)e
8035
(namespaces;)i(furthermore)d(namespace)i(nodes.)p Black
8036
396 2278 a Fu(\225)p Black 60 w Fv(Method:.)h Fr(obj)44
8037
b(#)h Fb(namespace_info)479 2428 y Fv(Signatur)o(e:.)659
8038
2566 y Fr(method)e(namespace_info)g(:)i('ext)f(namespace_info)479
8039
2757 y Fv(Description:.)20 b Fw(Returns)f(additional)g(information)f
8040
(about)h(the)h(namespace)e(pre\002x)o(es)h(in)i(the)f(parsed)f(XML)h
8041
(source.)479 2865 y(This)h(method)d(has)j(been)e(added)g(for)h(better)g
8042
(XP)o(ath)g(conformance.)d(Note)j(that)g(it)h(is)g(still)h(e)o
8043
(xperimental)c(and)h(it)i(is)479 2973 y(lik)o(ely)f(that)h(it)g(will)f
8044
(be)h(changed.)479 3123 y(This)g(record)d(is)k(only)d(a)n(v)n(ailable)h
8045
(if)g(the)g(parser)g(has)g(been)g(con\002gured)e(to)i(support)f
8046
(namespaces,)g(and)h(if)g(the)g(parser)479 3231 y(has)h(been)e
8047
(con\002gured)f(to)i(set)h(this)g(record)e(\(requires)g(a)h(lot)h(of)f
8048
(memory\).)e(Furthermore,)f(only)i(the)479 3339 y(implementation)f
8049
(namespace_element_impl)e(supports)j(this)i(method.)479
8050
3488 y(This)g(method)d(raises)j Fr(Not_found)f Fw(if)g(the)g
8051
Fr(namespace_info)f Fw(\002eld)h(has)g(not)g(been)g(set.)479
8052
3637 y Fv(Domain:.)g Fw(Elements)g(supporting)d(namespaces.)-2
8053
4090 y Fq(3.2.6.)35 b(The)f(c)n(lass)h Fd(element_impl)396
8054
4258 y Fv(Class:.)21 b Fr('ext)44 b Fb(element_impl)396
8055
4407 y Fv(Signatur)o(e:.)396 4587 y Fr(class)g([)h('ext)f(])h
8056
(element_impl)e(:)h('ext)g(-)p Fp(>)h Fr([)f('ext)h(])f(node)p
8057
Black 3798 5278 a Fs(76)p Black eop
8059
77 76 bop Black 2225 67 a Fs(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr)
8060
m(esenting)g(the)g(document)p Black 396 579 a Fv(Description:.)g
8061
Fw(This)g(class)h(is)h(an)e(implementation)e(of)i Fr(node)g
8062
Fw(which)f(realizes)i(element)e(nodes.)g(Y)-9 b(ou)20
8063
b(can)g(create)g(a)396 687 y(ne)n(w)g(object)g(by)396
8064
836 y Fr(let)45 b(exemplar)e(=)i(new)f(element_impl)f(ext_obj)396
8065
986 y Fw(which)19 b(creates)g(a)h(special)f(form)f(of)h(empty)f
8066
(element)h(which)f(already)h(contains)f(a)i(reference)d(to)i(the)h
8067
Fr(ext_obj)e Fw(,)i(b)n(ut)f(is)396 1094 y(otherwise)h(empty)-5
8068
b(.)18 b(This)j(special)f(form)f(is)i(called)f(an)h(element)e(e)o(x)o
8069
(emplar)-5 b(.)19 b(In)g(order)g(to)i(get)f(a)h(w)o(orking)d(element)i
8070
(that)396 1202 y(can)g(be)g(used)g(in)h(a)f(node)f(tree)i(it)g(is)g
8071
(required)d(to)i(apply)g(the)g(method)f Fr(create_element)f
8072
Fw(on)i(the)g(e)o(x)o(emplar)e(object.)396 1351 y(Note)i(that)h(the)f
8073
(class)h Fr(element_impl)e Fw(is)i(not)f(namespace-a)o(w)o(are.)396
8074
1500 y Fv(Example.)g Fw(First,)h(create)f(an)g(e)o(x)o(emplar)e(by)396
8075
1681 y Fr(let)45 b(exemplar)222 b(=)45 b(new)f(element_impl)f(ext_obj)h
8076
(in)396 1872 y Fw(The)20 b Fr(exemplar)g Fw(is)h(not)f(used)f(in)i
8077
(node)e(trees,)h(b)n(ut)g(only)g(as)h(a)f(pattern)g(when)f(the)h
8078
(element)g(nodes)f(are)i(created:)396 2052 y Fr(let)45
8079
b(element)e(=)i(exemplar)e(#)i(create_element)e(dtd)h(\(T_element)f
8080
(name\))h(attlist)396 2243 y Fw(The)20 b Fr(element)g
8081
Fw(is)h(a)f(cop)o(y)g(of)g Fr(exemplar)f Fw(\(e)n(v)o(en)g(the)h(e)o
8082
(xtension)f Fr(ext_obj)g Fw(has)i(been)e(copied\))g(which)h(ensures)f
8083
(that)396 2351 y Fr(element)h Fw(and)f(its)j(e)o(xtension)c(are)j
8084
(objects)e(of)h(the)h(same)f(class)h(as)g(the)f(e)o(x)o(emplars;)f
8085
(note)h(that)g(you)f(need)h(not)f(to)i(pass)396 2459
8086
y(a)g(class)g(name)f(or)g(other)f(meta)h(information.)e(The)h(cop)o(y)h
8087
(is)h(initially)f(connected)e(with)j(the)f Fr(dtd)p Fw(,)g(it)h(gets)f
8088
(a)h(node)e(type,)396 2566 y(and)h(the)g(attrib)n(ute)g(list)h(is)g
8089
(\002lled.)g(The)e Fr(element)h Fw(is)h(no)n(w)f(fully)f(functional;)g
8090
(it)i(can)f(be)g(added)f(to)h(another)f(element)h(as)396
8091
2674 y(child,)g(and)f(it)i(can)f(contain)g(references)e(to)j(subnodes.)
8092
-2 3044 y Fq(3.2.7.)35 b(The)f(c)n(lass)h Fd(data_impl)396
8093
3212 y Fv(Class:.)21 b Fr('ext)44 b Fb(data_impl)396
8094
3361 y Fv(Signatur)o(e:.)396 3541 y Fr(class)g([)h('ext)f(])h
8095
(data_impl)e(:)i('ext)f(-)p Fp(>)g Fr([)h('ext)f(])h(node)396
8096
3774 y Fv(Description:.)20 b Fw(This)g(class)h(is)h(an)e
8097
(implementation)e(of)i Fr(node)g Fw(which)f(realizes)i(data)f(nodes.)f
8098
(Y)-9 b(ou)19 b(can)h(create)g(a)h(ne)n(w)396 3882 y(object)f(by)396
8099
4031 y Fr(let)45 b(exemplar)e(=)i(new)f(data_impl)f(ext_obj)396
8100
4181 y Fw(which)20 b(creates)g(a)h(special)f(form)f(of)h(empty)f(data)i
8101
(node)e(which)g(already)g(contains)h(a)g(reference)f(to)h(the)h
8102
Fr(ext_obj)e Fw(,)i(b)n(ut)396 4289 y(is)g(otherwise)f(empty)-5
8103
b(.)19 b(This)h(special)g(form)f(is)j(called)e(a)g(data)g(e)o(x)o
8104
(emplar)-5 b(.)19 b(In)h(order)e(to)j(get)f(a)h(w)o(orking)d(data)i
8105
(node)f(that)396 4396 y(can)h(be)g(used)g(in)h(a)f(node)f(tree)i(it)g
8106
(is)g(required)d(to)i(apply)g(the)g(method)f Fr(create_data)g
8107
Fw(on)g(the)i(e)o(x)o(emplar)d(object.)396 4546 y Fv(Example.)i
8108
Fw(First,)h(create)f(an)g(e)o(x)o(emplar)e(by)396 4726
8109
y Fr(let)45 b(exemplar)222 b(=)45 b(new)f(data_impl)g(ext_obj)f(in)p
8110
Black 3797 5278 a Fs(77)p Black eop
8112
78 77 bop Black 2225 67 a Fs(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr)
8113
m(esenting)g(the)g(document)p Black 396 579 a Fw(The)g
8114
Fr(exemplar)g Fw(is)h(not)f(used)f(in)i(node)e(trees,)h(b)n(ut)g(only)g
8115
(as)h(a)f(pattern)g(when)f(the)h(data)g(nodes)g(are)g(created:)396
8116
759 y Fr(let)45 b(data_node)e(=)i(exemplar)e(#)i(create_data)e(dtd)h
8117
("The)g(characters)f(con-)396 856 y(tained)h(in)h(the)f(data)g(node")
8118
396 1047 y Fw(The)20 b Fr(data_node)f Fw(is)i(a)g(cop)o(y)e(of)h
8119
Fr(exemplar)p Fw(.)g(The)f(cop)o(y)h(is)h(initially)f(connected)e(with)
8120
j(the)f Fr(dtd)p Fw(,)g(and)f(it)i(is)h(\002lled)396
8121
1155 y(with)f(character)e(material.)g(The)h Fr(data_node)f
8122
Fw(is)i(no)n(w)f(fully)g(functional;)e(it)j(can)f(be)g(added)f(to)h(an)
8123
h(element)e(as)i(child.)-2 1525 y Fq(3.2.8.)35 b(The)f(c)n(lasses)i
8124
Fd(super_root_impl)o Fq(,)28 b Fd(pinstr_impl)p Fq(,)g(and)34
8125
b Fd(comment_impl)396 1692 y Fv(Class:.)21 b Fr('ext)44
8126
b Fb(super_root_impl)396 1842 y Fv(Signatur)o(e:.)396
8127
2022 y Fr(class)g([)h('ext)f(])h(super_root_impl)d(:)j('ext)f(-)p
8128
Fp(>)g Fr([)h('ext)f(])h(node)f(;;)396 2254 y Fv(Description:.)20
8129
b Fw(This)g(class)h(is)h(an)e(implementation)e(of)i Fr(node)g
8130
Fw(which)f(realizes)i(super)e(root)h(nodes.)f(Y)-9 b(ou)19
8131
b(can)h(create)g(a)396 2362 y(ne)n(w)g(object)g(by)396
8132
2512 y Fr(let)45 b(exemplar)e(=)i(new)f(super_root_impl)e(ext_obj)396
8133
2661 y Fw(which)19 b(creates)h(a)f(special)h(form)e(of)i(empty)e(super)
8134
h(root)g(which)g(already)f(contains)h(a)g(reference)f(to)i(the)f
8135
Fr(ext_obj)g Fw(,)h(b)n(ut)396 2769 y(is)h(otherwise)f(empty)-5
8136
b(.)19 b(This)h(special)g(form)f(is)j(called)e(a)g(super)g(root)f(e)o
8137
(x)o(emplar)-5 b(.)19 b(In)h(order)e(to)j(get)f(a)h(w)o(orking)d(node)h
8138
(that)396 2877 y(can)h(be)g(used)g(in)h(a)f(node)f(tree)i(it)g(is)g
8139
(required)d(to)i(apply)g(the)g(method)f Fr(create_other)f
8140
Fw(on)i(the)g(e)o(x)o(emplar)f(object,)g(e.g.)396 3027
8141
y Fr(let)45 b(root)f(=)g(exemplar)g(#)h(create_other)d(dtd)396
8142
3176 y Fv(Class:.)21 b Fr('ext)44 b Fb(pinstr_impl)396
8143
3325 y Fv(Signatur)o(e:.)396 3506 y Fr(class)g([)h('ext)f(])h
8144
(pinstr_impl)e(:)h('ext)h(-)p Fp(>)f Fr([)h('ext)f(])g(node)h(;;)396
8145
3738 y Fv(Description:.)20 b Fw(This)g(class)h(is)h(an)e
8146
(implementation)e(of)i Fr(node)g Fw(which)f(realizes)i(processing)d
8147
(instruction)h(nodes.)h(Y)-9 b(ou)396 3846 y(can)20 b(create)g(a)h(ne)n
8148
(w)f(object)f(by)396 3995 y Fr(let)45 b(exemplar)e(=)i(new)f
8149
(pinstr_impl)f(ext_obj)396 4145 y Fw(which)20 b(creates)g(a)h(special)f
8150
(form)f(of)h(empty)f(node)h(which)f(already)g(contains)h(a)g(reference)
8151
f(to)h(the)g Fr(ext_obj)g Fw(,)h(b)n(ut)f(is)396 4253
8152
y(otherwise)g(empty)-5 b(.)18 b(This)j(special)f(form)f(is)i(called)f
8153
(a)h(processing)e(instruction)g(e)o(x)o(emplar)-5 b(.)18
8154
b(In)i(order)f(to)h(get)h(a)f(w)o(orking)396 4361 y(node)f(that)i(can)f
8155
(be)g(used)g(in)g(a)h(node)e(tree)h(it)h(is)g(required)d(to)j(apply)e
8156
(the)h(method)f Fr(create_other)g Fw(on)h(the)g(e)o(x)o(emplar)396
8157
4469 y(object,)g(e.g.)396 4618 y Fr(let)45 b(pi)f(=)h(exemplar)e(#)i
8158
(create_other)e(dtd)396 4768 y Fv(Class:.)21 b Fr('ext)44
8159
b Fb(comment_impl)p Black 3800 5278 a Fs(78)p Black eop
8161
79 78 bop Black 2225 67 a Fs(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr)
8162
m(esenting)g(the)g(document)p Black 396 579 a Fv(Signatur)o(e:.)396
8163
759 y Fr(class)44 b([)h('ext)f(])h(comment_impl)e(:)h('ext)g(-)p
8164
Fp(>)h Fr([)f('ext)h(])f(node)g(;;)396 992 y Fv(Description:.)20
8165
b Fw(This)g(class)h(is)h(an)e(implementation)e(of)i Fr(node)g
8166
Fw(which)f(realizes)i(comment)d(nodes.)i(Y)-9 b(ou)19
8167
b(can)h(create)g(a)396 1099 y(ne)n(w)g(object)g(by)396
8168
1249 y Fr(let)45 b(exemplar)e(=)i(new)f(comment_impl)f(ext_obj)396
8169
1398 y Fw(which)19 b(creates)g(a)h(special)f(form)f(of)h(empty)f
8170
(element)h(which)f(already)h(contains)f(a)i(reference)d(to)i(the)h
8171
Fr(ext_obj)e Fw(,)i(b)n(ut)f(is)396 1506 y(otherwise)f(empty)-5
8172
b(.)18 b(This)g(special)h(form)f(is)h(called)g(an)g(comment)e(e)o(x)o
8173
(emplar)-5 b(.)17 b(In)h(order)g(to)h(get)f(a)h(w)o(orking)f(element)g
8174
(that)396 1614 y(can)i(be)g(used)g(in)h(a)f(node)f(tree)i(it)g(is)g
8175
(required)d(to)i(apply)g(the)g(method)f Fr(create_other)f
8176
Fw(on)i(the)g(e)o(x)o(emplar)f(object,)g(e.g.)396 1764
8177
y Fr(let)45 b(comment)e(=)i(exemplar)e(#)i(create_other)e(dtd)-2
8178
2133 y Fq(3.2.9.)35 b(Examples:)g(Creating)f(and)g(accessing)j(nodes)
8179
396 2301 y Fv(Building)22 b(tr)o(ees.)d Fw(Here)h(is)h(the)g(piece)e
8180
(of)h(code)g(that)g(creates)g(the)h(tree)f(of)g(the)g(\002gure)f
8181
Fs(A)i(tr)m(ee)g(with)f(element)g(nodes,)396 2409 y(data)g(nodes,)f
8182
(and)g(attrib)n(utes)p Fw(.)h(The)g(e)o(xtension)f(object)h(and)f(the)h
8183
(DTD)h(are)f(be)o(yond)e(the)i(scope)g(of)g(this)g(e)o(xample.)396
8184
2589 y Fr(let)45 b(exemplar_ext)d(=)j(...)f(\(*)h(some)f(extension)f
8185
(*\))i(in)396 2686 y(let)g(dtd)f(=)h(...)f(\(*)g(some)h(DTD)f(*\))g(in)
8186
396 2880 y(let)h(element_exemplar)d(=)i(new)h(element_impl)e
8187
(exemplar_ext)f(in)396 2978 y(let)j(data_exemplar)177
8188
b(=)44 b(new)h(data_impl)178 b(exemplar_ext)42 b(in)396
8189
3172 y(let)j(a1)f(=)h(element_exemplar)d(#)j(cre-)396
8190
3269 y(ate_element)e(dtd)i(\(T_element)e("a"\))h(["att",)g("apple"])396
8191
3366 y(and)h(b1)f(=)h(element_exemplar)d(#)j(create_element)d(dtd)i
8192
(\(T_element)g("b"\))g([])396 3463 y(and)h(c1)f(=)h(element_exemplar)d
8193
(#)j(create_element)d(dtd)i(\(T_element)g("c"\))g([])396
8194
3560 y(and)h(a2)f(=)h(element_exemplar)d(#)j(cre-)396
8195
3658 y(ate_element)e(dtd)i(\(T_element)e("a"\))h(["att",)g("orange"])
8196
396 3755 y(in)396 3949 y(let)h(cherries)e(=)i(data_exemplar)d(#)j
8197
(create_data)e(dtd)h("Cherries")g(in)396 4046 y(let)h(orange)133
8198
b(=)45 b(data_exemplar)d(#)j(create_data)e(dtd)h("An)h(orange")e(in)396
8199
4240 y(a1)i(#)f(append_node)f(b1;)396 4337 y(a1)i(#)f(append_node)f
8200
(c1;)396 4435 y(b1)i(#)f(append_node)f(a2;)396 4532 y(b1)i(#)f
8201
(append_node)f(cherries;)396 4629 y(a2)i(#)f(append_node)f(orange;)396
8202
4820 y Fw(Alternati)n(v)o(ely)-5 b(,)18 b(the)i(last)h(block)f(of)g
8203
(statements)g(could)f(also)i(be)f(written)g(as:)p Black
8204
3800 5278 a Fs(79)p Black eop
8206
80 79 bop Black 2225 67 a Fs(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr)
8207
m(esenting)g(the)g(document)p Black 396 579 a Fr(a1)45
8208
b(#)f(set_nodes)g([b1;)g(c1];)396 676 y(b1)h(#)f(set_nodes)g([a2;)g
8209
(cherries];)396 773 y(a2)h(#)f(set_nodes)g([orange];)396
8210
964 y Fw(The)20 b(root)g(of)g(the)g(tree)g(is)h Fr(a1)p
8211
Fw(,)f(i.e.)g(it)h(is)g(true)f(that)396 1144 y Fr(x)45
8212
b(#)g(root)f(==)g(a1)396 1335 y Fw(for)20 b(e)n(v)o(ery)f(x)h(from)f({)
8213
i Fr(a1)p Fw(,)f Fr(a2)p Fw(,)g Fr(b1)p Fw(,)g Fr(c1)p
8214
Fw(,)g Fr(cherries)p Fw(,)g Fr(orange)f Fw(}.)396 1485
8215
y(Furthermore,)f(the)i(follo)n(wing)f(properties)f(hold:)486
8216
1665 y Fr(a1)44 b(#)h(attribute)e("att")h(=)h(Value)f("apple")396
8217
1762 y(&)h(a2)f(#)h(attribute)e("att")h(=)h(Value)f("orange")396
8218
1956 y(&)h(cherries)e(#)i(data)f(=)h("Cherries")396 2053
8219
y(&)135 b(orange)43 b(#)i(data)f(=)h("An)f(orange")396
8220
2151 y(&)314 b(a1)44 b(#)h(data)f(=)h("CherriesAn)e(orange")396
8221
2345 y(&)314 b(a1)44 b(#)h(node_type)e(=)i(T_element)e("a")396
8222
2442 y(&)314 b(a2)44 b(#)h(node_type)e(=)i(T_element)e("a")396
8223
2539 y(&)314 b(b1)44 b(#)h(node_type)e(=)i(T_element)e("b")396
8224
2636 y(&)314 b(c1)44 b(#)h(node_type)e(=)i(T_element)e("c")396
8225
2733 y(&)i(cherries)e(#)i(node_type)e(=)i(T_data)396
8226
2830 y(&)135 b(orange)43 b(#)i(node_type)e(=)i(T_data)396
8227
3025 y(&)314 b(a1)44 b(#)h(sub_nodes)e(=)i([)g(b1;)f(c1)h(])396
8228
3122 y(&)314 b(a2)44 b(#)h(sub_nodes)e(=)i([)g(orange)f(])396
8229
3219 y(&)314 b(b1)44 b(#)h(sub_nodes)e(=)i([)g(a2;)f(cherries)g(])396
8230
3316 y(&)314 b(c1)44 b(#)h(sub_nodes)e(=)i([])396 3413
8231
y(&)g(cherries)e(#)i(sub_nodes)e(=)i([])396 3510 y(&)135
8232
b(orange)43 b(#)i(sub_nodes)e(=)i([])396 3705 y(&)314
8233
b(a2)44 b(#)h(parent)f(==)g(a1)396 3802 y(&)314 b(b1)44
8234
b(#)h(parent)f(==)g(b1)396 3899 y(&)314 b(c1)44 b(#)h(parent)f(==)g(a1)
8235
396 3996 y(&)h(cherries)e(#)i(parent)f(==)g(b1)396 4093
8236
y(&)135 b(orange)43 b(#)i(parent)f(==)g(a2)396 4326 y
8237
Fv(Sear)o(ching)19 b(nodes.)g Fw(The)g(follo)n(wing)e(function)h
8238
(searches)h(all)g(nodes)g(of)g(a)g(tree)h(for)e(which)h(a)g(certain)g
8239
(condition)e(holds:)396 4506 y Fr(let)45 b(rec)f(search)g(p)g(t)h(=)486
8240
4603 y(if)f(p)h(t)g(then)576 4700 y(t)f(::)h(search_list)e(p)h(\(t)h(#)
8241
g(sub_nodes\))486 4797 y(else)p Black 3800 5278 a Fs(80)p
8244
81 80 bop Black 2225 67 a Fs(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr)
8245
m(esenting)g(the)g(document)p Black 576 579 a Fr(search_list)43
8246
b(p)h(\(t)h(#)f(sub_nodes\))396 773 y(and)h(search_list)e(p)h(l)h(=)486
8247
870 y(match)f(l)h(with)576 967 y([])268 b(-)p Fp(>)45
8248
b Fr([])486 1065 y(|)g(t)f(::)h(l')f(-)p Fp(>)h Fr(\(search)e(p)i(t\))f
8249
(@)h(\(search_list)e(p)i(l'\))396 1162 y(;;)396 1394
8250
y Fw(F)o(or)20 b(e)o(xample,)f(if)h(you)f(w)o(ant)i(to)f(search)g(all)h
8251
(elements)f(of)f(a)i(certain)f(type)f Fr(et)p Fw(,)i(the)f(function)e
8252
Fr(search)i Fw(can)g(be)g(applied)396 1502 y(as)h(follo)n(ws:)396
8253
1682 y Fr(let)45 b(search_element_type)c(et)k(t)f(=)486
8254
1779 y(search)g(\(fun)g(x)h(-)p Fp(>)f Fr(x)h(#)f(node_type)g(=)g
8255
(T_element)g(et\))g(t)396 1877 y(;;)396 2109 y Fv(Getting)20
8256
b(attrib)n(ute)f(v)o(alues.)h Fw(Suppose)f(we)i(ha)n(v)o(e)f(the)g
8257
(declaration:)396 2289 y Fr(<!ATTLIST)44 b(e)g(a)h(CDATA)f(#REQUIRED)
8258
934 2386 y(b)h(CDATA)f(#IMPLIED)934 2483 y(c)h(CDATA)f("12345">)396
8259
2674 y Fw(In)20 b(this)h(case,)f(e)n(v)o(ery)f(element)h
8260
Fr(e)g Fw(must)h(ha)n(v)o(e)e(an)h(attrib)n(ute)g Fr(a)p
8261
Fw(,)g(otherwise)g(the)g(parser)g(w)o(ould)f(indicate)h(an)g(error)-5
8262
b(.)19 b(If)h(the)396 2782 y(O'Caml)h(v)n(ariable)e Fr(n)h
8263
Fw(holds)g(the)g(node)f(of)h(the)g(tree)h(corresponding)16
8264
b(to)21 b(the)f(element,)f(you)g(can)h(get)h(the)f(v)n(alue)f(of)h(the)
8265
396 2890 y(attrib)n(ute)g Fr(a)h Fw(by)396 3070 y Fr(let)45
8266
b(value_of_a)e(=)h(n)h(#)g(required_string_attribute)40
8267
b("a")396 3261 y Fw(which)20 b(is)h(more)e(or)h(less)i(an)e(abbre)n
8268
(viation)d(for)396 3442 y Fr(let)45 b(value_of_a)e(=)486
8269
3539 y(match)h(n)h(#)f(attribute)g("a")g(with)576 3636
8270
y(Value)g(s)g(->)h(s)486 3733 y(|)g(_)313 b(->)45 b(assert)f(false)396
8271
3924 y Fw(-)21 b(as)g(the)f(attrib)n(ute)g(is)h(required,)d(the)i
8272
Fr(attribute)f Fw(method)g(al)o(w)o(ays)i(returns)e(a)i
8273
Fr(Value)p Fw(.)396 4073 y(In)f(contrast)g(to)g(this,)h(the)f(attrib)n
8274
(ute)g Fr(b)g Fw(can)g(be)g(omitted.)g(In)f(this)i(case,)g(the)f
8275
(method)396 4181 y Fr(required_string_attribute)d Fw(w)o(orks)j(only)f
8276
(if)h(the)h(attrib)n(ute)f(is)h(there,)e(and)h(the)g(method)f(will)i(f)
8277
o(ail)f(if)h(the)396 4289 y(attrib)n(ute)f(is)h(missing.)f(T)-7
8278
b(o)20 b(get)h(the)f(v)n(alue,)f(you)g(can)h(apply)g(the)g(method)f
8279
Fr(optional_string_attribute)p Fw(:)396 4469 y Fr(let)45
8280
b(value_of_b)e(=)h(n)h(#)g(optional_string_attribute)40
8281
b("b")396 4660 y Fw(No)n(w)-5 b(,)20 b Fr(value_of_b)f
8282
Fw(is)i(of)f(type)g Fr(string)43 b(option)p Fw(,)20 b(and)f
8283
Fr(None)i Fw(represents)e(the)h(omitted)g(attrib)n(ute.)f(Alternati)n
8284
(v)o(ely)-5 b(,)396 4768 y(you)20 b(could)f(also)h(use)h
8285
Fr(attribute)p Fw(:)p Black 3800 5278 a Fs(81)p Black
8288
82 81 bop Black 2225 67 a Fs(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr)
8289
m(esenting)g(the)g(document)p Black 396 579 a Fr(let)45
8290
b(value_of_b)e(=)486 676 y(match)h(n)h(#)f(attribute)g("b")g(with)576
8291
773 y(Value)g(s)313 b(->)45 b(Some)f(s)486 870 y(|)h(Implied_value)d
8292
(->)j(None)486 967 y(|)g(_)582 b(->)45 b(assert)f(false)396
8293
1200 y Fw(The)20 b(attrib)n(ute)g Fr(c)h Fw(beha)n(v)o(es)e(much)g(lik)
8294
o(e)h Fr(a)p Fw(,)h(because)e(it)i(has)g(al)o(w)o(ays)f(a)h(v)n(alue.)e
8295
(If)h(the)g(attrib)n(ute)g(is)h(omitted,)f(the)g(def)o(ault,)396
8296
1308 y(here)g("12345",)e(will)j(be)f(returned)e(instead.)i(Because)g
8297
(of)g(this,)h(you)e(can)h(again)f(use)396 1416 y Fr
8298
(required_string_attribute)e Fw(to)j(get)g(the)h(v)n(alue.)396
8299
1565 y(The)f(type)g Fr(CDATA)g Fw(is)h(the)f(most)g(general)f(string)h
8300
(type.)g(The)g(types)g Fr(NMTOKEN)p Fw(,)f Fr(ID)p Fw(,)h
8301
Fr(IDREF)p Fw(,)g Fr(ENTITY)p Fw(,)f(and)h(all)396 1673
8302
y(enumerators)e(and)i(notations)f(are)h(special)h(forms)e(of)h(string)g
8303
(types)g(that)g(restrict)g(the)h(possible)f(v)n(alues.)f(From)396
8304
1781 y(O'Caml,)h(the)o(y)g(beha)n(v)o(e)f(lik)o(e)h Fr(CDATA)p
8305
Fw(,)g(i.e.)g(you)f(can)h(use)h(the)f(methods)f Fr
8306
(required_string_attribute)e Fw(and)396 1889 y Fr
8307
(optional_string_attribute)p Fw(,)g(too.)396 2038 y(In)j(contrast)g(to)
8308
g(this,)h(the)f(types)g Fr(NMTOKENS)p Fw(,)f Fr(IDREFS)p
8309
Fw(,)g(and)h Fr(ENTITIES)g Fw(mean)f(lists)j(of)e(strings.)g(Suppose)f
8310
(we)h(ha)n(v)o(e)396 2146 y(the)g(declaration:)396 2327
8311
y Fr(<!ATTLIST)44 b(f)g(d)h(NMTOKENS)e(#REQUIRED)934
8312
2424 y(e)i(NMTOKENS)e(#IMPLIED>)396 2615 y Fw(The)20
8313
b(type)g Fr(NMTOKENS)f Fw(stands)i(for)e(lists)j(of)e(space-separated)e
8314
(tok)o(ens;)i(for)f(e)o(xample)g(the)h(v)n(alue)g Fr("1)44
8315
b(abc)h(23ef")396 2723 y Fw(means)20 b(the)g(list)i Fr(["1";)44
8316
b("abc";)f("23ef"])p Fw(.)20 b(\(Again,)e Fr(IDREFS)i
8317
Fw(and)g Fr(ENTITIES)f Fw(ha)n(v)o(e)h(more)f(restricted)h(v)n
8318
(alues.\))396 2830 y(T)-7 b(o)21 b(get)f(the)g(v)n(alue)g(of)f(attrib)n
8319
(ute)h Fr(d)p Fw(,)h(one)e(can)h(use)396 3011 y Fr(let)45
8320
b(value_of_d)e(=)h(n)h(#)g(required_list_attribute)c("d")396
8321
3202 y Fw(or)396 3382 y Fr(let)k(value_of_d)e(=)486 3479
8322
y(match)h(n)h(#)f(attribute)g("d")g(with)576 3576 y(Valuelist)f(l)i(->)
8323
f(l)486 3673 y(|)h(_)493 b(->)44 b(assert)g(false)396
8324
3864 y Fw(As)21 b Fr(d)g Fw(is)g(required,)d(the)i(attrib)n(ute)g
8325
(cannot)f(be)h(omitted,)g(and)f(the)h Fr(attribute)g
8326
Fw(method)e(returns)i(al)o(w)o(ays)g(a)396 3972 y Fr(Valuelist)p
8327
Fw(.)396 4121 y(F)o(or)g(optional)f(attrib)n(utes)h(lik)o(e)h
8328
Fr(e)p Fw(,)f(apply)396 4302 y Fr(let)45 b(value_of_e)e(=)h(n)h(#)g
8329
(optional_list_attribute)c("e")396 4493 y Fw(or)396 4673
8330
y Fr(let)k(value_of_e)e(=)486 4770 y(match)h(n)h(#)f(attribute)g("e")g
8331
(with)576 4867 y(Valuelist)f(l)134 b(->)45 b(l)p Black
8332
3800 5278 a Fs(82)p Black eop
8334
83 82 bop Black 2225 67 a Fs(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr)
8335
m(esenting)g(the)g(document)p Black 486 579 a Fr(|)45
8336
b(Implied_value)d(->)j([])486 676 y(|)g(_)582 b(->)45
8337
b(assert)f(false)396 867 y Fw(Here,)20 b(the)g(case)h(that)f(the)g
8338
(attrib)n(ute)g(is)h(missing)f(counts)g(lik)o(e)g(the)h(empty)e(list.)
8339
-2 1237 y Fq(3.2.10.)36 b(The)d(type)h Fd(spec)p Black
8340
396 1524 a Fu(\225)p Black 60 w Fv(T)-6 b(ype:.)20 b
8341
Fr('ext)44 b Fb(spec)479 1673 y Fv(Signatur)o(e:.)479
8342
1812 y Fr(type)g('ext)h(spec)479 1909 y(constraint)e('ext)i(=)f('ext)g
8343
(node)h(#extension)479 2100 y Fv(Description:.)20 b Fw(The)g(abstract)g
8344
(data)g(type)f(specifying)g(which)h(objects)g(are)g(actually)f(created)
8345
h(by)g(the)g(parser)-5 b(.)p Black 396 2291 a Fu(\225)p
8346
Black 60 w Fv(Function:.)20 b Fb(make_spec_from_mapping)41
8347
b Fr(~super_root_exemplar)g(~comment_exemplar)479 2399
8348
y(~default_pinstr_exemplar)g(~pinstr_mapping)h(~data_exemplar)479
8349
2507 y(~default_element_exemplar)f(~element_mapping)h(\(\))479
8350
2656 y Fv(Signatur)o(e:.)479 2795 y Fr(val)j(make_spec_from_mapping)c
8351
(:)748 2892 y(?super_root_exemplar)h(:)i('ext)h(node)f(-)p
8352
Fp(>)748 2989 y Fr(?comment_exemplar)e(:)j('ext)f(node)g(-)p
8353
Fp(>)748 3086 y Fr(?default_pinstr_exemplar)d(:)k('ext)f(node)g(-)p
8354
Fp(>)748 3183 y Fr(?pinstr_mapping)f(:)h(\(string,)g('ext)g(node\))g
8355
(Hashtbl.t)f(-)p Fp(>)748 3281 y Fr(data_exemplar:)g('ext)h(node)g(-)p
8356
Fp(>)748 3378 y Fr(default_element_exemplar:)d('ext)j(node)g(-)p
8357
Fp(>)748 3475 y Fr(element_mapping:)e(\(string,)i('ext)g(node\))g
8358
(Hashtbl.t)f(-)p Fp(>)748 3572 y Fr(unit)h(-)p Fp(>)838
8359
3669 y Fr('ext)g(spec)479 3860 y Fv(Description:.)20
8360
b Fw(Creates)h(a)f Fr(spec)g Fw(from)f(the)i(ar)o(guments.)d(Some)h(ar)
8361
o(guments)g(are)h(optional,)e(some)i(ar)o(guments)e(are)479
8362
3968 y(mandatory)-5 b(.)p Black 479 4200 a Fa(\225)p
8363
Black 62 w Fr(~super_root_exemplar)18 b Fw(:)j(Speci\002es)f(the)g(e)o
8364
(x)o(emplar)e(to)j(be)f(used)g(for)f(ne)n(w)h(super)g(root)g(nodes.)f
8365
(This)562 4308 y(e)o(x)o(emplar)f(is)k(optional.)p Black
8366
479 4458 a Fa(\225)p Black 62 w Fr(~comment_exemplar)c
8367
Fw(:)j(Speci\002es)g(the)f(e)o(x)o(emplar)e(to)i(be)g(used)g(for)g(ne)n
8368
(w)g(comment)f(nodes.)g(This)h(e)o(x)o(emplar)562 4566
8369
y(is)h(optional.)p Black 479 4715 a Fa(\225)p Black 62
8370
w Fr(~pinstr_exemplar)d Fw(:)j(Speci\002es)g(the)f(e)o(x)o(emplar)e(to)
8371
i(be)h(used)f(for)f(ne)n(w)h(processing)f(instruction)g(nodes)g(by)h(a)
8372
562 4823 y(hashtable)g(mapping)e(tar)o(get)h(names)h(to)g(e)o(x)o
8373
(emplars.)f(This)h(hashtable)f(is)j(optional.)p Black
8374
3800 5278 a Fs(83)p Black eop
8376
84 83 bop Black 2225 67 a Fs(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr)
8377
m(esenting)g(the)g(document)p Black Black 479 579 a Fa(\225)p
8378
Black 62 w Fr(~default_pinstr_exemplar)d Fw(:)k(Speci\002es)f(the)h(e)o
8379
(x)o(emplar)d(to)i(be)g(used)g(for)g(ne)n(w)g(processing)f(instruction)
8380
562 687 y(nodes.)h(This)g(e)o(x)o(emplar)e(will)j(be)f(used)g(for)g
8381
(tar)o(gets)f(that)h(are)h(not)e(contained)g(in)h(the)h
8382
Fr(~pinstr_exemplar)562 795 y Fw(hashtable.)e(This)i(e)o(x)o(emplar)d
8383
(is)j(optional.)p Black 479 944 a Fa(\225)p Black 62
8384
w Fr(~data_exemplar)e Fw(:)i(Speci\002es)f(the)g(e)o(x)o(emplar)e(to)j
8385
(be)f(used)g(for)f(ne)n(w)h(data)h(nodes.)e(This)h(e)o(x)o(emplar)e(is)
8386
562 1052 y(mandatory)-5 b(.)p Black 479 1202 a Fa(\225)p
8387
Black 62 w Fr(~element_mapping)18 b Fw(:)j(Speci\002es)g(the)f(e)o(x)o
8388
(emplar)e(to)i(be)h(used)f(for)f(ne)n(w)h(element)g(nodes)f(by)h(a)h
8389
(hashtable)562 1310 y(mapping)e(element)g(types)h(to)h(e)o(x)o
8390
(emplars.)d(This)i(hashtable)g(is)h(mandatory)c(\(b)n(ut)j(may)g(be)g
8391
(empty\).)p Black 479 1459 a Fa(\225)p Black 62 w Fr
8392
(~default_element_exemplar)d Fw(:)k(Speci\002es)f(the)g(e)o(x)o(emplar)
8393
f(to)h(be)g(used)g(for)g(ne)n(w)g(element)f(nodes.)g(This)562
8394
1567 y(e)o(x)o(emplar)f(will)j(be)g(used)e(for)h(element)g(types)g
8395
(that)g(are)g(not)g(contained)e(in)j(the)f Fr(~element_mapping)562
8396
1675 y Fw(hashtable.)f(This)i(e)o(x)o(emplar)d(is)j(mandatory)-5
8397
b(.)p Black 396 1907 a Fu(\225)p Black 60 w Fv(Function:.)20
8398
b Fb(make_spec_from_alist)41 b Fr(~super_root_exemplar)h
8399
(~comment_exemplar)479 2015 y(~default_pinstr_exemplar)f(~pinstr_alist)
8400
i(~data_exemplar)479 2123 y(~default_element_exemplar)e(~element_alist)
8401
h(\(\))479 2273 y Fv(Signatur)o(e:.)479 2411 y Fr(val)j
8402
(make_spec_from_alist)c(:)748 2508 y(?super_root_exemplar)h(:)i('ext)h
8403
(node)f(-)p Fp(>)748 2605 y Fr(?comment_exemplar)e(:)j('ext)f(node)g(-)
8404
p Fp(>)748 2703 y Fr(?default_pinstr_exemplar)d(:)k('ext)f(node)g(-)p
8405
Fp(>)748 2800 y Fr(?pinstr_alist)f(:)i(\(string)e(*)i('ext)f(node\))g
8406
(list)g(-)p Fp(>)748 2897 y Fr(data_exemplar:)f('ext)h(node)g(-)p
8407
Fp(>)748 2994 y Fr(default_element_exemplar:)d('ext)j(node)g(-)p
8408
Fp(>)748 3091 y Fr(element_alist:)f(\(string)g(*)i('ext)f(node\))g
8409
(list)g(-)p Fp(>)748 3188 y Fr(unit)g(-)p Fp(>)838 3285
8410
y Fr('ext)g(spec)479 3476 y Fv(Description:.)20 b Fw(Creates)h(a)f
8411
Fr(spec)g Fw(from)f(the)i(ar)o(guments.)d(This)i(is)h(a)g(con)m(v)o
8412
(enience)c(function)h(for)479 3584 y Fr(make_spec_from_mapping)f
8413
Fw(;)k(instead)f(of)g(requiring)e(hashtables)i(the)g(function)e(allo)n
8414
(ws)j(it)g(to)f(pass)479 3692 y(associati)n(v)o(e)g(lists.)p
8415
Black 396 3883 a Fu(\225)p Black 60 w Fv(Function:.)g
8416
Fb(create_data_node)42 b Fr(spec)i(dtd)g(datastring)479
8417
4033 y Fv(Signatur)o(e:.)479 4171 y Fr(val)h(create_data_node)d(:)748
8418
4268 y('ext)i(spec)h(-)p Fp(>)f Fr(dtd)g(-)p Fp(>)h Fr(string)f(-)p
8419
Fp(>)g Fr('ext)g(node)479 4459 y Fv(Description:.)20
8420
b Fw(Creates)h(a)f(ne)n(w)g(data)g(node)f(from)h(the)g(e)o(x)o(emplar)e
8421
(contained)h(in)h Fr(spec)g Fw(.)g(The)g(ne)n(w)g(node)f(contains)479
8422
4567 y Fr(datastring)g Fw(and)h(is)h(connected)d(with)j(the)f
8423
Fr(dtd)g Fw(.)p Black 396 4758 a Fu(\225)p Black 60 w
8424
Fv(Function:.)g Fb(create_element_node)41 b Fr
8425
(~name_pool_for_attribute_values)f(~position)479 4866
8426
y(~valcheck)k(~att_values)f(spec)h(dtd)g(eltype)g(att_list)p
8427
Black 3800 5278 a Fs(84)p Black eop
8429
85 84 bop Black 2225 67 a Fs(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr)
8430
m(esenting)g(the)g(document)p Black 479 579 a Fv(Signatur)o(e:.)479
8431
718 y Fr(val)45 b(create_element_node)c(:)748 815 y
8432
(?name_pool_for_attribute_values:Pxp_types)o(.pool)d(-)p
8433
Fp(>)748 912 y Fr(?position:\(string)k(*)j(int)f(*)h(int\))f(-)p
8434
Fp(>)748 1009 y Fr(?valcheck:bool)f(-)p Fp(>)748 1106
8435
y Fr(?att_values:\(\(string)f(*)i(Pxp_types.att_value\))e(list\))i(-)p
8436
Fp(>)748 1203 y Fr('ext)g(spec)h(-)p Fp(>)f Fr(dtd)g(-)p
8437
Fp(>)h Fr(string)f(-)p Fp(>)g Fr(\(string)g(*)g(string\))g(list)g(-)p
8438
Fp(>)g Fr('ext)h(node)479 1394 y Fv(Description:.)20
8439
b Fw(Creates)h(a)f(ne)n(w)g(element)g(node)f(from)g(the)h(e)o(x)o
8440
(emplar\(s\))e(contained)h(in)h Fr(spec)g Fw(:)p Black
8441
479 1627 a Fa(\225)p Black 62 w Fw(The)g(ne)n(w)g(node)f(will)i(be)f
8442
(connected)f(to)h(the)g(passed)g Fr(dtd)h Fw(.)p Black
8443
479 1776 a Fa(\225)p Black 62 w Fw(The)f(ne)n(w)g(node)f(will)i(ha)n(v)
8444
o(e)f(the)g(element)g(type)f Fr(eltype)h Fw(.)p Black
8445
479 1926 a Fa(\225)p Black 62 w Fw(The)g(attrib)n(utes)g(of)g(the)g(ne)
8446
n(w)g(node)g(will)g(be)h(the)f(concatenation)e(of)i Fr(att_list)f
8447
Fw(and)h Fr(att_values)f Fw(;)562 2033 y Fr(att_list)h
8448
Fw(passes)h(attrib)n(ute)e(v)n(alues)h(as)h(strings)f(while)h
8449
Fr(att_values)e Fw(passes)h(attrib)n(ute)g(v)n(alues)g(as)h(type)562
8450
2141 y Fr(att_value)p Black 479 2291 a Fa(\225)p Black
8451
62 w Fw(The)f(source)g(position)f(is)i(set)g(to)f Fr(~position)g
8452
Fw(\(if)g(passed\))p Black 479 2440 a Fa(\225)p Black
8453
62 w Fw(The)g Fr(~name_pool_for_attribute_values)c Fw(will)21
8454
b(be)f(used,)f(if)i(passed.)p Black 479 2590 a Fa(\225)p
8455
Black 62 w Fw(If)f Fr(~valcheck)44 b(=)g(true)20 b Fw(\(the)g(def)o
8456
(ault\),)f(the)h(attrib)n(ute)g(list)h(is)h(immediately)c(v)n
8457
(alidated.)h(If)h Fr(~valcheck)44 b(=)562 2698 y(false)20
8458
b Fw(,)h(the)f(v)n(alidation)f(is)i(left)f(out;)g(in)h(this)f(case)h
8459
(you)e(can)h(pass)h(an)o(y)e(element)h(type)g(and)f(and)h(an)o(y)f
8460
(attrib)n(utes,)562 2806 y(and)h(it)h(does)f(not)g(matter)g(whether)f
8461
(and)g(ho)n(w)h(the)o(y)f(are)i(declared.)p Black 396
8462
3038 a Fu(\225)p Black 60 w Fv(Function:.)f Fb(create_super_root_node)
8463
41 b Fr(~position)i(spec)h(dtd)479 3187 y Fv(Signatur)o(e:.)479
8464
3326 y Fr(val)h(create_super_root_node)c(:)748 3423 y
8465
(?position:\(string)h(*)j(int)f(*)h(int\))f(-)p Fp(>)748
8466
3520 y Fr('ext)g(spec)h(-)p Fp(>)f Fr(dtd)g(-)p Fp(>)h
8467
Fr('ext)f(node)479 3711 y Fv(Description:.)20 b Fw(Creates)h(a)f(ne)n
8468
(w)g(super)g(root)f(node)g(from)h(the)g(e)o(x)o(emplar)e(contained)h
8469
(in)h Fr(spec)g Fw(.)g(The)g(ne)n(w)g(node)f(is)479 3819
8470
y(connected)g(to)h Fr(dtd)g Fw(,)h(and)e(the)i(position)e(triple)h(is)h
8471
(set)g(to)f Fr(~position)g Fw(.)479 3969 y(The)g(function)f(f)o(ails)h
8472
(if)h(there)f(is)h(no)f(super)f(root)h(e)o(x)o(emplar)e(in)i
8473
Fr(spec)g Fw(.)p Black 396 4160 a Fu(\225)p Black 60
8474
w Fv(Function:.)g Fb(create_pinstr_node)42 b Fr(~position)h(spec)h(dtd)
8475
g(pi)479 4309 y Fv(Signatur)o(e:.)479 4448 y Fr(val)h
8476
(create_pinstr_node)c(:)748 4545 y(?position:\(string)h(*)j(int)f(*)h
8477
(int\))f(-)p Fp(>)748 4642 y Fr('ext)g(spec)h(-)p Fp(>)f
8478
Fr(dtd)g(-)p Fp(>)h Fr(proc_instruction)d(-)p Fp(>)i
8479
Fr('ext)g(node)p Black 3800 5278 a Fs(85)p Black eop
8481
86 85 bop Black 2225 67 a Fs(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr)
8482
m(esenting)g(the)g(document)p Black 479 579 a Fv(Description:.)g
8483
Fw(Creates)h(a)f(ne)n(w)g(processing)f(instruction)g(node)g(from)g(the)
8484
i(e)o(x)o(emplar)d(contained)g(in)j Fr(spec)f Fw(.)g(The)479
8485
687 y(ne)n(w)g(node)f(is)j(connected)c(to)i Fr(dtd)g
8486
Fw(,)h(and)f(the)g(position)f(triple)h(is)h(set)g(to)g
8487
Fr(~position)e Fw(.)h(The)g(contents)g(of)g(the)g(node)479
8488
795 y(are)g(set)h(to)g Fr(pi)f Fw(.)479 944 y(The)g(function)f(f)o
8489
(ails)h(if)h(there)f(is)h(no)f(processing)e(instruction)h(e)o(x)o
8490
(emplar)g(in)h Fr(spec)g Fw(.)p Black 396 1135 a Fu(\225)p
8491
Black 60 w Fv(Function:.)g Fb(create_comment_node)41
8492
b Fr(~position)j(spec)g(dtd)g(commentstring)479 1285
8493
y Fv(Signatur)o(e:.)479 1423 y Fr(val)h(create_comment_node)c(:)748
8494
1520 y(?position:\(string)h(*)j(int)f(*)h(int\))f(-)p
8495
Fp(>)748 1618 y Fr('ext)g(spec)h(-)p Fp(>)f Fr(dtd)g(-)p
8496
Fp(>)h Fr(string)f(-)p Fp(>)g Fr('ext)g(node)479 1808
8497
y Fv(Description:.)20 b Fw(Creates)h(a)f(ne)n(w)g(comment)f(node)g
8498
(from)g(the)i(e)o(x)o(emplar)d(contained)g(in)j Fr(spec)f
8499
Fw(.)g(The)g(ne)n(w)g(node)f(is)479 1916 y(connected)g(to)h
8500
Fr(dtd)g Fw(,)h(and)e(the)i(position)e(triple)h(is)h(set)g(to)f
8501
Fr(~position)g Fw(.)g(The)g(contents)f(of)h(the)h(node)e(are)h(set)h
8502
(to)479 2024 y Fr(commentstring)e Fw(.)479 2174 y(The)h(function)f(f)o
8503
(ails)h(if)h(there)f(is)h(no)f(comment)e(e)o(x)o(emplar)h(in)h
8504
Fr(spec)g Fw(.)-2 2585 y Fq(3.2.11.)36 b(Examples:)f(Creating)f(nodes)g
8505
(using)g Fd(spec)396 2753 y Fv(Building)22 b(tr)o(ees.)d
8506
Fw(Here)h(is)h(again)f(a)g(piece)g(of)g(code)f(that)i(creates)f(the)g
8507
(tree)g(of)g(the)h(\002gure)e Fs(A)h(tr)m(ee)h(with)g(element)f(nodes,)
8508
396 2861 y(data)g(nodes,)f(and)g(attrib)n(utes)p Fw(.)h(No)n(w)g(the)h
8509
(type)e Fr(spec)h Fw(is)h(used)f(to)h(encapsulate)e(the)h(e)o(x)o
8510
(emplar)e(objects.)396 3041 y Fr(let)45 b(exemplar_ext)d(=)j(...)f(\(*)
8511
h(some)f(extension)f(*\))i(in)396 3138 y(let)g(dtd)f(=)h(...)f(\(*)g
8512
(some)h(DTD)f(*\))g(in)396 3332 y(let)h(element_exemplar)d(=)i(new)h
8513
(element_impl)e(exemplar_ext)f(in)396 3429 y(let)j(data_exemplar)177
8514
b(=)44 b(new)h(data_impl)178 b(exemplar_ext)42 b(in)396
8515
3623 y(let)j(spec)f(=)g(make_spec_from_alist)979 3721
8516
y(~data_exemplar:data_exemplar)979 3818 y
8517
(~default_element_exemplar:element_exempl)o(ar)979 3915
8518
y(~element_alist:[])979 4012 y(\(\))h(in)396 4206 y(let)g(a1)f(=)h
8519
(create_element_node)c(spec)k(dtd)f("a")g(["att",)g("apple"])396
8520
4303 y(and)h(b1)f(=)h(create_element_node)c(spec)k(dtd)f("b")g([])396
8521
4401 y(and)h(c1)f(=)h(create_element_node)c(spec)k(dtd)f("c")g([])396
8522
4498 y(and)h(a2)f(=)h(create_element_node)c(spec)k(dtd)f("a")g(["att",)
8523
g("orange"])396 4595 y(in)396 4789 y(let)h(cherries)e(=)i
8524
(create_data_node)d(spec)i(dtd)g("Cherries")g(in)p Black
8525
3798 5278 a Fs(86)p Black eop
8527
87 86 bop Black 2225 67 a Fs(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr)
8528
m(esenting)g(the)g(document)p Black 396 579 a Fr(let)45
8529
b(orange)133 b(=)45 b(create_data_node)d(spec)i(dtd)g("An)h(orange")e
8530
(in)396 773 y(a1)i(#)f(append_node)f(b1;)396 870 y(a1)i(#)f
8531
(append_node)f(c1;)396 967 y(b1)i(#)f(append_node)f(a2;)396
8532
1065 y(b1)i(#)f(append_node)f(cherries;)396 1162 y(a2)i(#)f
8533
(append_node)f(orange;)396 1353 y Fw(The)20 b(type)g
8534
Fr(spec)g Fw(is)h(ob)o(viously)d(useful)i(as)h(a)f(container)f(for)h
8535
(the)g(e)o(x)o(emplars.)e(Moreo)o(v)o(er)m(,)f(the)j(type)g
8536
Fr(spec)g Fw(allo)n(ws)g(it)h(to)396 1461 y(control)e(which)g(e)o
8537
(xtension)f(object)h(is)i(used)e(for)g(which)h(element)f(type)g(which)g
8538
(is)i(e)o(xplained)c(in)j(the)g(section)f(The)h(class)396
8539
1569 y(type)g(e)o(xtension.)-2 1938 y Fq(3.2.12.)36 b(Iterator)n(s)396
8540
2106 y Fw(There)20 b(are)g(also)g(se)n(v)o(eral)g(iterators)g(in)g
8541
(Pxp_document.)d(Y)-9 b(ou)19 b(can)h(\002nd)g(e)o(xamples)f(for)h
8542
(them)g(in)g(the)396 2214 y("simple_transformation")d(directory)-5
8543
b(.)p Black 396 2446 a Fu(\225)p Black 60 w Fv(Function:.)20
8544
b Fb(find)44 b Fr(~deeply)g(f)g(startnode)479 2596 y
8545
Fv(Signatur)o(e:.)479 2734 y Fr(val)h(find)f(:)g(?deeply:bool)f(-)p
8546
Fp(>)972 2831 y Fr(\('ext)h(node)h(-)p Fp(>)f Fr(bool\))g(-)p
8547
Fp(>)g Fr('ext)h(node)f(-)p Fp(>)g Fr('ext)g(node)479
8548
3022 y Fv(Description:.)20 b Fw(Searches)g(the)g(\002rst)h(node)e(in)h
8549
(the)h(tree)f(belo)n(w)f Fr(startnode)h Fw(for)f(which)h(the)g
8550
(predicate)f(f)h(is)i(true,)479 3130 y(and)e(returns)f(it.)i(Raises)g
8551
Fr(Not_found)f Fw(if)g(there)g(is)h(no)f(such)g(node.)479
8552
3280 y(By)h(def)o(ault,)e Fr(~deeply=false)g Fw(.)h(In)g(this)h(case,)f
8553
(only)g(the)g(children)f(of)h Fr(startnode)f Fw(are)h(searched.)479
8554
3429 y(If)g(passing)g Fr(~deeply=true)f Fw(,)h(the)h(children)d(are)j
8555
(searched)e(recursi)n(v)o(ely)f(\(depth-\002rst)h(search\).)g(Note)h
8556
(that)g(e)n(v)o(en)479 3537 y(in)h(this)f(case)h Fr(startnode)e
8557
Fw(itself)i(is)g(not)f(check)o(ed.)479 3687 y(Attrib)n(ute)g(and)g
8558
(namespace)f(nodes)g(are)h(ignored.)p Black 396 3878
8559
a Fu(\225)p Black 60 w Fv(Function:.)g Fb(find_all)43
8560
b Fr(~deeply)h(f)h(startnode)479 4027 y Fv(Signatur)o(e:.)479
8561
4166 y Fr(val)g(find_all)e(:)i(?deeply:bool)e(-)p Fp(>)1152
8562
4263 y Fr(\('ext)h(node)g(-)p Fp(>)g Fr(bool\))g(-)p
8563
Fp(>)h Fr('ext)f(node)g(-)p Fp(>)g Fr('ext)h(node)f(list)479
8564
4454 y Fv(Description:.)20 b Fw(Searches)g(all)g(nodes)g(in)g(the)g
8565
(tree)h(belo)n(w)e Fr(startnode)h Fw(for)f(which)h(the)g(predicate)f(f)
8566
h(is)h(true,)f(and)479 4562 y(returns)g(them.)479 4711
8567
y(By)h(def)o(ault,)e Fr(~deeply=false)g Fw(.)h(In)g(this)h(case,)f
8568
(only)g(the)g(children)f(of)h Fr(startnode)f Fw(are)h(searched.)p
8569
Black 3797 5278 a Fs(87)p Black eop
8571
88 87 bop Black 2225 67 a Fs(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr)
8572
m(esenting)g(the)g(document)p Black 479 579 a Fw(If)g(passing)g
8573
Fr(~deeply=true)f Fw(,)h(the)h(children)d(are)j(searched)e(recursi)n(v)
8574
o(ely)f(\(depth-\002rst)h(search\).)g(Note)h(that)g(e)n(v)o(en)479
8575
687 y(in)h(this)f(case)h Fr(startnode)e Fw(itself)i(is)g(not)f(check)o
8576
(ed.)479 836 y(Attrib)n(ute)g(and)g(namespace)f(nodes)g(are)h(ignored.)
8577
p Black 396 1027 a Fu(\225)p Black 60 w Fv(Function:.)g
8578
Fb(find_element)43 b Fr(~deeply)g(eltype)h(startnode)479
8579
1177 y Fv(Signatur)o(e:.)479 1315 y Fr(val)h(find_element)d(:)j
8580
(?deeply:bool)e(-)p Fp(>)1331 1412 y Fr(string)h(-)p
8581
Fp(>)g Fr('ext)g(node)h(-)p Fp(>)f Fr('ext)g(node)479
8582
1603 y Fv(Description:.)20 b Fw(Searches)g(the)g(\002rst)h(element)e
8583
(in)i(the)f(tree)g(belo)n(w)g Fr(startnode)f Fw(that)h(has)h(the)f
8584
(element)g(type)479 1711 y Fr(eltype)g Fw(,)h(and)e(returns)g(it.)i
8585
(Raises)h Fr(Not_found)d Fw(if)h(there)g(is)h(no)f(such)g(node.)479
8586
1861 y(By)h(def)o(ault,)e Fr(~deeply=false)g Fw(.)h(In)g(this)h(case,)f
8587
(only)g(the)g(children)f(of)h Fr(startnode)f Fw(are)h(searched.)479
8588
2010 y(If)g(passing)g Fr(~deeply=true)f Fw(,)h(the)h(children)d(are)j
8589
(searched)e(recursi)n(v)o(ely)f(\(depth-\002rst)h(search\).)g(Note)h
8590
(that)g(e)n(v)o(en)479 2118 y(in)h(this)f(case)h Fr(startnode)e
8591
Fw(itself)i(is)g(not)f(check)o(ed.)p Black 396 2309 a
8592
Fu(\225)p Black 60 w Fv(Function:.)g Fb(find_all_elements)42
8593
b Fr(~deeply)h(eltype)h(startnode)479 2459 y Fv(Signatur)o(e:.)479
8594
2597 y Fr(val)h(find_all_elements)d(:)i(?deeply:bool)f(-)p
8595
Fp(>)1555 2694 y Fr(string)h(-)p Fp(>)g Fr('ext)h(node)f(-)p
8596
Fp(>)g Fr('ext)g(node)g(list)479 2885 y Fv(Description:.)20
8597
b Fw(Searches)g(all)g(elements)g(in)h(the)f(tree)g(belo)n(w)g
8598
Fr(startnode)f Fw(ha)n(ving)g(the)h(element)g(type)g
8599
Fr(eltype)f Fw(,)479 2993 y(and)h(returns)f(them.)479
8600
3143 y(By)i(def)o(ault,)e Fr(~deeply=false)g Fw(.)h(In)g(this)h(case,)f
8601
(only)g(the)g(children)f(of)h Fr(startnode)f Fw(are)h(searched.)479
8602
3292 y(If)g(passing)g Fr(~deeply=true)f Fw(,)h(the)h(children)d(are)j
8603
(searched)e(recursi)n(v)o(ely)f(\(depth-\002rst)h(search\).)g(Note)h
8604
(that)g(e)n(v)o(en)479 3400 y(in)h(this)f(case)h Fr(startnode)e
8605
Fw(itself)i(is)g(not)f(check)o(ed.)p Black 396 3591 a
8606
Fu(\225)p Black 60 w Fv(Exception:.)g Fb(Skip)479 3740
8607
y Fv(Signatur)o(e:.)479 3879 y Fr(exception)44 b(Skip)479
8608
4070 y Fv(Description:.)20 b Fw(This)g(e)o(xception)f(can)h(be)g(used)g
8609
(in)g(the)g(functions)f(passed)h(to)g Fr(map_tree)g Fw(,)g
8610
Fr(map_tree_sibl)f Fw(,)479 4178 y Fr(iter_tree)h Fw(,)g(and)g
8611
Fr(iter_tree_sibl)e Fw(to)i(skip)h(the)f(current)f(node,)g(and)g(to)i
8612
(proceed)d(with)i(the)h(ne)o(xt)e(node.)g(See)479 4286
8613
y(these)i(function)d(for)i(details.)p Black 396 4477
8614
a Fu(\225)p Black 60 w Fv(Function:.)g Fb(map_tree)43
8615
b Fr(~pre)h(~post)g(startnode)479 4626 y Fv(Signatur)o(e:.)479
8616
4765 y Fr(val)h(map_tree)e(:)90 b(pre:\('exta)43 b(node)h(-)p
8617
Fp(>)g Fr('extb)g(node\))g(-)p Fp(>)1152 4862 y Fr(?post:\('extb)f
8618
(node)h(-)p Fp(>)g Fr('extb)g(node\))g(-)p Fp(>)p Black
8619
3800 5278 a Fs(88)p Black eop
8621
89 88 bop Black 2225 67 a Fs(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr)
8622
m(esenting)g(the)g(document)p Black 1152 579 a Fr('exta)44
8623
b(node)g(-)p Fp(>)1331 676 y Fr('extb)g(node)479 867
8624
y Fv(Description:.)20 b Fw(Maps)g(the)g(tree)h(be)o(ginning)c(at)k
8625
Fr(startnode)e Fw(to)h(a)h(second)e(tree)i(using)e(the)h(follo)n(wing)f
8626
(algorithm.)479 1016 y Fr(startnode)h Fw(and)f(the)h(whole)g(tree)g
8627
(belo)n(w)g(it)h(are)f(recursi)n(v)o(ely)e(tra)n(v)o(ersed.)h(After)h
8628
(entering)f(a)h(node,)f(the)i(function)479 1124 y(~pre)f(is)h(called.)f
8629
(The)g(result)g(of)g(this)h(function)d(must)i(be)g(a)h(ne)n(w)f(node;)f
8630
(it)i(must)f(not)g(ha)n(v)o(e)g(children)f(nor)g(a)i(parent.)479
8631
1232 y(F)o(or)f(e)o(xample,)f(you)g(can)h(pass)h Fr(~pre:\(fun)43
8632
b(n)i(-)p Fp(>)f Fr(n)h(#)f(orphaned_flat_clone\))18
8633
b Fw(to)i(cop)o(y)f(the)i(original)479 1340 y(node.)e(After)h(that,)g
8634
(the)g(children)f(are)h(processed)f(in)i(the)f(same)g(w)o(ay)h(\(from)d
8635
(left)j(to)f(right\))f(resulting)h(in)g(a)h(list)g(of)479
8636
1448 y(mapped)e(children.)f(These)i(are)h(added)e(to)h(the)g(mapped)f
8637
(node)g(as)i(its)g(children.)479 1598 y(No)n(w)-5 b(,)20
8638
b(the)g(~post)g(function)e(is)k(in)m(v)n(ok)o(ed)c(with)i(the)h(mapped)
8639
d(node)h(as)i(ar)o(gument,)d(and)h(the)i(result)f(is)h(the)f(result)g
8640
(of)479 1706 y(the)g(function)f(\(~post)h(should)f(return)g(a)h(root)g
8641
(node,)f(too;)h(if)g(not)g(speci\002ed,)g(the)g(identity)f(is)j(the)e
8642
(~post)g(function\).)479 1855 y(Both)h(~pre)e(and)h(~post)g(may)g
8643
(raise)g Fr(Skip)g Fw(which)g(causes)g(that)h(the)f(node)f(is)i(left)g
8644
(out)e(\(i.e.)h(the)g(mapped)f(tree)h(does)479 1963 y(neither)g
8645
(contain)f(the)h(node)f(nor)h(an)o(y)f(children)g(of)h(the)g(node\).)e
8646
(If)i(the)h(top)f(node)f(is)i(skipped,)e(the)h(e)o(xception)479
8647
2071 y Fr(Not_found)g Fw(is)h(raised.)479 2220 y(F)o(or)f(e)o(xample,)f
8648
(the)h(follo)n(wing)e(piece)i(of)g(code)g(duplicates)f(a)i(tree,)f(b)n
8649
(ut)g(remo)o(v)o(es)e(all)j(comment)e(nodes:)479 2370
8650
y Fr(map_tree)44 b(~pre:\(fun)f(n)i(-)p Fp(>)f Fr(if)h(n)f(#)h
8651
(node_type)e(=)i(T_comment)e(then)h(raise)g(Skip)h(else)f(n)479
8652
2478 y(#)h(orphaned_flat_clone\))c(startnode)479 2627
8653
y Fw(Attrib)n(ute)20 b(and)g(namespace)f(nodes)g(are)h(ignored.)p
8654
Black 396 2818 a Fu(\225)p Black 60 w Fv(Function:.)g
8655
Fb(map_tree_sibl)42 b Fr(~pre)j(~post)f(startnode)479
8656
2967 y Fv(Signatur)o(e:.)479 3106 y Fr(val)h(map_tree_sibl)d(:)838
8657
3203 y(pre:)i(\('exta)g(node)g(option)g(-)p Fp(>)g Fr('exta)g(node)g(-)
8658
p Fp(>)h Fr('exta)f(node)g(option)g(-)p Fp(>)1286 3300
8659
y Fr('extb)g(node\))g(-)p Fp(>)793 3398 y Fr(?post:\('extb)f(node)h
8660
(option)g(-)p Fp(>)g Fr('extb)g(node)g(-)p Fp(>)h Fr('extb)f(node)g
8661
(option)g(-)p Fp(>)1286 3495 y Fr('extb)g(node\))g(-)p
8662
Fp(>)793 3592 y Fr('exta)g(node)g(-)p Fp(>)972 3689 y
8663
Fr('extb)g(node)479 3880 y Fv(Description:.)20 b Fw(Maps)g(the)g(tree)h
8664
(be)o(ginning)c(at)k Fr(startnode)e Fw(to)h(a)h(second)e(tree)i(using)e
8665
(the)h(follo)n(wing)f(algorithm.)479 4029 y Fr(startnode)h
8666
Fw(and)f(the)h(whole)g(tree)g(belo)n(w)g(it)h(are)f(recursi)n(v)o(ely)e
8667
(tra)n(v)o(ersed.)h(After)h(entering)f(a)h(node,)f(the)i(function)479
8668
4137 y(~pre)f(is)h(called)f(with)g(three)g(ar)o(guments:)e(some)i(pre)n
8669
(vious)f(node,)g(the)h(current)f(node,)g(and)h(some)g(ne)o(xt)f(node.)g
8670
(The)479 4245 y(pre)n(vious)g(and)h(the)g(ne)o(xt)f(node)g(may)h(not)g
8671
(e)o(xist)g(because)g(the)g(current)f(node)g(is)i(the)f(\002rst)h(or)f
8672
(the)g(last)h(in)g(the)f(current)479 4353 y(list)i(of)d(nodes.)h(In)g
8673
(this)g(case,)h Fr(None)f Fw(is)h(passed)f(as)h(pre)n(vious)e(or)g(ne)o
8674
(xt)h(node,)f(resp.)h(The)f(result)i(of)f(this)g(function)479
8675
4461 y(in)m(v)n(ocation)f(must)h(be)g(a)h(ne)n(w)f(node;)f(it)i(must)f
8676
(not)g(ha)n(v)o(e)f(children)g(nor)h(a)g(parent.)f(F)o(or)h(e)o
8677
(xample,)f(you)g(can)h(pass)479 4569 y Fr(~pre:\(fun)44
8678
b(prev)g(n)g(next)h(-)p Fp(>)f Fr(n)h(#)f(orphaned_flat_clone\))18
8679
b Fw(to)i(cop)o(y)f(the)i(original)e(node.)g(After)479
8680
4677 y(that,)h(the)h(children)d(are)i(processed)g(in)g(the)g(same)g(w)o
8681
(ay)h(\(from)e(left)h(to)g(right\))g(resulting)f(in)h(a)h(list)g(of)f
8682
(mapped)479 4785 y(children.)p Black 3800 5278 a Fs(89)p
8685
90 89 bop Black 2225 67 a Fs(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr)
8686
m(esenting)g(the)g(document)p Black 479 579 a Fw(No)n(w)-5
8687
b(,)20 b(the)g(~post)g(function)e(is)k(applied)d(to)h(the)g(list)i(of)e
8688
(mapped)e(children)h(resulting)g(in)i(a)f(list)i(of)d(postprocessed)479
8689
687 y(children.)g(\(Note:)h(this)g(part)g(w)o(orks)g(rather)f(dif)n
8690
(ferently)g(than)g Fr(map_tree)h Fw(.\))g(~post)g(has)g(three)g(ar)o
8691
(guments:)e(some)479 795 y(pre)n(vious)h(child,)g(the)i(current)e
8692
(child,)g(and)h(some)g(ne)o(xt)f(child.)h(The)g(pre)n(vious)e(and)i
8693
(the)g(ne)o(xt)g(child)f(are)h Fr(None)h Fw(if)479 903
8694
y(non-e)o(xisting.)d(The)i(postprocessed)e(children)h(are)h(appended)e
8695
(to)i(the)g(mapped)f(node)g(resulting)g(in)i(the)f(mapped)479
8696
1011 y(tree.)479 1160 y(Both)h(~pre)e(and)h(~post)g(may)g(raise)g
8697
Fr(Skip)g Fw(which)g(causes)g(that)h(the)f(node)f(is)i(left)g(out)e
8698
(\(i.e.)h(the)g(mapped)f(tree)h(does)479 1268 y(neither)g(contain)f
8699
(the)h(node)f(nor)h(an)o(y)f(children)g(of)h(the)g(node\).)e(If)i(the)h
8700
(top)f(node)f(is)i(skipped,)e(the)h(e)o(xception)479
8701
1376 y Fr(Not_found)g Fw(is)h(raised.)479 1525 y(Attrib)n(ute)f(and)g
8702
(namespace)f(nodes)g(are)h(ignored.)p Black 396 1716
8703
a Fu(\225)p Black 60 w Fv(Function:.)g Fb(iter_tree)43
8704
b Fr(~pre)h(~post)g(startnode)479 1866 y Fv(Signatur)o(e:.)479
8705
2004 y Fr(val)h(iter_tree)e(:)i(?pre:\('ext)e(node)h(-)p
8706
Fp(>)g Fr(unit\))g(-)p Fp(>)1197 2102 y Fr(?post:\('ext)f(node)h(-)p
8707
Fp(>)g Fr(unit\))g(-)p Fp(>)1197 2199 y Fr('ext)g(node)g(-)p
8708
Fp(>)1376 2296 y Fr(unit)479 2487 y Fv(Description:.)20
8709
b Fw(Iterates)g(o)o(v)o(er)f(the)h(tree)g(be)o(ginning)e(at)i
8710
Fr(startnode)g Fw(using)f(the)i(follo)n(wing)d(algorithm.)479
8711
2636 y Fr(startnode)i Fw(and)f(the)h(whole)g(tree)g(belo)n(w)g(it)h
8712
(are)f(recursi)n(v)o(ely)e(tra)n(v)o(ersed.)h(After)h(entering)f(a)h
8713
(node,)f(the)i(function)479 2744 y(~pre)f(is)h(called.)f(No)n(w)-5
8714
b(,)19 b(the)i(children)d(are)i(processed)g(recursi)n(v)o(ely)-5
8715
b(.)17 b(Finally)-5 b(,)20 b(the)g(~post)g(function)e(is)j(in)m(v)n(ok)
8716
o(ed.)479 2894 y(The)f(~pre)g(function)e(may)i(raise)h
8717
Fr(Skip)f Fw(causing)f(that)h(the)g(children)f(and)h(the)g(in)m(v)n
8718
(ocation)e(of)i(the)h(~post)f(function)479 3001 y(are)g(skipped.)f(If)h
8719
(the)g(~post)h(function)d(raises)j Fr(Skip)f Fw(nothing)e(special)j
8720
(happens.)479 3151 y(Attrib)n(ute)f(and)g(namespace)f(nodes)g(are)h
8721
(ignored.)p Black 396 3342 a Fu(\225)p Black 60 w Fv(Function:.)g
8722
Fb(iter_tree_sibl)42 b Fr(~pre)i(~post)g(startnode)479
8723
3491 y Fv(Signatur)o(e:.)479 3630 y Fr(val)h(iter_tree_sibl)d(:)793
8724
3727 y(?pre:)i(\('ext)g(node)g(option)g(-)p Fp(>)g Fr('ext)h(node)f(-)p
8725
Fp(>)g Fr('ext)g(node)g(option)g(-)p Fp(>)h Fr(unit\))f(-)479
8726
3824 y Fp(>)793 3921 y Fr(?post:\('ext)f(node)h(option)g(-)p
8727
Fp(>)g Fr('ext)h(node)f(-)p Fp(>)g Fr('ext)g(node)g(option)g(-)p
8728
Fp(>)h Fr(unit\))f(-)479 4019 y Fp(>)793 4116 y Fr('ext)g(node)g(-)p
8729
Fp(>)972 4213 y Fr(unit)479 4404 y Fv(Description:.)20
8730
b Fw(Iterates)g(o)o(v)o(er)f(the)h(tree)g(be)o(ginning)e(at)i
8731
Fr(startnode)g Fw(using)f(the)i(follo)n(wing)d(algorithm.)479
8732
4553 y Fr(startnode)i Fw(and)f(the)h(whole)g(tree)g(belo)n(w)g(it)h
8733
(are)f(recursi)n(v)o(ely)e(tra)n(v)o(ersed.)h(After)h(entering)f(a)h
8734
(node,)f(the)i(function)479 4661 y(~pre)f(is)h(called)f(with)g(three)g
8735
(ar)o(guments:)e(some)i(pre)n(vious)f(node,)g(the)h(current)f(node,)g
8736
(and)h(some)g(ne)o(xt)f(node.)g(The)479 4769 y(pre)n(vious)g(and)h(the)
8737
g(ne)o(xt)f(node)g(may)h(be)g Fr(None)g Fw(if)h(non-e)o(xisting.)c(No)n
8738
(w)-5 b(,)20 b(the)g(children)f(are)h(processed)f(recursi)n(v)o(ely)-5
8739
b(.)479 4877 y(Finally)g(,)20 b(the)g(~post)g(function)e(is)k(in)m(v)n
8740
(ok)o(ed)c(with)i(the)h(same)f(three)g(ar)o(guments.)p
8741
Black 3800 5278 a Fs(90)p Black eop
8743
91 90 bop Black 2225 67 a Fs(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr)
8744
m(esenting)g(the)g(document)p Black 479 579 a Fw(The)g(~pre)g(function)
8745
e(may)i(raise)h Fr(Skip)f Fw(causing)f(that)h(the)g(children)f(and)h
8746
(the)g(in)m(v)n(ocation)e(of)i(the)h(~post)f(function)479
8747
687 y(are)g(skipped.)f(If)h(the)g(~post)h(function)d(raises)j
8748
Fr(Skip)f Fw(nothing)e(special)j(happens.)479 836 y(Attrib)n(ute)f(and)
8749
g(namespace)f(nodes)g(are)h(ignored.)-2 1247 y Fq(3.2.13.)36
8750
b(Stripping)d(whitespace)396 1415 y Fv(T)-6 b(ype:.)20
8751
b Fb(stripping_mode)396 1565 y Fv(Signatur)o(e:.)396
8752
1745 y Fr(type)44 b(stripping_mode)f(=)486 1842 y([)i(`Strip_one_lf)486
8753
1939 y(|)g(`Strip_one)486 2036 y(|)g(`Strip_seq)486 2133
8754
y(|)g(`Disabled)486 2230 y(])396 2463 y Fv(Description:.)20
8755
b Fw(The)g(dif)n(ferent)e(w)o(ays)j(ho)n(w)e(to)i(strip)f(whitespace)g
8756
(from)f(a)i(single)f(data)g(node:)p Black 396 2695 a
8757
Fu(\225)p Black 60 w Fr(`Strip_one_lf)f Fw(:)i(If)f(there)f(is)j(a)e
8758
(linefeed)f(character)g(at)i(the)f(be)o(ginning/at)e(the)i(end,)f(it)i
8759
(will)g(be)f(remo)o(v)o(ed.)e(If)479 2803 y(there)i(are)g(more)f
8760
(linefeed)h(characters,)f(only)g(the)h(\002rst/the)h(last)g(is)g(remo)o
8761
(v)o(ed.)c(\(This)j(is)i(the)e(SGML)g(rule)g(to)g(strip)479
8762
2911 y(whitespace.\))p Black 396 3061 a Fu(\225)p Black
8763
60 w Fr(`Strip_one)f Fw(:)i(If)f(there)g(is)h(a)g(whitespace)e
8764
(character)g(at)i(the)f(be)o(ginning/at)e(the)i(end,)f(it)i(will)g(be)f
8765
(remo)o(v)o(ed.)e(If)479 3169 y(there)i(are)g(more)f(whitespace)h
8766
(characters,)f(only)g(the)i(\002rst/the)f(last)h(is)g(remo)o(v)o(ed.)d
8767
(Whitespace)i(characters)f(are)479 3276 y(space,)h(ne)n(wline,)f
8768
(carriage)h(return,)e(tab)m(.)p Black 396 3426 a Fu(\225)p
8769
Black 60 w Fr(`Strip_seq)h Fw(:)i(All)g(whitespace)f(characters)f(at)i
8770
(the)f(be)o(ginning/at)d(the)k(end)e(are)h(remo)o(v)o(ed.)p
8771
Black 396 3575 a Fu(\225)p Black 60 w Fr(`Disabled)g
8772
Fw(:)g(Do)h(not)e(strip)i(whitespace.)396 3766 y Fv(Function:.)f
8773
Fb(strip_whitespace)42 b Fr(~force)i(~left)g(~right)g
8774
(~delete_empty_nodes)d(startnode)396 3916 y Fv(Signatur)o(e:.)396
8775
4096 y Fr(val)k(strip_whitespace)d(:)665 4193 y(?force:bool)h(-)p
8776
Fp(>)i Fr(?left:stripping_mode)c(-)p Fp(>)j Fr(?right:stripping_mode)e
8777
(-)p Fp(>)665 4290 y Fr(?delete_empty_nodes:bool)f(-)p
8778
Fp(>)665 4387 y Fr('ext)j(node)h(-)p Fp(>)665 4484 y
8779
Fr(unit)396 4717 y Fv(Description:.)20 b Fw(Modi\002es)g(the)g(passed)g
8780
(tree)g(in-place)g(by)f(the)i(follo)n(wing)d(rules:)p
8781
Black 3800 5278 a Fs(91)p Black eop
8783
92 91 bop Black 2225 67 a Fs(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr)
8784
m(esenting)g(the)g(document)p Black Black 396 579 a Fu(\225)p
8785
Black 60 w Fw(In)g(general,)f(whitespace)h(stripping)f(is)i(not)f
8786
(applied)f(to)h(nodes)g(inside)g(an)g Fr(xml:space="preserve")d
8787
Fw(re)o(gion,)479 687 y(unless)k Fr(~force:true)d Fw(is)k(passed)e(to)g
8788
(the)g(function)f(\(def)o(ault)g(is)i Fr(~force:false)e
8789
Fw(\).)h(Only)g(if)g(whitespace)479 795 y(stripping)f(is)i(allo)n(wed,)
8790
f(the)g(follo)n(wing)e(rules)j(are)f(carried)f(out.)h(Note)g(that)g
8791
(the)g(detection)f(of)h(re)o(gions)f(with)479 903 y(preserv)o(ed)g
8792
(whitespace)g(tak)o(es)i(the)f(parent)f(nodes)h(of)f(the)i(passed)f
8793
Fr(startnode)f Fw(into)h(account.)p Black 396 1052 a
8794
Fu(\225)p Black 60 w Fw(If)g(applied)f(to)h(a)g(data)g(node,)f
8795
(whitespace)g(at)i(the)e(be)o(ginning)f(of)h(the)h(node)f(is)i(remo)o
8796
(v)o(ed)d(according)f(to)j Fr(~left)g Fw(,)g(and)479
8797
1160 y(whitespace)g(at)h(the)f(end)f(of)h(the)h(node)e(is)i(remo)o(v)o
8798
(ed)d(according)g(to)i Fr(~right)g Fw(.)p Black 396 1310
8799
a Fu(\225)p Black 60 w Fw(If)g(applied)g(to)g(an)g(element,)f
8800
(whitespace)h(at)h(the)f(be)o(ginning)d(of)j(the)h(\002rst)g(data)f
8801
(subnode)e(is)j(remo)o(v)o(ed)d(according)g(to)479 1417
8802
y Fr(~left)i Fw(,)h(and)e(whitespace)h(at)h(the)f(end)g(of)f(the)i
8803
(last)g(data)f(subnode)e(is)j(remo)o(v)o(ed)d(according)g(to)j
8804
Fr(~right)e Fw(.)479 1525 y(Furthermore,)f(these)i(rules)g(are)g
8805
(recursi)n(v)o(ely)f(applied)g(to)h(all)h(subelements)e(\(b)n(ut)h(not)
8806
g(to)g(other)g(node)f(types\).)p Black 396 1675 a Fu(\225)p
8807
Black 60 w Fw(If)h(applied)g(to)g(the)g(super)g(root)f(node,)g(this)i
8808
(node)e(is)i(treated)f(as)h(if)f(it)h(were)f(an)g(element.)p
8809
Black 396 1824 a Fu(\225)p Black 60 w Fw(Whitespace)g(of)g(other)g
8810
(node)f(types)h(is)h(left)f(as-is,)h(as)g(whitespace)f(occuring)e(in)i
8811
(attrib)n(utes.)p Black 396 1974 a Fu(\225)p Black 60
8812
w Fw(Option)g Fr(~delete_empty_nodes)d Fw(\(def)o(ault)i(true\):)h(If)g
8813
(data)g(nodes)f(become)g(empty)h(after)g(remo)o(v)n(al)e(of)479
8814
2082 y(whitespace,)i(the)o(y)f(are)h(deleted)g(from)f(the)h(XML)g
8815
(tree.)396 2273 y(Def)o(aults:)p Black 396 2505 a Fu(\225)p
8816
Black 60 w Fr(~force:false)p Black 396 2654 a Fu(\225)p
8817
Black 60 w Fr(~left:`Disabled)p Black 396 2804 a Fu(\225)p
8818
Black 60 w Fr(~right:`Disabled)396 2995 y Fv(Examples:.)396
8819
3175 y Fr(strip_whitespace)42 b(~left:`Strip_one_lf)g
8820
(~right:`Strip_one_lf)g(startnode)396 3366 y Fw(Strips)21
8821
b(LF)f(characters)g(according)e(to)i(the)g(SGML)h(rules:)f(One)g(LF)h
8822
(is)g(stripped)e(after)h(the)g(start)h(tag,)f(and)f(one)h(before)396
8823
3474 y(the)g(end)g(tag.)g(xml:space)f(is)j(respected.)396
8824
3696 y Fr(iter_tree)486 3793 y(~pre:\(fun)43 b(n)i(-)p
8825
Fp(>)f Fr(if)h(n)f(#)h(node_type)e(=)i(T_data)f(then)1248
8826
3890 y(n)h(#)f(strip_whitespace)1293 3987 y(~force:true)f
8827
(~left:`Strip_seq)f(~right:`Strip_seq)710 4084 y(\))486
8828
4181 y(startnode)396 4372 y Fw(Strips)21 b(an)o(y)e(whitespace)h
8829
(characters)f(from)g(e)n(v)o(ery)g(data)h(nodes)g(indi)n(vidually)-5
8830
b(.)396 4522 y Fv(T)f(raps:.)20 b Fw(In)g(order)f(to)i(w)o(ork)e
8831
(properly)-5 b(,)18 b(this)i(function)f(e)o(xpects)g(a)i(normalized)d
8832
(XML)i(tree)h(\(no)e(consecuti)n(v)o(e)f(te)o(xt)396
8833
4630 y(nodes,)h(no)h(empty)g(te)o(xt)g(nodes\).)e(If)i(the)h(tree)f(is)
8834
h(not)f(normalized,)e(the)i(semantics)g(of)g(strip_whitespace)f(is)396
8835
4737 y(well-de\002ned,)g(b)n(ut)h(the)g(function)f(may)g(not)h(do)g
8836
(what)g(is)h(e)o(xpected.)e(Especially)-5 b(,)19 b(whitespace)g(is)i
8837
(not)f(stripped)f(across)396 4845 y(te)o(xt)h(nodes.)g(E.g.)f(if)h(the)
8838
h(spaces)f(in)p Black 3800 5278 a Fs(92)p Black eop
8840
93 92 bop Black 2225 67 a Fs(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr)
8841
m(esenting)g(the)g(document)p Black 396 579 a Fp(<)p
8842
Fr(A)p Fp(>)89 b(<)p Fr(/A)p Fp(>)396 770 y Fw(are)20
8843
b(stored)g(in)g(tw)o(o)h(nodes,)e(and)h(~left:`Strip_seq)e(is)k
8844
(demanded,)17 b(the)j(function)f(will)i(only)e(remo)o(v)o(e)f(the)j
8845
(\002rst)g(space.)-2 1139 y Fq(3.2.14.)36 b(Document)e(or)n(der)396
8846
1307 y Fw(The)20 b(functions)f(compare)f(and)i(ord_compare)d(implement)
8847
i(the)h(so-called)f("document)g(order".)f(The)i(basic)g(principle)396
8848
1415 y(is)h(that)g(the)f(nodes)f(are)h(linearly)g(ordered)e(by)i(their)
8849
g(occurence)e(in)i(the)h(te)o(xtual)e(XML)h(representation)e(of)i(the)h
8850
(tree.)396 1523 y(While)f(this)h(is)g(clear)e(for)g(element)g(nodes,)g
8851
(data)h(nodes,)f(comments,)f(and)h(processing)g(instructions,)f(a)i
8852
(more)f(detailed)396 1631 y(de\002nition)g(is)i(necessary)f(for)f(the)i
8853
(other)e(node)g(types.)h(In)g(particular)m(,)e(attrib)n(ute)i(nodes)f
8854
(of)h(an)g(element)g(node)f(occur)396 1739 y(before)g(an)o(y)g(re)o
8855
(gular)g(subnode)g(of)g(the)i(element,)e(and)h(namespace)f(nodes)g(of)h
8856
(that)g(element)g(occur)f(e)n(v)o(en)g(before)g(the)396
8857
1847 y(attrib)n(ute)h(nodes.)f(So)i(the)f(order)f(of)h(nodes)f(of)396
8858
2027 y Fr(<sample)44 b(a1="5")g(a2="6"><subnode/></sample>)396
8859
2218 y Fw(is)p Black 463 2575 a(1.)p Black 20 w(element)19
8860
b("sample")p Black 463 2724 a(2.)p Black 20 w(attrib)n(ute)h("a1")p
8861
Black 463 2874 a(3.)p Black 20 w(attrib)n(ute)g("a2")p
8862
Black 463 3023 a(4.)p Black 20 w(element)f("subnode")396
8863
3173 y(Note)h(that)h(the)f(order)f(of)h(the)g(attrib)n(utes)g(of)g(the)
8864
g(same)h(element)e(is)i(unspeci\002ed,)e(so)h("a2")g(may)g(alternati)n
8865
(v)o(ely)f(be)396 3281 y(ordered)g(before)f("a1".)i(If)g(there)g(were)g
8866
(namespace)f(nodes,)g(the)o(y)g(w)o(ould)h(occur)f(between)g(1)i(and)e
8867
(2.)396 3430 y(If)h(there)g(is)h(a)g(super)e(root)h(node,)f(it)i(will)g
8868
(be)f(handled)e(as)j(the)f(v)o(ery)f(\002rst)i(node.)p
8869
Black 396 3663 a Fu(\225)p Black 60 w Fv(Function:.)f
8870
Fb(compare)43 b Fr(n1)i(n2)479 3812 y Fv(Signatur)o(e:.)479
8871
3951 y Fr(val)g(compare)e(:)i('ext)f(node)g(-)p Fp(>)h
8872
Fr('ext)f(node)g(-)p Fp(>)g Fr(int)479 4142 y Fv(Description:.)20
8873
b Fw(Returns)g(-1)g(if)g Fr(n1)h Fw(occurs)e(before)g
8874
Fr(n2)h Fw(,)h(or)f(+1)g(if)g Fr(n1)h Fw(occurs)e(after)h
8875
Fr(n2)h Fw(,)f(or)g(0)g(if)h(both)e(nodes)h(are)479 4249
8876
y(identical.)g(If)g(the)g(nodes)f(are)i(unrelated)d(\(do)i(not)f(ha)n
8877
(v)o(e)h(a)h(common)d(ancestor\),)h(the)h(result)g(is)h(unde\002ned)e
8878
(\(Note:)479 4357 y(this)i(case)g(is)g(dif)n(ferent)d(from)h
8879
Fr(ord_compare)g Fw(\).)i(This)f(test)h(is)g(rather)e(slo)n(w)-5
8880
b(,)20 b(b)n(ut)g(it)h(w)o(orks)f(e)n(v)o(en)f(if)i(the)f(XML)g(tree)
8881
479 4465 y(changes)f(dynamically)g(\(in)h(contrast)f(to)i
8882
Fr(ord_compare)e Fw(belo)n(w\).)p Black 396 4656 a Fu(\225)p
8883
Black 60 w Fv(T)-6 b(ype:.)20 b Fr('ext)44 b Fb(ord_index)479
8884
4806 y Fv(Signatur)o(e:.)p Black 3800 5278 a Fs(93)p
8887
94 93 bop Black 2225 67 a Fs(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr)
8888
m(esenting)g(the)g(document)p Black 479 579 a Fr(type)44
8889
b('ext)h(ord_index)479 676 y(constraint)e('ext)i(=)f('ext)g(node)h
8890
(#extension)479 867 y Fv(Description:.)20 b Fw(The)g(type)f(of)h
8891
(ordinal)f(inde)o(x)o(es.)p Black 396 1058 a Fu(\225)p
8892
Black 60 w Fv(Function:.)h Fb(create_ord_index)42 b Fr(startnode)479
8893
1207 y Fv(Signatur)o(e:.)479 1346 y Fr(val)j(create_ord_index)d(:)i
8894
('ext)h(node)f(-)p Fp(>)g Fr('ext)g(ord_index)479 1537
8895
y Fv(Description:.)20 b Fw(Creates)h(an)f(ordinal)f(inde)o(x)g(for)g
8896
(the)h(subtree)g(starting)g(at)g Fr(startnode)g Fw(.)g(This)h(inde)o(x)
8897
e(assigns)h(to)479 1645 y(e)n(v)o(ery)f(node)g(an)h(ordinal)f(number)g
8898
(\(be)o(ginning)e(with)j(0\))g(such)g(that)g(nodes)g(are)g(numbered)e
8899
(upon)h(the)h(order)f(of)h(the)479 1753 y(\002rst)h(character)e(in)i
8900
(the)f(XML)g(representation)e(\(document)g(order\).)g(Note)i(that)h
8901
(the)f(inde)o(x)f(is)i(not)f(automatically)479 1861 y(updated)f(when)g
8902
(the)i(tree)f(is)h(modi\002ed.)p Black 396 2052 a Fu(\225)p
8903
Black 60 w Fv(Function:.)f Fb(ord_compare)43 b Fr(idx)h(n1)h(n2)479
8904
2201 y Fv(Signatur)o(e:.)479 2340 y Fr(val)g(ord_compare)e(:)h('ext)g
8905
(ord_index)g(-)p Fp(>)g Fr('ext)g(node)g(-)p Fp(>)h Fr('ext)f(node)g(-)
8906
p Fp(>)h Fr(int)479 2531 y Fv(Description:.)20 b Fw(Compares)f(tw)o(o)i
8907
(nodes)e(lik)o(e)i Fr(compare)e Fw(:)i(Returns)f(-1)g(if)h
8908
Fr(n1)f Fw(occurs)f(before)g Fr(n2)i Fw(,)f(or)g(+1)g(if)h
8909
Fr(n1)479 2639 y Fw(occurs)f(after)g Fr(n2)g Fw(,)h(or)e(0)i(if)f(both)
8910
g(nodes)f(are)h(identical.)g(If)g(one)f(of)h(the)g(nodes)g(does)g(not)g
8911
(occur)f(in)h(the)g(ordinal)479 2747 y(inde)o(x,)f Fr(Not_found)g
8912
Fw(is)i(raised.)f(\(Note)g(that)g(this)h(is)g(a)g(dif)n(ferent)d(beha)n
8913
(viour)g(than)i(what)g Fr(compare)g Fw(w)o(ould)f(do.\))479
8914
2896 y(This)i(test)g(is)g(much)e(f)o(aster)h(than)g Fr(compare)g
8915
Fw(.)-2 3307 y Fq(3.2.15.)36 b(Functions)p Black 396
8916
3594 a Fu(\225)p Black 60 w Fv(Function:.)20 b Fb(normalize)43
8917
b Fr(startnode)479 3744 y Fv(Signatur)o(e:.)479 3883
8918
y Fr(val)i(normalize)e(:)i('ext)f(node)g(-)p Fp(>)g Fr(unit)479
8919
4073 y Fv(Description:.)20 b Fw(Normalizes)f(the)i(tree)f(denoted)e(by)
8920
i Fr(startnode)f Fw(such)h(that)h(neither)e(empty)g(data)h(nodes)g(nor)
8921
479 4181 y(adjacent)g(data)g(nodes)f(e)o(xist.)h(Normalization)f(w)o
8922
(orks)g(in-place.)p Black 396 4372 a Fu(\225)p Black
8923
60 w Fv(Function:.)h Fb(validate)43 b Fr(startnode)479
8924
4522 y Fv(Signatur)o(e:.)479 4660 y Fr(val)i(validate)e(:)i('ext)f
8925
(node)g(-)p Fp(>)g Fr(unit)p Black 3800 5278 a Fs(94)p
8928
95 94 bop Black 2225 67 a Fs(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr)
8929
m(esenting)g(the)g(document)p Black 479 579 a Fv(Description:.)g
8930
Fw(V)-9 b(alidates)20 b(the)g(tree)g(denoted)f(by)h Fr(startnode)f
8931
Fw(.)i(In)e(contrast)h(to)g Fr(startnode)44 b(#)g(validate\(\))479
8932
687 y Fw(this)21 b(function)d(v)n(alidates)i(recursi)n(v)o(ely)-5
8933
b(.)p Black 396 878 a Fu(\225)p Black 60 w Fv(Function:.)20
8934
b Fb(pinstr)44 b Fr(n)479 1027 y Fv(Signatur)o(e:.)479
8935
1166 y Fr(val)h(pinstr)e(:)i('ext)f(node)g(-)p Fp(>)h
8936
Fr(proc_instruction)479 1357 y Fv(Description:.)20 b
8937
Fw(Returns)g(the)g(processing)f(instruction)g(contained)f(in)j(a)f
8938
(processing)f(instruction)g(node.)g(This)479 1465 y(function)g(raises)i
8939
Fr(Invalid_argument)d Fw(if)i(in)m(v)n(ok)o(ed)f(for)g(a)i(dif)n
8940
(ferent)d(node)h(type)h(than)g(T_pinstr)-5 b(.)p Black
8941
396 1656 a Fu(\225)p Black 60 w Fv(Function:.)20 b Fb(attribute_name)42
8942
b Fr(n)479 1805 y Fv(Signatur)o(e:.)479 1944 y Fr(val)j(attribute_name)
8943
87 b(:)45 b('ext)f(node)g(-)p Fp(>)g Fr(string)479 2135
8944
y Fv(Description:.)20 b Fw(Returns)g(the)g(name)g(of)g(the)g(attrib)n
8945
(ute)g(contained)e(in)j(an)f(attrib)n(ute)f(node.)g(Raises)479
8946
2243 y Fr(Invalid_argument)f Fw(if)j Fr(n)f Fw(does)g(not)g(ha)n(v)o(e)
8947
g(node)f(type)h Fr(T_attribute)f Fw(.)p Black 396 2434
8948
a Fu(\225)p Black 60 w Fv(Function:.)h Fb(attribute_value)42
8949
b Fr(n)479 2583 y Fv(Signatur)o(e:.)479 2722 y Fr(val)j
8950
(attribute_value)d(:)j('ext)f(node)g(-)p Fp(>)g Fr(Pxp_types.att_value)
8951
479 2913 y Fv(Description:.)20 b Fw(Returns)g(the)g(v)n(alue)g(of)g
8952
(the)g(attrib)n(ute)g(contained)e(in)i(an)h(attrib)n(ute)e(node.)g
8953
(Raises)479 3021 y Fr(Invalid_argument)f Fw(if)j Fr(n)f
8954
Fw(does)g(not)g(ha)n(v)o(e)g(node)f(type)h Fr(T_attribute)f
8955
Fw(.)p Black 396 3212 a Fu(\225)p Black 60 w Fv(Function:.)h
8956
Fb(attribute_string_value)41 b Fr(n)479 3361 y Fv(Signatur)o(e:.)479
8957
3500 y Fr(val)k(attribute_string_value)c(:)j('ext)h(node)f(-)p
8958
Fp(>)g Fr(string)479 3691 y Fv(Description:.)20 b Fw(Returns)g(the)g
8959
(string)g(v)n(alue)g(of)f(the)i(attrib)n(ute)e(contained)g(in)h(an)g
8960
(attrib)n(ute)g(node.)f(Raises)479 3799 y Fr(Invalid_argument)f
8961
Fw(if)j Fr(n)f Fw(does)g(not)g(ha)n(v)o(e)g(node)f(type)h
8962
Fr(T_attribute)f Fw(.)-2 4342 y Fy(3.3.)39 b(The)g(c)m(lass)g(type)g
8963
Fc(extension)396 4594 y Fr(class)44 b(type)g([)h('node)f(])h(extension)
8964
e(=)486 4691 y(object)h(\('self\))576 4788 y(method)f(clone)h(:)h
8965
('self)p Black 3800 5278 a Fs(95)p Black eop
8967
96 95 bop Black 2225 67 a Fs(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr)
8968
m(esenting)g(the)g(document)p Black 665 579 a Fr(\(*)45
8969
b("clone")e(should)h(return)g(an)h(exact)f(deep)g(copy)g(of)g(the)h
8970
(object.)e(*\))576 676 y(method)g(node)i(:)f('node)665
8971
773 y(\(*)h("node")f(returns)f(the)i(corresponding)d(node)i(of)h(this)f
8972
(extension.)f(This)h(method)710 870 y(*)h(intended)e(to)i(return)f
8973
(exactly)f(what)h(previ-)396 967 y(ously)g(has)h(been)f(set)g(by)h
8974
("set_node".)710 1065 y(*\))576 1162 y(method)e(set_node)h(:)h('node)f
8975
(->)g(unit)665 1259 y(\(*)h("set_node")e(is)h(invoked)g(once)g(the)h
8976
(extension)e(is)h(associated)g(to)g(a)h(new)710 1356
8977
y(*)g(node)f(object.)710 1453 y(*\))486 1550 y(end)396
8978
1741 y Fw(This)21 b(is)g(the)f(type)g(of)g(classes)h(used)f(for)f(node)
8979
h(e)o(xtensions.)e(F)o(or)i(e)n(v)o(ery)f(node)g(of)h(the)g(document)e
8980
(tree,)i(there)g(is)h(not)396 1849 y(only)f(the)g Fr(node)g
8981
Fw(object,)f(b)n(ut)h(also)g(an)g Fr(extension)f Fw(object.)h(The)f
8982
(latter)i(has)f(minimal)f(functionality;)f(it)j(has)f(only)g(the)396
8983
1957 y(necessary)g(methods)f(to)h(be)g(attached)g(to)g(the)g(node)f
8984
(object)h(containing)e(the)j(details)f(of)g(the)g(node)f(instance.)h
8985
(The)396 2065 y(e)o(xtension)f(object)h(is)h(called)f(e)o(xtension)f
8986
(because)g(its)i(purpose)e(is)i(e)o(xtensibility)-5 b(.)396
8987
2214 y(F)o(or)20 b(some)g(reasons,)g(it)h(is)g(impossible)e(to)i(deri)n
8988
(v)o(e)d(the)j Fr(node)f Fw(classes)h(\(i.e.)f Fr(element_impl)f
8989
Fw(and)g Fr(data_impl)p Fw(\))g(such)396 2322 y(that)i(the)f
8990
(subclasses)g(can)g(be)g(e)o(xtended)f(by)g(ne)n(w)h(ne)n(w)g(methods.)
8991
f(But)i(subclassing)f(nodes)f(is)i(a)g(great)f(feature,)396
8992
2430 y(because)g(it)h(allo)n(ws)f(the)g(user)g(to)h(pro)o(vide)d(dif)n
8993
(ferent)g(classes)k(for)d(dif)n(ferent)g(types)h(of)g(nodes.)f(The)h(e)
8994
o(xtension)f(objects)396 2538 y(are)h(a)h(w)o(orkaround)c(that)j(is)i
8995
(as)e(po)n(werful)f(as)i(direct)f(subclassing,)f(the)h(costs)h(are)f
8996
(some)g(notation)f(o)o(v)o(erhead.)396 2771 y Fv(Figur)o(e)h(3-6.)f
8997
(The)i(structur)o(e)f(of)g(nodes)g(and)h(extensions)396
8999
currentpoint currentpoint translate 1 1 scale neg exch neg exch translate
9000
396 4120 a @beginspecial 0 @llx 0 @lly 206 @urx
9001
140 @ury 2060 @rwi @setspecial
9002
%%BeginDocument: pic/extension_general.ps
9003
%!PS-Adobe-2.0 EPSF-2.0
9004
%%Title: src/pic/extension_general.fig
9005
%%Creator: fig2dev Version 3.2 Patchlevel 1
9006
%%CreationDate: Thu Jul 5 00:54:02 2001
9007
%%For: gerd@ice (Gerd Stolpmann)
9008
%%Orientation: Portrait
9009
%%BoundingBox: 0 0 206 140
9013
%%Magnification: 0.8000
9015
/$F2psDict 200 dict def
9017
$F2psDict /mtrx matrix put
9018
/col-1 {0 setgray} bind def
9019
/col0 {0.000 0.000 0.000 srgb} bind def
9020
/col1 {0.000 0.000 1.000 srgb} bind def
9021
/col2 {0.000 1.000 0.000 srgb} bind def
9022
/col3 {0.000 1.000 1.000 srgb} bind def
9023
/col4 {1.000 0.000 0.000 srgb} bind def
9024
/col5 {1.000 0.000 1.000 srgb} bind def
9025
/col6 {1.000 1.000 0.000 srgb} bind def
9026
/col7 {1.000 1.000 1.000 srgb} bind def
9027
/col8 {0.000 0.000 0.560 srgb} bind def
9028
/col9 {0.000 0.000 0.690 srgb} bind def
9029
/col10 {0.000 0.000 0.820 srgb} bind def
9030
/col11 {0.530 0.810 1.000 srgb} bind def
9031
/col12 {0.000 0.560 0.000 srgb} bind def
9032
/col13 {0.000 0.690 0.000 srgb} bind def
9033
/col14 {0.000 0.820 0.000 srgb} bind def
9034
/col15 {0.000 0.560 0.560 srgb} bind def
9035
/col16 {0.000 0.690 0.690 srgb} bind def
9036
/col17 {0.000 0.820 0.820 srgb} bind def
9037
/col18 {0.560 0.000 0.000 srgb} bind def
9038
/col19 {0.690 0.000 0.000 srgb} bind def
9039
/col20 {0.820 0.000 0.000 srgb} bind def
9040
/col21 {0.560 0.000 0.560 srgb} bind def
9041
/col22 {0.690 0.000 0.690 srgb} bind def
9042
/col23 {0.820 0.000 0.820 srgb} bind def
9043
/col24 {0.500 0.190 0.000 srgb} bind def
9044
/col25 {0.630 0.250 0.000 srgb} bind def
9045
/col26 {0.750 0.380 0.000 srgb} bind def
9046
/col27 {1.000 0.500 0.500 srgb} bind def
9047
/col28 {1.000 0.630 0.630 srgb} bind def
9048
/col29 {1.000 0.750 0.750 srgb} bind def
9049
/col30 {1.000 0.880 0.880 srgb} bind def
9050
/col31 {1.000 0.840 0.000 srgb} bind def
9054
-22.0 205.0 translate
9057
/cp {closepath} bind def
9058
/ef {eofill} bind def
9059
/gr {grestore} bind def
9060
/gs {gsave} bind def
9062
/rs {restore} bind def
9063
/l {lineto} bind def
9064
/m {moveto} bind def
9065
/rm {rmoveto} bind def
9066
/n {newpath} bind def
9067
/s {stroke} bind def
9069
/slc {setlinecap} bind def
9070
/slj {setlinejoin} bind def
9071
/slw {setlinewidth} bind def
9072
/srgb {setrgbcolor} bind def
9073
/rot {rotate} bind def
9074
/sc {scale} bind def
9075
/sd {setdash} bind def
9076
/ff {findfont} bind def
9077
/sf {setfont} bind def
9078
/scf {scalefont} bind def
9079
/sw {stringwidth} bind def
9080
/tr {translate} bind def
9081
/tnt {dup dup currentrgbcolor
9082
4 -2 roll dup 1 exch sub 3 -1 roll mul add
9083
4 -2 roll dup 1 exch sub 3 -1 roll mul add
9084
4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
9086
/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
9087
4 -2 roll mul srgb} bind def
9090
/startangle exch def
9095
/savematrix mtrx currentmatrix def
9096
x y tr xrad yrad sc 0 0 1 startangle endangle arc
9098
savematrix setmatrix
9101
/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
9102
/$F2psEnd {$F2psEnteredState restore end} def
9107
n -1000 5050 m -1000 -1000 l 5514 -1000 l 5514 5050 l cp clip
9111
n 1575 2250 229 229 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr
9114
n 1575 3375 225 225 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr
9117
n 675 3375 229 229 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr
9120
n 2475 3375 229 229 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr
9123
n 3600 2475 180 180 0 360 DrawEllipse gs col7 0.50 shd ef gr gs col0 s gr
9126
n 2880 2475 180 180 0 360 DrawEllipse gs col7 0.50 shd ef gr gs col0 s gr
9129
n 4320 2475 186 186 0 360 DrawEllipse gs col7 0.50 shd ef gr gs col0 s gr
9132
n 3600 1485 186 186 0 360 DrawEllipse gs col7 0.50 shd ef gr gs col0 s gr
9135
n 675 3150 m 1395 2385 l gs col0 s gr
9137
n 1575 2475 m 1575 3150 l gs col0 s gr
9139
n 1755 2385 m 2475 3150 l gs col0 s gr
9143
3288 1467 m 3412 1462 l 3305 1524 l 3435 1487 l 3418 1429 l cp
9145
n 1537 2010 m 3412 1462 l gs col0 s gr gr
9148
n 3288 1467 m 3412 1462 l 3305 1524 l col0 s
9152
1796 2042 m 1672 2047 l 1779 1984 l 1649 2022 l 1666 2080 l cp
9154
n 3412 1537 m 1672 2047 l gs col0 s gr gr
9157
n 1796 2042 m 1672 2047 l 1779 1984 l col0 s
9161
2584 2524 m 2707 2512 l 2604 2581 l 2731 2535 l 2711 2479 l cp
9162
933 3183 m 810 3195 l 913 3126 l 786 3172 l 806 3228 l cp
9164
n 810 3195 m 2707 2512 l gs col0 s gr gr
9167
n 933 3183 m 810 3195 l 913 3126 l col0 s
9169
n 2584 2524 m 2707 2512 l 2604 2581 l col0 s
9173
3319 2594 m 3442 2580 l 3340 2650 l 3467 2603 l 3446 2547 l cp
9174
1863 3203 m 1740 3217 l 1842 3147 l 1715 3194 l 1736 3250 l cp
9176
n 1740 3217 m 3442 2580 l gs col0 s gr gr
9179
n 1863 3203 m 1740 3217 l 1842 3147 l col0 s
9181
n 3319 2594 m 3442 2580 l 3340 2650 l col0 s
9185
4054 2626 m 4177 2610 l 4076 2682 l 4202 2632 l 4180 2577 l cp
9186
2763 3194 m 2640 3210 l 2741 3138 l 2615 3188 l 2637 3243 l cp
9188
n 2640 3210 m 4177 2610 l gs col0 s gr gr
9191
n 2763 3194 m 2640 3210 l 2741 3138 l col0 s
9193
n 4054 2626 m 4177 2610 l 4076 2682 l col0 s
9194
/Courier-Bold ff 180.00 scf sf
9196
gs 1 -1 sc (x) col0 sh gr
9197
/Courier-Bold ff 180.00 scf sf
9199
gs 1 -1 sc (n) col0 sh gr
9200
/Courier ff 180.00 scf sf
9202
gs 1 -1 sc 17.0 rot (n # extension) col0 sh gr
9203
/Courier ff 180.00 scf sf
9205
gs 1 -1 sc 17.0 rot (x # node) col0 sh gr
9206
/Helvetica ff 180.00 scf sf
9208
gs 1 -1 sc (The node tree) col0 sh gr
9209
/Helvetica ff 180.00 scf sf
9211
gs 1 -1 sc (The extensions) col0 sh gr
9216
@endspecial 396 4120 a
9217
currentpoint currentpoint translate 1 1 div 1 1 div scale neg exch
9219
396 4120 a 357 x Fw(The)f(picture)f(sho)n(ws)i
9220
(ho)n(w)e(the)i(nodes)e(and)h(e)o(xtensions)f(are)h(link)o(ed)f
9221
(together)-5 b(.)19 b(Ev)o(ery)g(node)g(has)i(a)f(reference)f(to)h(its)
9222
396 4585 y(e)o(xtension,)f(and)g(e)n(v)o(ery)g(e)o(xtension)g(has)h(a)h
9223
(reference)d(to)j(its)g(node.)e(The)h(methods)f Fr(extension)g
9224
Fw(and)h Fr(node)g Fw(follo)n(w)396 4693 y(these)h(references;)e(a)h
9225
(typical)g(phrase)f(is)396 4873 y Fr(self)44 b(#)h(node)f(#)h
9226
(attribute)e("xy")p Black 3798 5278 a Fs(96)p Black eop
9228
97 96 bop Black 2225 67 a Fs(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr)
9229
m(esenting)g(the)g(document)p Black 396 579 a Fw(to)h(get)f(the)g(v)n
9230
(alue)g(of)f(an)i(attrib)n(ute)e(from)h(a)g(method)f(de\002ned)g(in)h
9231
(the)h(e)o(xtension)d(object;)i(or)396 759 y Fr(self)44
9232
b(#)h(node)f(#)h(iter)486 856 y(\(fun)f(n)h(-)p Fp(>)f
9233
Fr(n)h(#)f(extension)g(#)g(my_method)g(...\))396 1047
9234
y Fw(to)21 b(iterate)f(o)o(v)o(er)f(the)h(subnodes)f(and)g(to)i(call)f
9235
Fr(my_method)f Fw(of)h(the)h(corresponding)16 b(e)o(xtension)j
9236
(objects.)396 1197 y(Note)h(that)h(e)o(xtension)d(objects)i(do)g(not)g
9237
(ha)n(v)o(e)g(references)e(to)j(subnodes)e(\(or)g("sube)o(xtensions"\))
9238
f(themselv)o(es;)h(in)i(order)396 1305 y(to)g(get)f(one)f(of)h(the)h
9239
(children)d(of)i(an)g(e)o(xtension)f(you)g(must)i(\002rst)g(go)e(to)i
9240
(the)f(node)f(object,)h(then)f(get)h(the)h(child)e(node,)396
9241
1412 y(and)h(\002nally)g(reach)f(the)i(e)o(xtension)d(that)j(is)g
9242
(logically)e(the)h(child)g(of)g(the)g(e)o(xtension)f(you)g(started)h
9243
(with.)-2 1741 y Fq(3.3.1.)35 b(Ho)n(w)f(to)f(de\002ne)h(an)g(e)n
9244
(xtension)i(c)n(lass)396 1908 y Fw(At)21 b(minimum,)e(you)g(must)h
9245
(de\002ne)g(the)g(methods)f Fr(clone)p Fw(,)h Fr(node)p
9246
Fw(,)g(and)f Fr(set_node)h Fw(such)f(that)i(your)e(class)i(is)396
9247
2016 y(compatible)e(with)h(the)h(type)e Fr(extension)p
9248
Fw(.)g(The)h(method)f Fr(set_node)g Fw(is)i(called)f(during)f(the)h
9249
(initialization)g(of)g(the)396 2124 y(node,)f(or)h(after)g(a)h(node)e
9250
(has)h(been)g(cloned;)f(the)h(node)f(object)h(in)m(v)n(ok)o(es)f
9251
Fr(set_node)g Fw(on)h(the)g(e)o(xtension)f(object)h(to)g(tell)396
9252
2232 y(it)h(that)f(this)h(node)e(is)i(no)n(w)f(the)g(object)g(the)g(e)o
9253
(xtension)f(is)i(link)o(ed)f(to.)g(The)f(e)o(xtension)g(must)h(return)f
9254
(the)i(node)e(object)396 2340 y(passed)h(as)h(ar)o(gument)d(of)i
9255
Fr(set_node)f Fw(when)h(the)g Fr(node)g Fw(method)f(is)i(called.)396
9256
2489 y(The)f Fr(clone)g Fw(method)f(must)h(return)f(a)i(cop)o(y)e(of)h
9257
(the)g(e)o(xtension)f(object;)h(at)g(least)h(the)f(object)g(itself)h
9258
(must)f(be)396 2597 y(duplicated,)f(b)n(ut)h(if)g(required,)e(the)j
9259
(cop)o(y)e(should)g(deeply)g(duplicate)g(all)i(objects)f(and)g(v)n
9260
(alues)g(that)g(are)g(referred)e(by)396 2705 y(the)i(e)o(xtension,)f
9261
(too.)h(Whether)f(this)i(is)g(required,)d(depends)h(on)h(the)g
9262
(application;)f Fr(clone)h Fw(is)h(in)m(v)n(ok)o(ed)d(by)i(the)g(node)
9263
396 2813 y(object)g(when)g(one)f(of)h(its)h(cloning)e(methods)g(is)i
9264
(called.)396 2963 y(A)g(good)e(starting)h(point)f(for)h(an)g(e)o
9265
(xtension)e(class:)396 3143 y Fr(class)44 b(custom_extension)e(=)486
9266
3240 y(object)i(\(self\))576 3434 y(val)g(mutable)g(node)g(=)g(\(None)g
9267
(:)h(custom_extension)d(node)i(option\))576 3628 y(method)f(clone)h(=)h
9268
({<)g(>})576 3823 y(method)e(node)i(=)665 3920 y(match)f(node)g(with)
9269
845 4017 y(None)g(->)934 4114 y(assert)g(false)755 4211
9270
y(|)h(Some)f(n)g(->)h(n)576 4406 y(method)e(set_node)h(n)h(=)665
9271
4503 y(node)f(<-)h(Some)f(n)486 4697 y(end)p Black 3797
9272
5278 a Fs(97)p Black eop
9274
98 97 bop Black 2225 67 a Fs(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr)
9275
m(esenting)g(the)g(document)p Black 396 579 a Fw(This)h(class)g(is)g
9276
(compatible)e(with)h Fr(extension)p Fw(.)f(The)h(purpose)e(of)i
9277
(de\002ning)f(such)h(a)h(class)g(is,)g(of)f(course,)f(adding)396
9278
687 y(further)g(methods;)g(and)h(you)f(can)h(do)g(it)h(without)e
9279
(restriction.)396 836 y(Often,)h(you)f(w)o(ant)h(not)g(only)g(one)f(e)o
9280
(xtension)g(class.)i(In)f(this)h(case,)f(it)h(is)g(the)f(simplest)h(w)o
9281
(ay)f(that)g(all)h(your)e(classes)i(\(for)396 944 y(one)f(kind)f(of)h
9282
(document\))e(ha)n(v)o(e)i(the)g(same)g(type)g(\(with)g(respect)g(to)g
9283
(the)g(interf)o(ace;)g(i.e.)g(it)h(does)f(not)g(matter)g(if)g(your)396
9284
1052 y(classes)i(dif)n(fer)d(in)h(the)g(de\002ned)f(pri)n(v)n(ate)h
9285
(methods)f(and)g(instance)h(v)n(ariables,)f(b)n(ut)h(public)g(methods)f
9286
(count\).)f(This)396 1160 y(approach)g(a)n(v)n(oids)i(lots)h(of)f
9287
(coercions)f(and)h(problems)e(with)j(type)f(incompatibilities.)e(It)j
9288
(is)g(simple)f(to)g(implement:)396 1340 y Fr(class)44
9289
b(custom_extension)e(=)486 1437 y(object)i(\(self\))576
9290
1534 y(val)g(mutable)g(node)g(=)g(\(None)g(:)h(custom_extension)d(node)
9291
i(option\))576 1729 y(method)f(clone)h(=)h(...)269 b(\(*)44
9292
b(see)g(above)g(*\))576 1826 y(method)f(node)i(=)f(...)314
9293
b(\(*)44 b(see)g(above)g(*\))576 1923 y(method)f(set_node)h(n)h(=)f
9294
(...)h(\(*)f(see)g(above)g(*\))576 2117 y(method)f(virtual)h
9295
(my_method1)f(:)i(...)576 2214 y(method)e(virtual)h(my_method2)f(:)i
9296
(...)576 2312 y(...)f(\(*)g(etc.)h(*\))486 2409 y(end)396
9297
2603 y(class)f(custom_extension_kind_A)d(=)486 2700 y(object)j
9298
(\(self\))576 2797 y(inherit)f(custom_extension)576 2992
9299
y(method)g(my_method1)h(=)g(...)576 3089 y(method)f(my_method2)h(=)g
9300
(...)486 3186 y(end)396 3380 y(class)g(custom_extension_kind_B)d(=)486
9301
3477 y(object)j(\(self\))576 3574 y(inherit)f(custom_extension)576
9302
3769 y(method)g(my_method1)h(=)g(...)576 3866 y(method)f(my_method2)h
9303
(=)g(...)486 3963 y(end)396 4154 y Fw(If)20 b(a)h(class)g(does)f(not)g
9304
(need)f(a)i(method)e(\(e.g.)g(because)h(it)h(does)e(not)h(mak)o(e)g
9305
(sense,)g(or)g(it)h(w)o(ould)f(violate)f(some)396 4262
9306
y(important)g(condition\),)f(it)j(is)g(possible)f(to)g(de\002ne)g(the)g
9307
(method)f(and)g(to)i(al)o(w)o(ays)f(raise)h(an)f(e)o(xception)e(when)i
9308
(the)396 4370 y(method)f(is)i(in)m(v)n(ok)o(ed)e(\(e.g.)g
9309
Fr(assert)44 b(false)p Fw(\).)396 4519 y(The)20 b(latter)g(is)i(a)e
9310
(strong)g(recommendation:)c(do)k(not)g(try)g(to)g(further)f(specialize)
9311
h(the)g(types)g(of)g(e)o(xtension)f(objects.)h(It)g(is)396
9312
4627 y(dif)n(\002cult,)g(sometimes)g(e)n(v)o(en)f(impossible,)g(and)h
9313
(almost)g(ne)n(v)o(er)f(w)o(orth-while.)p Black 3800
9314
5278 a Fs(98)p Black eop
9316
99 98 bop Black 2225 67 a Fs(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr)
9317
m(esenting)g(the)g(document)p Black -2 583 a Fq(3.3.2.)35
9318
b(Ho)n(w)f(to)f(bind)h(e)n(xtension)h(c)n(lasses)h(to)d(element)i
9319
(types)396 751 y Fw(Once)20 b(you)f(ha)n(v)o(e)h(de\002ned)f(your)g(e)o
9320
(xtension)g(classes,)i(you)e(can)h(bind)g(them)f(to)i(element)e(types.)
9321
h(The)g(simplest)h(case)f(is)396 859 y(that)h(you)e(ha)n(v)o(e)g(only)h
9322
(one)f(class)j(and)d(that)i(this)f(class)h(is)h(to)e(be)g(al)o(w)o(ays)
9323
h(used.)e(The)h(parsing)f(functions)g(in)h(the)h(module)396
9324
967 y Fr(Pxp_yacc)f Fw(tak)o(e)g(a)h Fr(spec)f Fw(ar)o(gument)d(which)j
9325
(can)g(be)g(customized.)f(If)h(your)f(single)h(class)h(has)g(the)f
9326
(name)f Fr(c)p Fw(,)i(this)396 1075 y(ar)o(gument)d(should)h(be)396
9327
1255 y Fr(let)45 b(spec)f(=)486 1352 y(make_spec_from_alist)576
9328
1449 y(~data_exemplar:)535 b(\(new)44 b(data_impl)g(c\))576
9329
1546 y(~default_element_exemplar:)c(\(new)k(element_impl)f(c\))576
9330
1643 y(~element_alist:)535 b([])576 1740 y(\(\))396 1931
9331
y Fw(This)21 b(means)f(that)g(data)g(nodes)f(will)i(be)f(created)g
9332
(from)f(the)h(e)o(x)o(emplar)e(passed)i(by)g(~data_e)o(x)o(emplar)d
9333
(and)j(that)g(all)396 2039 y(element)g(nodes)f(will)i(be)f(made)g(from)
9334
f(the)h(e)o(x)o(emplar)e(speci\002ed)i(by)g(~def)o(ault_element_e)o(x)o
9335
(emplar)-5 b(.)15 b(In)396 2147 y(~element_alist,)k(you)h(can)g(pass)g
9336
(that)h(dif)n(ferent)d(e)o(x)o(emplars)h(are)h(to)g(be)g(used)g(for)g
9337
(dif)n(ferent)e(element)i(types;)g(b)n(ut)g(this)396
9338
2255 y(is)h(an)g(optional)d(feature.)h(If)h(you)g(do)g(not)f(need)h
9339
(it,)h(pass)f(the)g(empty)g(list.)396 2405 y(Remember)f(that)i(an)f(e)o
9340
(x)o(emplar)e(is)j(a)g(\(node,)d(e)o(xtension\))h(pair)g(that)i(serv)o
9341
(es)f(as)h(pattern)e(when)h(ne)n(w)g(nodes)f(\(and)g(the)396
9342
2513 y(corresponding)e(e)o(xtension)i(objects\))g(are)h(added)f(to)i
9343
(the)f(document)e(tree.)i(In)g(this)h(case,)f(the)g(e)o(x)o(emplar)f
9344
(contains)g Fr(c)i Fw(as)396 2620 y(e)o(xtension,)e(and)g(when)h(nodes)
9345
f(are)i(created,)e(the)h(e)o(x)o(emplar)e(is)j(cloned,)e(and)h(cloning)
9346
f(mak)o(es)h(also)g(a)h(cop)o(y)e(of)h Fr(c)h Fw(such)396
9347
2728 y(that)g(all)f(nodes)g(of)g(the)g(document)e(tree)i(will)h(ha)n(v)
9348
o(e)f(a)g(cop)o(y)g(of)g Fr(c)g Fw(as)h(e)o(xtension.)396
9349
2878 y(The)f Fr(~element_alist)f Fw(ar)o(gument)e(can)j(bind)g
9350
(speci\002c)g(element)g(types)g(to)g(speci\002c)g(e)o(x)o(emplars;)f
9351
(as)i(e)o(x)o(emplars)396 2986 y(may)f(be)g(instances)g(of)g(dif)n
9352
(ferent)f(classes)i(it)g(is)g(ef)n(fecti)n(v)o(ely)d(possible)i(to)h
9353
(bind)e(element)h(types)g(to)g(classes.)h(F)o(or)396
9354
3094 y(e)o(xample,)e(if)h(the)g(element)g(type)g("p")g(is)h
9355
(implemented)d(by)i(class)h("c_p",)e(and)h("q")g(is)h(realized)f(by)f
9356
("c_q",)h(you)f(can)396 3202 y(pass)i(the)f(follo)n(wing)f(v)n(alue:)
9357
396 3382 y Fr(let)45 b(spec)f(=)486 3479 y(make_spec_from_alist)576
9358
3576 y(~data_exemplar:)535 b(\(new)44 b(data_impl)g(c\))576
9359
3673 y(~default_element_exemplar:)c(\(new)k(element_impl)f(c\))576
9360
3770 y(~element_alist:)665 3867 y([)i("p",)f(new)g(element_impl)f(c_p;)
9361
755 3965 y("q",)h(new)g(element_impl)f(c_q;)665 4062
9362
y(])576 4159 y(\(\))396 4350 y Fw(The)20 b(e)o(xtension)f(object)h
9363
Fr(c)g Fw(is)h(still)h(used)e(for)f(all)i(data)f(nodes)f(and)h(for)g
9364
(all)g(other)g(element)f(types.)p Black 3800 5278 a Fs(99)p
9367
100 99 bop Black 2225 67 a Fs(Chapter)20 b(3.)g(The)g(objects)g(r)m
9368
(epr)m(esenting)g(the)g(document)p Black -2 601 a Fy(3.4.)39
9369
b(Details)f(of)i(the)f(mapping)e(fr)m(om)i(XML)g(te)n(xt)g(to)g(the)g
9370
(tree)-2 787 y(representation)-2 1115 y Fq(3.4.1.)c(The)f
9371
(representation)h(of)e(c)o(haracter)n(-free)h(elements)396
9372
1283 y Fw(If)20 b(an)g(element)g(declaration)f(does)h(not)f(allo)n(w)i
9373
(the)f(element)f(to)i(contain)e(character)g(data,)h(the)g(follo)n(wing)
9374
e(rules)j(apply)-5 b(.)396 1432 y(If)20 b(the)h(element)e(must)h(be)g
9375
(empty)-5 b(,)19 b(i.e.)h(it)h(is)g(declared)e(with)i(the)f(k)o(e)o(yw)
9376
o(ord)e Fr(EMPTY)p Fw(,)i(the)g(element)g(instance)g(must)g(be)396
9377
1540 y(ef)n(fecti)n(v)o(ely)f(empty)g(\(it)h(must)h(not)f(e)n(v)o(en)f
9378
(contain)g(whitespace)h(characters\).)e(The)i(parser)g(guarantees)e
9379
(that)j(a)f(declared)396 1648 y Fr(EMPTY)g Fw(element)g(does)g(ne)n(v)o
9380
(er)f(contain)g(a)h(data)g(node,)f(e)n(v)o(en)g(if)i(the)f(data)g(node)
9381
f(represents)h(the)g(empty)f(string.)396 1798 y(If)h(the)h(element)e
9382
(declaration)g(only)g(permits)h(other)f(elements)h(to)h(occur)e(within)
9383
h(that)g(element)g(b)n(ut)g(not)g(character)396 1906
9384
y(data,)g(it)h(is)g(still)g(possible)f(to)h(insert)f(whitespace)g
9385
(characters)f(between)g(the)h(subelements.)f(The)h(parser)g(ignores)f
9386
(these)396 2013 y(characters,)g(too,)h(and)g(does)f(not)h(create)g
9387
(data)g(nodes)g(for)f(them.)396 2163 y Fv(Example.)h
9388
Fw(Consider)g(the)g(follo)n(wing)f(element)g(types:)396
9389
2343 y Fr(<!ELEMENT)44 b(x)g(\()h(#PCDATA)f(|)g(z)h(\)*)f(>)396
9390
2440 y(<!ELEMENT)g(y)g(\()h(z)g(\)*)f(>)396 2537 y(<!ELEMENT)g(z)g
9391
(EMPTY>)396 2728 y Fw(Only)20 b Fr(x)h Fw(may)e(contain)h(character)e
9392
(data,)i(the)h(k)o(e)o(yw)o(ord)d Fr(#PCDATA)h Fw(indicates)h(this.)h
9393
(The)f(other)f(types)h(are)396 2836 y(character)n(-free.)396
9394
2986 y(The)g(XML)g(term)396 3166 y Fr(<x><z/>)44 b(<z/></x>)396
9395
3357 y Fw(will)21 b(be)f(internally)f(represented)g(by)g(an)i(element)e
9396
(node)g(for)h Fr(x)g Fw(with)h(three)f(subnodes:)e(the)j(\002rst)g
9397
Fr(z)f Fw(element,)g(a)g(data)396 3465 y(node)f(containing)g(the)h
9398
(space)g(character)m(,)e(and)i(the)g(second)g Fr(z)g
9399
Fw(element.)g(In)f(contrast)h(to)g(this,)h(the)f(term)396
9400
3645 y Fr(<y><z/>)44 b(<z/></y>)396 3836 y Fw(is)21 b(represented)e(by)
9401
h(an)g(element)f(node)g(for)h Fr(y)h Fw(with)f(only)f
9402
Fs(two)i Fw(subnodes,)e(the)h(tw)o(o)g Fr(z)h Fw(elements.)e(There)h
9403
(is)h(no)f(data)396 3944 y(node)f(for)h(the)g(space)g(character)f
9404
(because)h(spaces)g(are)g(ignored)f(in)h(the)g(character)n(-free)e
9405
(element)i Fr(y)p Fw(.)396 4093 y Fv(P)o(arser)g(option:.)g
9406
Fw(By)g(setting)g(the)h(parser)e(option)g Fr(drop_ignorable_whitespace)
9407
e Fw(to)j Fr(false)p Fw(,)g(the)g(beha)n(viour)396 4201
9408
y(of)g(the)g(parser)g(is)h(changed)d(such)i(that)h(e)n(v)o(en)e
9409
(ignorable)f(whitespace)i(characters)f(are)h(represented)f(by)g(data)h
9410
(nodes.)-2 4571 y Fq(3.4.2.)35 b(The)f(representation)h(of)e(c)o
9411
(haracter)h(data)396 4738 y Fw(The)20 b(XML)g(speci\002cation)g(allo)n
9412
(ws)g(all)h(Unicode)e(characters)g(in)i(XML)f(te)o(xts.)g(This)g
9413
(parser)g(can)g(be)g(con\002gured)e(such)396 4846 y(that)j(UTF-8)e(is)i
9414
(used)f(to)h(represent)e(the)h(characters)f(internally;)g(ho)n(we)n(v)o
9415
(er)m(,)f(the)i(def)o(ault)g(character)e(encoding)h(is)p
9416
Black 3759 5278 a Fs(100)p Black eop
9418
101 100 bop Black 2225 67 a Fs(Chapter)20 b(3.)g(The)g(objects)g(r)m
9419
(epr)m(esenting)g(the)g(document)p Black 396 579 a Fw(ISO-8859-1.)d
9420
(\(Currently)-5 b(,)18 b(no)i(other)f(encodings)g(are)h(possible)g(for)
9421
f(the)i(internal)e(string)h(representation;)e(the)i(type)396
9422
687 y Fr(Pxp_types.rep_encoding)d Fw(enumerates)i(the)h(possible)g
9423
(encodings.)e(Principially)-5 b(,)19 b(the)h(parser)g(could)f(use)h(an)
9424
o(y)396 795 y(encoding)e(that)j(is)g(ASCII-compatible,)d(b)n(ut)i
9425
(there)g(are)g(currently)e(only)i(le)o(xical)f(analyzers)h(for)f(UTF-8)
9426
h(and)396 903 y(ISO-8859-1.)d(It)k(is)g(currently)d(impossible)i(to)g
9427
(use)h(UTF-16)e(or)h(UCS-4)g(as)h(internal)f(encodings)e(\(or)i(other)f
9428
(multibyte)396 1011 y(encodings)g(which)g(are)h(not)g
9429
(ASCII-compatible\))e(unless)i(major)g(parts)g(of)g(the)g(parser)g(are)
9430
g(re)n(written)f(-)i(unlik)o(ely)-5 b(...\))396 1160
9431
y(The)20 b(internal)g(encoding)e(may)h(be)h(dif)n(ferent)f(from)g(the)h
9432
(e)o(xternal)f(encoding)f(\(speci\002ed)i(in)g(the)g(XML)h(declaration)
9433
396 1268 y Fp(<)p Fr(?xml)44 b(...)g(encoding="..."?)p
9434
Fp(>)p Fw(\);)18 b(in)j(this)f(case)h(the)f(strings)g(are)g
9435
(automatically)f(con)m(v)o(erted)f(to)i(the)g(internal)396
9436
1376 y(encoding.)396 1525 y(If)g(the)h(internal)e(encoding)f(is)j
9437
(ISO-8859-1,)c(it)k(is)g(possible)f(that)g(there)g(are)g(characters)g
9438
(that)g(cannot)f(be)h(represented.)396 1633 y(In)g(this)h(case,)f(the)g
9439
(parser)g(ignores)f(such)h(characters)f(and)h(prints)g(a)h(w)o(arning)e
9440
(\(to)h(the)g Fr(collect_warning)e Fw(object)396 1741
9441
y(that)j(must)f(be)g(passed)g(when)g(the)g(parser)f(is)i(called\).)396
9442
1891 y(The)f(XML)g(speci\002cation)g(allo)n(ws)g(lines)h(to)f(be)g
9443
(separated)g(by)f(single)h(LF)h(characters,)e(by)h(CR)h(LF)g(character)
9444
396 1999 y(sequences,)e(or)h(by)g(single)g(CR)i(characters.)d
9445
(Internally)-5 b(,)18 b(these)i(separators)f(are)h(al)o(w)o(ays)h(con)m
9446
(v)o(erted)d(to)i(single)g(LF)396 2107 y(characters.)396
9447
2256 y(The)g(parser)g(guarantees)e(that)j(there)e(are)i(ne)n(v)o(er)d
9448
(tw)o(o)j(adjacent)e(data)h(nodes;)g(if)g(necessary)-5
9449
b(,)19 b(data)h(material)g(that)g(w)o(ould)396 2364 y(otherwise)g(be)g
9450
(represented)e(by)i(se)n(v)o(eral)g(nodes)f(is)i(collapsed)f(into)f
9451
(one)h(node.)f(Note)h(that)g(you)g(can)g(still)h(create)f(node)396
9452
2472 y(trees)h(with)f(adjacent)g(data)g(nodes;)f(ho)n(we)n(v)o(er)m(,)f
9453
(the)i(parser)g(does)f(not)h(return)f(such)h(trees.)396
9454
2621 y(Note)g(that)h(CD)m(A)-9 b(T)h(A)20 b(sections)g(are)g(not)g
9455
(represented)f(specially;)h(such)g(sections)g(are)g(added)f(to)h(the)h
9456
(current)d(data)396 2729 y(material)i(that)g(being)g(collected)f(for)h
9457
(the)g(ne)o(xt)f(data)h(node.)-2 3099 y Fq(3.4.3.)35
9458
b(The)f(representation)h(of)e(entities)h(within)g(documents)396
9459
3267 y Fs(Entities)21 b(ar)m(e)f(not)g(r)m(epr)m(esented)f(within)i
9460
(documents!)d Fw(If)i(the)h(parser)e(\002nds)h(an)h(entity)e(reference)
9461
g(in)h(the)g(document)396 3374 y(content,)f(the)h(reference)f(is)i
9462
(immediately)e(e)o(xpanded,)e(and)j(the)g(parser)g(reads)g(the)g(e)o
9463
(xpansion)e(te)o(xt)i(instead)g(of)g(the)396 3482 y(reference.)-2
9464
3852 y Fq(3.4.4.)35 b(The)f(representation)h(of)e(attrib)n(utes)396
9465
4020 y Fw(As)21 b(attrib)n(ute)f(v)n(alues)g(are)g(composed)e(of)i
9466
(Unicode)f(characters,)g(too,)h(the)g(same)h(problems)d(with)j(the)f
9467
(character)396 4128 y(encoding)e(arise)j(as)g(for)e(character)g
9468
(material.)h(Attrib)n(ute)g(v)n(alues)g(are)g(con)m(v)o(erted)d(to)k
9469
(the)f(internal)f(encoding,)f(too;)i(and)396 4236 y(if)h(there)e(are)i
9470
(characters)e(that)h(cannot)f(be)h(represented,)e(these)j(are)f
9471
(dropped,)e(and)h(a)i(w)o(arning)e(is)i(printed.)396
9472
4385 y(Attrib)n(ute)f(v)n(alues)g(are)g(normalized)e(before)h(the)o(y)h
9473
(are)g(returned)e(by)i(methods)f(lik)o(e)h Fr(attribute)p
9474
Fw(.)f(First,)i(an)o(y)396 4493 y(remaining)e(entity)h(references)e
9475
(are)i(e)o(xpanded;)e(if)j(necessary)-5 b(,)19 b(e)o(xpansion)f(is)j
9476
(performed)c(recursi)n(v)o(ely)-5 b(.)18 b(Second,)396
9477
4601 y(ne)n(wline)i(characters)f(\(an)o(y)g(of)h(LF)-7
9478
b(,)21 b(CR)g(LF)-7 b(,)21 b(or)f(CR)h(characters\))e(are)h(con)m(v)o
9479
(erted)e(to)i(single)g(space)h(characters.)e(Note)396
9480
4709 y(that)i(especially)e(the)i(latter)f(action)g(is)h(prescribed)d
9481
(by)i(the)g(XML)g(standard)f(\(b)n(ut)41 b(is)21 b(not)f(con)m(v)o
9482
(erted)e(such)i(that)g(it)h(is)396 4817 y(still)h(possible)e(to)g
9483
(include)f(line)h(feeds)g(into)g(attrib)n(utes\).)p Black
9484
3759 5278 a Fs(101)p Black eop
9486
102 101 bop Black 2225 67 a Fs(Chapter)20 b(3.)g(The)g(objects)g(r)m
9487
(epr)m(esenting)g(the)g(document)p Black -2 583 a Fq(3.4.5.)35
9488
b(The)f(representation)h(of)e(pr)n(ocessing)h(instructions)396
9489
751 y Fw(Processing)20 b(instructions)f(are)h(parsed)g(to)g(some)g(e)o
9490
(xtent:)f(The)h(\002rst)h(w)o(ord)f(of)g(the)g(PI)g(is)i(called)e(the)g
9491
(tar)o(get,)f(and)g(it)i(is)396 859 y(stored)f(separated)f(from)g(the)i
9492
(rest)f(of)g(the)g(PI:)396 1039 y Fr(<?target)44 b(rest?>)396
9493
1230 y Fw(The)20 b(e)o(xact)g(location)f(where)h(a)g(PI)h(occurs)e(is)i
9494
(not)f(represented)f(\(by)g(def)o(ault\).)g(The)h(parser)f(puts)i(the)f
9495
(PI)g(into)g(the)396 1338 y(object)g(that)g(represents)g(the)g
9496
(embracing)e(construct)h(\(an)h(element,)f(a)i(DTD,)f(or)g(the)g(whole)
9497
g(document\);)e(that)i(means)396 1446 y(you)g(can)g(\002nd)f(out)h
9498
(which)g(PIs)h(occur)e(in)h(a)h(certain)f(element,)f(in)h(the)h(DTD,)f
9499
(or)g(in)g(the)g(whole)g(document,)e(b)n(ut)i(you)396
9500
1554 y(cannot)f(lookup)g(the)h(e)o(xact)g(position)f(within)h(the)g
9501
(construct.)396 1703 y Fv(P)o(arser)g(option:.)g Fw(If)g(you)f(require)
9502
g(the)h(e)o(xact)g(location)f(of)h(PIs,)g(it)h(is)g(possible)f(to)h
9503
(create)f(e)o(xtra)f(nodes)h(for)f(them.)h(This)396 1811
9504
y(mode)f(is)j(controled)c(by)i(the)g(option)f Fr(enable_pinstr_nodes)p
9505
Fw(.)e(The)j(additional)f(nodes)g(ha)n(v)o(e)h(the)g(node)f(type)396
9506
1919 y Fr(T_pinstr)44 b Fo(target)p Fw(,)19 b(and)h(are)g(created)f
9507
(from)h(special)g(e)o(x)o(emplars)e(contained)h(in)h(the)g
9508
Fr(spec)h Fw(\(see)396 2027 y(pxp_document.mli\).)-2
9509
2396 y Fq(3.4.6.)35 b(The)f(representation)h(of)e(comments)396
9510
2564 y Fw(Normally)-5 b(,)19 b(comments)g(are)h(not)g(represented;)e
9511
(the)o(y)i(are)g(dropped)e(by)h(def)o(ault.)396 2714
9512
y Fv(P)o(arser)h(option:.)g Fw(Ho)n(we)n(v)o(er)m(,)e(if)i(you)f
9513
(require)g(comment)g(in)h(the)h(document)d(tree,)i(it)h(is)g(possible)f
9514
(to)g(create)396 2822 y Fr(T_comment)g Fw(nodes)f(for)h(them.)f(This)h
9515
(mode)g(can)g(be)g(speci\002ed)g(by)f(the)i(option)e
9516
Fr(enable_comment_nodes)p Fw(.)396 2929 y(Comment)h(nodes)f(are)h
9517
(created)g(from)f(special)h(e)o(x)o(emplars)e(contained)h(in)h(the)h
9518
Fr(spec)f Fw(\(see)g(pxp_document.mli\).)15 b(Y)-9 b(ou)396
9519
3037 y(can)20 b(access)h(the)f(contents)g(of)g(comments)f(through)f
9520
(the)i(method)f Fr(comment)p Fw(.)-2 3407 y Fq(3.4.7.)35
9521
b(The)f(attrib)n(utes)f Fd(xml:lang)d Fq(and)k Fd(xml:space)396
9522
3575 y Fw(These)20 b(attrib)n(utes)g(are)g(not)g(supported)f
9523
(specially;)h(the)o(y)f(are)h(handled)f(lik)o(e)h(an)o(y)g(other)f
9524
(attrib)n(ute.)396 3724 y(Note)h(that)h(the)f(utility)g(function)f
9525
Fr(strip_whitespace)f Fw(respects)i Fr(xml:space)p Fw(.)-2
9526
4226 y Fy(3.5.)39 b(Namespaces)-2 4554 y Fq(3.5.1.)c(Pre\002x)f
9527
(normalization)396 4722 y Fw(Namespaces)20 b(ha)n(v)o(e)g(a)g(unique)f
9528
(identi\002er)m(,)g(the)h(so-called)g(namespace)f(URI.)h(F)o(or)g(e)o
9529
(xample,)396 4830 y Fr(http://www.w3.org/1999/xhtml)c
9530
Fw(is)21 b(the)g(namespace)e(URI)h(of)g(XHTML)g(1.0.)f(As)i(URIs)g(are)
9531
g(quite)e(long,)g(it)p Black 3759 5278 a Fs(102)p Black
9534
103 102 bop Black 2225 67 a Fs(Chapter)20 b(3.)g(The)g(objects)g(r)m
9535
(epr)m(esenting)g(the)g(document)p Black 396 579 a Fw(w)o(ould)g(be)g
9536
(a)g(pain)g(to)h(use)f(them)g(directly)f(to)i(refer)e(to)h(namespaces.)
9537
f(Because)i(of)f(this,)g(namespaces)f(are)h(primarily)396
9538
687 y(referred)f(to)h(by)g(a)g(shorthand)f(notation,)f(the)i(namespace)
9539
f(pre\002x.)h(F)o(or)f(e)o(xample,)g(in)h(the)h(follo)n(wing)d(XML)i
9540
(snippet)396 795 y(the)g(pre\002x)g("h")g(is)h(declared)e(as)i(a)g
9541
(shorthand)d(for)h(the)h(XHTML)g(namespace:)396 975 y
9542
Fr(<h:html)44 b(xmlns:h="http://www.w3.org/1999/xhtml">)486
9543
1072 y(<h:head>)576 1169 y(<h:title>Virtual)e(Library</h:title>)486
9544
1266 y(</h:head>)486 1363 y(<h:body>)576 1461 y(<h:p>Moved)h(to)h(<h:a)
9545
g(href="http://vlib.org/">vlib.org</h:a>.</h)o(:p>)486
9546
1558 y(</h:body>)396 1655 y(</h:html>)396 1846 y Fw(It)21
9547
b(is)g(possible)f(to)g(change)f(the)h(meaning)f(of)h(the)g(pre\002x)o
9548
(es)f(e)n(v)o(erywhere)f(in)i(the)h(document.)c(Especially)j(it)h(is)g
9549
(possible)396 1954 y(to)g(change)d(the)j(meaning)d(of)i(a)h(pre\002x)e
9550
(for)h(the)g(scope)g(of)g(an)g(element:)396 2134 y Fr(<x:address)43
9551
b(xmlns:x="http://addresses.org">)486 2231 y(<x:name)h
9552
(xmlns:x="http://names.org">)576 2328 y(Gerd)g(Stolpmann)486
9553
2425 y(</x:name>)396 2522 y(</x:address>)396 2713 y Fw(Here,)20
9554
b(the)g(inner)g(declaration)e(of)i("x")g(temporarily)e(o)o(v)o(errides)
9555
h(the)h(outer)f(declaration)g(of)h("x".)f(This)i(limits)g(the)396
9556
2821 y(usability)f(of)g(namespace)f(pre\002x)o(es,)g(as)i(the)o(y)e(do)
9557
h(not)g(identify)f(namespaces)g(throughout)e(the)k(whole)e(document.)
9558
396 2971 y(Man)o(y)g(other)h(parsers)g(represent)f(the)h(namespace)f
9559
(declarations)g(e)o(xplicitly)g(by)h(creating)f(namespace)g(nodes)g
9560
(for)h(the)396 3079 y(declarations.)f(Ho)n(we)n(v)o(er)m(,)f(this)j
9561
(has)f(the)g(disadv)n(antage)e(that)j(you)e(need)h(to)g(recur)f(to)i
9562
(the)f(namespace)f(URIs)i(in)f(order)396 3187 y(to)h(identify)e
9563
(namespaces)g(in)h(your)f(programs,)f(as)j(the)f(pre\002x)o(es)g(are)g
9564
(not)g(unique.)396 3336 y(PXP)h(has)g(a)f(dif)n(ferent)f(mode)g(of)h
9565
(processing)f(namespaces.)g(The)h(pre\002x)o(es)f(are)h(transformed)e
9566
(while)i(the)h(document)d(is)396 3444 y(being)h(parsed)h(such)g(that)g
9567
(the)o(y)g(become)f(unique.)f(This)i(transformation)e(is)j(called)f
9568
("pre\002x)f(normalization".)f(F)o(or)396 3552 y(e)o(xample,)h(the)h
9569
(abo)o(v)o(e)f Fr(x:address)g Fw(e)o(xample)g(w)o(ould)g(be)h
9570
(transformed)e(to)396 3732 y Fr(<x:address)43 b
9571
(xmlns:x="http://addresses.org">)486 3829 y(<x1:name)g
9572
(xmlns:x1="http://names.org">)576 3926 y(Gerd)h(Stolpmann)486
9573
4023 y(</x1:name>)396 4121 y(</x:address>)396 4312 y
9574
Fw(and)20 b(the)g(parsed)g(tree)g(w)o(ould)f(ha)n(v)o(e)h(an)g(outer)f
9575
(element)h(with)g(node)f(type)h Fr(T_element)43 b("x:address")p
9576
Fw(,)19 b(and)h(an)396 4420 y(inner)g(element)f(with)i(node)e(type)g
9577
Fr(T_element)44 b("x1:name")p Fw(.)19 b(The)h(ob)o(vious)e(adv)n
9578
(antage)g(is)j(that)g(the)f(names)g(of)396 4527 y(elements)g(are)g
9579
(still)i(simple)e(strings,)g(and)f(that)i(it)g(is)g(not)f(necessary)f
9580
(to)h(deal)g(with)h(pairs)396 4635 y(\(namespace_uri,localname\).)p
9581
Black 3759 5278 a Fs(103)p Black eop
9583
104 103 bop Black 2225 67 a Fs(Chapter)20 b(3.)g(The)g(objects)g(r)m
9584
(epr)m(esenting)g(the)g(document)p Black 396 579 a Fw(Furthermore,)e
9585
(it)j(is)g(possible)f(to)g(control)f(which)h(pre\002x)o(es)f(are)h
9586
(preferred.)e(By)j(manipulating)c(the)396 687 y(namespace_manager)g(it)
9587
j(is)i(possible)e(to)g(demand)e(a)j(certain)f(pre\002x)f(for)h(a)g
9588
(certain)g(namespace)f(URI:)396 867 y Fr(dtd)45 b(#)f
9589
(namespace_manager)e(#)j(add_namespace)e("addr")g
9590
("http://addresses.org";)396 964 y(dtd)i(#)f(namespace_manager)e(#)j
9591
(add_namespace)e("nm")h("http://names.org";)396 1155
9592
y Fw(No)n(w)20 b(the)h(normalized)d(te)o(xt)i(reads:)396
9593
1335 y Fr(<addr:address)43 b(xmlns:addr="http://addresses.org">)486
9594
1432 y(<nm:name)g(xmlns:nm="http://names.org">)576 1530
9595
y(Gerd)h(Stolpmann)486 1627 y(</nm:name>)396 1724 y(</addr:address>)396
9596
1915 y Fw(This)21 b(has)f(the)g(adv)n(antage)f(that)h(you)f(kno)n(w)g
9597
(in)i(adv)n(ance)d(which)i(pre\002x)o(es)f(will)i(be)f(used)g(which)g
9598
(simpli\002es)396 2023 y(programming)d(a)k(lot.)-2 2392
9599
y Fq(3.5.2.)35 b(DTDs)396 2560 y Fw(PXP)21 b(de\002nes)f(a)h
9600
(processing)e(instruction)g(for)g(DTDs)i(doing)e(the)h(same)g(as)h(the)
9601
f Fr(add_namespace)f Fw(method:)396 2740 y Fp(<)p Fr(?pxp:dtd)43
9602
b(namespace)h(prefix=")p Fo(p)p Fr(")f(uri=")p Fo(u)p
9603
Fr("?)p Fp(>)396 2931 y Fw(This)21 b(mak)o(es)f(it)h(possible)e(to)i
9604
(declare)e(elements)h(\(and)f(attrib)n(utes\))h(for)g(documents)e(no)i
9605
(matter)g(which)g(pre\002x)o(es)f(are)396 3039 y(actually)h(used.)g(F)o
9606
(or)f(e)o(xample,)g(the)h(follo)n(wing)f(document)f(is)j(v)n(alid:)396
9607
3219 y Fr(<?xml)44 b(version="1.0"?>)396 3316 y(<!DOCTYPE)g
9608
(addr:address)e([)396 3511 y(<!ELEMENT)i(addr:address)e(\(nm:name\)>)
9609
396 3608 y(<!ELEMENT)i(nm:name)f(\(#PCDATA\)>)396 3802
9610
y(<?pxp:dtd)h(namespace)f(prefix="addr")g(uri="http://addresses.org"?>)
9611
396 3899 y(<?pxp:dtd)h(namespace)f(prefix="nm")133 b
9612
(uri="http://names.org"?>)396 3996 y(]>)396 4191 y(<x:address)43
9613
b(xmlns:x="http://addresses.org">)486 4288 y(<x:name)h
9614
(xmlns:x="http://names.org">)576 4385 y(Gerd)g(Stolpmann)486
9615
4482 y(</x:name>)396 4579 y(</x:address>)p Black 3759
9616
5278 a Fs(104)p Black eop
9618
105 104 bop Black 2225 67 a Fs(Chapter)20 b(3.)g(The)g(objects)g(r)m
9619
(epr)m(esenting)g(the)g(document)p Black -2 583 a Fq(3.5.3.)35
9620
b(Ho)n(w)f(to)f(enab)o(le)i(namespace)h(pr)n(ocessing)396
9621
751 y Fw(By)21 b(def)o(ault,)e(PXP)i(does)f(no)g(namespace)f
9622
(processing.)f(T)-7 b(o)21 b(enable)e(it,)i(set)g(the)f(parser)g
9623
(option)396 859 y Fr(enable_namespace_processing)c Fw(to)21
9624
b Fr(true)p Fw(.)f(This)g(mak)o(es)g(the)g(parser)g(recognize)e
9625
(namespace)h(declarations,)396 967 y(and)h(it)h(enables)f(the)g
9626
(pre\002x)f(normalization,)f(too.)396 1116 y(Furthermore,)g(it)j(is)g
9627
(recommended)c(to)j(use)h(the)f(class)h Fr(namespace_element_impl)c
9628
Fw(instead)j(of)396 1224 y Fr(element_impl)p Fw(.)396
9629
1373 y Fv(Class:.)h Fr('ext)44 b Fb(namespace_element_impl)396
9630
1523 y Fv(Signatur)o(e:.)396 1703 y Fr(class)g([)h('ext)f(])h
9631
(namespace_element_impl)c(:)k('ext)f(-)p Fp(>)g Fr([)h('ext)f(])h(node)
9632
396 1936 y Fv(Description:.)20 b Fw(This)g(class)h(is)h(an)e
9633
(implementation)e(of)i Fr(node)g Fw(which)f(realizes)i(element)e
9634
(nodes.)g(In)h(contrast)g(to)396 2043 y Fr(element_impl)f
9635
Fw(,)i(this)f(class)h(also)g(implements)e(the)h(namespace)f(methods.)g
9636
(Y)-9 b(ou)20 b(can)g(create)g(a)g(ne)n(w)g(object)g(by)396
9637
2193 y Fr(let)45 b(exemplar)e(=)i(new)f(namespace_element_impl)d
9638
(ext_obj)396 2342 y Fw(which)19 b(creates)g(a)h(special)f(form)f(of)h
9639
(empty)f(element)h(which)f(already)h(contains)f(a)i(reference)d(to)i
9640
(the)h Fr(ext_obj)e Fw(,)i(b)n(ut)f(is)396 2450 y(otherwise)h(empty)-5
9641
b(.)18 b(This)j(special)f(form)f(is)i(called)f(an)h(element)e(e)o(x)o
9642
(emplar)-5 b(.)19 b(In)g(order)g(to)i(get)f(a)h(w)o(orking)d(element)i
9643
(that)396 2558 y(can)g(be)g(used)g(in)h(a)f(node)f(tree)i(it)g(is)g
9644
(required)d(to)i(apply)g(the)g(method)f Fr(create_element)f
9645
Fw(on)i(the)g(e)o(x)o(emplar)e(object.)p Black 3759 5278
9646
a Fs(105)p Black eop
9648
106 105 bop Black Black -2 621 a Ft(Chapter)48 b(4.)f(Con\002guring)j
9649
(and)e(calling)f(the)h(par)m(ser)-2 1055 y Fy(4.1.)39
9650
b(Over)q(vie)n(w)396 1235 y Fw(There)20 b(are)g(the)g(follo)n(wing)f
9651
(main)g(functions)g(in)m(v)n(oking)f(the)i(parser)g(\(in)g(Pxp_yacc\):)
9652
p Black 396 1558 a Fu(\225)p Black 60 w Fs(par)o(se_document_entity:)d
9653
Fw(Y)-9 b(ou)19 b(w)o(ant)i(to)f(parse)g(a)g(complete)g(and)f(closed)h
9654
(document)e(consisting)i(of)g(a)g(DTD)h(and)479 1666
9655
y(the)f(document)f(body;)g(the)h(body)f(is)i(v)n(alidated)e(against)g
9656
(the)h(DTD.)h(This)f(mode)f(is)i(interesting)f(if)g(you)f(ha)n(v)o(e)h
9657
(a)h(\002le)479 1835 y Fr(<!DOCTYPE)44 b(root)g(...)g([)h(...)f(])h(>)f
9658
(<root>)g(...)h(</root>)396 1984 y Fw(and)20 b(you)f(can)h(accept)g(an)
9659
o(y)f(DTD)i(that)f(is)h(included)e(in)h(the)g(\002le)h(\(e.g.)f
9660
(because)f(the)h(\002le)h(is)g(under)e(your)g(control\).)p
9661
Black 396 2092 a Fu(\225)p Black 60 w Fs(par)o(se_wfdocument_entity:)e
9662
Fw(Y)-9 b(ou)20 b(w)o(ant)g(to)g(parse)g(a)h(complete)e(and)h(closed)f
9663
(document)g(consisting)g(of)h(a)h(DTD)479 2200 y(and)f(the)g(document)e
9664
(body;)h(b)n(ut)h(the)h(body)d(is)k(not)d(v)n(alidated,)g(only)h(check)
9665
o(ed)e(for)i(well-formedness.)e(This)i(mode)f(is)479
9666
2308 y(preferred)f(if)j(v)n(alidation)d(costs)j(too)f(much)f(time)i(or)
9667
f(if)g(the)g(DTD)h(is)g(missing.)p Black 396 2416 a Fu(\225)p
9668
Black 60 w Fs(par)o(se_dtd_entity:)d Fw(Y)-9 b(ou)20
9669
b(w)o(ant)g(only)f(to)i(parse)e(an)i(entity)e(\(\002le\))i(containing)d
9670
(the)i(e)o(xternal)f(subset)h(of)g(a)h(DTD.)479 2524
9671
y(Sometimes)f(it)h(is)g(interesting)e(to)i(read)e(such)h(a)h(DTD,)f
9672
(for)g(e)o(xample)e(to)j(compare)d(it)j(with)g(the)f(DTD)g(included)f
9673
(in)h(a)479 2632 y(document,)e(or)i(to)g(apply)g(the)g(ne)o(xt)f(mode:)
9674
p Black 396 2740 a Fu(\225)p Black 60 w Fs(par)o(se_content_entity:)e
9675
Fw(Y)-9 b(ou)20 b(w)o(ant)g(only)g(to)g(parse)g(an)g(entity)g
9676
(\(\002le\))g(containing)e(a)j(fragment)d(of)i(a)h(document)479
9677
2848 y(body;)e(this)i(fragment)d(is)j(v)n(alidated)f(against)f(the)h
9678
(DTD)h(you)e(pass)i(to)f(the)g(function.)e(Especially)-5
9679
b(,)19 b(the)i(fragment)479 2956 y(must)g(not)e(ha)n(v)o(e)h(a)65
9680
b Fp(<)p Fr(!DOCTYPE)p Fp(>)19 b Fw(clause,)h(and)g(must)g(directly)g
9681
(be)o(gin)f(with)h(an)g(element.)f(The)h(element)g(is)479
9682
3064 y(v)n(alidated)f(against)h(the)g(DTD.)g(This)h(mode)e(is)i
9683
(interesting)e(if)i(you)e(w)o(ant)h(to)h(check)e(documents)f(against)i
9684
(a)h(\002x)o(ed,)479 3172 y(immutable)e(DTD.)p Black
9685
396 3280 a Fu(\225)p Black 60 w Fs(par)o(se_wfcontent_entity:)f
9686
Fw(This)i(function)f(also)h(parses)g(a)h(single)f(element)g(without)f
9687
(DTD,)h(b)n(ut)g(does)g(not)g(v)n(alidate)479 3388 y(it.)p
9688
Black 396 3495 a Fu(\225)p Black 60 w Fs(e)n(xtr)o(act_dtd_fr)l
9689
(om_document_entity:)15 b Fw(This)20 b(function)f(e)o(xtracts)g(the)i
9690
(DTD)f(from)f(a)i(closed)f(document)479 3603 y(consisting)g(of)g(a)g
9691
(DTD)h(and)e(a)i(document)d(body)-5 b(.)18 b(Both)j(the)f(internal)f
9692
(and)h(the)g(e)o(xternal)f(subsets)h(are)h(e)o(xtracted.)396
9693
3794 y(In)f(man)o(y)f(cases,)i Fr(parse_document_entity)c
9694
Fw(is)k(the)f(preferred)e(mode)i(to)g(parse)g(a)g(document)f(in)h(a)h
9695
(v)n(alidating)396 3902 y(w)o(ay)-5 b(,)20 b(and)g Fr
9696
(parse_wfdocument_entity)c Fw(is)22 b(the)e(mode)f(of)h(choice)f(to)i
9697
(parse)f(a)g(\002le)h(while)f(only)g(checking)e(for)396
9698
4010 y(well-formedness.)396 4160 y(There)i(are)g(a)g(number)f(of)h(v)n
9699
(ariations)f(of)h(these)g(modes.)f(One)h(important)f(application)g(of)h
9700
(a)g(parser)g(is)h(to)f(check)396 4268 y(documents)f(of)h(an)g
9701
(untrusted)f(source)g(against)h(a)g(\002x)o(ed)g(DTD.)g(One)g(solution)
9702
f(is)i(to)g(not)f(allo)n(w)g(the)g Fp(<)p Fr(!DOCTYPE)p
9703
Fp(>)396 4375 y Fw(clause)g(in)h(these)f(documents,)e(and)i(treat)g
9704
(the)h(document)d(lik)o(e)i(a)h(fragment)d(\(using)i(mode)f
9705
Fs(par)o(se_content_entity)p Fw(\).)396 4483 y(This)i(is)g(v)o(ery)e
9706
(simple,)h(b)n(ut)g(in\003e)o(xible;)f(users)i(of)e(such)h(a)h(system)f
9707
(cannot)f(e)n(v)o(en)h(de\002ne)f(additional)g(entities)i(to)396
9708
4591 y(abbre)n(viate)e(frequent)f(phrases)i(of)g(their)g(te)o(xt.)396
9709
4741 y(It)h(may)e(be)i(necessary)e(to)h(ha)n(v)o(e)g(a)h(more)e
9710
(intelligent)g(check)o(er)-5 b(.)20 b(F)o(or)g(e)o(xample,)e(it)j(is)g
9711
(also)g(possible)e(to)i(parse)f(the)396 4849 y(document)e(to)j(check)e
9712
(fully)-5 b(,)19 b(i.e.)h(with)h(DTD,)f(and)f(to)i(compare)d(this)j
9713
(DTD)f(with)h(the)f(prescribed)f(one.)g(In)h(order)f(to)p
9714
Black 3757 5278 a Fs(106)p Black eop
9716
107 106 bop Black 2348 67 a Fs(Chapter)20 b(4.)g(Con\002guring)e(and)i
9717
(calling)f(the)h(par)o(ser)p Black 396 579 a Fw(fully)g(parse)g(the)g
9718
(document,)e(mode)h Fs(par)o(se_document_entity)e Fw(is)k(applied,)e
9719
(and)h(to)g(get)g(the)g(DTD)h(to)f(compare)f(with)396
9720
687 y(mode)g Fs(par)o(se_dtd_entity)f Fw(can)i(be)h(used.)396
9721
836 y(There)f(is)h(another)d(v)o(ery)i(important)e(con\002gurable)g
9722
(aspect)i(of)g(the)g(parser:)g(the)g(so-called)g(resolv)o(er)-5
9723
b(.)19 b(The)h(task)g(of)g(the)396 944 y(resolv)o(er)f(is)i(to)g
9724
(locate)f(the)g(contents)f(of)h(an)g(\(e)o(xternal\))f(entity)g(for)h
9725
(a)h(gi)n(v)o(en)e(entity)g(name,)h(and)f(to)i(mak)o(e)e(the)i
9726
(contents)396 1052 y(accessible)g(as)f(a)h(character)e(stream.)h
9727
(\(Furthermore,)d(it)k(also)f(normalizes)g(the)g(character)f(set;)i(b)n
9728
(ut)f(this)h(is)g(a)f(detail)h(we)396 1160 y(can)f(ignore)f(here.\))g
9729
(Consider)h(you)f(ha)n(v)o(e)h(a)g(\002le)h(called)f
9730
Fr("main.xml")f Fw(containing)396 1340 y Fr(<!ENTITY)44
9731
b(\045)g(sub)h(SYSTEM)f("sub/sub.xml">)396 1437 y(\045sub;)396
9732
1628 y Fw(and)20 b(a)h(\002le)f(stored)g(in)g(the)h(subdirectory)c
9733
Fr("sub")j Fw(with)h(name)e Fr("sub.xml")g Fw(containing)396
9734
1808 y Fr(<!ENTITY)44 b(\045)g(subsub)g(SYSTEM)g("subsub/subsub.xml">)
9735
396 1906 y(\045subsub;)396 2097 y Fw(and)20 b(a)g(\002le)h(stored)e(in)
9736
h(the)g(subdirectory)d Fr("subsub")j Fw(of)f Fr("sub")h
9737
Fw(with)g(name)f Fr("subsub.xml")g Fw(\(the)g(contents)h(of)f(this)396
9738
2204 y(\002le)i(do)f(not)g(matter\).)f(Here,)h(the)g(resolv)o(er)f
9739
(must)h(track)g(that)g(the)g(second)g(entity)g Fr(subsub)f
9740
Fw(is)i(located)f(in)g(the)h(directory)396 2312 y Fr("sub/subsub")p
9741
Fw(,)e(i.e.)h(the)g(dif)n(\002culty)f(is)i(to)g(interpret)e(the)h
9742
(system)g(\(\002le\))h(names)e(of)h(entities)h(relati)n(v)o(e)e(to)i
9743
(the)f(entities)396 2420 y(containing)f(them,)g(e)n(v)o(en)g(if)i(the)f
9744
(entities)h(are)f(deeply)f(nested.)396 2570 y(There)h(is)h(not)f(a)g
9745
(\002x)o(ed)g(resolv)o(er)f(already)g(doing)g(e)n(v)o(erything)e(right)
9746
j(-)g(resolving)f(entity)h(names)g(is)h(a)f(task)h(that)f(highly)396
9747
2678 y(depends)f(on)h(the)g(en)m(vironment.)d(The)j(XML)g
9748
(speci\002cation)f(only)h(demands)f(that)h Fr(SYSTEM)g
9749
Fw(entities)g(are)g(interpreted)396 2786 y(lik)o(e)h(URLs)g(\(which)e
9750
(is)i(not)f(v)o(ery)f(precise,)h(as)h(there)e(are)i(lots)f(of)g(URL)h
9751
(schemes)f(in)g(use\),)g(hoping)f(that)h(this)h(helps)396
9752
2894 y(o)o(v)o(ercoming)c(the)j(local)g(peculiarities)g(of)g(the)g(en)m
9753
(vironment;)d(the)k(idea)f(is)h(that)f(if)h(you)e(do)h(not)f(kno)n(w)h
9754
(your)396 3001 y(en)m(vironment)d(you)j(can)g(refer)f(to)h(other)g
9755
(entities)g(by)g(denoting)e(URLs)k(for)d(them.)h(I)g(think)g(that)g
9756
(this)h(interpretation)d(of)396 3109 y Fr(SYSTEM)i Fw(names)g(may)g(ha)
9757
n(v)o(e)f(some)h(applications)f(in)i(the)f(internet,)f(b)n(ut)h(it)h
9758
(is)g(not)f(the)g(\002rst)h(choice)f(in)g(general.)396
9759
3217 y(Because)h(of)f(this,)g(the)g(resolv)o(er)f(is)i(a)g(separate)f
9760
(module)e(of)i(the)h(parser)e(that)h(can)g(be)h(e)o(xchanged)c(by)j
9761
(another)f(one)g(if)396 3325 y(necessary;)h(more)f(precisely)-5
9762
b(,)19 b(the)h(parser)g(already)f(de\002nes)h(se)n(v)o(eral)f(resolv)o
9763
(ers.)396 3475 y(The)h(follo)n(wing)f(resolv)o(ers)g(do)h(already)f(e)o
9764
(xist:)p Black 396 3707 a Fu(\225)p Black 60 w Fw(Resolv)o(ers)h
9765
(reading)f(from)g(arbitrary)g(input)g(channels.)g(These)h(can)g(be)g
9766
(con\002gured)e(such)i(that)g(a)h(certain)f(ID)g(is)479
9767
3815 y(associated)g(with)h(the)f(channel;)f(in)h(this)h(case)g(inner)e
9768
(references)g(to)h(e)o(xternal)f(entities)i(can)f(be)g(resolv)o(ed.)e
9769
(There)i(is)479 3923 y(also)h(a)f(special)h(resolv)o(er)e(that)h
9770
(interprets)f(SYSTEM)i(IDs)f(as)h(URLs;)g(this)g(resolv)o(er)e(can)h
9771
(process)g(relati)n(v)o(e)479 4031 y(SYSTEM)h(names)e(and)h(determine)f
9772
(the)h(corresponding)d(absolute)i(URL.)p Black 396 4139
9773
a Fu(\225)p Black 60 w Fw(A)i(resolv)o(er)e(that)h(reads)g(al)o(w)o
9774
(ays)h(from)e(a)i(gi)n(v)o(en)d(O'Caml)j(string.)e(This)i(resolv)o(er)e
9775
(is)i(not)f(able)g(to)g(resolv)o(e)f(further)479 4247
9776
y(names)h(unless)g(the)h(string)f(is)h(not)f(associated)g(with)g(an)o
9777
(y)f(name,)h(i.e.)g(if)g(the)g(document)f(contained)f(in)j(the)f
9778
(string)479 4355 y(refers)g(to)g(an)g(e)o(xternal)f(entity)-5
9779
b(,)20 b(this)g(reference)f(cannot)g(be)h(follo)n(wed)f(in)h(this)h
9780
(case.)p Black 396 4463 a Fu(\225)p Black 60 w Fw(A)g(resolv)o(er)e
9781
(for)g(\002le)i(names.)f(The)g Fr(SYSTEM)g Fw(name)f(is)i(interpreted)e
9782
(as)i(\002le)f(URL)h(with)g(the)f(slash)h("/")f(as)h(separator)479
9783
4571 y(for)f(directories.)f(-)h(This)h(resolv)o(er)d(is)k(deri)n(v)o
9784
(ed)c(from)h(the)h(generic)f(URL)i(resolv)o(er)-5 b(.)396
9785
4720 y(The)20 b(interf)o(ace)f(a)i(resolv)o(er)e(must)h(ha)n(v)o(e)g
9786
(is)h(documented,)c(so)k(it)g(is)g(possible)f(to)g(write)g(your)f(o)n
9787
(wn)h(resolv)o(er)-5 b(.)19 b(F)o(or)396 4828 y(e)o(xample,)g(you)g
9788
(could)g(connect)g(the)h(parser)g(with)g(an)h(HTTP)f(client,)g(and)f
9789
(resolv)o(e)h(URLs)h(of)f(the)g(HTTP)g(namespace.)p Black
9790
3756 5278 a Fs(107)p Black eop
9792
108 107 bop Black 2348 67 a Fs(Chapter)20 b(4.)g(Con\002guring)e(and)i
9793
(calling)f(the)h(par)o(ser)p Black 396 579 a Fw(The)g(resolv)o(er)f
9794
(classes)i(support)e(that)h(se)n(v)o(eral)g(independent)e(resolv)o(ers)
9795
h(are)h(combined)e(to)i(one)g(more)f(po)n(werful)396
9796
687 y(resolv)o(er;)g(thus)h(it)h(is)g(possible)f(to)h(combine)d(a)j
9797
(self-written)e(resolv)o(er)g(with)i(the)f(already)f(e)o(xisting)g
9798
(resolv)o(ers.)396 836 y(Note)h(that)h(the)f(e)o(xisting)f(resolv)o
9799
(ers)h(only)f(interpret)g Fr(SYSTEM)h Fw(names,)f(not)h
9800
Fr(PUBLIC)g Fw(names.)g(If)g(it)h(helps)f(you,)f(it)h(is)396
9801
944 y(possible)g(to)f(de\002ne)h(resolv)o(ers)e(for)h
9802
Fr(PUBLIC)h Fw(names,)f(too;)g(for)g(e)o(xample,)f(such)i(a)g(resolv)o
9803
(er)e(could)h(look)g(up)g(the)h(public)396 1052 y(name)g(in)g(a)h(hash)
9804
f(table,)g(and)f(map)h(it)h(to)f(a)h(system)f(name)g(which)g(is)h
9805
(passed)f(o)o(v)o(er)f(to)h(the)g(e)o(xisting)g(resolv)o(er)e(for)396
9806
1160 y(system)j(names.)e(It)i(is)g(relati)n(v)o(ely)e(simple)h(to)g
9807
(pro)o(vide)f(such)g(a)i(resolv)o(er)-5 b(.)-2 1579 y
9808
Fy(4.2.)39 b(Resolver)n(s)e(and)i(sour)m(ces)-2 1907
9809
y Fq(4.2.1.)c(Using)f(the)g(b)n(uilt-in)f(resolver)n(s)i(\(called)g
9810
(sour)n(ces\))396 2075 y Fw(The)20 b(type)g Fr(source)g
9811
Fw(enumerates)e(the)j(tw)o(o)f(possibilities)h(where)e(the)h(document)f
9812
(to)h(parse)g(comes)g(from.)396 2255 y Fr(type)44 b(source)g(=)576
9813
2352 y(Entity)f(of)i(\(\(dtd)f(-)p Fp(>)g Fr(Pxp_entity.entity\))e(*)j
9814
(Pxp_reader.resolver\))486 2449 y(|)g(ExtID)f(of)g(\(ext_id)g(*)g
9815
(Pxp_reader.resolver\))396 2640 y Fw(Y)-9 b(ou)20 b(normally)e(need)i
9816
(not)g(to)g(w)o(orry)f(about)h(this)g(type)g(as)h(there)f(are)g(con)m
9817
(v)o(enience)d(functions)i(that)h(create)g Fr(source)396
9818
2748 y Fw(v)n(alues:)p Black 396 3105 a Fu(\225)p Black
9819
60 w Fr(from_file)44 b(s)p Fw(:)20 b(The)g(document)e(is)j(read)f(from)
9820
f(\002le)i Fr(s)p Fw(;)g(you)e(may)h(specify)f(absolute)h(or)g(relati)n
9821
(v)o(e)f(path)h(names.)479 3213 y(The)g(\002le)h(name)f(must)g(be)g
9822
(encoded)e(as)j(UTF-8)f(string.)479 3362 y(There)g(is)h(an)f(optional)f
9823
(ar)o(gument)f Fr(~system_encoding)g Fw(specifying)g(the)j(character)d
9824
(encoding)h(which)g(is)i(used)479 3470 y(for)f(the)g(names)g(of)g(the)g
9825
(\002le)h(system.)f(F)o(or)g(e)o(xample,)e(if)j(this)g(encoding)d(is)j
9826
(ISO-8859-1)c(and)j Fr(s)g Fw(is)i(also)e(a)479 3578
9827
y(ISO-8859-1)e(string,)h(you)h(can)g(form)f(the)h(source:)479
9828
3717 y Fr(let)45 b(s_utf8)88 b(=)i(recode_string)42 b
9829
(~in_enc:`Enc_iso88591)g(~out_enc:`Enc_utf8)g(s)i(in)479
9830
3814 y(from_file)g(~system_encoding:`Enc_iso88591)39
9831
b(s_utf8)479 4005 y Fw(This)21 b Fr(source)e Fw(has)i(the)f(adv)n
9832
(antage)e(that)j(it)f(is)i(able)e(to)g(resolv)o(e)f(inner)h(e)o
9833
(xternal)f(entities;)h(i.e.)g(if)h(your)e(document)479
9834
4113 y(includes)g(data)g(from)g(another)f(\002le)i(\(using)f(the)g
9835
Fr(SYSTEM)g Fw(attrib)n(ute\),)g(this)g(mode)g(will)h(\002nd)f(that)h
9836
(\002le.)g(Ho)n(we)n(v)o(er)m(,)d(this)479 4221 y(mode)j(cannot)f
9837
(resolv)o(e)g Fr(PUBLIC)h Fw(identi\002ers)f(nor)h Fr(SYSTEM)g
9838
Fw(identi\002ers)f(other)h(than)g("\002le:".)p Black
9839
396 4370 a Fu(\225)p Black 60 w Fr(from_channel)43 b(ch)p
9840
Fw(:)21 b(The)e(document)g(is)i(read)e(from)h(the)g(channel)f
9841
Fr(ch)p Fw(.)h(In)g(general,)f(this)h(source)g(also)g(supports)479
9842
4478 y(\002le)h(URLs)g(found)e(in)h(the)g(document;)f(ho)n(we)n(v)o(er)
9843
m(,)e(by)j(def)o(ault)f(only)h(absolute)f(URLs)i(are)f(understood.)e
9844
(It)i(is)479 4586 y(possible)g(to)h(associate)f(an)g(ID)g(with)h(the)f
9845
(channel)f(such)h(that)g(the)g(resolv)o(er)f(kno)n(ws)h(ho)n(w)f(to)i
9846
(interpret)e(relati)n(v)o(e)479 4694 y(URLs:)479 4832
9847
y Fr(from_channel)43 b(~id:\(System)g("file:///dir/dir1/"\))f(ch)p
9848
Black 3759 5278 a Fs(108)p Black eop
9850
109 108 bop Black 2348 67 a Fs(Chapter)20 b(4.)g(Con\002guring)e(and)i
9851
(calling)f(the)h(par)o(ser)p Black 396 579 a Fw(There)g(is)h(also)f
9852
(the)g(~system_encoding)e(ar)o(gument)f(specifying)i(ho)n(w)h(\002le)h
9853
(names)e(are)i(encoded.)d(-)i(The)g(e)o(xample)479 687
9854
y(from)f(abo)o(v)o(e)g(can)h(also)g(be)h(written)f(\(b)n(ut)f(it)i(is)g
9855
(no)f(longer)f(possible)h(to)g(interpret)f(relati)n(v)o(e)h(URLs)h
9856
(because)e(there)h(is)479 795 y(no)g(~id)g(ar)o(gument,)e(and)i
9857
(computing)d(this)k(ar)o(gument)d(is)j(relati)n(v)o(ely)e(complicated)g
9858
(because)g(it)i(must)f(be)h(a)f(v)n(alid)479 903 y(URL\):)479
9859
1041 y Fr(let)45 b(ch)f(=)h(open_in)e(s)i(in)479 1138
9860
y(let)g(src)f(=)h(from_channel)d(~system_encoding:`Enc_iso88591)e(ch)45
9861
b(in)479 1236 y(...;)479 1333 y(close_in)f(ch)p Black
9862
396 1482 a Fu(\225)p Black 60 w Fr(from_string)f(s)p
9863
Fw(:)21 b(The)f(string)g Fr(s)g Fw(is)h(the)g(document)d(to)i(parse.)g
9864
(This)g(mode)f(is)j(not)d(able)h(to)h(interpret)e(\002le)i(names)479
9865
1590 y(of)f Fr(SYSTEM)g Fw(clauses,)g(nor)g(it)h(can)f(look)f(up)h
9866
Fr(PUBLIC)f Fw(identi\002ers.)479 1740 y(Normally)-5
9867
b(,)19 b(the)h(encoding)e(of)i(the)g(string)g(is)h(detected)e(as)i
9868
(usual)f(by)g(analyzing)f(the)h(XML)g(declaration,)e(if)j(an)o(y)-5
9869
b(.)479 1847 y(Ho)n(we)n(v)o(er)m(,)18 b(it)j(is)g(also)g(possible)f
9870
(to)g(specify)g(the)g(encoding)e(directly:)479 1986 y
9871
Fr(let)45 b(src)f(=)h(from_string)e(~fixenc:`ISO-8859-2)e(s)p
9872
Black 396 2177 a Fu(\225)p Black 60 w Fr(ExtID)j(\(id,)g(r\))p
9873
Fw(:)21 b(The)f(document)e(to)i(parse)g(is)h(denoted)e(by)h(the)g
9874
(identi\002er)g Fr(id)g Fw(\(either)f(a)i Fr(SYSTEM)f
9875
Fw(or)g Fr(PUBLIC)479 2285 y Fw(clause\),)g(and)g(this)g(identi\002er)g
9876
(is)h(interpreted)d(by)i(the)g(resolv)o(er)f Fr(r)p Fw(.)i(Use)f(this)h
9877
(mode)e(if)i(you)e(ha)n(v)o(e)h(written)g(your)f(o)n(wn)479
9878
2393 y(resolv)o(er)-5 b(.)479 2542 y(Which)20 b(character)f(sets)j(are)
9879
e(possible)g(depends)e(on)i(the)g(passed)h(resolv)o(er)d
9880
Fr(r)p Fw(.)p Black 396 2692 a Fu(\225)p Black 60 w Fr(Entity)44
9881
b(\(get_entity,)f(r\))p Fw(:)20 b(The)g(document)e(to)j(parse)f(is)h
9882
(returned)d(by)i(the)g(function)f(in)m(v)n(ocation)479
9883
2800 y Fr(get_entity)43 b(dtd)p Fw(,)20 b(where)g Fr(dtd)g
9884
Fw(is)h(the)g(DTD)f(object)g(to)g(use)g(\(it)h(may)f(be)g(empty\).)f
9885
(Inner)f(e)o(xternal)h(references)479 2908 y(occuring)g(in)h(this)h
9886
(entity)e(are)i(resolv)o(ed)d(using)i(the)g(resolv)o(er)f
9887
Fr(r)p Fw(.)479 3057 y(Which)h(character)f(sets)j(are)e(possible)g
9888
(depends)e(on)i(the)g(passed)h(resolv)o(er)d Fr(r)p Fw(.)-2
9889
3510 y Fq(4.2.2.)35 b(The)f(resolver)g(API)396 3677 y
9890
Fw(A)21 b(resolv)o(er)e(is)i(an)f(object)g(that)g(can)g(be)g(opened)e
9891
(lik)o(e)j(a)f(\002le,)h(b)n(ut)f(you)f(do)h(not)g(pass)g(the)h(\002le)
9892
f(name)g(to)g(the)g(resolv)o(er)m(,)f(b)n(ut)396 3785
9893
y(the)h(XML)h(identi\002er)e(of)h(the)g(entity)g(to)h(read)e(from)g
9894
(\(either)h(a)g Fr(SYSTEM)g Fw(or)g Fr(PUBLIC)g Fw(clause\).)f(When)h
9895
(opened,)f(the)396 3893 y(resolv)o(er)g(must)h(return)f(the)i
9896
Fr(Lexing.lexbuf)d Fw(that)i(reads)g(the)h(characters.)e(The)g(resolv)o
9897
(er)g(can)h(be)h(closed,)e(and)h(it)396 4001 y(can)g(be)g(cloned.)f
9898
(Furthermore,)f(it)j(is)g(possible)f(to)g(tell)h(the)f(resolv)o(er)f
9899
(which)h(character)f(set)i(it)g(should)e(assume.)h(-)g(The)396
9900
4109 y(follo)n(wing)f(from)g(Pxp_reader:)396 4289 y Fr(exception)44
9901
b(Not_competent)396 4386 y(exception)g(Not_resolvable)e(of)j(exn)396
9902
4581 y(class)f(type)g(resolver)g(=)486 4678 y(object)576
9903
4775 y(method)f(init_rep_encoding)f(:)j(rep_encoding)e(->)h(unit)576
9904
4872 y(method)f(init_warner)g(:)i(collect_warnings)d(->)j(unit)p
9905
Black 3759 5278 a Fs(109)p Black eop
9907
110 109 bop Black 2348 67 a Fs(Chapter)20 b(4.)g(Con\002guring)e(and)i
9908
(calling)f(the)h(par)o(ser)p Black 576 579 a Fr(method)43
9909
b(rep_encoding)g(:)i(rep_encoding)576 676 y(method)e(open_in)h(:)h
9910
(ext_id)f(->)g(Lexing.lexbuf)576 773 y(method)f(close_in)h(:)h(unit)576
9911
870 y(method)e(change_encoding)g(:)h(string)g(->)h(unit)576
9912
967 y(method)e(clone)h(:)h(resolver)576 1065 y(method)e(close_all)h(:)g
9913
(unit)486 1162 y(end)396 1353 y Fw(The)20 b(resolv)o(er)f(object)h
9914
(must)g(w)o(ork)f(as)i(follo)n(ws:)p Black 396 1627 a
9915
Fu(\225)p Black 60 w Fw(When)f(the)h(parser)e(is)i(called,)f(it)h
9916
(tells)g(the)f(resolv)o(er)f(the)h(w)o(arner)g(object)f(and)h(the)g
9917
(internal)g(encoding)e(by)i(in)m(v)n(oking)479 1735 y
9918
Fr(init_warner)f Fw(and)h Fr(init_rep_encoding)p Fw(.)d(The)j(resolv)o
9919
(er)f(should)g(store)i(these)f(v)n(alues.)f(The)h(method)479
9920
1843 y Fr(rep_encoding)f Fw(should)g(return)g(the)h(internal)g
9921
(encoding.)p Black 396 1950 a Fu(\225)p Black 60 w Fw(If)g(the)h
9922
(parser)e(w)o(ants)i(to)f(read)g(from)f(the)h(resolv)o(er)m(,)e(it)j
9923
(in)m(v)n(ok)o(es)f(the)g(method)f Fr(open_in)p Fw(.)g(Either)h(the)g
9924
(resolv)o(er)479 2058 y(succeeds,)g(in)g(which)g(case)g(the)h
9925
Fr(Lexing.lexbuf)d Fw(reading)h(from)g(the)h(\002le)h(or)f(stream)g
9926
(must)g(be)h(returned,)d(or)479 2166 y(opening)h(f)o(ails.)h(In)g(the)g
9927
(latter)h(case)f(the)h(method)d(implementation)g(should)h(raise)i(an)f
9928
(e)o(xception)e(\(see)j(belo)n(w\).)p Black 396 2274
9929
a Fu(\225)p Black 60 w Fw(If)f(the)h(parser)e(\002nishes)i(reading,)d
9930
(it)j(calls)g(the)f Fr(close_in)g Fw(method.)p Black
9931
396 2382 a Fu(\225)p Black 60 w Fw(If)g(the)h(parser)e(\002nds)h(a)h
9932
(reference)d(to)j(another)e(e)o(xternal)f(entity)i(in)h(the)f(input)f
9933
(stream,)h(it)h(calls)g Fr(clone)f Fw(to)g(get)h(a)479
9934
2490 y(second)f(resolv)o(er)f(which)g(must)h(be)h(initially)f(closed)g
9935
(\(not)f(yet)h(connected)f(with)h(an)g(input)f(stream\).)h(The)g
9936
(parser)479 2598 y(then)g(in)m(v)n(ok)o(es)f Fr(open_in)h
9937
Fw(and)f(the)i(other)e(methods)g(as)i(described.)p Black
9938
396 2706 a Fu(\225)p Black 60 w Fw(If)f(you)g(already)f(kno)n(w)g(the)h
9939
(character)f(set)i(of)f(the)g(input)g(stream,)f(you)h(should)f(recode)g
9940
(it)i(to)f(the)g(internal)479 2814 y(encoding,)e(and)i(de\002ne)f(the)i
9941
(method)d Fr(change_encoding)h Fw(as)i(an)f(empty)f(method.)p
9942
Black 396 2922 a Fu(\225)p Black 60 w Fw(If)h(you)g(w)o(ant)g(to)g
9943
(support)f(multiple)h(e)o(xternal)f(character)g(sets,)i(the)f(object)f
9944
(must)i(follo)n(w)e(a)i(much)e(more)479 3030 y(complicated)g(protocol.)
9945
f(Directly)i(after)g Fr(open_in)f Fw(has)i(been)e(called,)h(the)g
9946
(resolv)o(er)f(must)h(return)f(a)i(le)o(xical)f(b)n(uf)n(fer)479
9947
3138 y(that)h(only)e(reads)h(one)g(byte)f(at)i(a)g(time.)f(This)g(is)h
9948
(only)f(possible)f(if)i(you)e(create)h(the)g(le)o(xical)g(b)n(uf)n(fer)
9949
f(with)479 3246 y Fr(Lexing.from_function)p Fw(;)e(the)j(function)d
9950
(must)j(then)f(al)o(w)o(ays)h(return)e(1)i(if)f(the)h(EOF)g(is)g(not)f
9951
(yet)h(reached,)e(and)h(0)479 3354 y(if)i(EOF)f(is)h(reached.)e(If)h
9952
(the)g(parser)g(has)g(read)g(the)g(\002rst)h(line)f(of)g(the)h
9953
(document,)c(it)k(will)g(in)m(v)n(ok)o(e)479 3461 y Fr(change_encoding)
9954
e Fw(to)h(tell)h(the)f(resolv)o(er)f(which)h(character)e(set)j(to)g
9955
(assume.)f(From)f(this)i(moment,)e(the)h(object)479 3569
9956
y(can)g(return)f(more)h(than)f(one)h(byte)g(at)g(once.)g(The)g(ar)o
9957
(gument)d(of)j Fr(change_encoding)f Fw(is)i(either)e(the)i(parameter)d
9958
(of)479 3677 y(the)i("encoding")e(attrib)n(ute)i(of)g(the)g(XML)h
9959
(declaration,)d(or)i(the)g(empty)f(string)h(if)h(there)e(is)j(not)d(an)
9960
o(y)h(XML)479 3785 y(declaration)f(or)h(if)g(the)h(declaration)d(does)i
9961
(not)g(contain)f(an)h(encoding)e(attrib)n(ute.)479 3935
9962
y(At)j(the)f(be)o(ginning)e(the)i(resolv)o(er)f(must)h(only)g(return)f
9963
(one)g(character)g(e)n(v)o(ery)g(time)h(something)f(is)i(read)f(from)f
9964
(the)479 4043 y(le)o(xical)h(b)n(uf)n(fer)-5 b(.)19 b(The)h(reason)f
9965
(for)h(this)h(is)g(that)f(you)f(otherwise)h(w)o(ould)f(not)h(e)o
9966
(xactly)g(kno)n(w)f(at)h(which)g(position)f(in)479 4151
9967
y(the)h(input)g(stream)g(the)g(character)f(set)i(changes.)479
9968
4300 y(If)f(you)g(w)o(ant)g(automatic)f(recognition)f(of)i(the)g
9969
(character)f(set,)i(it)g(is)g(up)f(to)g(the)g(resolv)o(er)f(object)h
9970
(to)g(implement)f(this.)p Black 396 4449 a Fu(\225)p
9971
Black 60 w Fw(If)h(an)g(error)g(occurs,)f(the)h(parser)g(calls)g(the)h
9972
(method)d Fr(close_all)i Fw(for)f(the)h(top-le)n(v)o(el)f(resolv)o(er;)
9973
g(this)i(method)479 4557 y(should)e(close)i(itself)g(\(if)f(not)g
9974
(already)f(done\))f(and)i(all)h(clones.)396 4748 y Fv(Exceptions.)f
9975
Fw(It)h(is)g(possible)f(to)g(chain)g(resolv)o(ers)f(such)h(that)g(when)
9976
g(the)g(\002rst)h(resolv)o(er)e(is)i(not)f(able)g(to)g(open)f(the)396
9977
4856 y(entity)-5 b(,)20 b(the)g(other)f(resolv)o(ers)g(of)h(the)g
9978
(chain)g(are)g(tried)g(in)g(turn.)g(The)g(method)e Fr(open_in)i
9979
Fw(should)f(raise)i(the)f(e)o(xception)p Black 3759 5278
9980
a Fs(110)p Black eop
9982
111 110 bop Black 2348 67 a Fs(Chapter)20 b(4.)g(Con\002guring)e(and)i
9983
(calling)f(the)h(par)o(ser)p Black 396 579 a Fr(Not_competent)f
9984
Fw(to)h(indicate)g(that)g(the)g(ne)o(xt)g(resolv)o(er)f(should)g(try)h
9985
(to)g(open)f(the)i(entity)-5 b(.)19 b(If)h(the)g(resolv)o(er)f(is)i
9986
(able)f(to)396 687 y(handle)f(the)i(ID,)f(b)n(ut)g(some)g(other)f
9987
(error)g(occurs,)g(the)i(e)o(xception)d Fr(Not_resolvable)g
9988
Fw(should)i(be)g(raised)g(to)g(force)396 795 y(that)h(the)f(chain)f
9989
(breaks.)396 944 y(Example:)g(Ho)n(w)h(to)h(de\002ne)e(a)i(resolv)o(er)
9990
e(that)h(is)h(equi)n(v)n(alent)e(to)h(from_string:)e(...)-2
9991
1314 y Fq(4.2.3.)35 b(Prede\002ned)f(resolver)h(components)396
9992
1482 y Fs(Note)21 b(that)f(the)g(following)f(section)h(is)i(not)d(yet)i
9993
(up)f(to)g(date)o(.)f(Ther)m(e)i(ar)m(e)f(curr)m(ently)g(muc)o(h)f(mor)
9994
m(e)i(r)m(esolver)o(s,)g(especially)396 1589 y(r)m(esolver)o(s)g(for)g
9995
(catalo)o(gs)e(of)i(PUBLIC)f(and/or)f(SYSTEM)h(identi\002er)o(s.)g(See)
9996
g(the)g(interface)g(Pxp_r)m(eader)f(for)h(details.)396
9997
1739 y Fw(There)g(are)g(some)g(classes)h(in)f(Pxp_reader)e(that)j
9998
(de\002ne)e(common)g(resolv)o(er)f(beha)n(viour)-5 b(.)396
9999
1919 y Fr(class)44 b(resolve_read_this_channel)d(:)576
10000
2016 y(?id:ext_id)i(->)576 2113 y(?fixenc:encoding)f(->)576
10001
2210 y(?auto_close:bool)g(->)576 2308 y(in_channel)h(->)755
10002
2405 y(resolver)396 2596 y Fw(Reads)21 b(from)e(the)h(passed)g(channel)
10003
f(\(it)i(may)f(be)g(e)n(v)o(en)f(a)i(pipe\).)e(If)h(the)g
10004
Fr(~id)g Fw(ar)o(gument)e(is)j(passed)f(to)h(the)f(object,)f(the)396
10005
2704 y(created)h(resolv)o(er)f(accepts)h(only)f(this)i(ID.)f(Otherwise)
10006
g(all)h(IDs)f(are)g(accepted.)f(-)i(Once)f(the)g(resolv)o(er)f(has)h
10007
(been)396 2812 y(cloned,)f(it)h(does)g(not)f(accept)h(an)o(y)f(ID.)g
10008
(This)h(means)g(that)g(this)g(resolv)o(er)e(cannot)h(handle)g(inner)g
10009
(references)f(to)i(e)o(xternal)396 2919 y(entities.)h(Note)f(that)g
10010
(you)f(can)h(combine)f(this)i(resolv)o(er)e(with)h(another)f(resolv)o
10011
(er)g(that)h(can)g(handle)f(inner)g(references)396 3027
10012
y(\(such)h(as)h(resolv)o(e_as_\002le\);)d(see)j(class)g('combine')d
10013
(belo)n(w)-5 b(.)19 b(-)h(If)g(you)g(pass)g(the)h Fr(~fixenc)e
10014
Fw(ar)o(gument,)f(the)i(encoding)396 3135 y(of)g(the)g(channel)f(is)i
10015
(set)g(to)g(the)f(passed)g(v)n(alue,)f(re)o(gardless)g(of)h(an)o(y)f
10016
(auto-recognition)e(or)j(an)o(y)f(XML)h(declaration.)f(-)h(If)396
10017
3243 y Fr(~auto_close)43 b(=)i(true)20 b Fw(\(which)f(is)i(the)g(def)o
10018
(ault\),)e(the)h(channel)f(is)i(closed)f(after)g(use.)g(If)g
10019
Fr(~auto_close)43 b(=)396 3351 y(false)p Fw(,)20 b(the)g(channel)f(is)i
10020
(left)g(open.)396 3573 y Fr(class)44 b(resolve_read_any_channel)d(:)576
10021
3670 y(?auto_close:bool)h(->)576 3767 y(channel_of_id:\(ext_id)f(->)j
10022
(\(in_channel)f(*)i(encoding)f(option\)\))f(->)755 3864
10023
y(resolver)396 4055 y Fw(This)21 b(resolv)o(er)e(calls)h(the)h
10024
(function)d Fr(~channel_of_id)h Fw(to)h(open)f(a)i(ne)n(w)f(channel)f
10025
(for)g(the)h(passed)g Fr(ext_id)p Fw(.)g(This)396 4163
10026
y(function)f(must)h(either)g(return)f(the)h(channel)f(and)h(the)g
10027
(encoding,)e(or)i(it)g(must)h(f)o(ail)f(with)h(Not_competent.)c(The)396
10028
4271 y(function)i(must)h(return)f Fr(None)h Fw(as)h(encoding)d(if)j
10029
(the)f(def)o(ault)f(mechanism)g(to)h(recognize)f(the)h(encoding)e
10030
(should)h(be)396 4379 y(used.)g(It)i(must)e(return)g
10031
Fr(Some)44 b(e)20 b Fw(if)g(it)h(is)f(already)f(kno)n(wn)f(that)i(the)g
10032
(encoding)d(of)j(the)f(channel)g(is)i Fr(e)p Fw(.)e(If)h
10033
Fr(~auto_close)396 4487 y(=)45 b(true)19 b Fw(\(which)g(is)h(the)f(def)
10034
o(ault\),)f(the)i(channel)e(is)i(closed)f(after)g(use.)h(If)f
10035
Fr(~auto_close)43 b(=)h(false)p Fw(,)19 b(the)h(channel)e(is)396
10036
4595 y(left)j(open.)396 4817 y Fr(class)44 b(resolve_read_url_channel)d
10037
(:)p Black 3759 5278 a Fs(111)p Black eop
10039
112 111 bop Black 2348 67 a Fs(Chapter)20 b(4.)g(Con\002guring)e(and)i
10040
(calling)f(the)h(par)o(ser)p Black 576 579 a Fr(?base_url:Neturl.url)41
10041
b(->)576 676 y(?auto_close:bool)h(->)576 773 y(url_of_id:\(ext_id)g(->)
10042
i(Neturl.url\))f(->)576 870 y(channel_of_url:\(Neturl.url)d(->)45
10043
b(\(in_channel)e(*)h(encoding)g(option\)\))f(->)755 967
10044
y(resolver)396 1158 y Fw(When)20 b(this)h(resolv)o(er)e(gets)h(an)h(ID)
10045
f(to)g(read)g(from,)f(it)i(calls)g(the)f(function)e Fr(~url_of_id)h
10046
Fw(to)i(get)f(the)g(corresponding)396 1266 y(URL.)h(This)f(URL)h(may)f
10047
(be)g(a)g(relati)n(v)o(e)g(URL;)h(ho)n(we)n(v)o(er)m(,)c(a)k(URL)g
10048
(scheme)f(must)g(be)g(used)g(which)f(contains)h(a)h(path.)396
10049
1374 y(The)f(resolv)o(er)f(con)m(v)o(erts)g(the)h(URL)h(to)f(an)g
10050
(absolute)f(URL)i(if)g(necessary)-5 b(.)19 b(The)g(second)h(function,)
10051
396 1482 y Fr(~channel_of_url)p Fw(,)e(is)j(fed)f(with)h(the)f
10052
(absolute)f(URL)i(as)g(input.)e(This)h(function)f(opens)g(the)i
10053
(resource)e(to)h(read)396 1590 y(from,)f(and)h(returns)f(the)h(channel)
10054
f(and)h(the)g(encoding)e(of)i(the)g(resource.)396 1740
10055
y(Both)g(functions,)f Fr(~url_of_id)g Fw(and)h Fr(~channel_of_url)p
10056
Fw(,)e(can)i(raise)g(Not_competent)e(to)i(indicate)g(that)g(the)396
10057
1847 y(object)g(is)h(not)f(able)g(to)g(read)g(from)f(the)h(speci\002ed)
10058
g(resource.)f(Ho)n(we)n(v)o(er)m(,)f(there)i(is)h(a)f(dif)n(ference:)f
10059
(A)h(Not_competent)396 1955 y(from)f Fr(~url_of_id)g
10060
Fw(is)j(left)e(as)h(it)g(is,)g(b)n(ut)f(a)h(Not_competent)c(from)i
10061
Fr(~channel_of_url)g Fw(is)i(con)m(v)o(erted)c(to)396
10062
2063 y(Not_resolv)n(able.)h(So)i(only)g Fr(~url_of_id)f
10063
Fw(decides)h(which)f(URLs)i(are)f(accepted)g(by)f(the)i(resolv)o(er)e
10064
(and)g(which)h(not.)396 2213 y(The)g(function)f Fr(~channel_of_url)f
10065
Fw(must)i(return)f Fr(None)h Fw(as)h(encoding)d(if)j(the)f(def)o(ault)f
10066
(mechanism)g(to)i(recognize)396 2321 y(the)f(encoding)f(should)g(be)h
10067
(used.)g(It)g(must)g(return)f Fr(Some)44 b(e)21 b Fw(if)g(it)f(is)i
10068
(already)d(kno)n(wn)f(that)j(the)f(encoding)e(of)i(the)396
10069
2429 y(channel)f(is)i Fr(e)p Fw(.)396 2578 y(If)f Fr(~auto_close)43
10070
b(=)i(true)20 b Fw(\(which)f(is)i(the)g(def)o(ault\),)e(the)h(channel)f
10071
(is)i(closed)f(after)g(use.)g(If)g Fr(~auto_close)43
10072
b(=)396 2686 y(false)p Fw(,)20 b(the)g(channel)f(is)i(left)g(open.)396
10073
2835 y(Objects)f(of)g(this)g(class)h(contain)e(a)h(base)g(URL)g(relati)
10074
n(v)o(e)f(to)h(which)g(relati)n(v)o(e)f(URLs)h(are)g(interpreted.)e
10075
(When)i(creating)e(a)396 2943 y(ne)n(w)i(object,)g(you)f(can)h(specify)
10076
f(the)i(base)f(URL)h(by)f(passing)f(it)i(as)g Fr(~base_url)e
10077
Fw(ar)o(gument.)f(When)i(an)g(e)o(xisting)396 3051 y(object)g(is)h
10078
(cloned,)e(the)h(base)g(URL)h(of)f(the)g(clone)g(is)h(the)f(URL)h(of)f
10079
(the)g(original)f(object.)h(-)g(Note)g(that)g(the)h(term)f("base)396
10080
3159 y(URL")h(has)f(a)h(strict)g(de\002nition)e(in)h(RFC)i(1808.)396
10081
3381 y Fr(class)44 b(resolve_read_this_string)d(:)576
10082
3478 y(?id:ext_id)i(->)576 3575 y(?fixenc:encoding)f(->)576
10083
3672 y(string)h(->)755 3769 y(resolver)396 3960 y Fw(Reads)21
10084
b(from)e(the)h(passed)g(string.)g(If)g(the)g Fr(~id)h
10085
Fw(ar)o(gument)c(is)k(passed)g(to)f(the)g(object,)g(the)g(created)f
10086
(resolv)o(er)g(accepts)396 4068 y(only)h(this)g(ID.)g(Otherwise)g(all)h
10087
(IDs)g(are)f(accepted.)f(-)h(Once)g(the)g(resolv)o(er)f(has)i(been)e
10088
(cloned,)g(it)i(does)f(not)g(accept)g(an)o(y)396 4176
10089
y(ID.)g(This)h(means)f(that)g(this)h(resolv)o(er)e(cannot)g(handle)g
10090
(inner)g(references)g(to)h(e)o(xternal)f(entities.)i(Note)f(that)g(you)
10091
f(can)396 4284 y(combine)g(this)i(resolv)o(er)e(with)h(another)f
10092
(resolv)o(er)g(that)h(can)g(handle)f(inner)g(references)g(\(such)h(as)h
10093
(resolv)o(e_as_\002le\);)396 4392 y(see)g(class)g('combine')d(belo)n(w)
10094
-5 b(.)19 b(-)i(If)f(you)f(pass)i(the)f Fr(~fixenc)f
10095
Fw(ar)o(gument,)f(the)i(encoding)e(of)i(the)g(string)g(is)h(set)g(to)g
10096
(the)396 4500 y(passed)f(v)n(alue,)g(re)o(gardless)e(of)i(an)o(y)g
10097
(auto-recognition)c(or)k(an)o(y)f(XML)i(declaration.)396
10098
4722 y Fr(class)44 b(resolve_read_any_string)d(:)576
10099
4819 y(string_of_id:\(ext_id)g(->)k(\(string)e(*)i(encoding)e
10100
(option\)\))h(->)p Black 3759 5278 a Fs(112)p Black eop
10102
113 112 bop Black 2348 67 a Fs(Chapter)20 b(4.)g(Con\002guring)e(and)i
10103
(calling)f(the)h(par)o(ser)p Black 755 579 a Fr(resolver)396
10104
770 y Fw(This)h(resolv)o(er)e(calls)h(the)h(function)d
10105
Fr(~string_of_id)h Fw(to)h(get)g(the)g(string)g(for)g(the)g(passed)g
10106
Fr(ext_id)p Fw(.)g(This)g(function)396 878 y(must)g(either)g(return)f
10107
(the)i(string)e(and)h(the)g(encoding,)e(or)i(it)h(must)f(f)o(ail)h
10108
(with)f(Not_competent.)e(The)h(function)g(must)396 986
10109
y(return)g Fr(None)h Fw(as)h(encoding)d(if)j(the)f(def)o(ault)g
10110
(mechanism)e(to)j(recognize)d(the)i(encoding)f(should)g(be)h(used.)g
10111
(It)g(must)396 1094 y(return)f Fr(Some)44 b(e)21 b Fw(if)g(it)f(is)i
10112
(already)d(kno)n(wn)f(that)j(the)f(encoding)e(of)i(the)g(string)g(is)h
10113
Fr(e)p Fw(.)396 1315 y Fr(class)44 b(resolve_as_file)f(:)576
10114
1412 y(?file_prefix:[)f(`Not_recognized)g(|)j(`Allowed)f(|)g(`Required)
10115
g(])g(->)576 1510 y(?host_prefix:[)e(`Not_recognized)g(|)j(`Allowed)f
10116
(|)g(`Required)g(])g(->)576 1607 y(?system_encoding:encoding)c(->)576
10117
1704 y(?url_of_id:\(ext_id)h(->)k(Neturl.url\))e(->)576
10118
1801 y(?channel_of_url:)f(\(Neturl.url)h(->)h(\(in_channel)f(*)i
10119
(encoding)e(option\)\))h(->)576 1898 y(unit)g(->)755
10120
1995 y(resolver)396 2186 y Fw(Reads)21 b(from)e(the)h(local)g(\002le)h
10121
(system.)f(Ev)o(ery)f(\002le)i(name)f(is)h(interpreted)d(as)j(\002le)g
10122
(name)f(of)f(the)i(local)f(\002le)h(system,)f(and)396
10123
2294 y(the)g(referred)f(\002le)i(is)g(read.)396 2444
10124
y(The)f(full)g(form)f(of)h(a)h(\002le)g(URL)g(is:)g
10125
(\002le://host/path,)e(where)h('host')f(speci\002es)i(the)f(host)g
10126
(system)g(where)g(the)g(\002le)396 2552 y(identi\002ed)g('path')f
10127
(resides.)h(host)g(=)g("")h(or)f(host)g(=)h("localhost")e(are)h
10128
(accepted;)f(other)h(v)n(alues)f(will)i(raise)396 2659
10129
y(Not_competent.)d(The)i(standard)f(for)g(\002le)i(URLs)g(is)g
10130
(de\002ned)e(in)i(RFC)g(1738.)396 2809 y(Option)f Fr(~file_prefix)p
10131
Fw(:)e(Speci\002es)j(ho)n(w)f(the)g("\002le:")h(pre\002x)e(of)h(\002le)
10132
h(names)f(is)h(handled:)p Black 396 3041 a Fu(\225)p
10133
Black 60 w Fr(`Not_recognized:)p Fw(The)c(pre\002x)j(is)h(not)f
10134
(recognized.)p Black 396 3149 a Fu(\225)p Black 60 w
10135
Fr(`Allowed:)g Fw(The)f(pre\002x)h(is)h(allo)n(wed)e(b)n(ut)i(not)f
10136
(required)e(\(the)i(def)o(ault\).)p Black 396 3257 a
10137
Fu(\225)p Black 60 w Fr(`Required:)f Fw(The)h(pre\002x)g(is)h
10138
(required.)396 3448 y(Option)f Fr(~host_prefix:)e Fw(Speci\002es)j(ho)n
10139
(w)e(the)i("//host")f(phrase)f(of)h(\002le)h(names)f(is)h(handled:)p
10140
Black 396 3681 a Fu(\225)p Black 60 w Fr(`Not_recognized:)p
10141
Fw(The)c(pre\002x)j(is)h(not)f(recognized.)p Black 396
10142
3789 a Fu(\225)p Black 60 w Fr(`Allowed:)g Fw(The)f(pre\002x)h(is)h
10143
(allo)n(wed)e(b)n(ut)i(not)f(required)e(\(the)i(def)o(ault\).)p
10144
Black 396 3896 a Fu(\225)p Black 60 w Fr(`Required:)f
10145
Fw(The)h(pre\002x)g(is)h(required.)396 4087 y(Option)f
10146
Fr(~system_encoding:)e Fw(Speci\002es)i(the)g(encoding)e(of)i(\002le)h
10147
(names)f(of)g(the)g(local)g(\002le)h(system.)f(Def)o(ault:)396
10148
4195 y(UTF-8.)396 4345 y(Options)g Fr(~url_of_id)p Fw(,)f
10149
Fr(~channel_of_url)p Fw(:)f(Not)i(for)g(the)g(casual)g(user!)396
10150
4566 y Fr(class)44 b(combine)g(:)576 4664 y(?prefer:resolver)e(->)576
10151
4761 y(resolver)h(list)h(->)755 4858 y(resolver)p Black
10152
3759 5278 a Fs(113)p Black eop
10154
114 113 bop Black 2348 67 a Fs(Chapter)20 b(4.)g(Con\002guring)e(and)i
10155
(calling)f(the)h(par)o(ser)p Black 396 579 a Fw(Combines)g(se)n(v)o
10156
(eral)f(resolv)o(er)g(objects.)h(If)g(a)h(concrete)e(entity)g(with)i
10157
(an)f Fr(ext_id)g Fw(is)h(to)f(be)g(opened,)f(the)h(combined)396
10158
687 y(resolv)o(er)f(tries)i(the)f(contained)f(resolv)o(ers)g(in)h(turn)
10159
g(until)g(a)g(resolv)o(er)f(accepts)h(opening)f(the)h(entity)g(\(i.e.)g
10160
(it)g(does)g(not)396 795 y(raise)h(Not_competent)c(on)j(open_in\).)396
10161
944 y(Clones:)h(If)f(the)g('clone')f(method)g(is)i(in)m(v)n(ok)o(ed)d
10162
(before)h('open_in',)e(all)k(contained)e(resolv)o(ers)g(are)h(cloned)f
10163
(separately)396 1052 y(and)h(again)f(combined.)f(If)i(the)g('clone')f
10164
(method)g(is)i(in)m(v)n(ok)o(ed)e(after)g('open_in')f(\(i.e.)i(while)g
10165
(the)g(resolv)o(er)f(is)i(open\),)396 1160 y(additionally)e(the)h
10166
(clone)f(of)h(the)h(acti)n(v)o(e)e(resolv)o(er)g(is)i(\003agged)f(as)g
10167
(being)g(preferred,)d(i.e.)k(it)f(is)i(tried)e(\002rst.)-2
10168
1662 y Fy(4.3.)39 b(The)g(DTD)g(c)m(lasses)396 1841 y
10169
Fs(Sorry)-5 b(,)21 b(not)f(yet)g(written.)h(P)-7 b(erhaps)20
10170
b(the)g(interface)g(de\002nition)e(of)j(Pxp_dtd)d(e)n(xpr)m(esses)j
10171
(the)f(same:)396 2063 y Fr(\(****************************************)o
10172
(******)o(******)o(******)o(******)o(*****)o(*\))396
10173
2160 y(\(*)3048 b(*\))396 2257 y(\(*)45 b(Pxp_dtd:)2643
10174
b(*\))396 2354 y(\(*)224 b(Object)44 b(model)g(of)g(document)g(type)g
10175
(declarations)939 b(*\))396 2452 y(\(*)3048 b(*\))396
10176
2549 y(\(****************************************)o(******)o(******)o
10177
(******)o(******)o(*****)o(*\))396 2743 y(\(*)45 b
10178
(======================================)o(======)o(======)o(======)o
10179
(======)o(=====)o(===)441 2840 y(*)g(OVERVIEW)441 2937
10180
y(*)441 3034 y(*)g(class)f(dtd)g(...............)e(represents)i(the)g
10181
(whole)g(DTD,)g(including)f(element)441 3132 y(*)1210
10182
b(declarations,)43 b(entity)h(declarations,)f(notation)441
10183
3229 y(*)1210 b(declarations,)43 b(and)h(processing)g(instructions)441
10184
3326 y(*)h(class)f(dtd_element)f(.......)g(represents)h(an)g(element)g
10185
(declaration)f(consisting)441 3423 y(*)1210 b(of)45 b(a)g(content)e
10186
(model)h(and)h(an)f(attribute)f(list)441 3520 y(*)1210
10187
b(declaration)441 3617 y(*)45 b(class)f(dtd_notation)f(......)g
10188
(represents)h(a)g(notation)g(declaration)441 3714 y(*)h(class)f
10189
(proc_instruction)e(..)i(represents)g(a)g(processing)f(instruction)441
10190
3811 y(*)i(======================================)o(======)o(======)o
10191
(======)o(======)o(=====)o(===)441 3909 y(*)441 4006
10192
y(*\))396 4297 y(type)f(validation_record)e(=)576 4394
10193
y({)i(content_model)133 b(:)44 b(Pxp_types.content_model_type;)665
10194
4491 y(content_dfa)223 b(:)44 b(Pxp_dfa.dfa_definition)d(option)j
10195
(Lazy.t;)665 4589 y(id_att_name)223 b(:)44 b(string)g(option;)665
10196
4686 y(idref_att_names)f(:)h(string)g(list;)665 4783
10197
y(att_lookup)268 b(:)44 b(int)h(Pxp_aux.Str_hashtbl.t;)p
10198
Black 3759 5278 a Fs(114)p Black eop
10200
115 114 bop Black 2348 67 a Fs(Chapter)20 b(4.)g(Con\002guring)e(and)i
10201
(calling)f(the)h(par)o(ser)p Black 665 579 a Fr(init_att_vals)133
10202
b(:)44 b(\(string)g(*)h(Pxp_types.att_value\))c(array;)665
10203
676 y(att_info)358 b(:)44 b(\(Pxp_types.att_type)e(*)j(bool\))f(array;)
10204
665 773 y(att_required)178 b(:)44 b(int)h(list;)665 870
10205
y(accept_undeclared_atts)c(:)k(bool;)576 967 y(})486
10206
1065 y(\(*)f(This)h(is)f(an)h(internally)e(structure)g(used)h(to)h
10207
(pass)f(validation)f(information)531 1162 y(*)h(efficiently)f(from)i
10208
(the)f(DTD)g(to)h(the)f(document)g(nodes.)531 1259 y(*)g(Please)g(do)h
10209
(not)f(use)g(this)h(type)f(in)g(your)g(own)h(programs.)531
10210
1356 y(*\))396 1647 y(\(*)g(Very)f(experimental)f(namespace)g(support:)
10211
h(*\))396 1842 y(class)g(namespace_manager)e(:)486 1939
10212
y(\(*)i(This)h(class)f(manages)f(mappings)h(from)g(URIs)g(to)h
10213
(normalized)e(prefixes.)g(For)h(every)531 2036 y(*)g(namespace)g(a)g
10214
(namespace_manager)e(object)i(contains)g(a)g(set)h(of)f(mappings)531
10215
2133 y(*)g(uri1)h(|-)p Fp(>)f Fr(np,)g(uri2)g(|-)p Fp(>)h
10216
Fr(np,)f(...,)g(uriN)g(|-)p Fp(>)g Fr(np.)531 2230 y(*)g(The)h
10217
(normalized)e(prefix)h(np)g(is)h(characterical)d(of)j(the)f(namespace,)
10218
f(and)531 2327 y(*)h(identifies)g(the)g(namespace)f(uniquely.)531
10219
2424 y(*)h(The)h(first)f(URI)g(uri1)g(is)h(the)f(primary)g(URI,)g(the)g
10220
(other)g(URIs)g(are)h(aliases.)531 2522 y(*)f(The)h(following)e
10221
(operations)g(are)i(supported:)531 2619 y(*)f(-)h(add_uri)f(np)g(uri:)g
10222
(The)h(passed)f(uri)g(is)g(added)g(to)h(the)f(already)g(existing)531
10223
2716 y(*)134 b(namespace)43 b(which)h(is)h(identified)e(by)i(the)f
10224
(normprefix)f(np.)h(This)h(means)531 2813 y(*)134 b(that)44
10225
b(the)h(precondition)d(is)j(that)f(there)g(is)h(already)e(some)h
10226
(mapping)531 2910 y(*)134 b(uri')44 b(|-)p Fp(>)g Fr(np,)h(and)f(that)g
10227
(there)g(is)h(no)f(mapping)g(for)g(uri.)g(Postcondition)531
10228
3007 y(*)134 b(is)45 b(that)f(uri)g(|-)p Fp(>)g Fr(np)h(is)f(a)h(new)f
10229
(mapping.)531 3104 y(*)134 b(add_uri)44 b(thus)g(adds)g(a)h(new)f
10230
(alias)g(URI)g(for)h(an)f(existing)g(namespace.)531 3202
10231
y(*)g(-)h(add_namespace)e(np)h(uri:)g(Precondition)f(is)i(that)f
10232
(neither)g(np)g(nor)g(uri)531 3299 y(*)134 b(are)44 b(used)h(in)f(the)g
10233
(namespace_manager)e(object.)i(The)g(effect)g(is)h(that)f(the)531
10234
3396 y(*)134 b(mapping)44 b(uri)g(|-)p Fp(>)g Fr(np)h(is)f(added.)531
10235
3493 y(*)g(-)h(lookup_or_add_namespace)c(p)k(uri:)f(If)g(there)g(is)h
10236
(already)f(some)g(mapping)531 3590 y(*)134 b(uri)44 b(|-)p
10237
Fp(>)h Fr(np,)f(the)g(normprefix)f(np)i(is)f(simply)g(returned)g
10238
(\("lookup"\).)f(In)h(this)531 3687 y(*)134 b(case)44
10239
b(p)h(is)f(ignored.)g(Otherwise)f(uri)i(is)f(not)g(yet)h(mapped,)e(and)
10240
i(in)f(this)531 3784 y(*)134 b(case)44 b(some)g(unique)g(np)h(must)f
10241
(be)g(found)g(such)h(that)f(uri)g(|-)p Fp(>)g Fr(np)h(can)f(be)531
10242
3882 y(*)134 b(added)44 b(\("add_namespace"\).)e(First,)i(the)g(passed)
10243
g(prefix)g(p)g(is)h(tried.)531 3979 y(*)134 b(If)45 b(p)f(is)h(free,)f
10244
(it)g(can)h(be)f(taken)g(as)h(new)f(normprefix:)f(np)h(=)h(p.)g
10245
(Otherwise)531 4076 y(*)134 b(some)44 b(number)g(n)h(is)f(found)g(such)
10246
g(that)h(the)f(concatenation)f(p)h(+)h(n)g(is)f(free:)531
10247
4173 y(*)134 b(np)45 b(=)f(p)h(+)g(n.)f(The)g(operation)g(returns)f
10248
(np.)531 4270 y(*\))486 4367 y(object)576 4464 y(method)g(add_uri)h(:)h
10249
(string)f(-)p Fp(>)g Fr(string)g(-)p Fp(>)g Fr(unit)665
10250
4561 y(\(*)h(add_uri)e(np)i(uri:)f(adds)g(uri)h(as)f(alias)g(URI)g(to)h
10251
(the)f(namespace)g(identified)710 4659 y(*)h(by)f(the)h(normprefix)e
10252
(np)h(\(see)g(above)g(for)h(detailed)e(semantics\).)g(The)h(method)710
10253
4756 y(*)h(raises)f(Not_found)f(if)h(the)h(normprefix)e(np)h(is)h
10254
(unknown)f(to)g(the)g(object,)710 4853 y(*)h(and)f(it)h(fails)f
10255
(\(Namespace_error\))e(if)i(the)g(uri)h(is)f(member)g(of)h(a)p
10256
Black 3759 5278 a Fs(115)p Black eop
10258
116 115 bop Black 2348 67 a Fs(Chapter)20 b(4.)g(Con\002guring)e(and)i
10259
(calling)f(the)h(par)o(ser)p Black 710 579 a Fr(*)45
10260
b(different)e(namespace.)g(Nothing)h(happens)g(if)g(the)g(uri)h(is)f
10261
(already)g(member)710 676 y(*)h(of)f(the)h(namespace)e(np.)710
10262
773 y(*\))576 870 y(method)g(add_namespace)g(:)i(string)f(-)p
10263
Fp(>)g Fr(string)g(-)p Fp(>)g Fr(unit)665 967 y(\(*)h(add_namespace)d
10264
(np)j(uri:)f(adds)g(a)h(new)f(namespace)g(to)g(the)g(object.)g(The)710
10265
1065 y(*)h(namespace)e(is)i(identified)e(by)h(the)h(normprefix)e(np)h
10266
(and)h(contains)e(initially)710 1162 y(*)i(the)f(primary)g(URI)g(uri.)
10267
710 1259 y(*)h(The)f(method)g(fails)g(\(Namespace_error\))e(if)i
10268
(either)g(np)h(already)e(identifies)710 1356 y(*)i(some)f(namespace)f
10269
(or)i(if)f(uri)h(is)f(already)g(member)g(of)g(some)g(namespace.)710
10270
1453 y(*)h(Nothing)e(happens)h(if)h(uri)f(is)g(the)h(sole)f(member)g
10271
(of)g(the)h(namespace)e(np.)710 1550 y(*)i(It)f(is)h(required)e(that)h
10272
(np)h Fp(<>)f Fr("".)710 1647 y(*\))576 1745 y(method)f
10273
(lookup_or_add_namespace)e(:)k(string)f(-)p Fp(>)g Fr(string)g(-)p
10274
Fp(>)g Fr(string)665 1842 y(\(*)h(lookup_or_add_namespace)c(p)j(uri:)h
10275
(first,)e(the)i(method)f(looks)g(up)g(if)710 1939 y(*)h(the)f
10276
(namespace)f(for)i(uri)f(does)g(already)g(exist.)g(If)g(so,)h(p)f(is)h
10277
(ignored,)710 2036 y(*)g(and)f(the)g(method)g(returns)g(the)g
10278
(normprefix)f(identifying)g(the)i(namespace.)710 2133
10279
y(*)g(Otherwise,)e(a)i(new)f(namespace)f(is)i(added)f(for)g(some)g
10280
(normprefix)f(np)i(which)710 2230 y(*)g(initially)e(contains)h(uri.)g
10281
(The)g(normprefix)f(np)i(is)f(calculated)f(upon)h(p)710
10282
2327 y(*)h(serving)e(as)i(suggestion)e(for)h(the)h(normprefix.)e(The)h
10283
(method)g(returns)710 2424 y(*)h(the)f(normprefix.)710
10284
2522 y(*\))576 2619 y(method)f(get_primary_uri)g(:)h(string)g(-)p
10285
Fp(>)h Fr(string)665 2716 y(\(*)g(Return)f(the)g(primary)g(URI)g(for)g
10286
(a)h(normprefix,)e(or)h(raises)g(Not_found.)710 2813
10287
y(*)h(get_uri)e("")i(raises)f(always)g(Not_found.)710
10288
2910 y(*\))576 3007 y(method)f(get_uri_list)g(:)i(string)f(-)p
10289
Fp(>)g Fr(string)g(list)665 3104 y(\(*)h(Return)f(all)g(URIs)g(for)g(a)
10290
h(normprefix,)e(or)i([])f(if)h(the)f(normprefix)f(is)710
10291
3202 y(*)i(unused.)e(get_uri_list)g("")i(returns)e(always)h([].)h(The)f
10292
(last)g(URI)g(of)h(the)710 3299 y(*)g(returned)e(list)h(is)h(the)f
10293
(primary)g(URI.)710 3396 y(*\))576 3493 y(method)f(get_normprefix)g(:)i
10294
(string)e(-)p Fp(>)i Fr(string)665 3590 y(\(*)g(Return)f(the)g
10295
(normprefix)f(for)h(a)h(URI,)f(or)h(raises)f(Not_found)f(*\))576
10296
3687 y(method)g(iter_namespaces)g(:)h(\(string)g(-)p
10297
Fp(>)g Fr(unit\))g(-)p Fp(>)h Fr(unit)665 3784 y(\(*)g(Iterates)e(over)
10298
h(all)h(namespaces)e(contained)g(in)i(the)f(object,)g(and)710
10299
3882 y(*)h(calls)f(the)g(passed)g(function)f(for)i(every)f(namespace.)f
10300
(The)h(argument)g(of)g(the)710 3979 y(*)h(invoked)e(function)h(is)g
10301
(the)h(normprefix)e(of)h(the)h(namespace.)710 4076 y(*\))576
10302
4270 y(\(*)f(Encodings:)f(prefixes)h(and)g(URIs)g(are)h(always)e
10303
(encoded)h(in)h(the)f(default)620 4367 y(*)h(encoding)f(of)g(the)g
10304
(document)620 4464 y(*\))486 4561 y(end)396 4659 y(;;)p
10305
Black 3757 5278 a Fs(116)p Black eop
10307
117 116 bop Black 2348 67 a Fs(Chapter)20 b(4.)g(Con\002guring)e(and)i
10308
(calling)f(the)h(par)o(ser)p Black 396 579 a Fr(class)44
10309
b(dtd)h(:)486 676 y(\(*)f(Creation:)531 773 y(*)134 b(new)44
10310
b(dtd)531 870 y(*)g(creates)g(a)h(new,)f(empty)g(DTD)g(object)g
10311
(without)g(any)g(declaration,)f(without)g(a)i(root)531
10312
967 y(*)f(element,)g(without)g(an)g(ID.)531 1065 y(*\))486
10313
1162 y(Pxp_types.collect_warnings)c(-)p Fp(>)486 1259
10314
y Fr(Pxp_types.rep_encoding)h(-)p Fp(>)486 1356 y Fr(object)576
10315
1453 y(method)i(root)i(:)f(string)g(option)665 1550 y(\(*)h(get)f(the)g
10316
(name)h(of)f(the)g(root)h(element)e(if)i(present)e(*\))576
10317
1745 y(method)g(set_root)h(:)h(string)e(-)p Fp(>)i Fr(unit)665
10318
1842 y(\(*)g(set)f(the)g(name)h(of)f(the)g(root)h(element.)e(This)h
10319
(method)g(can)g(be)h(invoked)710 1939 y(*)g(only)f(once)710
10320
2036 y(*\))576 2230 y(method)f(id)i(:)g(Pxp_types.dtd_id)d(option)665
10321
2327 y(\(*)j(get)f(the)g(identifier)g(for)g(this)g(DTD)g(*\))576
10322
2522 y(method)f(set_id)h(:)h(Pxp_types.dtd_id)d(-)p Fp(>)i
10323
Fr(unit)665 2619 y(\(*)h(set)f(the)g(identifier.)f(This)i(method)e(can)
10324
i(be)f(invoked)g(only)g(once)g(*\))576 2813 y(method)f(encoding)h(:)h
10325
(Pxp_types.rep_encoding)665 2910 y(\(*)g(returns)e(the)i(encoding)e
10326
(used)h(for)h(character)e(representation)g(*\))576 3202
10327
y(method)g(allow_arbitrary)g(:)h(unit)665 3299 y(\(*)h(After)f(this)g
10328
(method)g(has)g(been)g(invoked,)g(the)g(ob-)396 3396
10329
y(ject)g(changes)g(its)g(behaviour:)710 3493 y(*)h(-)f(elements)g(and)g
10330
(notations)g(that)g(have)g(not)g(been)g(added)g(may)h(be)f(used)g(in)h
10331
(an)710 3590 y(*)134 b(arbitrary)44 b(way;)g(the)g(methods)g("element")
10332
f(and)i("notation")e(indicate)g(this)710 3687 y(*)134
10333
b(by)45 b(raising)f(Undeclared)f(instead)g(of)i(Validation_error.)710
10334
3784 y(*\))576 3979 y(method)e(disallow_arbitrary)f(:)j(unit)576
10335
4173 y(method)e(arbitrary_allowed)f(:)j(bool)665 4270
10336
y(\(*)g(Returns)e(whether)h(arbitrary)f(contents)h(are)g(allowed)g(or)g
10337
(not.)h(*\))576 4464 y(method)e(standalone_declaration)f(:)i(bool)665
10338
4561 y(\(*)h(Whether)e(there)h(is)h(a)g('standalone')d(declaration)h
10339
(or)i(not.)f(Strictly)710 4659 y(*)h(speaking,)e(this)h(declaration)f
10340
(is)i(not)f(part)g(of)h(the)f(DTD,)g(but)h(it)f(is)710
10341
4756 y(*)h(included)e(here)h(because)g(of)h(practical)e(reasons.)710
10342
4853 y(*)i(If)f(not)h(set,)f(this)g(property)f(defaults)h(to)g
10343
('false'.)p Black 3756 5278 a Fs(117)p Black eop
10345
118 117 bop Black 2348 67 a Fs(Chapter)20 b(4.)g(Con\002guring)e(and)i
10346
(calling)f(the)h(par)o(ser)p Black 710 579 a Fr(*\))576
10347
773 y(method)43 b(set_standalone_declaration)e(:)k(bool)f(-)p
10348
Fp(>)g Fr(unit)665 870 y(\(*)h(Sets)f(the)g('standalone')f
10349
(declaration.)g(*\))576 1162 y(method)g(namespace_manager)f(:)j
10350
(namespace_manager)665 1259 y(\(*)g(For)f(namespace-aware)e
10351
(implementations)h(of)h(the)h(node)f(class,)g(this)g(method)710
10352
1356 y(*)h(returns)e(the)i(namespace)e(manager.)h(If)g(the)g(namespace)
10353
g(manager)f(has)i(not)f(been)710 1453 y(*)h(set,)f(the)g(exception)g
10354
(Not_found)f(is)h(raised.)710 1550 y(*\))576 1745 y(method)f
10355
(set_namespace_manager)f(:)i(namespace_manager)e(-)p
10356
Fp(>)j Fr(unit)665 1842 y(\(*)g(Sets)f(the)g(namespace)g(manager)f(as)i
10357
(returned)e(by)i(namespace_manager.)710 1939 y(*\))576
10358
2133 y(method)e(add_element)g(:)i(dtd_element)e(-)p Fp(>)h
10359
Fr(unit)665 2230 y(\(*)h(add)f(the)g(given)g(element)g(declaration)f
10360
(to)i(this)f(DTD.)g(Raises)g(Not_found)710 2327 y(*)h(if)f(there)g(is)h
10361
(already)e(an)i(element)f(declaration)f(with)h(the)g(same)g(name.)710
10362
2424 y(*\))576 2619 y(method)f(add_gen_entity)g(:)i(Pxp_entity.entity)d
10363
(-)p Fp(>)i Fr(bool)g(-)p Fp(>)g Fr(unit)665 2716 y(\(*)h
10364
(add_gen_entity)d(e)j(extdecl:)710 2813 y(*)g(add)f(the)g(entity)g('e')
10365
h(as)f(general)g(entity)g(to)g(this)g(DTD)h(\(general)e(entities)710
10366
2910 y(*)i(are)f(those)g(represented)f(by)i(&name;\).)e(If)i(there)f
10367
(is)g(already)g(a)g(declaration)710 3007 y(*)h(with)f(the)g(same)g
10368
(name,)g(the)h(second)f(definition)f(is)h(ignored;)g(as)g(excep-)396
10369
3104 y(tion)g(from)710 3202 y(*)h(this)f(rule,)g(entities)f(with)i
10370
(names)f("lt",)g("gt",)g("amp",)f("quot",)h(and)g("apos")710
10371
3299 y(*)h(may)f(only)g(be)h(redeclared)e(with)h(a)h(definition)e(that)
10372
h(is)h(equivalent)e(to)h(the)710 3396 y(*)h(standard)e(definition;)g
10373
(otherwise)h(a)g(Validation_error)e(is)j(raised.)710
10374
3493 y(*)710 3590 y(*)g('extdecl':)e('true')h(indicates)f(that)h(the)h
10375
(entity)e(declaration)g(occurs)h(in)710 3687 y(*)h(an)f(external)g
10376
(entity.)f(\(Used)h(for)h(the)f(standalone)f(check.\))710
10377
3784 y(*\))576 3979 y(method)g(add_par_entity)g(:)i(Pxp_entity.entity)d
10378
(-)p Fp(>)i Fr(unit)665 4076 y(\(*)h(add)f(the)g(given)g(entity)g(as)h
10379
(parameter)e(entity)h(to)g(this)h(DTD)f(\(parameter)710
10380
4173 y(*)h(entities)e(are)i(those)f(represented)f(by)h(\045name;\).)g
10381
(If)g(there)g(is)h(already)e(a)710 4270 y(*)i(declaration)e(with)h(the)
10382
g(same)g(name,)g(the)h(second)f(definition)f(is)h(ignored.)710
10383
4367 y(*\))576 4561 y(method)f(add_notation)g(:)i(dtd_notation)e(-)p
10384
Fp(>)h Fr(unit)665 4659 y(\(*)h(add)f(the)g(given)g(notation)g(to)g
10385
(this)h(DTD.)f(If)g(there)g(is)h(al-)396 4756 y(ready)f(a)h
10386
(declaration)710 4853 y(*)g(with)f(the)g(same)g(name,)g(a)h
10387
(Validation_error)d(is)j(raised.)p Black 3759 5278 a
10390
119 118 bop Black 2348 67 a Fs(Chapter)20 b(4.)g(Con\002guring)e(and)i
10391
(calling)f(the)h(par)o(ser)p Black 710 579 a Fr(*\))576
10392
773 y(method)43 b(add_pinstr)h(:)g(proc_instruction)e(-)p
10393
Fp(>)j Fr(unit)665 870 y(\(*)g(add)f(the)g(given)g(processing)g
10394
(instruction)f(to)h(this)g(DTD.)g(*\))576 1065 y(method)f(element)h(:)h
10395
(string)f(-)p Fp(>)g Fr(dtd_element)665 1162 y(\(*)h(looks)f(up)g(the)h
10396
(element)e(declaration)g(with)h(the)h(given)f(name.)g(Raises)710
10397
1259 y(*)h(Validation_error)d(if)i(the)h(element)e(can-)396
10398
1356 y(not)i(be)f(found.)g(\(If)g("allow_arbitrary")710
10399
1453 y(*)h(has)f(been)g(invoked)g(before,)g(Undeclared)f(is)h(raised)g
10400
(instead.\))710 1550 y(*\))576 1745 y(method)f(element_names)g(:)i
10401
(string)f(list)665 1842 y(\(*)h(returns)e(the)i(list)f(of)g(the)h
10402
(names)f(of)g(all)h(element)e(declarations.)g(*\))576
10403
2036 y(method)g(gen_entity)h(:)g(string)g(-)p Fp(>)g
10404
Fr(\(Pxp_entity.entity)e(*)j(bool\))665 2133 y(\(*)g(let)f(e,)h
10405
(extdecl)e(=)i(obj)f(#)h(gen_entity)e(n:)710 2230 y(*)i(looks)f(up)g
10406
(the)h(general)e(entity)h('e')g(with)h(the)f(name)g('n'.)g(Raises)710
10407
2327 y(*)h(WF_error)e(if)i(the)f(entity)g(cannot)g(be)g(found.)710
10408
2424 y(*)h('extdecl':)e(indicates)g(whether)h(the)g(entity)g
10409
(declaration)f(occured)h(in)g(an)710 2522 y(*)h(external)e(entity.)710
10410
2619 y(*\))576 2813 y(method)g(gen_entity_names)g(:)h(string)g(list)665
10411
2910 y(\(*)h(returns)e(the)i(list)f(of)g(all)h(general)e(entity)h
10412
(names)g(*\))576 3104 y(method)f(par_entity)h(:)g(string)g(-)p
10413
Fp(>)g Fr(Pxp_entity.entity)665 3202 y(\(*)h(looks)f(up)g(the)h
10414
(parameter)e(entity)h(with)g(the)g(given)g(name.)g(Raises)710
10415
3299 y(*)h(WF_error)e(if)i(the)f(entity)g(cannot)g(be)g(found.)710
10416
3396 y(*\))576 3590 y(method)f(par_entity_names)g(:)h(string)g(list)665
10417
3687 y(\(*)h(returns)e(the)i(list)f(of)g(all)h(parameter)e(entity)h
10418
(names)g(*\))576 3882 y(method)f(notation)h(:)h(string)e(-)p
10419
Fp(>)i Fr(dtd_notation)665 3979 y(\(*)g(looks)f(up)g(the)h(notation)e
10420
(declaration)g(with)h(the)h(given)f(name.)g(Raises)710
10421
4076 y(*)h(Validation_error)d(if)i(the)h(notation)e(can-)396
10422
4173 y(not)i(be)f(found.)g(\(If)g("allow_arbitrary")710
10423
4270 y(*)h(has)f(been)g(invoked)g(before,)g(Unrestricted)e(is)j(raised)
10424
f(instead.\))710 4367 y(*\))576 4561 y(method)f(notation_names)g(:)i
10425
(string)e(list)665 4659 y(\(*)i(Returns)e(the)i(list)f(of)g(the)h
10426
(names)f(of)g(all)h(added)f(notations)f(*\))576 4853
10427
y(method)g(pinstr)h(:)h(string)f(-)p Fp(>)g Fr(proc_instruction)e(list)
10428
p Black 3759 5278 a Fs(119)p Black eop
10430
120 119 bop Black 2348 67 a Fs(Chapter)20 b(4.)g(Con\002guring)e(and)i
10431
(calling)f(the)h(par)o(ser)p Black 665 579 a Fr(\(*)45
10432
b(looks)f(up)g(all)h(processing)e(instructions)g(with)h(the)g(given)g
10433
(target.)710 676 y(*)h(The)f("target")g(is)g(the)g(identifier)g
10434
(following)f(")p Fp(<)p Fr(?".)710 773 y(*)i(Note:)f(It)g(is)h(not)f
10435
(possible)g(to)g(find)g(out)h(the)f(exact)g(position)f(of)i(the)710
10436
870 y(*)g(processing)e(instruction.)710 967 y(*\))576
10437
1162 y(method)g(pinstr_names)g(:)i(string)f(list)665
10438
1259 y(\(*)h(Returns)e(the)i(list)f(of)g(the)h(names)f(\(targets\))f
10439
(of)i(all)f(added)g(pinstrs)f(*\))576 1453 y(method)g(validate)h(:)h
10440
(unit)665 1550 y(\(*)g(ensures)e(that)i(the)f(DTD)g(is)h(valid.)f(This)
10441
g(method)g(is)g(optimized)f(such)h(that)710 1647 y(*)h(actual)f
10442
(validation)f(is)h(only)g(performed)g(if)g(DTD)h(has)f(changed.)710
10443
1745 y(*)h(If)f(the)h(DTD)f(is)g(invalid,)g(mostly)g(a)g
10444
(Validation_error)f(is)h(raised,)710 1842 y(*)h(but)f(other)g
10445
(exceptions)f(are)i(possible,)e(too.)710 1939 y(*\))576
10446
2133 y(method)g(only_deterministic_models)e(:)k(unit)665
10447
2230 y(\(*)g(Succeeds)e(if)i(all)f(regexp)g(content)g(models)f(are)i
10448
(deterministic.)710 2327 y(*)g(Otherwise)e(Validation_error.)710
10449
2424 y(*\))576 2619 y(method)g(write)h(:)h(Pxp_types.output_stream)c(-)
10450
p Fp(>)j Fr(Pxp_types.encoding)e(-)p Fp(>)j Fr(bool)f(-)396
10451
2716 y Fp(>)h Fr(unit)665 2813 y(\(*)g(write)f(os)g(enc)h(doctype:)710
10452
2910 y(*)g(Writes)f(the)g(DTD)g(as)h('enc'-encoded)d(string)i(to)h
10453
('os'.)f(If)g('doctype',)f(a)710 3007 y(*)i(DTD)f(like)g
10454
Fp(<)p Fr(!DOCTYPE)f(root)i([)f(...)h(])p Fp(>)f Fr(is)g(written.)g(If)
10455
g('not)h(doctype',)710 3104 y(*)g(only)f(the)g(declarations)f(are)h
10456
(written)g(\(the)g(material)g(within)g(the)710 3202 y(*)h(square)f
10457
(brackets\).)710 3299 y(*\))576 3493 y(method)f(write_ref)h(:)g
10458
(Pxp_types.output_stream)d(-)p Fp(>)k Fr(Pxp_types.encoding)d(-)p
10459
Fp(>)i Fr(unit)620 3590 y(\(*)h(write_ref)e(os)i(enc:)665
10460
3687 y(*)g(Writes)f(a)g(reference)g(to)g(the)h(DTD)f(as)g
10461
('enc'-encoded)f(string)h(to)g('os'.)665 3784 y(*)h(The)f(reference)g
10462
(looks)g(as)g(follows:)665 3882 y(*)135 b Fp(<)p Fr(!DOCTYPE)43
10463
b(root)h(SYSTEM)g(...)g Fp(>)h Fr(or)665 3979 y(*)135
10464
b Fp(<)p Fr(!DOCTYPE)43 b(root)h(PUBLIC)g(...)g Fp(>)665
10465
4076 y Fr(*)h(Of)f(course,)g(the)g(DTD)h(must)f(have)g(an)h(external)e
10466
(ID:)665 4173 y(*)i(-)g(dtd#id)e(=)i(External\(System)d(...\))j(or)665
10467
4270 y(*)g(-)g(dtd#id)e(=)i(External\(Public)d(...\))665
10468
4367 y(*)j(If)f(the)h(DTD)f(is)h(internal)e(or)i(mixed,)e(the)i(method)
10469
f([write_ref])f(will)h(fail.)665 4464 y(*)h(If)f(the)h(ID)f(is)h
10470
(anonymous)e(or)i(private,)e(the)h(method)g(will)g(fail,)g(too.)665
10471
4561 y(*\))576 4756 y(\(*---------------------------*\))576
10472
4853 y(method)f(invalidate)h(:)g(unit)p Black 3759 5278
10473
a Fs(120)p Black eop
10475
121 120 bop Black 2348 67 a Fs(Chapter)20 b(4.)g(Con\002guring)e(and)i
10476
(calling)f(the)h(par)o(ser)p Black 665 579 a Fr(\(*)45
10477
b(INTERNAL)e(METHOD)h(*\))576 676 y(method)f(warner)h(:)h
10478
(Pxp_types.collect_warnings)665 773 y(\(*)g(INTERNAL)e(METHOD)h(*\))486
10479
870 y(end)396 1259 y(\(*)h(--------------------------------------)o
10480
(------)o(---)39 b(*\))396 1453 y(and)45 b(dtd_element)e(:)h(dtd)h(-)p
10481
Fp(>)f Fr(string)g(-)p Fp(>)486 1550 y Fr(\(*)g(Creation:)531
10482
1647 y(*)134 b(new)44 b(dtd_element)f(init_dtd)h(init_name:)531
10483
1745 y(*)g(creates)g(a)h(new)f(dtd_element)f(object)h(for)g(init_dtd)g
10484
(with)g(init_name.)531 1842 y(*)g(The)h(strings)e(are)i(represented)e
10485
(in)h(the)h(same)f(encoding)f(as)i(init_dtd.)531 1939
10486
y(*\))486 2036 y(object)576 2230 y(method)e(name)i(:)f(string)665
10487
2327 y(\(*)h(returns)e(the)i(name)f(of)g(the)h(declared)e(element)h
10488
(*\))576 2522 y(method)f(externally_declared)f(:)j(bool)665
10489
2619 y(\(*)g(returns)e(whether)h(the)g(element)g(declaration)f(occurs)h
10490
(in)g(an)h(external)710 2716 y(*)g(entity.)710 2813 y(*\))576
10491
3007 y(method)e(content_model)g(:)i(Pxp_types.content_model_type)665
10492
3104 y(\(*)g(get)f(the)g(content)g(model)g(of)h(this)f(element)f
10493
(declaration,)g(or)i(Unspecified)e(*\))576 3299 y(method)g(content_dfa)
10494
g(:)i(Pxp_dfa.dfa_definition)c(option)665 3396 y(\(*)k(return)f(the)g
10495
(DFA)g(of)h(the)f(content)g(model)g(if)g(there)g(is)h(a)f(DFA,)h(or)f
10496
(None.)710 3493 y(*)h(A)f(DFA)h(exists)f(only)g(for)g(regexp)g(style)g
10497
(content)g(models)f(which)h(are)710 3590 y(*)h(deterministic.)710
10498
3687 y(*\))576 3882 y(method)e(set_cm_and_extdecl)f(:)j
10499
(Pxp_types.content_model_type)40 b(-)p Fp(>)k Fr(bool)h(-)p
10500
Fp(>)f Fr(unit)665 3979 y(\(*)h(set_cm_and_extdecl)d(cm)i(extdecl:)710
10501
4076 y(*)h(set)f(the)g(content)g(model)g(to)h('cm'.)f(Once)g(the)g
10502
(content)g(model)g(is)g(not)710 4173 y(*)h(Unspecified,)e(it)h(cannot)g
10503
(be)g(set)h(to)f(a)h(different)e(value)h(again.)710 4270
10504
y(*)h(Furthermore,)e(it)h(is)h(set)f(whether)g(the)g(element)g(occurs)f
10505
(in)i(an)f(external)710 4367 y(*)h(entity)f(\('extdecl'\).)710
10506
4464 y(*\))576 4659 y(method)f(encoding)h(:)h(Pxp_types.rep_encoding)
10507
665 4756 y(\(*)g(Return)f(the)g(encoding)f(of)i(the)f(strings)g(*\))p
10508
Black 3759 5278 a Fs(121)p Black eop
10510
122 121 bop Black 2348 67 a Fs(Chapter)20 b(4.)g(Con\002guring)e(and)i
10511
(calling)f(the)h(par)o(ser)p Black 576 579 a Fr(method)43
10512
b(allow_arbitrary)g(:)h(unit)665 676 y(\(*)h(After)f(this)g(method)g
10513
(has)g(been)g(invoked,)g(the)g(ob-)396 773 y(ject)g(changes)g(its)g
10514
(behaviour:)710 870 y(*)h(-)f(attributes)g(that)g(have)g(not)g(been)g
10515
(added)g(may)h(be)f(used)g(in)h(an)710 967 y(*)134 b(arbitrary)44
10516
b(way;)g(the)g(method)g("attribute")f(indicates)g(this)710
10517
1065 y(*)134 b(by)45 b(raising)f(Undeclared)f(instead)g(of)i
10518
(Validation_error.)710 1162 y(*\))576 1356 y(method)e
10519
(disallow_arbitrary)f(:)j(unit)576 1550 y(method)e(arbitrary_allowed)f
10520
(:)j(bool)665 1647 y(\(*)g(Returns)e(whether)h(arbitrary)f(attributes)h
10521
(are)g(allowed)g(or)g(not.)g(*\))576 1842 y(method)f(attribute)h(:)g
10522
(string)g(-)p Fp(>)1517 1939 y Fr(Pxp_types.att_type)e(*)j
10523
(Pxp_types.att_default)665 2036 y(\(*)g(get)f(the)g(type)h(and)f
10524
(default)g(value)g(of)g(a)h(declared)e(attribute,)g(or)i(raise)710
10525
2133 y(*)g(Validation_error)d(if)i(the)h(attribute)e(does)h(not)h
10526
(exist.)710 2230 y(*)g(If)f('arbitrary_allowed',)e(the)i(exception)f
10527
(Undeclared)h(is)g(raised)g(instead)710 2327 y(*)h(of)f
10528
(Validation_error.)710 2424 y(*\))576 2619 y(method)f
10529
(attribute_violates_standalone_declaration)38 b(:)1069
10530
2716 y(string)44 b(-)p Fp(>)g Fr(string)g(option)g(-)p
10531
Fp(>)g Fr(bool)665 2813 y(\(*)h(attribute_violates_standalone_declarat)
10532
o(ion)39 b(name)44 b(v:)710 2910 y(*)h(Checks)f(whether)f(the)i
10533
(attribute)e('name')h(violates)f(the)i("standalone")710
10534
3007 y(*)g(declaration)e(if)h(it)h(has)f(value)g('v'.)710
10535
3104 y(*)h(The)f(method)g(returns)g(true)g(if:)710 3202
10536
y(*)h(-)f(The)h(attribute)e(declaration)g(occurs)h(in)g(an)h(external)e
10537
(entity,)710 3299 y(*)i(and)f(if)h(one)f(of)g(the)h(two)f(conditions)f
10538
(holds:)710 3396 y(*)i(-)f(v)h(=)g(None,)f(and)g(there)g(is)h(a)f
10539
(default)g(for)g(the)h(attribute)e(value)710 3493 y(*)i(-)f(v)h(=)g
10540
(Some)f(s,)g(and)h(the)f(type)g(of)h(the)f(attribute)f(is)i(not)f
10541
(CDATA,)710 3590 y(*)134 b(and)45 b(s)f(changes)g(if)h(normalized)e
10542
(according)g(to)i(the)f(rules)g(of)g(the)710 3687 y(*)134
10543
b(attribute)44 b(type.)710 3784 y(*)710 3882 y(*)h(The)f(method)g
10544
(raises)g(Validation_error)e(if)i(the)h(attribute)e(does)h(not)g
10545
(exist.)710 3979 y(*)h(If)f('arbitrary_allowed',)e(the)i(exception)f
10546
(Undeclared)h(is)g(raised)g(instead)710 4076 y(*)h(of)f
10547
(Validation_error.)710 4173 y(*\))576 4367 y(method)f(attribute_names)g
10548
(:)h(string)g(list)665 4464 y(\(*)h(get)f(the)g(list)h(of)f(all)g
10549
(declared)g(attributes)f(*\))576 4659 y(method)g
10550
(names_of_required_attributes)e(:)j(string)g(list)665
10551
4756 y(\(*)h(get)f(the)g(list)h(of)f(all)g(attributes)g(that)g(are)g
10552
(specified)f(as)i(required)710 4853 y(*)g(attributes)p
10553
Black 3759 5278 a Fs(122)p Black eop
10555
123 122 bop Black 2348 67 a Fs(Chapter)20 b(4.)g(Con\002guring)e(and)i
10556
(calling)f(the)h(par)o(ser)p Black 710 579 a Fr(*\))576
10557
773 y(method)43 b(id_attribute_name)f(:)j(string)f(option)665
10558
870 y(\(*)h(Returns)e(the)i(name)f(of)g(the)h(attribute)e(with)h(type)g
10559
(ID,)h(or)f(None.)g(*\))576 1065 y(method)f(idref_attribute_names)f(:)i
10560
(string)g(list)665 1162 y(\(*)h(Returns)e(the)i(names)f(of)g(the)h
10561
(attributes)e(with)h(type)g(IDREF)g(or)h(IDREFS.)e(*\))576
10562
1356 y(method)g(add_attribute)g(:)i(string)f(-)p Fp(>)1607
10563
1453 y Fr(Pxp_types.att_type)e(-)p Fp(>)531 1550 y Fr
10564
(Pxp_types.att_default)f(-)p Fp(>)531 1647 y Fr(bool)j(-)p
10565
Fp(>)620 1745 y Fr(unit)665 1842 y(\(*)h(add_attribute)d(name)j(type)f
10566
(default)f(extdecl:)710 1939 y(*)i(add)f(an)h(attribute)e(declaration)g
10567
(for)h(an)h(attribute)e(with)h(the)h(given)e(name,)710
10568
2036 y(*)i(type,)f(and)g(default)g(value.)g(If)g(there)g(is)h(more)f
10569
(than)g(one)g(declaration)f(for)710 2133 y(*)i(an)f(attribute)g(name,)g
10570
(the)g(first)g(declara-)396 2230 y(tion)g(counts;)g(the)g(other)g
10571
(declarations)710 2327 y(*)h(are)f(ignored.)710 2424
10572
y(*)h('extdecl':)e(if)h(true,)g(the)h(attribute)e(declaration)g(occurs)
10573
h(in)g(an)h(external)710 2522 y(*)g(entity.)e(This)i(property)e(is)i
10574
(used)f(to)g(check)g(the)h("standalone")d(attribute.)710
10575
2619 y(*\))576 2813 y(method)h(validate)h(:)h(unit)665
10576
2910 y(\(*)g(checks)f(whether)f(this)h(element)g(declaration)f(\(i.e.)h
10577
(the)g(content)g(model)g(and)710 3007 y(*)h(all)f(attribute)f
10578
(declarations\))g(is)i(valid)f(for)g(the)g(associated)f(DTD.)710
10579
3104 y(*)i(Raises)f(mostly)f(Validation_error)g(if)h(the)g(validation)g
10580
(fails.)710 3202 y(*\))576 3396 y(method)f(write)h(:)h
10581
(Pxp_types.output_stream)c(-)p Fp(>)j Fr(Pxp_types.encoding)e(-)p
10582
Fp(>)j Fr(unit)665 3493 y(\(*)g(write)f(os)g(enc:)710
10583
3590 y(*)h(Writes)f(the)g Fp(<)p Fr(!ELEMENT)f(...)h
10584
Fp(>)h Fr(declaration)e(to)h('os')h(as)f('enc'-)396 3687
10585
y(encoded)g(string.)710 3784 y(*\))576 3979 y(method)f(internal_vr)g(:)
10586
i(validation_record)665 4076 y(\(*)g(INTERNAL)e(METHOD:)h(Returns)g
10587
(the)g(validation)f(record)h(for)g(this)g(ele-)396 4173
10588
y(ment)g(type.)710 4270 y(*\))486 4367 y(end)396 4561
10589
y(\(*)h(--------------------------------------)o(------)o(---)39
10590
b(*\))396 4756 y(and)45 b(dtd_notation)d(:)j(string)f(-)p
10591
Fp(>)g Fr(Pxp_types.ext_id)e(-)p Fp(>)j Fr(Pxp_types.rep_encoding)c(-)p
10592
Fp(>)486 4853 y Fr(\(*)j(Creation:)p Black 3759 5278
10593
a Fs(123)p Black eop
10595
124 123 bop Black 2348 67 a Fs(Chapter)20 b(4.)g(Con\002guring)e(and)i
10596
(calling)f(the)h(par)o(ser)p Black 531 579 a Fr(*)179
10597
b(new)44 b(dtd_notation)f(a_name)h(an_external_ID)e(init_encoding)531
10598
676 y(*)i(creates)g(a)h(new)f(dtd_notation)f(object)h(with)g(the)g
10599
(given)g(name)g(and)h(the)f(given)531 773 y(*)g(external)g(ID.)531
10600
870 y(*\))486 967 y(object)576 1065 y(method)f(name)i(:)f(string)576
10601
1162 y(method)f(ext_id)h(:)h(Pxp_types.ext_id)576 1259
10602
y(method)e(encoding)h(:)h(Pxp_types.rep_encoding)576
10603
1453 y(method)e(write)h(:)h(Pxp_types.output_stream)c(-)p
10604
Fp(>)j Fr(Pxp_types.encoding)e(-)p Fp(>)j Fr(unit)665
10605
1550 y(\(*)g(write_compact_as_latin1)c(os)j(enc:)710
10606
1647 y(*)h(Writes)f(the)g Fp(<)p Fr(!NOTATION)f(...)h
10607
Fp(>)h Fr(declaration)e(to)h('os')g(as)h('enc'-encoded)710
10608
1745 y(*)g(string.)710 1842 y(*\))486 2036 y(end)396
10609
2230 y(\(*)g(--------------------------------------)o(------)o(---)39
10610
b(*\))396 2424 y(and)45 b(proc_instruction)d(:)i(string)g(-)p
10611
Fp(>)h Fr(string)e(-)p Fp(>)i Fr(Pxp_types.rep_encoding)c(-)p
10612
Fp(>)486 2522 y Fr(\(*)j(Creation:)531 2619 y(*)134 b(new)44
10613
b(proc_instruction)f(a_target)g(a_value)531 2716 y(*)h(creates)g(a)h
10614
(new)f(proc_instruction)e(object)i(with)g(the)h(given)f(target)f
10615
(string)h(and)531 2813 y(*)g(the)h(given)f(value)g(string.)531
10616
2910 y(*)g(Note:)g(A)h(processing)e(instruction)g(is)i(written)e(as)i
10617
Fp(<)p Fr(?target)e(value?)p Fp(>)p Fr(.)531 3007 y(*\))486
10618
3104 y(object)576 3202 y(method)g(target)h(:)h(string)576
10619
3299 y(method)e(value)h(:)h(string)576 3396 y(method)e(encoding)h(:)h
10620
(Pxp_types.rep_encoding)576 3590 y(method)e(write)h(:)h
10621
(Pxp_types.output_stream)c(-)p Fp(>)j Fr(Pxp_types.encoding)e(-)p
10622
Fp(>)j Fr(unit)665 3687 y(\(*)g(write)f(os)g(enc:)710
10623
3784 y(*)h(Writes)f(the)g Fp(<)p Fr(?...?)p Fp(>)f Fr(PI)i(to)f('os')h
10624
(as)f('enc'-encoded)f(string.)710 3882 y(*\))576 4076
10625
y(method)g(parse_pxp_option)g(:)h(\(string)g(*)h(string)e(*)i(\(string)
10626
f(*)g(string\))g(list\))665 4173 y(\(*)h(Parses)f(a)g(PI)h(containing)e
10627
(a)i(PXP)f(option.)g(Such)g(PIs)g(are)g(formed)g(like:)710
10628
4270 y(*)134 b Fp(<)p Fr(?target)44 b(option-name)f(option-att="value")
10629
f(option-att="value")f(...)k(?)p Fp(>)710 4367 y Fr(*)g(The)f(method)g
10630
(returns)g(a)g(triple)710 4464 y(*)134 b(\(target,)44
10631
b(option-name,)f([option-att,)g(value;)g(...]\))710 4561
10632
y(*)i(or)f(raises)g(Error.)710 4659 y(*\))486 4853 y(end)p
10633
Black 3759 5278 a Fs(124)p Black eop
10635
125 124 bop Black 2348 67 a Fs(Chapter)20 b(4.)g(Con\002guring)e(and)i
10636
(calling)f(the)h(par)o(ser)p Black 396 676 a Fr(;;)-2
10637
1178 y Fy(4.4.)39 b(In)-6 b(v)l(oking)38 b(the)h(par)n(ser)396
10638
1357 y Fw(Here)20 b(a)h(description)e(of)h(Pxp_yacc.)-2
10639
1685 y Fq(4.4.1.)35 b(Defaults)396 1853 y Fw(The)20 b(follo)n(wing)f
10640
(def)o(aults)g(are)i(a)n(v)n(ailable:)396 2033 y Fr(val)45
10641
b(default_config)d(:)j(config)396 2130 y(val)g
10642
(default_namespace_config)40 b(:)45 b(config)396 2228
10643
y(val)g(default_extension)d(:)i(\('a)h(node)f(extension\))f(as)h('a)396
10644
2325 y(val)h(default_spec)d(:)j(\('a)f(node)h(extension)e(as)h('a\))h
10645
(spec)396 2422 y(val)g(default_namespace_spec)c(:)j(\('a)h(node)f
10646
(extension)f(as)i('a\))f(spec)-2 2875 y Fq(4.4.2.)35
10647
b(P)l(ar)n(sing)f(functions)396 3042 y Fw(In)20 b(the)g(follo)n(wing,)f
10648
(the)h(term)g("closed)g(document")e(refers)h(to)i(an)f(XML)g(structure)
10649
f(lik)o(e)396 3222 y Fp(<)p Fr(!DOCTYPE)43 b(...)i([)f
10650
Fo(declarations)f Fr(])i Fp(>)396 3320 y(<)p Fo(root)p
10651
Fp(>)396 3417 y Fr(...)396 3514 y Fp(<)p Fr(/)p Fo(root)p
10652
Fp(>)396 3705 y Fw(The)20 b(term)g("fragment")e(refers)i(to)g(an)g(XML)
10653
h(structure)e(lik)o(e)396 3885 y Fp(<)p Fo(root)p Fp(>)396
10654
3982 y Fr(...)396 4079 y Fp(<)p Fr(/)p Fo(root)p Fp(>)396
10655
4270 y Fw(i.e.)h(only)g(to)g(one)g(isolated)g(element)f(instance.)396
10656
4492 y Fr(val)45 b(parse_dtd_entity)d(:)i(config)g(->)h(source)f(->)g
10657
(dtd)396 4683 y Fw(P)o(arses)21 b(the)f(declarations)f(which)h(are)g
10658
(contained)e(in)j(the)f(entity)-5 b(,)19 b(and)h(returns)f(them)h(as)h
10659
Fr(dtd)f Fw(object.)p Black 3759 5278 a Fs(125)p Black
10662
126 125 bop Black 2348 67 a Fs(Chapter)20 b(4.)g(Con\002guring)e(and)i
10663
(calling)f(the)h(par)o(ser)p Black 396 579 a Fr(val)45
10664
b(extract_dtd_from_document_entity)39 b(:)45 b(config)f(->)g(source)g
10665
(->)g(dtd)396 770 y Fw(Extracts)20 b(the)g(DTD)h(from)e(a)h(closed)g
10666
(document.)e(Both)i(the)h(internal)e(and)h(the)g(e)o(xternal)f(subsets)
10667
h(are)h(e)o(xtracted)d(and)396 878 y(combined)g(to)i(one)f
10668
Fr(dtd)h Fw(object.)f(This)h(function)e(does)h(not)h(parse)f(the)h
10669
(whole)f(document,)f(b)n(ut)i(only)e(the)i(parts)g(that)g(are)396
10670
986 y(necessary)g(to)g(e)o(xtract)f(the)i(DTD.)396 1207
10671
y Fr(val)45 b(parse_document_entity)c(:)576 1305 y
10672
(?transform_dtd:\(dtd)g(->)k(dtd\))f(->)576 1402 y(?id_index:\('ext)e
10673
(index\))i(->)576 1499 y(config)f(->)576 1596 y(source)g(->)576
10674
1693 y('ext)h(spec)g(->)755 1790 y('ext)g(document)396
10675
1981 y Fw(P)o(arses)21 b(a)g(closed)e(document)g(and)g(v)n(alidates)h
10676
(it)h(against)e(the)i(DTD)f(that)g(is)h(contained)e(in)h(the)h
10677
(document)d(\(internal)396 2089 y(and)i(e)o(xternal)f(subsets\).)h(The)
10678
g(option)f Fr(~transform_dtd)f Fw(can)i(be)g(used)g(to)g(transform)f
10679
(the)h(DTD)h(in)f(the)g(document,)396 2197 y(and)g(to)g(use)h(the)f
10680
(transformed)e(DTD)i(for)g(v)n(alidation.)e(If)i Fr(~id_index)g
10681
Fw(is)h(speci\002ed,)e(an)h(inde)o(x)f(of)h(all)h(ID)f(attrib)n(utes)h
10682
(is)396 2305 y(created.)396 2527 y Fr(val)45 b(parse_wfdocument_entity)
10683
c(:)576 2624 y(config)i(->)576 2721 y(source)g(->)576
10684
2818 y('ext)h(spec)g(->)755 2915 y('ext)g(document)396
10685
3106 y Fw(P)o(arses)21 b(a)g(closed)e(document,)f(b)n(ut)j(checks)e(it)
10686
i(only)e(on)h(well-formedness.)396 3328 y Fr(val)45 b
10687
(parse_content_entity)86 b(:)576 3425 y(?id_index:\('ext)42
10688
b(index\))i(->)576 3522 y(config)f(->)576 3619 y(source)g(->)576
10689
3716 y(dtd)h(->)576 3813 y('ext)g(spec)g(->)755 3911
10690
y('ext)g(node)396 4102 y Fw(P)o(arses)21 b(a)g(fragment,)d(and)h(v)n
10691
(alidates)h(the)g(element.)396 4323 y Fr(val)45 b
10692
(parse_wfcontent_entity)c(:)576 4420 y(config)i(->)576
10693
4517 y(source)g(->)576 4615 y('ext)h(spec)g(->)755 4712
10694
y('ext)g(node)p Black 3757 5278 a Fs(126)p Black eop
10696
127 126 bop Black 2348 67 a Fs(Chapter)20 b(4.)g(Con\002guring)e(and)i
10697
(calling)f(the)h(par)o(ser)p Black 396 579 a Fw(P)o(arses)h(a)g
10698
(fragment,)d(b)n(ut)i(checks)g(it)g(only)g(on)g(well-formedness.)-2
10699
949 y Fq(4.4.3.)35 b(Con\002guration)f(options)396 1188
10700
y Fr(type)44 b(config)g(=)576 1286 y({)g(warner)g(:)h
10701
(collect_warnings;)665 1383 y(enable_pinstr_nodes)d(:)j(bool;)665
10702
1480 y(enable_super_root_node)c(:)k(bool;)665 1577 y
10703
(enable_comment_nodes)d(:)i(bool;)665 1674 y(drop_ignorable_whitespace)
10704
d(:)k(bool;)665 1771 y(encoding)f(:)g(rep_encoding;)665
10705
1868 y(recognize_standalone_declaration)c(:)k(bool;)665
10706
1966 y(store_element_positions)d(:)k(bool;)665 2063 y(idref_pass)e(:)i
10707
(bool;)665 2160 y(validate_by_dfa)e(:)h(bool;)665 2257
10708
y(accept_only_deterministic_models)c(:)k(bool;)665 2354
10709
y(enable_namespace_processing)d(:)j(Pxp_dtd.namespace_manager)d
10710
(option;)665 2451 y(...)576 2548 y(})p Black 396 2905
10711
a Fu(\225)p Black 60 w Fr(warner:)p Fw(The)19 b(parser)h(prints)f(w)o
10712
(arnings)h(by)f(in)m(v)n(oking)f(the)j(method)d Fr(warn)j
10713
Fw(for)e(this)i(w)o(arner)e(object.)h(\(Def)o(ault:)f(all)479
10714
3013 y(w)o(arnings)h(are)g(dropped\))p Black 396 3121
10715
a Fu(\225)p Black 60 w Fr(enable_pinstr_nodes:)p Fw(If)d(true,)j(the)g
10716
(parser)f(creates)i(e)o(xtra)e(nodes)g(for)h(processing)f
10717
(instructions.)g(If)h(f)o(alse,)479 3229 y(processing)f(instructions)g
10718
(are)h(simply)g(added)f(to)i(the)f(element)f(or)h(document)f
10719
(surrounding)e(the)j(instructions.)479 3337 y(\(Def)o(ault:)g(f)o
10720
(alse\))p Black 396 3445 a Fu(\225)p Black 60 w Fr
10721
(enable_super_root_node:)p Fw(If)c(true,)k(the)g(parser)g(creates)g(an)
10722
g(e)o(xtra)g(node)f(which)g(is)j(the)e(parent)f(of)h(the)g(root)479
10723
3553 y(of)g(the)g(document)f(tree.)h(This)g(node)f(is)i(called)f(super)
10724
g(root;)f(it)i(is)g(an)g(element)e(with)i(type)e Fr(T_super_root)p
10725
Fw(.)g(-)h(If)479 3661 y(there)g(are)g(processing)f(instructions)g
10726
(outside)h(the)g(root)f(element)h(and)g(outside)f(the)i(DTD,)f(the)o(y)
10727
f(are)h(added)f(to)i(the)479 3769 y(super)f(root)f(instead)h(of)g(the)g
10728
(document.)e(-)j(If)f(f)o(alse,)g(the)g(super)g(root)g(node)f(is)i(not)
10729
f(created.)f(\(Def)o(ault:)h(f)o(alse\))p Black 396 3877
10730
a Fu(\225)p Black 60 w Fr(enable_comment_nodes:)p Fw(If)d(true,)i(the)i
10731
(parser)e(creates)h(nodes)g(for)f(comments)g(with)i(type)f
10732
Fr(T_comment)p Fw(;)f(if)479 3985 y(f)o(alse,)i(such)f(nodes)f(are)h
10733
(not)g(created.)f(\(Def)o(ault:)h(f)o(alse\))p Black
10734
396 4093 a Fu(\225)p Black 60 w Fr(drop_ignorable_whitespace:)d
10735
Fw(Speci\002es)j(to)h(drop)d(whitespace)i(occuring)e(in)j(elements)f
10736
(that)g(are)479 4200 y(declared)f(not)h(to)g(contain)g(characters.)f
10737
(\(Def)o(ault:)g(true\))p Black 396 4308 a Fu(\225)p
10738
Black 60 w Fr(encoding:)p Fw(Speci\002es)g(the)i(internal)e(encoding)f
10739
(of)i(the)g(parser)-5 b(.)20 b(Most)g(strings)h(are)f(then)f
10740
(represented)g(according)479 4416 y(to)i(this)f(encoding;)f(ho)n(we)n
10741
(v)o(er)f(there)h(are)i(some)f(e)o(xceptions)e(\(especially)i
10742
Fr(ext_id)f Fw(v)n(alues)h(which)g(are)g(al)o(w)o(ays)479
10743
4524 y(UTF-8)g(encoded\).)e(\(Def)o(ault:)h(`Enc_iso88591\))p
10744
Black 396 4632 a Fu(\225)p Black 60 w Fr
10745
(recognize_standalone_declaration:)c Fw(If)21 b(true)e(and)h(if)h(the)f
10746
(parser)f(is)i(v)n(alidating,)e(the)479 4740 y Fr(standalone="yes")f
10747
Fw(declaration)h(forces)h(that)g(it)h(is)g(check)o(ed)e(whether)g(the)h
10748
(document)e(is)j(a)g(standalone)p Black 3756 5278 a Fs(127)p
10751
128 127 bop Black 2348 67 a Fs(Chapter)20 b(4.)g(Con\002guring)e(and)i
10752
(calling)f(the)h(par)o(ser)p Black 479 579 a Fw(document.)e(-)j(If)f(f)
10753
o(alse,)g(or)g(if)g(the)h(parser)e(is)i(in)g(well-formedness)d(mode,)h
10754
(such)h(declarations)f(are)h(ignored.)479 687 y(\(Def)o(ault:)g(true\))
10755
p Black 396 795 a Fu(\225)p Black 60 w Fr(store_element_positions:)d
10756
Fw(If)j(true,)g(for)f(e)n(v)o(ery)g(non-data)f(node)h(the)i(source)e
10757
(position)g(is)j(stored.)d(If)h(f)o(alse,)479 903 y(the)g(position)g
10758
(information)e(is)j(lost.)f(If)g(a)n(v)n(ailable,)g(you)f(can)h(get)g
10759
(the)g(positions)g(of)g(nodes)f(by)h(in)m(v)n(oking)e(the)479
10760
1011 y Fr(position)i Fw(method.)e(\(Def)o(ault:)i(true\))p
10761
Black 396 1119 a Fu(\225)p Black 60 w Fr(idref_pass:)p
10762
Fw(If)e(true)i(and)g(if)g(there)g(is)h(an)f(ID)h(inde)o(x,)e(the)h
10763
(parser)f(checks)h(whether)f(e)n(v)o(ery)g(IDREF)i(or)e(IDREFS)479
10764
1226 y(attrib)n(ute)h(refer)g(to)g(an)g(e)o(xisting)f(node;)h(this)g
10765
(requires)g(that)g(the)g(parser)g(tra)n(v)o(erses)g(the)g(whole)f
10766
(doument)g(tree.)h(If)479 1334 y(f)o(alse,)h(this)f(check)g(is)h(left)f
10767
(out.)g(\(Def)o(ault:)g(f)o(alse\))p Black 396 1442 a
10768
Fu(\225)p Black 60 w Fr(validate_by_dfa:)p Fw(If)e(true)h(and)h(if)h
10769
(the)f(content)f(model)g(for)h(an)g(element)g(type)f(is)i
10770
(deterministic,)e(a)479 1550 y(deterministic)h(\002nite)g(automaton)e
10771
(is)j(used)f(to)h(v)n(alidate)e(whether)g(the)i(element)e(contents)h
10772
(match)f(the)i(content)479 1658 y(model)e(of)h(the)g(type.)g(If)g(f)o
10773
(alse,)g(or)g(if)g(a)g(DF)-6 b(A)21 b(is)g(not)f(a)n(v)n(ailable,)f(a)h
10774
(backtracking)e(algorithm)g(is)j(used)f(for)f(v)n(alidation.)479
10775
1766 y(\(Def)o(ault:)h(true\))p Black 396 1874 a Fu(\225)p
10776
Black 60 w Fr(accept_only_deterministic_models:)15 b
10777
Fw(If)21 b(true,)e(only)h(deterministic)f(content)g(models)h(are)g
10778
(accepted;)f(if)479 1982 y(f)o(alse,)i(an)o(y)e(syntactically)h
10779
(correct)f(content)g(models)h(can)g(be)g(processed.)f(\(Def)o(ault:)g
10780
(true\))p Black 396 2090 a Fu(\225)p Black 60 w Fr
10781
(enable_namespace_processing:)d Fw(By)21 b(setting)f(this)h(to)f
10782
Fr(Some)44 b(\(new)h(namespace_manager\))479 2198 y Fw(namespace)19
10783
b(processing)g(is)i(enabled.)e(The)h(DTD)g(will)h(be)f(initialized)g
10784
(with)g(the)h(passed)f(namespace)f(manager)-5 b(.)479
10785
2306 y(\(Def)o(ault:)20 b Fr(None)g Fw(for)g Fr(default_config)p
10786
Fw(,)e Fr(Some)44 b(m)20 b Fw(for)g Fr(default_namespace_config)p
10787
Fw(\))-2 2717 y Fq(4.4.4.)35 b(Whic)o(h)f(con\002guration)g(should)g(I)
10788
f(use?)396 2885 y Fw(First,)21 b(I)f(recommend)e(to)i(v)n(ary)g(the)g
10789
(def)o(ault)f(con\002guration)f(instead)i(of)g(creating)f(a)i(ne)n(w)f
10790
(con\002guration)d(record.)i(F)o(or)396 2993 y(instance,)h(to)g(set)h
10791
Fr(idref_pass)e Fw(to)i Fr(true)p Fw(,)e(change)g(the)i(def)o(ault)e
10792
(as)i(in:)396 3173 y Fr(let)45 b(config)e(=)i({)g(default_config)d
10793
(with)i(idref_pass)g(=)g(true)g(})396 3364 y Fw(The)20
10794
b(background)d(is)k(that)f(I)h(can)f(add)f(more)h(options)f(to)h(the)g
10795
(record)f(in)i(future)e(v)o(ersions)g(of)h(the)g(parser)f(without)396
10796
3472 y(breaking)g(your)f(programs.)396 3621 y(T)-7 b(o)21
10797
b(start)f(with)h(namespace)e(processing,)f(use)j Fr
10798
(default_namespace_config)16 b Fw(and)396 3729 y Fr
10799
(default_namespace_spec)p Fw(.)396 3878 y Fv(Do)k(I)i(need)e(extra)f
10800
(nodes)i(f)n(or)f(pr)o(ocessing)g(instructions?)g Fw(By)g(def)o(ault,)g
10801
(such)g(nodes)f(are)h(not)g(created.)f(This)i(does)396
10802
3986 y(not)f(mean)g(that)g(the)g(processing)f(instructions)g(are)h
10803
(lost;)h(ho)n(we)n(v)o(er)m(,)d(you)h(cannot)g(\002nd)h(out)g(the)g(e)o
10804
(xact)g(location)f(where)396 4094 y(the)o(y)h(occur)-5
10805
b(.)19 b(F)o(or)h(e)o(xample,)e(the)j(follo)n(wing)d(XML)i(te)o(xt)396
10806
4274 y Fr(<x><?pi1?><y/><?pi2?></x>)396 4465 y Fw(will)h(normally)e
10807
(create)h(one)f(element)h(node)f(for)h Fr(x)g Fw(containing)e
10808
Fs(one)i Fw(subnode)f(for)g Fr(y)p Fw(.)h(The)g(processing)f
10809
(instructions)396 4573 y(are)h(attached)g(to)g Fr(x)h
10810
Fw(in)f(a)h(separate)e(hash)h(table;)h(you)e(can)h(access)h(them)e
10811
(using)h Fr(x)45 b(#)f(pinstr)g("pi1")20 b Fw(and)g Fr(x)44
10812
b(#)396 4681 y(pinstr)g("pi2")p Fw(,)20 b(respecti)n(v)o(ely)-5
10813
b(.)18 b(The)i(information)d(is)k(lost)g(where)f(the)g(instructions)f
10814
(occur)g(within)h Fr(x)p Fw(.)p Black 3759 5278 a Fs(128)p
10817
129 128 bop Black 2348 67 a Fs(Chapter)20 b(4.)g(Con\002guring)e(and)i
10818
(calling)f(the)h(par)o(ser)p Black 396 579 a Fw(If)g(the)h(option)d
10819
Fr(enable_pinstr_nodes)g Fw(is)j(turned)e(on,)h(the)g(parser)f(creates)
10820
i(e)o(xtra)e(nodes)g Fr(pi1)i Fw(and)e Fr(pi2)i Fw(such)f(that)396
10821
687 y(the)g(subnodes)f(of)h Fr(x)h Fw(are)f(no)n(w:)396
10822
867 y Fr(x)45 b(#)g(sub_nodes)e(=)i([)f(pi1;)g(y;)h(pi2)f(])396
10823
1058 y Fw(The)20 b(e)o(xtra)g(nodes)f(contain)g(the)h(processing)f
10824
(instructions)g(in)i(the)f(usual)g(w)o(ay)-5 b(,)20 b(i.e.)g(you)f(can)
10825
h(access)h(them)f(using)f Fr(pi1)396 1166 y(#)45 b(pinstr)f("pi1")20
10826
b Fw(and)f Fr(pi2)45 b(#)f(pinstr)g("pi2")p Fw(,)20 b(respecti)n(v)o
10827
(ely)-5 b(.)396 1315 y(Note)20 b(that)h(you)e(will)i(need)e(an)i(e)o(x)
10828
o(emplar)d(for)h(the)i(PI)f(nodes)g(\(see)g Fr(make_spec_from_alist)p
10829
Fw(\).)396 1465 y Fv(Do)g(I)i(need)e(a)h(super)g(r)o(oot)d(node?)i
10830
Fw(By)h(def)o(ault,)e(there)h(is)h(no)f(super)f(root)h(node.)f(The)h
10831
Fr(document)f Fw(object)h(refers)396 1573 y(directly)g(to)g(the)g(node)
10832
f(representing)f(the)j(root)e(element)h(of)g(the)g(document,)e(i.e.)396
10833
1753 y Fr(doc)45 b(#)f(root)g(=)h(r)396 1944 y Fw(if)21
10834
b Fr(r)f Fw(is)h(the)g(root)e(node.)g(This)h(is)i(sometimes)d(incon)m
10835
(v)o(enient:)f(\(1\))h(Some)h(algorithms)f(become)g(simpler)h(if)g(e)n
10836
(v)o(ery)f(node)396 2052 y(has)i(a)f(parent,)f(e)n(v)o(en)g(the)i(root)
10837
e(node.)g(\(2\))h(Some)g(standards)f(such)h(as)h(XP)o(ath)f(call)g(the)
10838
h("root)e(node")g(the)h(node)f(whose)396 2160 y(child)h(represents)f
10839
(the)i(root)e(of)h(the)g(document.)e(\(3\))i(The)g(super)f(root)h(node)
10840
f(can)h(serv)o(e)f(as)i(a)g(container)e(for)g(processing)396
10841
2268 y(instructions)g(outside)h(the)g(root)g(element.)f(Because)i(of)e
10842
(these)i(reasons,)e(it)i(is)g(possible)f(to)h(create)f(an)g(e)o(xtra)f
10843
(super)h(root)396 2376 y(node,)f(whose)h(child)g(is)h(the)f(root)g
10844
(node:)396 2556 y Fr(doc)45 b(#)f(root)g(=)h(sr)403 b(&&)396
10845
2653 y(sr)45 b(#)f(sub_nodes)g(=)g([)h(r)g(])396 2844
10846
y Fw(When)20 b(e)o(xtra)g(nodes)f(are)h(also)h(created)e(for)h
10847
(processing)f(instructions,)g(these)h(nodes)f(can)h(be)h(added)e(to)h
10848
(the)g(super)g(root)396 2952 y(node)f(if)h(the)o(y)e(occur)h(outside)g
10849
(the)g(root)g(element)g(\(reason)f(\(3\)\),)h(and)g(the)g(order)g
10850
(re\003ects)g(the)h(order)e(in)i(the)f(source)g(te)o(xt.)396
10851
3101 y(Note)h(that)h(you)e(will)i(need)e(an)i(e)o(x)o(emplar)d(for)h
10852
(the)i(super)e(root)h(node)f(\(see)h Fr(make_spec_from_alist)p
10853
Fw(\).)396 3251 y Fv(What)g(is)h(the)g(effect)e(of)h(the)h(UTF-8)e
10854
(encoding?)h Fw(By)h(def)o(ault,)e(the)h(parser)g(represents)f(strings)
10855
h(\(with)g(fe)n(w)396 3358 y(e)o(xceptions\))e(as)j(ISO-8859-1)c
10856
(strings.)i(These)h(are)g(well-kno)n(wn,)d(and)j(there)f(are)h(tools)g
10857
(and)f(fonts)g(for)h(this)g(encoding.)396 3508 y(Ho)n(we)n(v)o(er)m(,)e
10858
(internationalization)g(may)h(require)g(that)i(you)e(switch)h(o)o(v)o
10859
(er)f(to)i(UTF-8)e(encoding.)f(In)i(most)396 3616 y(en)m(vironments,)d
10860
(the)k(immediate)e(ef)n(fect)h(will)g(be)h(that)f(you)f(cannot)g(read)h
10861
(strings)g(with)g(character)f(codes)h(>=)h(160)e(an)o(y)396
10862
3724 y(longer;)g(your)g(terminal)h(will)h(only)e(sho)n(w)h(funn)o(y)e
10863
(glyph)h(combinations.)f(It)i(is)h(strongly)e(recommended)e(to)k
10864
(install)396 3832 y(Unicode)e(fonts)h(\(GNU)g(Unifont)f
10865
(\(http://czyborra.com/unifon)o(t/\),)c(Markus)k(K)o(uhn')-5
10866
b(s)19 b(fonts)396 3940 y(\(http://www)-5 b(.cl.cam.ac.uk/~mgk25)o(/do)
10867
m(wnlo)o(ad/u)o(cs-fo)o(nts.tar)g(.g)o(z\)\))14 b(and)20
10868
b(terminal)f(emulators)h(that)g(can)g(handle)396 4048
10869
y(UTF-8)g(byte)g(sequences)f(\(http://myweb)m(.clark.net/pub/d)o(ick)o
10870
(e)o(y)o(/xter)o(m/x)o(term.)o(html\))o(.)c(Furthermore,)i(a)k(Unicode)
10871
396 4156 y(editor)f(may)f(be)i(helpful)e(\(such)g(as)i(Y)-9
10872
b(udit)20 b(\(ftp://metalab)m(.unc.edu/pub)o(/Linu)o(x/ap)o(ps/ed)o
10873
(itors/X/\)\))o(.)15 b(There)k(are)h(also)396 4263 y(F)-6
10874
b(A)h(Q)21 b(\(http://www)-5 b(.cl.cam.ac.uk/~mgk25)o(/unico)o(de)o
10875
(.htm)o(l\))15 b(by)20 b(Markus)f(K)o(uhn.)396 4413 y(By)i(setting)f
10876
Fr(encoding)f Fw(to)i Fr(`Enc_utf8)e Fw(all)i(strings)f(originating)e
10877
(from)h(the)i(parsed)e(XML)h(document)e(are)396 4521
10878
y(represented)h(as)i(UTF-8)e(strings.)h(This)h(includes)e(not)h(only)f
10879
(character)g(data)h(and)g(attrib)n(ute)g(v)n(alues)g(b)n(ut)g(also)g
10880
(element)396 4629 y(names,)g(attrib)n(ute)g(names)g(and)f(so)i(on,)e
10881
(as)i(it)g(is)g(possible)f(to)h(use)f(an)o(y)f(Unicode)g(letter)i(to)f
10882
(form)f(such)h(names.)g(Strictly)396 4737 y(speaking,)f(PXP)i(is)g
10883
(only)e(XML-compliant)f(if)j(the)f(UTF-8)g(mode)f(is)i(used;)f
10884
(otherwise)g(it)h(will)g(ha)n(v)o(e)e(dif)n(\002culties)396
10885
4845 y(when)h(v)n(alidating)f(documents)f(containing)g
10886
(non-ISO-8859-1-names.)p Black 3759 5278 a Fs(129)p Black
10889
130 129 bop Black 2348 67 a Fs(Chapter)20 b(4.)g(Con\002guring)e(and)i
10890
(calling)f(the)h(par)o(ser)p Black 396 579 a Fw(This)h(mode)e(does)h
10891
(not)g(ha)n(v)o(e)f(an)o(y)h(impact)f(on)h(the)g(e)o(xternal)f
10892
(representation)f(of)i(documents.)f(The)g(character)g(set)396
10893
687 y(assumed)h(when)g(reading)e(a)j(document)d(is)j(set)g(in)g(the)f
10894
(XML)g(declaration,)e(and)i(character)f(set)i(when)e(writing)h(a)396
10895
795 y(document)e(must)j(be)f(passed)g(to)g(the)g Fr(write)g
10896
Fw(method.)396 944 y Fv(Ho)o(w)g(do)h(I)g(check)f(that)g(nodes)h(exist)
10897
f(which)h(ar)o(e)e(r)o(eferr)o(ed)g(by)i(IDREF)g(attrib)n(utes?)e
10898
Fw(First,)i(you)e(must)h(create)g(an)396 1052 y(inde)o(x)f(of)h(all)h
10899
(occurring)d(ID)i(attrib)n(utes:)396 1232 y Fr(let)45
10900
b(index)f(=)g(new)h(hash_index)396 1423 y Fw(This)21
10901
b(inde)o(x)e(must)h(be)g(passed)g(to)g(the)h(parsing)e(function:)396
10902
1603 y Fr(parse_document_entity)486 1701 y(~id_index:\(index)42
10903
b(:>)j(index\))486 1798 y(config)f(source)g(spec)396
10904
1989 y Fw(Ne)o(xt,)20 b(you)f(must)h(turn)g(on)g(the)g
10905
Fr(idref_pass)f Fw(mode:)396 2169 y Fr(let)45 b(config)e(=)i({)g
10906
(default_config)d(with)i(idref_pass)g(=)g(true)g(})396
10907
2360 y Fw(Note)20 b(that)h(no)n(w)e(the)i(whole)e(document)f(tree)j
10908
(will)g(be)f(tra)n(v)o(ersed,)f(and)g(e)n(v)o(ery)g(node)g(will)i(be)f
10909
(check)o(ed)f(for)h(IDREF)g(and)396 2468 y(IDREFS)h(attrib)n(utes.)f
10910
(If)g(the)g(tree)g(is)h(big,)f(this)h(may)f(tak)o(e)g(some)g(time.)396
10911
2617 y Fv(What)g(ar)o(e)g(deterministic)g(content)g(models?)g
10912
Fw(These)g(type)g(of)g(models)g(can)g(speed)f(up)h(the)g(v)n(alidation)
10913
f(checks;)396 2725 y(furthermore)f(the)o(y)h(ensure)g
10914
(SGML-compatibility)-5 b(.)18 b(In)i(particular)m(,)e(a)j(content)e
10915
(model)g(is)i(deterministic)e(if)i(the)f(parser)396 2833
10916
y(can)g(determine)f(the)h(actually)g(used)g(alternati)n(v)o(e)f(by)g
10917
(inspecting)g(only)h(the)g(current)f(tok)o(en.)g(F)o(or)h(e)o(xample,)e
10918
(this)396 2941 y(element)i(has)g(non-deterministic)e(contents:)396
10919
3121 y Fr(<!ELEMENT)44 b(x)g(\(\(u,v\))g(|)h(\(u,y+\))f(|)g(v\)>)396
10920
3312 y Fw(If)20 b(the)h(\002rst)f(element)g(in)g Fr(x)h
10921
Fw(is)g Fr(u)p Fw(,)f(the)h(parser)e(does)h(not)g(kno)n(w)f(which)h(of)
10922
g(the)g(alternati)n(v)o(es)f Fr(\(u,v\))h Fw(or)g Fr(\(u,y+\))g
10923
Fw(will)396 3420 y(w)o(ork;)g(the)g(parser)g(must)g(also)g(inspect)g
10924
(the)h(second)e(element)g(to)i(be)f(able)g(to)g(distinguish)g(between)f
10925
(the)h(alternati)n(v)o(es.)396 3528 y(Because)h(such)f(look-ahead)d
10926
(\(or)j("guessing"\))e(is)k(required,)c(this)i(e)o(xample)f(is)i
10927
(non-deterministic.)396 3677 y(The)f(XML)g(standard)f(demands)g(that)i
10928
(content)e(models)g(must)i(be)f(deterministic.)f(So)h(it)h(is)g
10929
(recommended)c(to)k(turn)e(the)396 3785 y(option)g Fr
10930
(accept_only_deterministic_models)d Fw(on;)j(ho)n(we)n(v)o(er)m(,)f
10931
(PXP)j(can)f(also)h(process)e(non-deterministic)396 3893
10932
y(models)h(using)g(a)g(backtracking)e(algorithm.)396
10933
4043 y(Deterministic)i(models)g(ensure)f(that)h(v)n(alidation)f(can)h
10934
(be)g(performed)e(in)i(linear)g(time.)g(In)g(order)f(to)h(get)g(the)396
10935
4151 y(maximum)f(bene\002ts,)h(PXP)h(also)f(implements)f(a)i(special)f
10936
(v)n(alidator)f(that)h(pro\002ts)g(from)f(deterministic)h(models;)f
10937
(this)396 4258 y(is)i(the)g(deterministic)e(\002nite)h(automaton)f
10938
(\(DF)-6 b(A\).)19 b(This)i(v)n(alidator)d(is)k(enabled)d(per)g
10939
(element)h(type)g(if)g(the)g(element)396 4366 y(type)g(has)g(a)h
10940
(deterministic)e(model)h(and)f(if)i(the)f(option)f Fr(validate_by_dfa)f
10941
Fw(is)j(turned)e(on.)396 4516 y(In)h(general,)f(I)h(e)o(xpect)g(that)g
10942
(the)g(DF)-6 b(A)21 b(method)e(is)i(f)o(aster)f(than)g(the)g
10943
(backtracking)e(method;)g(especially)i(in)h(the)f(w)o(orst)396
10944
4624 y(case)h(the)f(DF)-6 b(A)21 b(tak)o(es)f(only)g(linear)f(time.)i
10945
(Ho)n(we)n(v)o(er)m(,)d(if)i(the)g(content)g(model)f(has)h(only)g(fe)n
10946
(w)g(alternati)n(v)o(es)f(and)h(the)396 4732 y(alternati)n(v)o(es)f(do)
10947
h(not)g(nest,)g(the)h(backtracking)c(algorithm)i(may)g(be)i(better)-5
10948
b(.)p Black 3759 5278 a Fs(130)p Black eop
10950
131 130 bop Black Black Black Black eop
10953
userdict /end-hook known{end-hook}if