0000: 27 5c 22 0a 27 5c 22 20 47 65 6e 65 72 61 74 65 '\".'\" Generate
0010: 64 20 66 72 6f 6d 20 64 6f 6d 44 6f 63 2e 78 6d d from domDoc.xm
0020: 6c 0a 27 5c 22 0a 27 5c 22 20 42 45 47 49 4e 20 l.'\".'\" BEGIN
0030: 6d 61 6e 2e 6d 61 63 72 6f 73 0a 2e 69 66 20 74 man.macros..if t
0040: 20 2e 77 68 20 2d 31 2e 33 69 20 5e 42 0a 2e 6e .wh -1.3i ^B..n
0050: 72 20 5e 6c 20 5c 6e 28 2e 6c 0a 2e 61 64 20 62 r ^l \n(.l..ad b
0060: 0a 2e 64 65 20 41 50 0a 2e 69 65 20 21 22 5c 5c ..de AP..ie !"\\
0070: 24 34 22 22 20 2e 54 50 20 5c 5c 24 34 0a 2e 65 $4"" .TP \\$4..e
0080: 6c 20 5c 7b 5c 0a 2e 20 20 20 69 65 20 21 22 5c l \{\.. ie !"\
0090: 5c 24 32 22 22 20 2e 54 50 20 5c 5c 6e 28 29 43 \$2"" .TP \\n()C
00a0: 75 0a 2e 20 20 20 65 6c 20 20 20 20 20 20 20 20 u.. el
00b0: 20 20 2e 54 50 20 31 35 0a 2e 5c 7d 0a 2e 74 61 .TP 15..\}..ta
00c0: 20 5c 5c 6e 28 29 41 75 20 5c 5c 6e 28 29 42 75 \\n()Au \\n()Bu
00d0: 0a 2e 69 65 20 21 22 5c 5c 24 33 22 22 20 5c 7b ..ie !"\\$3"" \{
00e0: 5c 0a 5c 26 5c 5c 24 31 09 5c 5c 66 49 5c 5c 24 \.\&\\$1.\\fI\\$
00f0: 32 5c 5c 66 50 09 28 5c 5c 24 33 29 0a 2e 5c 22 2\\fP.(\\$3)..\"
0100: 2e 62 0a 2e 5c 7d 0a 2e 65 6c 20 5c 7b 5c 0a 2e .b..\}..el \{\..
0110: 62 72 0a 2e 69 65 20 21 22 5c 5c 24 32 22 22 20 br..ie !"\\$2""
0120: 5c 7b 5c 0a 5c 26 5c 5c 24 31 09 5c 5c 66 49 5c \{\.\&\\$1.\\fI\
0130: 5c 24 32 5c 5c 66 50 0a 2e 5c 7d 0a 2e 65 6c 20 \$2\\fP..\}..el
0140: 5c 7b 5c 0a 5c 26 5c 5c 66 49 5c 5c 24 31 5c 5c \{\.\&\\fI\\$1\\
0150: 66 50 0a 2e 5c 7d 0a 2e 5c 7d 0a 2e 2e 0a 2e 64 fP..\}..\}.....d
0160: 65 20 41 53 0a 2e 6e 72 20 29 41 20 31 30 6e 0a e AS..nr )A 10n.
0170: 2e 69 66 20 21 22 5c 5c 24 31 22 22 20 2e 6e 72 .if !"\\$1"" .nr
0180: 20 29 41 20 5c 5c 77 27 5c 5c 24 31 27 75 2b 33 )A \\w'\\$1'u+3
0190: 6e 0a 2e 6e 72 20 29 42 20 5c 5c 6e 28 29 41 75 n..nr )B \\n()Au
01a0: 2b 31 35 6e 0a 2e 5c 22 0a 2e 69 66 20 21 22 5c +15n..\"..if !"\
01b0: 5c 24 32 22 22 20 2e 6e 72 20 29 42 20 5c 5c 77 \$2"" .nr )B \\w
01c0: 27 5c 5c 24 32 27 75 2b 5c 5c 6e 28 29 41 75 2b '\\$2'u+\\n()Au+
01d0: 33 6e 0a 2e 6e 72 20 29 43 20 5c 5c 6e 28 29 42 3n..nr )C \\n()B
01e0: 75 2b 5c 5c 77 27 28 69 6e 2f 6f 75 74 29 27 75 u+\\w'(in/out)'u
01f0: 2b 32 6e 0a 2e 2e 0a 2e 41 53 20 54 63 6c 5f 49 +2n.....AS Tcl_I
0200: 6e 74 65 72 70 20 54 63 6c 5f 43 72 65 61 74 65 nterp Tcl_Create
0210: 49 6e 74 65 72 70 20 69 6e 2f 6f 75 74 0a 2e 64 Interp in/out..d
0220: 65 20 42 53 0a 2e 62 72 0a 2e 6d 6b 20 5e 79 0a e BS..br..mk ^y.
0230: 2e 6e 72 20 5e 62 20 31 75 0a 2e 69 66 20 6e 20 .nr ^b 1u..if n
0240: 2e 6e 66 0a 2e 69 66 20 6e 20 2e 74 69 20 30 0a .nf..if n .ti 0.
0250: 2e 69 66 20 6e 20 5c 6c 27 5c 5c 6e 28 2e 6c 75 .if n \l'\\n(.lu
0260: 5c 28 75 6c 27 0a 2e 69 66 20 6e 20 2e 66 69 0a \(ul'..if n .fi.
0270: 2e 2e 0a 2e 64 65 20 42 45 0a 2e 6e 66 0a 2e 74 ....de BE..nf..t
0280: 69 20 30 0a 2e 6d 6b 20 5e 74 0a 2e 69 65 20 6e i 0..mk ^t..ie n
0290: 20 5c 6c 27 5c 5c 6e 28 5e 6c 75 5c 28 75 6c 27 \l'\\n(^lu\(ul'
02a0: 0a 2e 65 6c 20 5c 7b 5c 0a 2e 5c 22 09 44 72 61 ..el \{\..\".Dra
02b0: 77 20 66 6f 75 72 2d 73 69 64 65 64 20 62 6f 78 w four-sided box
02c0: 20 6e 6f 72 6d 61 6c 6c 79 2c 20 62 75 74 20 64 normally, but d
02d0: 6f 6e 27 74 20 64 72 61 77 20 74 6f 70 20 6f 66 on't draw top of
02e0: 0a 2e 5c 22 09 62 6f 78 20 69 66 20 74 68 65 20 ..\".box if the
02f0: 62 6f 78 20 73 74 61 72 74 65 64 20 6f 6e 20 61 box started on a
0300: 6e 20 65 61 72 6c 69 65 72 20 70 61 67 65 2e 0a n earlier page..
0310: 2e 69 65 20 21 5c 5c 6e 28 5e 62 2d 31 20 5c 7b .ie !\\n(^b-1 \{
0320: 5c 0a 5c 68 27 2d 31 2e 35 6e 27 5c 4c 27 7c 5c \.\h'-1.5n'\L'|\
0330: 5c 6e 28 5e 79 75 2d 31 76 27 5c 6c 27 5c 5c 6e \n(^yu-1v'\l'\\n
0340: 28 5e 6c 75 2b 33 6e 5c 28 75 6c 27 5c 4c 27 5c (^lu+3n\(ul'\L'\
0350: 5c 6e 28 5e 74 75 2b 31 76 2d 5c 5c 6e 28 5e 79 \n(^tu+1v-\\n(^y
0360: 75 27 5c 6c 27 7c 30 75 2d 31 2e 35 6e 5c 28 75 u'\l'|0u-1.5n\(u
0370: 6c 27 0a 2e 5c 7d 0a 2e 65 6c 20 5c 7d 5c 0a 5c l'..\}..el \}\.\
0380: 68 27 2d 31 2e 35 6e 27 5c 4c 27 7c 5c 5c 6e 28 h'-1.5n'\L'|\\n(
0390: 5e 79 75 2d 31 76 27 5c 68 27 5c 5c 6e 28 5e 6c ^yu-1v'\h'\\n(^l
03a0: 75 2b 33 6e 27 5c 4c 27 5c 5c 6e 28 5e 74 75 2b u+3n'\L'\\n(^tu+
03b0: 31 76 2d 5c 5c 6e 28 5e 79 75 27 5c 6c 27 7c 30 1v-\\n(^yu'\l'|0
03c0: 75 2d 31 2e 35 6e 5c 28 75 6c 27 0a 2e 5c 7d 0a u-1.5n\(ul'..\}.
03d0: 2e 5c 7d 0a 2e 66 69 0a 2e 62 72 0a 2e 6e 72 20 .\}..fi..br..nr
03e0: 5e 62 20 30 0a 2e 2e 0a 2e 64 65 20 56 53 0a 2e ^b 0.....de VS..
03f0: 69 66 20 21 22 5c 5c 24 32 22 22 20 2e 62 72 0a if !"\\$2"" .br.
0400: 2e 6d 6b 20 5e 59 0a 2e 69 65 20 6e 20 27 6d 63 .mk ^Y..ie n 'mc
0410: 20 5c 73 31 32 5c 28 62 72 5c 73 30 0a 2e 65 6c \s12\(br\s0..el
0420: 20 2e 6e 72 20 5e 76 20 31 75 0a 2e 2e 0a 2e 64 .nr ^v 1u.....d
0430: 65 20 56 45 0a 2e 69 65 20 6e 20 27 6d 63 0a 2e e VE..ie n 'mc..
0440: 65 6c 20 5c 7b 5c 0a 2e 65 76 20 32 0a 2e 6e 66 el \{\..ev 2..nf
0450: 0a 2e 74 69 20 30 0a 2e 6d 6b 20 5e 74 0a 5c 68 ..ti 0..mk ^t.\h
0460: 27 7c 5c 5c 6e 28 5e 6c 75 2b 33 6e 27 5c 4c 27 '|\\n(^lu+3n'\L'
0470: 7c 5c 5c 6e 28 5e 59 75 2d 31 76 5c 28 62 76 27 |\\n(^Yu-1v\(bv'
0480: 5c 76 27 5c 5c 6e 28 5e 74 75 2b 31 76 2d 5c 5c \v'\\n(^tu+1v-\\
0490: 6e 28 5e 59 75 27 5c 68 27 2d 7c 5c 5c 6e 28 5e n(^Yu'\h'-|\\n(^
04a0: 6c 75 2b 33 6e 27 0a 2e 73 70 20 2d 31 0a 2e 66 lu+3n'..sp -1..f
04b0: 69 0a 2e 65 76 0a 2e 5c 7d 0a 2e 6e 72 20 5e 76 i..ev..\}..nr ^v
04c0: 20 30 0a 2e 2e 0a 2e 64 65 20 5e 42 0a 2e 65 76 0.....de ^B..ev
04d0: 20 32 0a 27 74 69 20 30 0a 27 6e 66 0a 2e 6d 6b 2.'ti 0.'nf..mk
04e0: 20 5e 74 0a 2e 69 66 20 5c 5c 6e 28 5e 62 20 5c ^t..if \\n(^b \
04f0: 7b 5c 0a 2e 5c 22 09 44 72 61 77 20 74 68 72 65 {\..\".Draw thre
0500: 65 2d 73 69 64 65 64 20 62 6f 78 20 69 66 20 74 e-sided box if t
0510: 68 69 73 20 69 73 20 74 68 65 20 62 6f 78 27 73 his is the box's
0520: 20 66 69 72 73 74 20 70 61 67 65 2c 0a 2e 5c 22 first page,..\"
0530: 09 64 72 61 77 20 74 77 6f 20 73 69 64 65 73 20 .draw two sides
0540: 62 75 74 20 6e 6f 20 74 6f 70 20 6f 74 68 65 72 but no top other
0550: 77 69 73 65 2e 0a 2e 69 65 20 21 5c 5c 6e 28 5e wise...ie !\\n(^
0560: 62 2d 31 20 5c 68 27 2d 31 2e 35 6e 27 5c 4c 27 b-1 \h'-1.5n'\L'
0570: 7c 5c 5c 6e 28 5e 79 75 2d 31 76 27 5c 6c 27 5c |\\n(^yu-1v'\l'\
0580: 5c 6e 28 5e 6c 75 2b 33 6e 5c 28 75 6c 27 5c 4c \n(^lu+3n\(ul'\L
0590: 27 5c 5c 6e 28 5e 74 75 2b 31 76 2d 5c 5c 6e 28 '\\n(^tu+1v-\\n(
05a0: 5e 79 75 27 5c 68 27 7c 30 75 27 5c 63 0a 2e 65 ^yu'\h'|0u'\c..e
05b0: 6c 20 5c 68 27 2d 31 2e 35 6e 27 5c 4c 27 7c 5c l \h'-1.5n'\L'|\
05c0: 5c 6e 28 5e 79 75 2d 31 76 27 5c 68 27 5c 5c 6e \n(^yu-1v'\h'\\n
05d0: 28 5e 6c 75 2b 33 6e 27 5c 4c 27 5c 5c 6e 28 5e (^lu+3n'\L'\\n(^
05e0: 74 75 2b 31 76 2d 5c 5c 6e 28 5e 79 75 27 5c 68 tu+1v-\\n(^yu'\h
05f0: 27 7c 30 75 27 5c 63 0a 2e 5c 7d 0a 2e 69 66 20 '|0u'\c..\}..if
0600: 5c 5c 6e 28 5e 76 20 5c 7b 5c 0a 2e 6e 72 20 5e \\n(^v \{\..nr ^
0610: 78 20 5c 5c 6e 28 5e 74 75 2b 31 76 2d 5c 5c 6e x \\n(^tu+1v-\\n
0620: 28 5e 59 75 0a 5c 6b 78 5c 68 27 2d 5c 5c 6e 78 (^Yu.\kx\h'-\\nx
0630: 75 27 5c 68 27 7c 5c 5c 6e 28 5e 6c 75 2b 33 6e u'\h'|\\n(^lu+3n
0640: 27 5c 6b 79 5c 4c 27 2d 5c 5c 6e 28 5e 78 75 27 '\ky\L'-\\n(^xu'
0650: 5c 76 27 5c 5c 6e 28 5e 78 75 27 5c 68 27 7c 30 \v'\\n(^xu'\h'|0
0660: 75 27 5c 63 0a 2e 5c 7d 0a 2e 62 70 0a 27 66 69 u'\c..\}..bp.'fi
0670: 0a 2e 65 76 0a 2e 69 66 20 5c 5c 6e 28 5e 62 20 ..ev..if \\n(^b
0680: 5c 7b 5c 0a 2e 6d 6b 20 5e 79 0a 2e 6e 72 20 5e \{\..mk ^y..nr ^
0690: 62 20 32 0a 2e 5c 7d 0a 2e 69 66 20 5c 5c 6e 28 b 2..\}..if \\n(
06a0: 5e 76 20 5c 7b 5c 0a 2e 6d 6b 20 5e 59 0a 2e 5c ^v \{\..mk ^Y..\
06b0: 7d 0a 2e 2e 0a 2e 64 65 20 44 53 0a 2e 52 53 0a }.....de DS..RS.
06c0: 2e 6e 66 0a 2e 73 70 0a 2e 2e 0a 2e 64 65 20 44 .nf..sp.....de D
06d0: 45 0a 2e 66 69 0a 2e 52 45 0a 2e 73 70 0a 2e 2e E..fi..RE..sp...
06e0: 0a 2e 64 65 20 53 4f 0a 2e 53 48 20 22 53 54 41 ..de SO..SH "STA
06f0: 4e 44 41 52 44 20 4f 50 54 49 4f 4e 53 22 0a 2e NDARD OPTIONS"..
0700: 4c 50 0a 2e 6e 66 0a 2e 74 61 20 35 2e 35 63 20 LP..nf..ta 5.5c
0710: 31 31 63 0a 2e 66 74 20 42 0a 2e 2e 0a 2e 64 65 11c..ft B.....de
0720: 20 53 45 0a 2e 66 69 0a 2e 66 74 20 52 0a 2e 4c SE..fi..ft R..L
0730: 50 0a 53 65 65 20 74 68 65 20 5c 5c 66 42 6f 70 P.See the \\fBop
0740: 74 69 6f 6e 73 5c 5c 66 52 20 6d 61 6e 75 61 6c tions\\fR manual
0750: 20 65 6e 74 72 79 20 66 6f 72 20 64 65 74 61 69 entry for detai
0760: 6c 73 20 6f 6e 20 74 68 65 20 73 74 61 6e 64 61 ls on the standa
0770: 72 64 20 6f 70 74 69 6f 6e 73 2e 0a 2e 2e 0a 2e rd options......
0780: 64 65 20 4f 50 0a 2e 4c 50 0a 2e 6e 66 0a 2e 74 de OP..LP..nf..t
0790: 61 20 34 63 0a 43 6f 6d 6d 61 6e 64 2d 4c 69 6e a 4c.Command-Lin
07a0: 65 20 4e 61 6d 65 3a 09 5c 5c 66 42 5c 5c 24 31 e Name:.\\fB\\$1
07b0: 5c 5c 66 52 0a 44 61 74 61 62 61 73 65 20 4e 61 \\fR.Database Na
07c0: 6d 65 3a 09 5c 5c 66 42 5c 5c 24 32 5c 5c 66 52 me:.\\fB\\$2\\fR
07d0: 0a 44 61 74 61 62 61 73 65 20 43 6c 61 73 73 3a .Database Class:
07e0: 09 5c 5c 66 42 5c 5c 24 33 5c 5c 66 52 0a 2e 66 .\\fB\\$3\\fR..f
07f0: 69 0a 2e 49 50 0a 2e 2e 0a 2e 64 65 20 43 53 0a i..IP.....de CS.
0800: 2e 52 53 0a 2e 6e 66 0a 2e 74 61 20 2e 32 35 69 .RS..nf..ta .25i
0810: 20 2e 35 69 20 2e 37 35 69 20 31 69 0a 2e 69 66 .5i .75i 1i..if
0820: 20 74 20 2e 66 74 20 43 0a 2e 2e 0a 2e 64 65 20 t .ft C.....de
0830: 43 45 0a 2e 66 69 0a 2e 69 66 20 74 20 2e 66 74 CE..fi..if t .ft
0840: 20 52 0a 2e 52 45 0a 2e 2e 0a 2e 64 65 20 55 4c R..RE.....de UL
0850: 0a 5c 5c 24 31 5c 6c 27 7c 30 5c 28 75 6c 27 5c .\\$1\l'|0\(ul'\
0860: 5c 24 32 0a 2e 2e 0a 27 5c 22 20 45 4e 44 20 6d \$2....'\" END m
0870: 61 6e 2e 6d 61 63 72 6f 73 0a 2e 54 48 20 64 6f an.macros..TH do
0880: 6d 44 6f 63 20 6e 20 22 22 20 54 63 6c 20 22 22 mDoc n "" Tcl ""
0890: 0a 2e 42 53 0a 2e 53 48 20 4e 41 4d 45 0a 64 6f ..BS..SH NAME.do
08a0: 6d 44 6f 63 20 5c 2d 20 4d 61 6e 69 70 75 6c 61 mDoc \- Manipula
08b0: 74 65 73 20 61 6e 20 69 6e 73 74 61 6e 63 65 20 tes an instance
08c0: 6f 66 20 61 20 44 4f 4d 20 64 6f 63 75 6d 65 6e of a DOM documen
08d0: 74 20 6f 62 6a 65 63 74 0a 2e 53 48 20 53 59 4e t object..SH SYN
08e0: 4f 50 53 49 53 0a 2e 6e 66 0a 64 6f 6d 44 6f 63 OPSIS..nf.domDoc
08f0: 4f 62 6a 43 6d 64 20 5c 66 49 6d 65 74 68 6f 64 ObjCmd \fImethod
0900: 5c 66 52 20 3f 5c 66 49 61 72 67 20 61 72 67 20 \fR ?\fIarg arg
0910: 2e 2e 2e 5c 66 52 3f 0a 2e 66 69 0a 2e 6e 66 0a ...\fR?..fi..nf.
0920: 64 6f 6d 44 6f 63 20 5c 66 49 64 6f 63 54 6f 6b domDoc \fIdocTok
0930: 65 6e 5c 66 52 20 5c 66 49 6d 65 74 68 6f 64 5c en\fR \fImethod\
0940: 66 52 20 3f 5c 66 49 61 72 67 20 61 72 67 20 2e fR ?\fIarg arg .
0950: 2e 2e 5c 66 52 3f 0a 2e 66 69 0a 2e 42 45 0a 2e ..\fR?..fi..BE..
0960: 53 48 20 22 44 45 53 43 52 49 50 54 49 4f 4e 20 SH "DESCRIPTION
0970: 22 0a 2e 50 50 0a 54 68 69 73 20 63 6f 6d 6d 61 "..PP.This comma
0980: 6e 64 20 6d 61 6e 69 70 75 6c 61 74 65 73 20 6f nd manipulates o
0990: 6e 65 20 70 61 72 74 69 63 75 6c 61 72 20 69 6e ne particular in
09a0: 73 74 61 6e 63 65 20 6f 66 20 61 20 64 6f 63 75 stance of a docu
09b0: 6d 65 6e 74 0a 6f 62 6a 65 63 74 2e 20 5c 66 49 ment.object. \fI
09c0: 6d 65 74 68 6f 64 5c 66 52 20 69 6e 64 69 63 61 method\fR indica
09d0: 74 65 73 20 61 20 73 70 65 63 69 66 69 63 20 6d tes a specific m
09e0: 65 74 68 6f 64 20 6f 66 20 74 68 65 20 64 6f 63 ethod of the doc
09f0: 75 6d 65 6e 74 20 63 6c 61 73 73 2e 20 54 68 65 ument class. The
0a00: 73 65 0a 6d 65 74 68 6f 64 73 20 73 68 6f 75 6c se.methods shoul
0a10: 64 20 63 6c 6f 73 65 6c 79 20 63 6f 6e 66 6f 72 d closely confor
0a20: 6d 20 74 6f 20 74 68 65 20 57 33 43 20 72 65 63 m to the W3C rec
0a30: 6f 6d 6d 65 6e 64 61 74 69 6f 6e 20 22 44 6f 63 ommendation "Doc
0a40: 75 6d 65 6e 74 20 4f 62 6a 65 63 74 20 4d 6f 64 ument Object Mod
0a50: 65 6c 0a 28 43 6f 72 65 29 20 4c 65 76 65 6c 20 el.(Core) Level
0a60: 31 22 20 28 68 74 74 70 3a 2f 2f 77 77 77 2e 77 1" (http://www.w
0a70: 33 2e 6f 72 67 2f 54 52 2f 52 45 43 2d 44 4f 4d 3.org/TR/REC-DOM
0a80: 2d 4c 65 76 65 6c 2d 31 2f 6c 65 76 65 6c 2d 6f -Level-1/level-o
0a90: 6e 65 2d 63 6f 72 65 2e 68 74 6d 6c 29 2e 20 4c ne-core.html). L
0aa0: 6f 6f 6b 0a 61 74 20 74 68 65 73 65 20 64 6f 63 ook.at these doc
0ab0: 75 6d 65 6e 74 73 20 66 6f 72 20 61 20 64 65 65 uments for a dee
0ac0: 70 65 72 20 75 6e 64 65 72 73 74 61 6e 64 69 6e per understandin
0ad0: 67 20 6f 66 20 74 68 65 20 66 75 6e 63 74 69 6f g of the functio
0ae0: 6e 61 6c 69 74 79 2e 0a 2e 50 50 0a 54 68 65 20 nality...PP.The
0af0: 76 61 6c 69 64 20 6d 65 74 68 6f 64 73 20 61 72 valid methods ar
0b00: 65 3a 0a 2e 54 50 0a 5c 26 5c 66 42 5c 66 42 64 e:..TP.\&\fB\fBd
0b10: 6f 63 75 6d 65 6e 74 45 6c 65 6d 65 6e 74 5c 66 ocumentElement\f
0b20: 50 20 3f 5c 66 49 6f 62 6a 56 61 72 5c 66 42 3f P ?\fIobjVar\fB?
0b30: 0a 5c 26 5c 66 52 52 65 74 75 72 6e 73 20 74 68 .\&\fRReturns th
0b40: 65 20 74 6f 70 20 6d 6f 73 74 20 65 6c 65 6d 65 e top most eleme
0b50: 6e 74 20 69 6e 20 74 68 65 20 64 6f 63 75 6d 65 nt in the docume
0b60: 6e 74 20 28 74 68 65 20 72 6f 6f 74 0a 65 6c 65 nt (the root.ele
0b70: 6d 65 6e 74 29 2e 0a 2e 54 50 0a 5c 26 5c 66 42 ment)...TP.\&\fB
0b80: 5c 66 42 67 65 74 45 6c 65 6d 65 6e 74 73 42 79 \fBgetElementsBy
0b90: 54 61 67 4e 61 6d 65 5c 66 50 20 5c 66 49 6e 61 TagName\fP \fIna
0ba0: 6d 65 5c 66 42 0a 5c 26 5c 66 52 52 65 74 75 72 me\fB.\&\fRRetur
0bb0: 6e 73 20 61 20 6c 69 73 74 20 6f 66 20 61 6c 6c ns a list of all
0bc0: 20 65 6c 65 6d 65 6e 74 73 20 69 6e 20 74 68 65 elements in the
0bd0: 20 64 6f 63 75 6d 65 6e 74 20 6d 61 74 63 68 69 document matchi
0be0: 6e 67 0a 28 67 6c 6f 62 20 73 74 79 6c 65 29 20 ng.(glob style)
0bf0: 5c 66 49 6e 61 6d 65 5c 66 52 2e 0a 2e 54 50 0a \fIname\fR...TP.
0c00: 5c 26 5c 66 42 5c 66 42 67 65 74 45 6c 65 6d 65 \&\fB\fBgetEleme
0c10: 6e 74 73 42 79 54 61 67 4e 61 6d 65 4e 53 5c 66 ntsByTagNameNS\f
0c20: 50 20 5c 66 49 75 72 69 5c 66 42 20 5c 66 49 6c P \fIuri\fB \fIl
0c30: 6f 63 61 6c 6e 61 6d 65 5c 66 42 0a 5c 26 5c 66 ocalname\fB.\&\f
0c40: 52 20 52 65 74 75 72 6e 73 20 61 20 6c 69 73 74 R Returns a list
0c50: 20 6f 66 20 61 6c 6c 20 65 6c 65 6d 65 6e 74 73 of all elements
0c60: 20 69 6e 20 74 68 65 20 73 75 62 74 72 65 65 0a in the subtree.
0c70: 6d 61 74 63 68 69 6e 67 20 28 67 6c 6f 62 20 73 matching (glob s
0c80: 74 79 6c 65 29 20 5c 66 49 6c 6f 63 61 6c 6e 61 tyle) \fIlocalna
0c90: 6d 65 5c 66 52 20 61 6e 64 20 68 61 76 69 6e 67 me\fR and having
0ca0: 20 74 68 65 20 67 69 76 65 6e 20 6e 61 6d 65 73 the given names
0cb0: 70 61 63 65 0a 5c 26 5c 66 49 75 72 69 5c 66 52 pace.\&\fIuri\fR
0cc0: 2e 0a 2e 54 50 0a 5c 26 5c 66 42 5c 66 42 63 72 ...TP.\&\fB\fBcr
0cd0: 65 61 74 65 45 6c 65 6d 65 6e 74 5c 66 50 20 5c eateElement\fP \
0ce0: 66 49 74 61 67 4e 61 6d 65 5c 66 42 20 3f 5c 66 fItagName\fB ?\f
0cf0: 49 6f 62 6a 56 61 72 5c 66 42 3f 0a 5c 26 5c 66 IobjVar\fB?.\&\f
0d00: 52 43 72 65 61 74 65 73 20 28 61 6c 6c 6f 63 61 RCreates (alloca
0d10: 74 65 73 29 20 61 20 6e 65 77 20 65 6c 65 6d 65 tes) a new eleme
0d20: 6e 74 20 6e 6f 64 65 20 77 69 74 68 20 6e 6f 64 nt node with nod
0d30: 65 20 6e 61 6d 65 0a 5c 26 5c 66 49 74 61 67 4e e name.\&\fItagN
0d40: 61 6d 65 5c 66 52 2c 20 61 70 70 65 6e 64 20 69 ame\fR, append i
0d50: 74 20 74 6f 20 74 68 65 20 68 69 64 64 65 6e 20 t to the hidden
0d60: 66 72 61 67 6d 65 6e 74 20 6c 69 73 74 20 69 6e fragment list in
0d70: 20 74 68 65 20 64 6f 63 75 6d 65 6e 74 0a 6f 62 the document.ob
0d80: 6a 65 63 74 20 61 6e 64 20 72 65 74 75 72 6e 73 ject and returns
0d90: 20 74 68 65 20 6e 6f 64 65 20 6f 62 6a 65 63 74 the node object
0da0: 2e 20 20 49 66 20 5c 66 49 6f 62 6a 56 61 72 5c . If \fIobjVar\
0db0: 66 52 20 69 73 20 67 69 76 65 6e 20 74 68 65 20 fR is given the
0dc0: 6e 65 77 0a 6e 6f 64 65 20 6f 62 6a 65 63 74 20 new.node object
0dd0: 69 73 20 73 74 6f 72 65 64 20 69 6e 20 74 68 69 is stored in thi
0de0: 73 20 76 61 72 69 61 62 6c 65 2e 0a 2e 54 50 0a s variable...TP.
0df0: 5c 26 5c 66 42 5c 66 42 63 72 65 61 74 65 45 6c \&\fB\fBcreateEl
0e00: 65 6d 65 6e 74 4e 53 5c 66 50 20 5c 66 49 75 72 ementNS\fP \fIur
0e10: 6c 5c 66 42 20 5c 66 49 74 61 67 4e 61 6d 65 5c l\fB \fItagName\
0e20: 66 42 20 3f 5c 66 49 6f 62 6a 56 61 72 5c 66 42 fB ?\fIobjVar\fB
0e30: 3f 0a 5c 26 5c 66 52 43 72 65 61 74 65 73 20 28 ?.\&\fRCreates (
0e40: 61 6c 6c 6f 63 61 74 65 73 29 20 61 20 6e 65 77 allocates) a new
0e50: 20 65 6c 65 6d 65 6e 74 20 6e 6f 64 65 20 77 69 element node wi
0e60: 74 68 69 6e 20 61 20 6e 61 6d 65 73 70 61 63 65 thin a namespace
0e70: 0a 68 61 76 69 6e 67 20 5c 66 49 75 72 69 5c 66 .having \fIuri\f
0e80: 52 20 61 73 20 74 68 65 20 55 52 49 20 61 6e 64 R as the URI and
0e90: 20 6e 6f 64 65 20 6e 61 6d 65 20 5c 66 49 74 61 node name \fIta
0ea0: 67 4e 61 6d 65 5c 66 52 2c 20 77 68 69 63 68 0a gName\fR, which.
0eb0: 63 6f 75 6c 64 20 69 6e 63 6c 75 64 65 20 74 68 could include th
0ec0: 65 20 6e 61 6d 65 73 70 61 63 65 20 70 72 65 66 e namespace pref
0ed0: 69 78 2c 20 61 70 70 65 6e 64 20 69 74 20 74 6f ix, append it to
0ee0: 20 74 68 65 20 68 69 64 64 65 6e 20 66 72 61 67 the hidden frag
0ef0: 6d 65 6e 74 20 6c 69 73 74 20 69 6e 0a 74 68 65 ment list in.the
0f00: 20 64 6f 63 75 6d 65 6e 74 20 6f 62 6a 65 63 74 document object
0f10: 20 61 6e 64 20 72 65 74 75 72 6e 73 20 74 68 65 and returns the
0f20: 20 6e 6f 64 65 20 6f 62 6a 65 63 74 2e 20 20 49 node object. I
0f30: 66 20 5c 66 49 6f 62 6a 56 61 72 5c 66 52 20 69 f \fIobjVar\fR i
0f40: 73 0a 67 69 76 65 6e 20 74 68 65 20 6e 65 77 20 s.given the new
0f50: 6e 6f 64 65 20 6f 62 6a 65 63 74 20 69 73 20 73 node object is s
0f60: 74 6f 72 65 64 20 69 6e 20 74 68 69 73 20 76 61 tored in this va
0f70: 72 69 61 62 6c 65 2e 0a 2e 54 50 0a 5c 26 5c 66 riable...TP.\&\f
0f80: 42 5c 66 42 63 72 65 61 74 65 54 65 78 74 4e 6f B\fBcreateTextNo
0f90: 64 65 5c 66 50 20 5c 66 49 74 65 78 74 5c 66 42 de\fP \fItext\fB
0fa0: 20 3f 5c 66 49 6f 62 6a 56 61 72 5c 66 42 3f 0a ?\fIobjVar\fB?.
0fb0: 5c 26 5c 66 52 43 72 65 61 74 65 73 20 28 61 6c \&\fRCreates (al
0fc0: 6c 6f 63 61 74 65 73 29 20 61 20 6e 65 77 20 74 locates) a new t
0fd0: 65 78 74 20 6e 6f 64 65 20 77 69 74 68 20 6e 6f ext node with no
0fe0: 64 65 20 76 61 6c 75 65 0a 5c 26 5c 66 49 74 65 de value.\&\fIte
0ff0: 78 74 5c 66 52 2c 20 61 70 70 65 6e 64 73 20 69 xt\fR, appends i
1000: 74 20 74 6f 20 74 68 65 20 68 69 64 64 65 6e 20 t to the hidden
1010: 66 72 61 67 6d 65 6e 74 20 6c 69 73 74 20 69 6e fragment list in
1020: 20 74 68 65 20 64 6f 63 75 6d 65 6e 74 0a 6f 62 the document.ob
1030: 6a 65 63 74 20 61 6e 64 20 72 65 74 75 72 6e 73 ject and returns
1040: 20 74 68 65 20 6e 6f 64 65 20 6f 62 6a 65 63 74 the node object
1050: 2e 20 20 49 66 20 5c 66 49 6f 62 6a 56 61 72 5c . If \fIobjVar\
1060: 66 52 20 69 73 20 67 69 76 65 6e 2c 20 74 68 65 fR is given, the
1070: 20 6e 65 77 0a 6e 6f 64 65 20 6f 62 6a 65 63 74 new.node object
1080: 20 69 73 20 73 74 6f 72 65 64 20 69 6e 20 74 68 is stored in th
1090: 69 73 20 76 61 72 69 61 62 6c 65 2e 0a 2e 54 50 is variable...TP
10a0: 0a 5c 26 5c 66 42 5c 66 42 63 72 65 61 74 65 43 .\&\fB\fBcreateC
10b0: 6f 6d 6d 65 6e 74 5c 66 50 20 5c 66 49 74 65 78 omment\fP \fItex
10c0: 74 5c 66 42 20 3f 5c 66 49 6f 62 6a 56 61 72 5c t\fB ?\fIobjVar\
10d0: 66 42 3f 0a 5c 26 5c 66 52 43 72 65 61 74 65 73 fB?.\&\fRCreates
10e0: 20 28 61 6c 6c 6f 63 61 74 65 73 29 20 61 20 6e (allocates) a n
10f0: 65 77 20 63 6f 6d 6d 65 6e 74 20 6e 6f 64 65 20 ew comment node
1100: 77 69 74 68 20 76 61 6c 75 65 0a 5c 26 5c 66 49 with value.\&\fI
1110: 74 65 78 74 5c 66 52 2c 20 61 70 70 65 6e 64 73 text\fR, appends
1120: 20 69 74 20 74 6f 20 74 68 65 20 68 69 64 64 65 it to the hidde
1130: 6e 20 66 72 61 67 6d 65 6e 74 20 6c 69 73 74 20 n fragment list
1140: 69 6e 20 74 68 65 20 64 6f 63 75 6d 65 6e 74 0a in the document.
1150: 6f 62 6a 65 63 74 20 61 6e 64 20 72 65 74 75 72 object and retur
1160: 6e 73 20 74 68 65 20 6e 6f 64 65 20 6f 62 6a 65 ns the node obje
1170: 63 74 2e 20 20 49 66 20 5c 66 49 6f 62 6a 56 61 ct. If \fIobjVa
1180: 72 5c 66 52 20 69 73 20 67 69 76 65 6e 2c 20 74 r\fR is given, t
1190: 68 65 20 6e 65 77 0a 63 6f 6d 6d 65 6e 74 20 6e he new.comment n
11a0: 6f 64 65 20 6f 62 6a 65 63 74 20 69 73 20 73 74 ode object is st
11b0: 6f 72 65 64 20 69 6e 20 74 68 69 73 20 76 61 72 ored in this var
11c0: 69 61 62 6c 65 2e 0a 2e 54 50 0a 5c 26 5c 66 42 iable...TP.\&\fB
11d0: 5c 66 42 63 72 65 61 74 65 43 44 41 54 41 53 65 \fBcreateCDATASe
11e0: 63 74 69 6f 6e 5c 66 50 20 5c 66 49 64 61 74 61 ction\fP \fIdata
11f0: 5c 66 42 20 3f 5c 66 49 6f 62 6a 56 61 72 5c 66 \fB ?\fIobjVar\f
1200: 42 3f 0a 5c 26 5c 66 52 43 72 65 61 74 65 73 20 B?.\&\fRCreates
1210: 28 61 6c 6c 6f 63 61 74 65 73 29 20 61 20 6e 65 (allocates) a ne
1220: 77 20 43 44 41 54 41 20 6e 6f 64 65 20 77 69 74 w CDATA node wit
1230: 68 20 6e 6f 64 65 20 76 61 6c 75 65 0a 5c 26 5c h node value.\&\
1240: 66 49 64 61 74 61 5c 66 52 2c 20 61 70 70 65 6e fIdata\fR, appen
1250: 64 73 20 69 74 20 74 6f 20 74 68 65 20 68 69 64 ds it to the hid
1260: 64 65 6e 20 66 72 61 67 6d 65 6e 74 20 6c 69 73 den fragment lis
1270: 74 20 69 6e 20 74 68 65 20 64 6f 63 75 6d 65 6e t in the documen
1280: 74 0a 6f 62 6a 65 63 74 20 61 6e 64 20 72 65 74 t.object and ret
1290: 75 72 6e 73 20 74 68 65 20 6e 6f 64 65 20 6f 62 urns the node ob
12a0: 6a 65 63 74 2e 20 20 49 66 20 5c 66 49 6f 62 6a ject. If \fIobj
12b0: 56 61 72 5c 66 52 20 69 73 20 67 69 76 65 6e 2c Var\fR is given,
12c0: 20 74 68 65 20 6e 65 77 0a 6e 6f 64 65 20 6f 62 the new.node ob
12d0: 6a 65 63 74 20 69 73 20 73 74 6f 72 65 64 20 69 ject is stored i
12e0: 6e 20 74 68 69 73 20 76 61 72 69 61 62 6c 65 2e n this variable.
12f0: 0a 2e 54 50 0a 5c 26 5c 66 42 5c 66 42 63 72 65 ..TP.\&\fB\fBcre
1300: 61 74 65 50 72 6f 63 65 73 73 69 6e 67 49 6e 73 ateProcessingIns
1310: 74 72 75 63 74 69 6f 6e 5c 66 50 20 5c 66 49 74 truction\fP \fIt
1320: 61 72 67 65 74 5c 66 42 20 5c 66 49 64 61 74 61 arget\fB \fIdata
1330: 5c 66 42 20 3f 5c 66 49 6f 62 6a 56 61 72 5c 66 \fB ?\fIobjVar\f
1340: 42 3f 0a 5c 26 5c 66 52 43 72 65 61 74 65 73 20 B?.\&\fRCreates
1350: 61 20 70 72 6f 63 65 73 73 20 69 6e 73 74 72 75 a process instru
1360: 63 74 69 6f 6e 2c 20 61 70 70 65 6e 64 73 20 69 ction, appends i
1370: 74 20 74 6f 20 74 68 65 20 68 69 64 64 65 6e 0a t to the hidden.
1380: 66 72 61 67 6d 65 6e 74 20 6c 69 73 74 20 69 6e fragment list in
1390: 20 74 68 65 20 64 6f 63 75 6d 65 6e 74 20 6f 62 the document ob
13a0: 6a 65 63 74 20 61 6e 64 20 72 65 74 75 72 6e 73 ject and returns
13b0: 20 74 68 65 20 6e 6f 64 65 20 6f 62 6a 65 63 74 the node object
13c0: 2e 20 20 49 66 0a 5c 26 5c 66 49 6f 62 6a 56 61 . If.\&\fIobjVa
13d0: 72 5c 66 52 20 69 73 20 67 69 76 65 6e 2c 20 74 r\fR is given, t
13e0: 68 65 20 6e 65 77 20 6e 6f 64 65 20 6f 62 6a 65 he new node obje
13f0: 63 74 20 69 73 20 73 74 6f 72 65 64 20 69 6e 20 ct is stored in
1400: 74 68 69 73 20 76 61 72 69 61 62 6c 65 2e 0a 2e this variable...
1410: 54 50 0a 5c 26 5c 66 42 5c 66 42 64 65 6c 65 74 TP.\&\fB\fBdelet
1420: 65 5c 66 50 0a 5c 26 5c 66 52 45 78 70 6c 69 63 e\fP.\&\fRExplic
1430: 69 74 6c 79 20 64 65 6c 65 74 65 73 20 74 68 65 itly deletes the
1440: 20 64 6f 63 75 6d 65 6e 74 2c 20 69 6e 63 6c 75 document, inclu
1450: 64 69 6e 67 20 74 68 65 20 61 73 73 6f 63 69 61 ding the associa
1460: 74 65 64 0a 54 63 6c 20 6f 62 6a 65 63 74 20 63 ted.Tcl object c
1470: 6f 6d 6d 61 6e 64 73 20 28 66 6f 72 20 6e 6f 64 ommands (for nod
1480: 65 73 2c 20 66 72 61 67 6d 65 6e 74 2f 6e 65 77 es, fragment/new
1490: 20 6e 6f 64 65 73 2c 20 74 68 65 20 64 6f 63 75 nodes, the docu
14a0: 6d 65 6e 74 20 6f 62 6a 65 63 74 20 69 74 73 65 ment object itse
14b0: 6c 66 29 0a 61 6e 64 20 74 68 65 20 75 6e 64 65 lf).and the unde
14c0: 72 6c 79 69 6e 67 20 44 4f 4d 20 74 72 65 65 2e rlying DOM tree.
14d0: 0a 2e 54 50 0a 5c 26 5c 66 42 5c 66 42 67 65 74 ..TP.\&\fB\fBget
14e0: 44 65 66 61 75 6c 74 4f 75 74 70 75 74 4d 65 74 DefaultOutputMet
14f0: 68 6f 64 5c 66 50 0a 5c 26 5c 66 52 52 65 74 75 hod\fP.\&\fRRetu
1500: 72 6e 73 20 74 68 65 20 64 65 66 61 75 6c 74 20 rns the default
1510: 6f 75 74 70 75 74 20 6d 65 74 68 6f 64 20 6f 66 output method of
1520: 20 74 68 65 20 64 6f 63 75 6d 65 6e 74 2e 20 54 the document. T
1530: 68 69 73 20 69 73 0a 75 73 75 61 6c 6c 79 20 61 his is.usually a
1540: 20 72 65 73 75 6c 74 20 6f 66 20 61 20 58 53 4c result of a XSL
1550: 54 20 74 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e T transformation
1560: 2e 0a 2e 54 50 0a 5c 26 5c 66 42 5c 66 42 61 73 ...TP.\&\fB\fBas
1570: 58 4d 4c 5c 66 50 20 5c 66 42 3f 2d 69 6e 64 65 XML\fP \fB?-inde
1580: 6e 74 20 6e 6f 6e 65 2f 31 2e 2e 38 3f 5c 66 50 nt none/1..8?\fP
1590: 20 5c 66 42 3f 2d 63 68 61 6e 6e 65 6c 20 63 68 \fB?-channel ch
15a0: 61 6e 6e 65 6c 49 64 3f 5c 66 50 20 5c 66 42 3f annelId?\fP \fB?
15b0: 2d 65 73 63 61 70 65 4e 6f 6e 41 53 43 49 49 3f -escapeNonASCII?
15c0: 5c 66 50 20 5c 66 42 3f 2d 64 6f 63 74 79 70 65 \fP \fB?-doctype
15d0: 44 65 63 6c 61 72 61 74 69 6f 6e 20 3c 62 6f 6f Declaration <boo
15e0: 6c 65 61 6e 3e 3f 5c 66 50 20 5c 66 42 2d 78 6d lean>?\fP \fB-xm
15f0: 6c 44 65 63 6c 61 72 61 74 69 6f 6e 20 3c 62 6f lDeclaration <bo
1600: 6f 6c 65 61 6e 3e 3f 5c 66 50 20 5c 66 42 2d 65 olean>?\fP \fB-e
1610: 6e 63 53 74 72 69 6e 67 20 3c 73 74 72 69 6e 67 ncString <string
1620: 3e 5c 66 50 20 5c 66 42 3f 2d 65 73 63 61 70 65 >\fP \fB?-escape
1630: 41 6c 6c 51 75 6f 74 3f 5c 66 50 20 5c 66 42 3f AllQuot?\fP \fB?
1640: 2d 69 6e 64 65 6e 74 41 74 74 72 73 3f 5c 66 50 -indentAttrs?\fP
1650: 20 5c 66 42 3f 2d 6e 6f 67 74 65 73 63 61 70 65 \fB?-nogtescape
1660: 3f 5c 66 50 20 5c 66 42 3f 2d 6e 6f 45 6d 70 74 ?\fP \fB?-noEmpt
1670: 79 45 6c 65 6d 65 6e 74 54 61 67 3f 5c 66 50 0a yElementTag?\fP.
1680: 5c 26 5c 66 52 0a 2e 52 53 0a 2e 50 50 0a 52 65 \&\fR..RS..PP.Re
1690: 74 75 72 6e 73 20 74 68 65 20 44 4f 4d 20 74 72 turns the DOM tr
16a0: 65 65 20 61 73 20 61 6e 20 28 6f 70 74 69 6f 6e ee as an (option
16b0: 61 6c 20 69 6e 64 65 6e 74 65 64 29 20 58 4d 4c al indented) XML
16c0: 0a 73 74 72 69 6e 67 20 6f 72 20 73 65 6e 64 73 .string or sends
16d0: 20 74 68 65 20 6f 75 74 70 75 74 20 64 69 72 65 the output dire
16e0: 63 74 6c 79 20 74 6f 20 74 68 65 20 67 69 76 65 ctly to the give
16f0: 6e 0a 63 68 61 6e 6e 65 6c 49 64 2e 0a 2e 50 50 n.channelId...PP
1700: 0a 49 66 20 74 68 65 20 6f 70 74 69 6f 6e 20 5c .If the option \
1710: 66 49 2d 65 73 63 61 70 65 4e 6f 6e 41 53 43 49 fI-escapeNonASCI
1720: 49 5c 66 52 20 69 73 20 67 69 76 65 6e 2c 0a 65 I\fR is given,.e
1730: 76 65 72 79 20 6e 6f 6e 20 37 20 62 69 74 20 41 very non 7 bit A
1740: 53 43 49 49 20 63 68 61 72 61 63 74 65 72 20 69 SCII character i
1750: 6e 20 61 74 74 72 69 62 75 74 65 20 76 61 6c 75 n attribute valu
1760: 65 73 20 6f 72 20 65 6c 65 6d 65 6e 74 0a 50 43 es or element.PC
1770: 44 41 54 41 20 63 6f 6e 74 65 6e 74 20 77 69 6c DATA content wil
1780: 6c 20 62 65 20 65 73 63 61 70 65 64 20 61 73 20 l be escaped as
1790: 63 68 61 72 61 63 74 65 72 20 72 65 66 65 72 65 character refere
17a0: 6e 63 65 20 69 6e 0a 64 65 63 69 6d 61 6c 20 72 nce in.decimal r
17b0: 65 70 72 65 73 65 6e 74 61 74 69 6f 6e 2e 0a 2e epresentation...
17c0: 50 50 0a 54 68 65 20 66 6c 61 67 20 5c 66 49 2d PP.The flag \fI-
17d0: 64 6f 63 74 79 70 65 44 65 63 6c 61 72 61 74 69 doctypeDeclarati
17e0: 6f 6e 5c 66 52 20 64 65 74 65 72 6d 69 6e 65 73 on\fR determines
17f0: 20 77 68 65 74 68 65 72 0a 74 68 65 72 65 20 77 whether.there w
1800: 69 6c 6c 20 62 65 20 61 20 44 4f 43 54 59 50 45 ill be a DOCTYPE
1810: 20 64 65 63 6c 61 72 61 74 69 6f 6e 20 65 6d 69 declaration emi
1820: 74 74 65 64 20 62 65 66 6f 72 65 20 74 68 65 20 tted before the
1830: 66 69 72 73 74 0a 6e 6f 64 65 20 6f 66 20 74 68 first.node of th
1840: 65 20 64 6f 63 75 6d 65 6e 74 2e 20 54 68 65 20 e document. The
1850: 64 65 66 61 75 6c 74 20 69 73 20 6e 6f 74 20 74 default is not t
1860: 6f 20 65 6d 69 74 20 69 74 2e 20 54 68 65 0a 44 o emit it. The.D
1870: 4f 43 54 59 50 45 20 6e 61 6d 65 20 77 69 6c 6c OCTYPE name will
1880: 20 61 6c 77 61 79 73 20 62 65 20 74 68 65 20 65 always be the e
1890: 6c 65 6d 65 6e 74 20 6e 61 6d 65 20 6f 66 20 74 lement name of t
18a0: 68 65 20 64 6f 63 75 6d 65 6e 74 0a 65 6c 65 6d he document.elem
18b0: 65 6e 74 2e 20 41 6e 20 65 78 74 65 72 6e 61 6c ent. An external
18c0: 20 65 6e 74 69 74 79 20 64 65 63 6c 61 72 61 74 entity declarat
18d0: 69 6f 6e 20 6f 66 20 74 68 65 20 65 78 74 65 72 ion of the exter
18e0: 6e 61 6c 20 73 75 62 73 65 74 0a 69 73 20 6f 6e nal subset.is on
18f0: 6c 79 20 65 6d 69 74 74 65 64 20 69 66 20 74 68 ly emitted if th
1900: 65 20 64 6f 63 75 6d 65 6e 74 20 68 61 73 20 61 e document has a
1910: 20 73 79 73 74 65 6d 20 69 64 65 6e 74 69 66 69 system identifi
1920: 65 72 2e 0a 2e 50 50 0a 54 68 65 20 66 6c 61 67 er...PP.The flag
1930: 20 5c 66 49 2d 78 6d 6c 44 65 63 6c 61 72 61 74 \fI-xmlDeclarat
1940: 69 6f 6e 5c 66 52 20 64 65 74 65 72 6d 69 6e 65 ion\fR determine
1950: 73 20 77 68 65 74 68 65 72 20 74 68 65 72 65 0a s whether there.
1960: 77 69 6c 6c 20 62 65 20 61 6e 20 58 4d 4c 20 44 will be an XML D
1970: 65 63 6c 61 72 61 74 69 6f 6e 20 61 6e 64 20 61 eclaration and a
1980: 20 6e 65 77 6c 69 6e 65 20 65 6d 69 74 74 65 64 newline emitted
1990: 20 62 65 66 6f 72 65 0a 61 6e 79 74 68 69 6e 67 before.anything
19a0: 20 65 6c 73 65 2e 20 54 68 65 20 64 65 66 61 75 else. The defau
19b0: 6c 74 20 69 73 20 6e 6f 74 20 74 6f 20 65 6d 69 lt is not to emi
19c0: 74 20 6f 6e 65 2e 20 49 66 20 74 68 69 73 20 66 t one. If this f
19d0: 6c 61 67 20 69 73 0a 67 69 76 65 6e 20 77 69 74 lag is.given wit
19e0: 68 20 61 20 74 72 75 65 20 61 72 67 75 6d 65 6e h a true argumen
19f0: 74 20 74 68 65 6e 0a 2e 50 50 0a 5c 26 5c 66 49 t then..PP.\&\fI
1a00: 2d 65 6e 63 53 74 72 69 6e 67 5c 66 52 20 73 65 -encString\fR se
1a10: 74 73 20 74 68 65 20 65 6e 63 6f 64 69 6e 67 20 ts the encoding
1a20: 76 61 6c 75 65 20 69 6e 20 74 68 65 20 58 4d 4c value in the XML
1a30: 0a 44 65 63 6c 61 72 61 74 69 6f 6e 2e 20 4f 74 .Declaration. Ot
1a40: 68 65 72 77 69 73 65 20 74 68 69 73 20 6f 70 74 herwise this opt
1a50: 69 6f 6e 20 69 73 20 69 67 6e 6f 72 65 64 2e 20 ion is ignored.
1a60: 50 6c 65 61 73 65 20 6e 6f 74 65 0a 74 68 61 74 Please note.that
1a70: 20 74 68 69 73 20 6f 70 74 69 6f 6e 20 6a 75 73 this option jus
1a80: 74 20 65 6e 68 61 6e 63 65 73 20 74 68 65 20 73 t enhances the s
1a90: 74 72 69 6e 67 20 72 65 70 72 65 73 65 6e 74 61 tring representa
1aa0: 74 69 6f 6e 20 6f 66 20 74 68 65 0a 67 65 6e 65 tion of the.gene
1ab0: 72 61 74 65 64 20 58 4d 4c 20 44 65 63 6c 61 72 rated XML Declar
1ac0: 61 74 69 6f 6e 20 77 69 74 68 20 61 6e 20 65 6e ation with an en
1ad0: 63 6f 64 69 6e 67 20 69 6e 66 6f 72 6d 61 74 69 coding informati
1ae0: 6f 6e 20 73 74 72 69 6e 67 2c 0a 6e 6f 74 68 69 on string,.nothi
1af0: 6e 67 20 6d 6f 72 65 2e 20 49 74 27 73 20 75 70 ng more. It's up
1b00: 20 74 6f 20 74 68 65 20 75 73 65 72 20 74 6f 20 to the user to
1b10: 68 61 6e 64 6c 65 20 65 6e 63 6f 64 69 6e 67 20 handle encoding
1b20: 69 6e 20 63 61 73 65 0a 6f 66 20 77 72 69 74 69 in case.of writi
1b30: 6e 67 20 74 6f 20 61 20 63 68 61 6e 6e 65 6c 20 ng to a channel
1b40: 6f 72 20 72 65 70 61 72 73 69 6e 67 2e 0a 2e 50 or reparsing...P
1b50: 50 0a 49 66 20 74 68 65 20 6f 70 74 69 6f 6e 20 P.If the option
1b60: 5c 66 49 2d 65 73 63 61 70 65 41 6c 6c 51 75 6f \fI-escapeAllQuo
1b70: 74 5c 66 52 20 69 73 20 67 69 76 65 6e 2c 0a 71 t\fR is given,.q
1b80: 75 6f 74 61 74 69 6f 6e 20 6d 61 72 6b 73 20 77 uotation marks w
1b90: 69 6c 6c 20 62 65 20 65 73 63 61 70 65 64 20 77 ill be escaped w
1ba0: 69 74 68 20 26 71 75 6f 74 3b 20 65 76 65 6e 20 ith " even
1bb0: 69 6e 20 74 65 78 74 0a 63 6f 6e 74 65 6e 74 20 in text.content
1bc0: 6f 66 20 65 6c 65 6d 65 6e 74 73 2e 0a 2e 50 50 of elements...PP
1bd0: 0a 49 66 20 74 68 65 20 6f 70 74 69 6f 6e 20 5c .If the option \
1be0: 66 49 2d 69 6e 64 65 6e 74 41 74 74 72 73 5c 66 fI-indentAttrs\f
1bf0: 52 20 69 73 0a 67 69 76 65 6e 2c 20 74 68 65 6e R is.given, then
1c00: 20 61 74 74 72 69 62 75 74 65 73 20 77 69 6c 6c attributes will
1c10: 20 65 61 63 68 20 62 65 20 73 65 70 61 72 61 74 each be separat
1c20: 65 64 20 77 69 74 68 20 6e 65 77 6c 69 6e 65 73 ed with newlines
1c30: 0a 61 6e 64 20 69 6e 64 65 6e 74 65 64 20 74 6f .and indented to
1c40: 20 74 68 65 20 73 61 6d 65 20 6c 65 76 65 6c 20 the same level
1c50: 61 73 20 74 68 65 20 70 61 72 65 6e 74 20 6e 6f as the parent no
1c60: 64 65 20 70 6c 75 73 20 74 68 65 0a 76 61 6c 75 de plus the.valu
1c70: 65 20 67 69 76 65 6e 20 61 73 20 61 72 67 75 6d e given as argum
1c80: 65 6e 74 20 74 6f 20 5c 66 49 2d 69 6e 64 65 6e ent to \fI-inden
1c90: 74 41 74 74 72 73 5c 66 52 20 28 30 2e 2e 38 29 tAttrs\fR (0..8)
1ca0: 2e 0a 2e 50 50 0a 49 66 20 74 68 65 20 6f 70 74 ...PP.If the opt
1cb0: 69 6f 6e 20 5c 66 49 2d 6e 6f 67 74 65 73 63 61 ion \fI-nogtesca
1cc0: 70 65 5c 66 52 20 69 73 20 67 69 76 65 6e 20 74 pe\fR is given t
1cd0: 68 65 6e 20 74 68 65 0a 63 68 61 72 61 63 74 65 hen the.characte
1ce0: 72 20 27 3e 27 20 77 6f 6e 27 74 20 67 65 74 20 r '>' won't get
1cf0: 65 73 63 61 70 65 64 20 69 6e 20 61 74 74 72 69 escaped in attri
1d00: 62 75 74 65 20 76 61 6c 75 65 73 20 61 6e 64 20 bute values and
1d10: 74 65 78 74 0a 63 6f 6e 74 65 6e 74 20 6f 66 20 text.content of
1d20: 65 6c 65 6d 65 6e 74 73 2e 20 54 68 65 20 64 65 elements. The de
1d30: 66 61 75 6c 74 20 69 73 20 74 6f 20 65 73 63 61 fault is to esca
1d40: 70 65 20 74 68 69 73 0a 63 68 61 72 61 63 74 65 pe this.characte
1d50: 72 2e 0a 2e 50 50 0a 49 66 20 74 68 65 20 6f 70 r...PP.If the op
1d60: 74 69 6f 6e 20 5c 66 49 2d 6e 6f 45 6d 70 74 79 tion \fI-noEmpty
1d70: 45 6c 65 6d 65 6e 74 54 61 67 5c 66 52 20 69 73 ElementTag\fR is
1d80: 20 67 69 76 65 6e 20 74 68 65 6e 20 6e 6f 0a 65 given then no.e
1d90: 6d 70 74 79 20 74 61 67 20 73 79 6e 74 61 78 20 mpty tag syntax
1da0: 77 69 6c 6c 20 62 65 20 75 73 65 64 2e 20 49 6e will be used. In
1db0: 73 74 65 61 64 2c 20 69 66 20 61 6e 20 65 6c 65 stead, if an ele
1dc0: 6d 65 6e 74 20 68 61 73 0a 65 6d 70 74 79 20 63 ment has.empty c
1dd0: 6f 6e 74 65 6e 74 20 69 74 20 77 69 6c 6c 20 62 ontent it will b
1de0: 65 20 73 65 72 69 61 6c 69 7a 65 64 20 77 69 74 e serialized wit
1df0: 68 20 61 6e 20 65 6c 65 6d 65 6e 74 20 73 74 61 h an element sta
1e00: 72 74 20 74 61 67 0a 61 6e 64 20 61 6e 20 69 6d rt tag.and an im
1e10: 6d 65 64 69 61 74 65 6c 79 20 66 6f 6c 6c 6f 77 mediately follow
1e20: 69 6e 67 20 65 6c 65 6d 65 6e 74 20 65 6e 64 20 ing element end
1e30: 74 61 67 2e 0a 2e 52 45 0a 2e 54 50 0a 5c 26 5c tag...RE..TP.\&\
1e40: 66 42 5c 66 42 61 73 48 54 4d 4c 5c 66 50 20 5c fB\fBasHTML\fP \
1e50: 66 42 3f 2d 63 68 61 6e 6e 65 6c 20 63 68 61 6e fB?-channel chan
1e60: 6e 65 6c 49 64 3f 5c 66 50 20 5c 66 42 3f 2d 65 nelId?\fP \fB?-e
1e70: 73 63 61 70 65 4e 6f 6e 41 53 43 49 49 3f 5c 66 scapeNonASCII?\f
1e80: 50 20 5c 66 42 3f 2d 68 74 6d 6c 45 6e 74 69 74 P \fB?-htmlEntit
1e90: 69 65 73 3f 5c 66 50 20 5c 66 42 3f 2d 64 6f 63 ies?\fP \fB?-doc
1ea0: 74 79 70 65 44 65 63 6c 61 72 61 74 69 6f 6e 20 typeDeclaration
1eb0: 3c 62 6f 6f 6c 65 61 6e 3e 3f 5c 66 50 0a 5c 26 <boolean>?\fP.\&
1ec0: 5c 66 52 52 65 74 75 72 6e 73 20 74 68 65 20 44 \fRReturns the D
1ed0: 4f 4d 20 74 72 65 65 20 73 65 72 69 61 6c 69 7a OM tree serializ
1ee0: 65 64 20 61 63 63 6f 72 64 69 6e 67 20 74 6f 20 ed according to
1ef0: 48 54 4d 4c 20 72 75 6c 65 73 0a 28 48 54 4d 4c HTML rules.(HTML
1f00: 20 65 6c 65 6d 65 6e 74 73 20 61 72 65 20 72 65 elements are re
1f10: 63 6f 67 6e 69 7a 65 64 20 72 65 67 61 72 64 6c cognized regardl
1f20: 65 73 73 20 6f 66 20 63 61 73 65 2c 20 77 69 74 ess of case, wit
1f30: 68 6f 75 74 20 65 6e 64 0a 74 61 67 73 20 66 6f hout end.tags fo
1f40: 72 20 65 6d 70 74 79 20 48 54 4d 4c 20 65 6c 65 r empty HTML ele
1f50: 6d 65 6e 74 73 20 65 74 63 2e 29 20 61 73 20 73 ments etc.) as s
1f60: 74 72 69 6e 67 20 6f 72 20 73 65 6e 64 73 20 74 tring or sends t
1f70: 68 65 0a 6f 75 74 70 75 74 20 64 69 72 65 63 74 he.output direct
1f80: 6c 79 20 74 6f 20 74 68 65 20 67 69 76 65 6e 20 ly to the given
1f90: 63 68 61 6e 6e 65 6c 49 64 2e 20 49 66 20 74 68 channelId. If th
1fa0: 65 20 6f 70 74 69 6f 6e 0a 5c 26 5c 66 49 2d 65 e option.\&\fI-e
1fb0: 73 63 61 70 65 4e 6f 6e 41 53 43 49 49 5c 66 52 scapeNonASCII\fR
1fc0: 20 69 73 20 67 69 76 65 6e 2c 20 65 76 65 72 79 is given, every
1fd0: 20 6e 6f 6e 20 37 20 62 69 74 20 41 53 43 49 49 non 7 bit ASCII
1fe0: 0a 63 68 61 72 61 63 74 65 72 20 69 6e 20 61 74 .character in at
1ff0: 74 72 69 62 75 74 65 20 76 61 6c 75 65 73 20 6f tribute values o
2000: 72 20 65 6c 65 6d 65 6e 74 20 50 43 44 41 54 41 r element PCDATA
2010: 20 63 6f 6e 74 65 6e 74 20 77 69 6c 6c 0a 62 65 content will.be
2020: 20 65 73 63 61 70 65 64 20 61 73 20 63 68 61 72 escaped as char
2030: 61 63 74 65 72 20 72 65 66 65 72 65 6e 63 65 20 acter reference
2040: 69 6e 20 64 65 63 69 6d 61 6c 20 72 65 70 72 65 in decimal repre
2050: 73 65 6e 74 61 74 69 6f 6e 2e 0a 49 66 20 74 68 sentation..If th
2060: 65 20 6f 70 74 69 6f 6e 20 5c 66 49 2d 68 74 6d e option \fI-htm
2070: 6c 45 6e 74 69 74 69 65 73 5c 66 52 20 69 73 20 lEntities\fR is
2080: 67 69 76 65 6e 2c 20 61 20 63 68 61 72 61 63 74 given, a charact
2090: 65 72 20 69 73 0a 77 72 69 74 74 65 6e 20 75 73 er is.written us
20a0: 69 6e 67 20 69 74 73 20 48 54 4d 4c 20 34 2e 30 ing its HTML 4.0
20b0: 31 20 63 68 61 72 61 63 74 65 72 20 65 6e 74 69 1 character enti
20c0: 74 79 20 72 65 66 65 72 65 6e 63 65 2c 20 69 66 ty reference, if
20d0: 20 69 74 0a 68 61 73 20 6f 6e 65 2e 20 49 66 20 it.has one. If
20e0: 74 68 65 20 66 6c 61 67 20 5c 66 49 2d 64 6f 63 the flag \fI-doc
20f0: 74 79 70 65 44 65 63 6c 61 72 61 74 69 6f 6e 5c typeDeclaration\
2100: 66 52 20 69 73 20 67 69 76 65 6e 20 74 68 65 72 fR is given ther
2110: 65 0a 77 69 6c 6c 20 62 65 20 61 20 44 4f 43 54 e.will be a DOCT
2120: 59 50 45 20 64 65 63 6c 61 72 61 74 69 6f 6e 20 YPE declaration
2130: 65 6d 69 74 74 65 64 20 62 65 66 6f 72 65 20 74 emitted before t
2140: 68 65 20 66 69 72 73 74 20 6e 6f 64 65 20 6f 66 he first node of
2150: 0a 74 68 65 20 64 6f 63 75 6d 65 6e 74 2e 20 54 .the document. T
2160: 68 65 20 64 65 66 61 75 6c 74 20 69 73 2c 20 74 he default is, t
2170: 6f 20 64 6f 20 6e 6f 74 2e 20 54 68 65 20 44 4f o do not. The DO
2180: 43 54 59 50 45 20 6e 61 6d 65 20 77 69 6c 6c 0a CTYPE name will.
2190: 61 6c 77 61 79 73 20 62 65 20 74 68 65 20 65 6c always be the el
21a0: 65 6d 65 6e 74 20 6e 61 6d 65 20 6f 66 20 74 68 ement name of th
21b0: 65 20 64 6f 63 75 6d 65 6e 74 20 65 6c 65 6d 65 e document eleme
21c0: 6e 74 20 77 69 74 68 6f 75 74 0a 63 61 73 65 20 nt without.case
21d0: 6e 6f 72 6d 61 6c 69 7a 61 74 69 6f 6e 2e 20 41 normalization. A
21e0: 6e 20 65 78 74 65 72 6e 61 6c 20 65 6e 74 69 74 n external entit
21f0: 79 20 64 65 63 6c 61 72 61 74 69 6f 6e 20 6f 66 y declaration of
2200: 20 74 68 65 0a 65 78 74 65 72 6e 61 6c 20 73 75 the.external su
2210: 62 73 65 74 20 69 73 20 6f 6e 6c 79 20 65 6d 69 bset is only emi
2220: 74 74 65 64 2c 20 69 66 20 74 68 65 20 64 6f 63 tted, if the doc
2230: 75 6d 65 6e 74 20 68 61 73 20 61 20 73 79 73 74 ument has a syst
2240: 65 6d 0a 69 64 65 6e 74 69 66 69 65 72 2e 20 54 em.identifier. T
2250: 68 65 20 64 6f 63 74 79 70 65 20 64 65 63 6c 61 he doctype decla
2260: 72 61 74 69 6f 6e 20 77 69 6c 6c 20 62 65 20 77 ration will be w
2270: 72 69 74 74 65 6e 20 66 72 6f 6d 20 74 68 65 0a ritten from the.
2280: 61 76 61 69 6c 61 62 6c 65 20 69 6e 66 6f 72 6d available inform
2290: 61 74 69 6f 6e 2c 20 77 69 74 68 6f 75 74 20 63 ation, without c
22a0: 68 65 63 6b 2c 20 69 66 20 74 68 69 73 20 69 73 heck, if this is
22b0: 20 61 20 6b 6e 6f 77 6e 0a 28 77 33 63 29 20 48 a known.(w3c) H
22c0: 54 4d 4c 20 76 65 72 73 69 6f 6e 20 69 6e 66 6f TML version info
22d0: 72 6d 61 74 69 6f 6e 20 6f 72 20 69 66 20 74 68 rmation or if th
22e0: 65 20 64 6f 63 75 6d 65 6e 74 20 63 6f 6e 66 69 e document confi
22f0: 72 6d 73 20 74 6f 0a 74 68 65 20 67 69 76 65 6e rms to.the given
2300: 20 48 54 4d 4c 20 76 65 72 73 69 6f 6e 2e 0a 2e HTML version...
2310: 54 50 0a 5c 26 5c 66 42 5c 66 42 61 73 54 65 78 TP.\&\fB\fBasTex
2320: 74 5c 66 50 0a 5c 26 5c 66 52 54 68 65 20 61 73 t\fP.\&\fRThe as
2330: 54 65 78 74 20 6d 65 74 68 6f 64 20 72 65 74 75 Text method retu
2340: 72 6e 73 20 74 68 65 20 74 72 65 65 20 62 79 20 rns the tree by
2350: 73 65 72 69 61 6c 69 7a 69 6e 67 20 74 68 65 0a serializing the.
2360: 73 74 72 69 6e 67 2d 76 61 6c 75 65 20 6f 66 20 string-value of
2370: 65 76 65 72 79 20 74 65 78 74 20 6e 6f 64 65 20 every text node
2380: 69 6e 20 64 6f 63 75 6d 65 6e 74 20 6f 72 64 65 in document orde
2390: 72 20 77 69 74 68 6f 75 74 0a 61 6e 79 20 65 73 r without.any es
23a0: 63 61 70 69 6e 67 2e 20 49 6e 20 65 66 66 65 63 caping. In effec
23b0: 74 2c 20 74 68 69 73 20 69 73 20 77 68 61 74 20 t, this is what
23c0: 74 68 65 20 78 73 6c 74 20 6f 75 74 70 75 74 20 the xslt output
23d0: 6d 65 74 68 6f 64 0a 22 74 65 78 74 22 20 28 58 method."text" (X
23e0: 53 4c 54 20 31 2e 30 20 72 65 63 6f 6d 6d 65 6e SLT 1.0 recommen
23f0: 64 61 74 69 6f 6e 2c 20 73 65 63 74 69 6f 6e 20 dation, section
2400: 31 36 2e 33 29 20 64 6f 65 73 2e 0a 2e 54 50 0a 16.3) does...TP.
2410: 5c 26 5c 66 42 5c 66 42 61 73 4a 53 4f 4e 5c 66 \&\fB\fBasJSON\f
2420: 50 20 5c 66 42 3f 2d 69 6e 64 65 6e 74 20 6e 6f P \fB?-indent no
2430: 6e 65 2f 30 2e 2e 38 3f 5c 66 50 20 5c 66 42 3f ne/0..8?\fP \fB?
2440: 2d 63 68 61 6e 6e 65 6c 20 63 68 61 6e 6e 65 6c -channel channel
2450: 49 64 3f 5c 66 50 0a 5c 26 5c 66 52 0a 2e 52 53 Id?\fP.\&\fR..RS
2460: 0a 2e 50 50 0a 54 68 65 20 61 73 4a 53 4f 4e 20 ..PP.The asJSON
2470: 6d 65 74 68 6f 64 20 73 65 72 69 61 6c 69 7a 65 method serialize
2480: 73 20 74 68 65 20 74 72 65 65 20 69 6e 74 6f 20 s the tree into
2490: 61 20 76 61 6c 69 64 0a 4a 53 4f 4e 20 64 61 74 a valid.JSON dat
24a0: 61 20 73 74 72 69 6e 67 2e 20 49 6e 20 67 65 6e a string. In gen
24b0: 65 72 61 6c 2c 20 74 68 69 73 20 6d 61 79 20 62 eral, this may b
24c0: 65 20 61 20 6c 6f 73 73 79 0a 73 65 72 69 61 6c e a lossy.serial
24d0: 69 7a 61 74 69 6f 6e 2e 20 46 6f 72 20 74 68 69 ization. For thi
24e0: 73 20 73 65 72 69 61 6c 69 7a 61 74 69 6f 6e 20 s serialization
24f0: 61 6c 6c 20 63 6f 6d 6d 65 6e 74 2c 20 63 68 61 all comment, cha
2500: 72 61 63 74 65 72 0a 64 61 74 61 20 73 65 63 74 racter.data sect
2510: 69 6f 6e 73 20 61 6e 64 20 70 72 6f 63 65 73 73 ions and process
2520: 69 6e 67 20 69 6e 73 74 72 75 63 74 69 6f 6e 20 ing instruction
2530: 6e 6f 64 65 73 2c 20 61 6c 6c 0a 61 74 74 72 69 nodes, all.attri
2540: 62 75 74 65 73 20 61 6e 64 20 61 6c 6c 20 58 4d butes and all XM
2550: 4c 20 6e 61 6d 65 73 70 61 63 65 73 20 61 72 65 L namespaces are
2560: 20 69 67 6e 6f 72 65 64 2e 20 4f 6e 6c 79 20 65 ignored. Only e
2570: 6c 65 6d 65 6e 74 0a 61 6e 64 20 74 65 78 74 20 lement.and text
2580: 6e 6f 64 65 73 20 6d 61 79 20 62 65 20 72 65 66 nodes may be ref
2590: 6c 65 63 74 65 64 20 69 6e 20 74 68 65 20 67 65 lected in the ge
25a0: 6e 65 72 61 74 65 64 20 4a 53 4f 4e 0a 73 65 72 nerated JSON.ser
25b0: 69 61 6c 69 7a 61 74 69 6f 6e 2e 20 41 70 70 72 ialization. Appr
25c0: 6f 70 72 69 61 74 65 20 4a 53 4f 4e 20 64 61 74 opriate JSON dat
25d0: 61 20 74 79 70 65 20 69 6e 66 6f 72 6d 61 74 69 a type informati
25e0: 6f 6e 20 6f 66 20 61 0a 6e 6f 64 65 20 77 69 6c on of a.node wil
25f0: 6c 20 62 65 20 72 65 73 70 65 63 74 65 64 2e 0a l be respected..
2600: 2e 50 50 0a 49 66 20 61 6e 20 65 6c 65 6d 65 6e .PP.If an elemen
2610: 74 20 6e 6f 64 65 20 68 61 73 20 74 68 65 20 4a t node has the J
2620: 53 4f 4e 20 74 79 70 65 20 4f 42 4a 45 43 54 2c SON type OBJECT,
2630: 20 74 68 65 6e 20 65 76 65 72 79 0a 65 6c 65 6d then every.elem
2640: 65 6e 74 20 6e 6f 64 65 20 63 68 69 6c 64 20 6f ent node child o
2650: 66 20 74 68 69 73 20 65 6c 65 6d 65 6e 74 20 77 f this element w
2660: 69 6c 6c 20 62 65 20 73 65 72 69 61 6c 69 7a 65 ill be serialize
2670: 64 20 61 73 0a 6d 65 6d 62 65 72 20 6f 66 20 74 d as.member of t
2680: 68 61 74 20 6f 62 6a 65 63 74 2c 20 77 69 74 68 hat object, with
2690: 20 74 68 65 20 6e 6f 64 65 20 6e 61 6d 65 20 6f the node name o
26a0: 66 20 74 68 65 20 63 68 69 6c 64 20 61 73 0a 74 f the child as.t
26b0: 68 65 20 6d 65 6d 62 65 72 20 6e 61 6d 65 20 61 he member name a
26c0: 6e 64 20 74 68 65 20 72 65 6c 65 76 61 6e 74 20 nd the relevant
26d0: 63 68 69 6c 64 72 65 6e 20 6f 66 20 74 68 61 74 children of that
26e0: 20 63 68 69 6c 64 20 61 73 0a 74 68 65 20 76 61 child as.the va
26f0: 6c 75 65 2e 20 45 76 65 72 79 20 6f 74 68 65 72 lue. Every other
2700: 20 63 68 69 6c 64 20 6e 6f 64 65 73 20 77 69 6c child nodes wil
2710: 6c 20 62 65 20 69 67 6e 6f 72 65 64 2e 0a 2e 50 l be ignored...P
2720: 50 0a 49 66 20 61 6e 20 65 6c 65 6d 65 6e 74 20 P.If an element
2730: 6e 6f 64 65 20 68 61 73 20 74 68 65 20 4a 53 4f node has the JSO
2740: 4e 20 74 79 70 65 20 41 52 52 41 59 2c 20 74 68 N type ARRAY, th
2750: 65 6e 20 74 68 65 20 74 65 78 74 0a 61 6e 64 20 en the text.and
2760: 65 6c 65 6d 65 6e 74 20 6e 6f 64 65 20 63 68 69 element node chi
2770: 6c 64 72 65 6e 20 6f 66 20 74 68 61 74 20 65 6c ldren of that el
2780: 65 6d 65 6e 74 20 6e 6f 64 65 20 61 72 65 20 73 ement node are s
2790: 65 72 69 61 6c 69 7a 65 64 0a 61 73 20 74 68 65 erialized.as the
27a0: 20 63 6f 6e 73 65 63 75 74 69 76 65 20 76 61 6c consecutive val
27b0: 75 65 73 20 6f 66 20 74 68 65 20 61 72 72 61 79 ues of the array
27c0: 2e 20 45 6c 65 6d 65 6e 74 20 6e 6f 64 65 20 63 . Element node c
27d0: 68 69 6c 64 72 65 6e 0a 6f 66 20 61 6e 20 41 52 hildren.of an AR
27e0: 52 41 59 20 65 6c 65 6d 65 6e 74 20 77 69 6c 6c RAY element will
27f0: 20 62 65 20 63 6f 6e 74 61 69 6e 65 72 20 6e 6f be container no
2800: 64 65 73 20 66 6f 72 20 6e 65 73 74 65 64 20 41 des for nested A
2810: 52 52 41 59 0a 6f 72 20 4f 42 4a 45 43 54 20 76 RRAY.or OBJECT v
2820: 61 6c 75 65 73 2e 0a 2e 50 50 0a 54 65 78 74 20 alues...PP.Text
2830: 6e 6f 64 65 73 20 77 69 74 68 20 74 68 65 20 4a nodes with the J
2840: 53 4f 4e 20 74 79 70 65 73 20 54 52 55 45 2c 20 SON types TRUE,
2850: 46 41 4c 53 45 20 6f 72 20 4e 55 4c 4c 20 77 69 FALSE or NULL wi
2860: 6c 6c 0a 62 65 20 73 65 72 69 61 6c 69 7a 65 64 ll.be serialized
2870: 20 74 6f 20 74 68 65 20 63 6f 72 72 65 73 70 6f to the correspo
2880: 6e 64 69 6e 67 20 4a 53 4f 4e 20 74 6f 6b 65 6e nding JSON token
2890: 20 77 69 74 68 6f 75 74 0a 6c 6f 6f 6b 69 6e 67 without.looking
28a0: 20 61 74 20 74 68 65 20 76 61 6c 75 65 20 6f 66 at the value of
28b0: 20 74 68 65 20 74 65 78 74 20 6e 6f 64 65 2e 20 the text node.
28c0: 41 20 74 65 78 74 20 6e 6f 64 65 20 77 69 74 68 A text node with
28d0: 6f 75 74 0a 4a 53 4f 4e 20 74 79 70 65 20 77 69 out.JSON type wi
28e0: 6c 6c 20 61 6c 77 61 79 73 20 62 65 20 73 65 72 ll always be ser
28f0: 69 61 6c 69 7a 65 64 20 61 73 20 61 20 4a 53 4f ialized as a JSO
2900: 4e 20 73 74 72 69 6e 67 20 74 6f 6b 65 6e 2e 0a N string token..
2910: 41 20 74 65 78 74 20 6e 6f 64 65 20 77 69 74 68 A text node with
2920: 20 4a 53 4f 4e 20 74 79 70 65 20 4e 55 4d 42 45 JSON type NUMBE
2930: 52 20 77 69 6c 6c 20 62 65 20 73 65 72 69 61 6c R will be serial
2940: 69 7a 65 64 20 61 73 20 4a 53 4f 4e 0a 6e 75 6d ized as JSON.num
2950: 62 65 72 20 74 6f 6b 65 6e 20 69 66 20 74 68 65 ber token if the
2960: 20 74 65 78 74 20 6e 6f 64 65 20 76 61 6c 75 65 text node value
2970: 20 69 73 20 69 6e 20 66 61 63 74 20 61 20 76 61 is in fact a va
2980: 6c 69 64 20 4a 53 4f 4e 0a 6e 75 6d 62 65 72 20 lid JSON.number
2990: 61 6e 64 20 61 73 20 61 20 4a 53 4f 4e 20 73 74 and as a JSON st
29a0: 72 69 6e 67 20 69 66 20 6e 6f 74 2e 0a 2e 50 50 ring if not...PP
29b0: 0a 49 66 20 61 6e 20 65 6c 65 6d 65 6e 74 20 6e .If an element n
29c0: 6f 64 65 20 64 6f 65 73 6e 27 74 20 68 61 73 20 ode doesn't has
29d0: 61 20 4a 53 4f 4e 20 74 79 70 65 20 74 68 65 6e a JSON type then
29e0: 20 74 68 65 0a 73 65 72 69 61 6c 69 7a 61 74 69 the.serializati
29f0: 6f 6e 20 6f 66 20 69 74 73 20 63 68 69 6c 64 72 on of its childr
2a00: 65 6e 20 69 73 20 64 65 74 65 72 6d 69 6e 65 64 en is determined
2a10: 20 62 79 20 74 68 65 20 66 6f 6c 6c 6f 77 69 6e by the followin
2a20: 67 0a 72 75 6c 65 73 3a 0a 2e 50 50 0a 4f 6e 6c g.rules:..PP.Onl
2a30: 79 20 74 65 78 74 20 61 6e 64 20 65 6c 65 6d 65 y text and eleme
2a40: 6e 74 20 6e 6f 64 65 20 63 68 69 6c 64 20 61 72 nt node child ar
2a50: 65 20 72 65 6c 65 76 61 6e 74 2e 20 49 66 20 74 e relevant. If t
2a60: 68 65 0a 65 6c 65 6d 65 6e 74 20 6e 6f 64 65 20 he.element node
2a70: 74 6f 20 73 65 72 69 61 6c 69 7a 65 20 69 73 20 to serialize is
2a80: 74 68 65 20 6d 65 6d 62 65 72 20 6f 66 20 61 20 the member of a
2a90: 4a 53 4f 4e 20 6f 62 6a 65 63 74 20 61 6e 64 0a JSON object and.
2aa0: 74 68 65 72 65 20 69 73 20 6e 6f 20 72 65 6c 65 there is no rele
2ab0: 76 61 6e 74 20 63 68 69 6c 64 20 6e 6f 64 65 20 vant child node
2ac0: 74 68 65 20 76 61 6c 75 65 20 6f 66 20 74 68 61 the value of tha
2ad0: 74 20 6d 65 6d 62 65 72 0a 77 69 6c 6c 20 62 65 t member.will be
2ae0: 20 61 6e 20 65 6d 70 74 79 20 4a 53 4f 4e 20 73 an empty JSON s
2af0: 74 72 69 6e 67 2e 20 49 66 20 74 68 65 20 6f 6e tring. If the on
2b00: 6c 79 20 72 65 6c 65 76 61 6e 74 20 63 68 69 6c ly relevant chil
2b10: 64 0a 6e 6f 64 65 20 6f 66 20 74 68 69 73 20 65 d.node of this e
2b20: 6c 65 6d 65 6e 74 20 6e 6f 64 65 20 69 73 20 61 lement node is a
2b30: 20 74 65 78 74 20 6e 6f 64 65 20 74 68 65 6e 20 text node then
2b40: 74 68 65 20 4a 53 4f 4e 0a 76 61 6c 75 65 20 6f the JSON.value o
2b50: 66 20 74 68 61 74 20 74 65 78 74 20 6e 6f 64 65 f that text node
2b60: 20 77 69 6c 6c 20 62 65 20 74 68 65 20 76 61 6c will be the val
2b70: 75 65 20 6f 66 20 74 68 65 20 6f 62 6a 65 63 74 ue of the object
2b80: 0a 6d 65 6d 62 65 72 2e 20 49 66 20 74 68 65 20 .member. If the
2b90: 65 6c 65 6d 65 6e 74 20 68 61 73 20 6d 6f 72 65 element has more
2ba0: 20 74 68 61 6e 20 6f 6e 65 20 72 65 6c 65 76 61 than one releva
2bb0: 6e 74 20 63 68 69 6c 64 0a 6e 6f 64 65 73 20 61 nt child.nodes a
2bc0: 6e 64 20 74 68 65 20 66 69 72 73 74 20 6f 6e 65 nd the first one
2bd0: 20 69 73 20 61 20 74 65 78 74 20 6e 6f 64 65 20 is a text node
2be0: 74 68 65 6e 20 74 68 65 20 72 65 6c 65 76 61 6e then the relevan
2bf0: 74 0a 63 68 69 6c 64 72 65 6e 20 77 69 6c 6c 20 t.children will
2c00: 62 65 20 73 65 72 69 61 6c 69 7a 65 64 20 61 73 be serialized as
2c10: 20 4a 53 4f 4e 20 61 72 72 61 79 2e 20 49 66 20 JSON array. If
2c20: 74 68 65 20 6f 6e 6c 79 0a 72 65 6c 65 76 61 6e the only.relevan
2c30: 74 20 63 68 69 6c 64 20 6e 6f 64 65 20 69 73 20 t child node is
2c40: 61 6e 20 65 6c 65 6d 65 6e 74 20 6e 6f 64 65 20 an element node
2c50: 6f 72 20 74 68 65 20 66 69 72 73 74 20 72 65 6c or the first rel
2c60: 65 76 61 6e 74 0a 63 68 69 6c 64 20 69 73 20 61 evant.child is a
2c70: 6e 20 65 6c 65 6d 65 6e 74 20 6e 6f 64 65 20 61 n element node a
2c80: 6e 64 20 74 68 65 20 6e 6f 64 65 20 6e 61 6d 65 nd the node name
2c90: 20 6f 66 20 74 68 61 74 20 6f 6e 6c 79 20 6f 72 of that only or
2ca0: 0a 66 69 72 73 74 20 72 65 6c 65 76 61 6e 74 20 .first relevant
2cb0: 63 68 69 6c 64 20 69 73 6e 27 74 20 65 71 75 61 child isn't equa
2cc0: 6c 20 74 6f 20 74 68 65 20 61 72 72 61 79 20 63 l to the array c
2cd0: 6f 6e 74 61 69 6e 65 72 20 6e 6f 64 65 0a 6e 61 ontainer node.na
2ce0: 6d 65 20 61 6c 6c 20 65 6c 65 6d 65 6e 74 20 6e me all element n
2cf0: 6f 64 65 20 63 68 69 6c 64 72 65 6e 20 77 69 6c ode children wil
2d00: 6c 20 62 65 20 73 65 72 69 61 6c 69 7a 65 64 20 l be serialized
2d10: 61 73 20 74 68 65 0a 6d 65 6d 62 65 72 73 20 6f as the.members o
2d20: 66 20 61 20 4a 53 4f 4e 20 6f 62 6a 65 63 74 20 f a JSON object
2d30: 28 77 68 69 6c 65 20 69 67 6e 6f 72 69 6e 67 20 (while ignoring
2d40: 61 6e 79 20 69 6e 74 65 72 6d 69 78 65 64 20 74 any intermixed t
2d50: 65 78 74 0a 6e 6f 64 65 73 29 2e 20 49 66 20 74 ext.nodes). If t
2d60: 68 65 20 6f 6e 6c 79 20 6f 72 20 66 69 72 73 74 he only or first
2d70: 20 72 65 6c 65 76 61 6e 74 20 63 68 69 6c 64 20 relevant child
2d80: 69 73 20 61 6e 20 65 6c 65 6d 65 6e 74 0a 6e 6f is an element.no
2d90: 64 65 20 61 6e 64 20 74 68 65 20 6e 6f 64 65 20 de and the node
2da0: 6e 61 6d 65 20 6f 66 20 74 68 69 73 20 63 68 69 name of this chi
2db0: 6c 64 20 69 73 20 65 71 75 61 6c 20 74 6f 20 74 ld is equal to t
2dc0: 68 65 20 61 72 72 61 79 0a 63 6f 6e 74 61 69 6e he array.contain
2dd0: 65 72 20 65 6c 65 6d 65 6e 74 20 6e 61 6d 65 20 er element name
2de0: 74 68 65 6e 20 61 6c 6c 20 72 65 6c 65 76 61 6e then all relevan
2df0: 74 20 63 68 69 6c 64 72 65 6e 20 77 69 6c 6c 20 t children will
2e00: 62 65 0a 73 65 72 69 61 6c 69 7a 65 64 20 61 73 be.serialized as
2e10: 20 74 68 65 20 76 61 6c 75 65 73 20 6f 66 20 61 the values of a
2e20: 20 4a 53 4f 4e 20 61 72 72 61 79 2e 0a 2e 50 50 JSON array...PP
2e30: 0a 49 66 20 74 68 65 20 65 6c 65 6d 65 6e 74 20 .If the element
2e40: 74 6f 20 73 65 72 69 61 6c 69 7a 65 20 69 73 20 to serialize is
2e50: 61 20 76 61 6c 75 65 20 6f 66 20 61 20 4a 53 4f a value of a JSO
2e60: 4e 20 61 72 72 61 79 0a 61 6e 64 20 74 68 65 20 N array.and the
2e70: 6e 6f 64 65 20 6e 61 6d 65 20 6f 66 20 74 68 69 node name of thi
2e80: 73 20 65 6c 65 6d 65 6e 74 20 69 73 6e 27 74 20 s element isn't
2e90: 65 71 75 61 6c 20 74 6f 20 74 68 65 20 61 72 72 equal to the arr
2ea0: 61 79 0a 63 6f 6e 74 61 69 6e 65 72 20 6e 6f 64 ay.container nod
2eb0: 65 20 6e 61 6d 65 20 74 68 61 74 20 65 6c 65 6d e name that elem
2ec0: 65 6e 74 20 77 69 6c 6c 20 62 65 20 73 65 65 6e ent will be seen
2ed0: 20 61 73 20 61 20 63 6f 6e 74 61 69 6e 65 72 0a as a container.
2ee0: 6e 6f 64 65 20 66 6f 72 20 61 20 4a 53 4f 4e 20 node for a JSON
2ef0: 6f 62 6a 65 63 74 20 61 6e 64 20 61 6c 6c 20 65 object and all e
2f00: 6c 65 6d 65 6e 74 20 6e 6f 64 65 20 63 68 69 6c lement node chil
2f10: 64 72 65 6e 20 77 69 6c 6c 20 62 65 0a 73 65 72 dren will be.ser
2f20: 69 61 6c 69 7a 65 64 20 61 73 20 74 68 65 20 6d ialized as the m
2f30: 65 6d 62 65 72 73 20 6f 66 20 74 68 61 74 20 61 embers of that a
2f40: 72 72 61 79 20 77 68 69 6c 65 20 69 67 6e 6f 72 rray while ignor
2f50: 69 6e 67 20 61 6e 79 0a 74 65 78 74 20 6e 6f 64 ing any.text nod
2f60: 65 20 63 68 69 6c 64 72 65 6e 2e 20 49 66 20 74 e children. If t
2f70: 68 65 20 65 6c 65 6d 65 6e 74 20 74 6f 20 73 65 he element to se
2f80: 72 69 61 6c 69 7a 65 20 69 73 20 61 20 76 61 6c rialize is a val
2f90: 75 65 20 6f 66 0a 61 20 4a 53 4f 4e 20 61 72 72 ue of.a JSON arr
2fa0: 61 79 20 61 6e 64 20 74 68 65 20 6e 6f 64 65 20 ay and the node
2fb0: 6e 61 6d 65 20 6f 66 20 74 68 69 73 20 65 6c 65 name of this ele
2fc0: 6d 65 6e 74 20 69 73 20 65 71 75 61 6c 20 74 6f ment is equal to
2fd0: 0a 74 68 65 20 61 72 72 61 79 20 63 6f 6e 74 61 .the array conta
2fe0: 69 6e 65 72 20 6e 6f 64 65 20 6e 61 6d 65 2c 20 iner node name,
2ff0: 61 6c 6c 20 72 65 6c 65 76 61 6e 74 20 63 68 69 all relevant chi
3000: 6c 64 72 65 6e 20 77 69 6c 6c 20 62 65 0a 73 65 ldren will be.se
3010: 72 69 61 6c 69 7a 65 64 20 61 73 20 4a 53 4f 4e rialized as JSON
3020: 20 61 72 72 61 79 2e 0a 2e 50 50 0a 49 66 20 74 array...PP.If t
3030: 68 65 20 5c 66 49 2d 63 68 61 6e 6e 65 6c 5c 66 he \fI-channel\f
3040: 52 20 6f 70 74 69 6f 6e 20 69 73 20 67 69 76 65 R option is give
3050: 6e 20 74 68 65 20 73 65 72 69 61 6c 69 7a 61 74 n the serializat
3060: 69 6f 6e 0a 69 73 6e 27 74 20 72 65 74 75 72 6e ion.isn't return
3070: 65 64 20 61 73 20 73 74 72 69 6e 67 20 62 75 74 ed as string but
3080: 20 73 65 6e 64 20 64 69 72 65 63 74 6c 79 20 74 send directly t
3090: 6f 20 74 68 65 20 63 68 61 6e 6e 65 6c 2c 0a 67 o the channel,.g
30a0: 69 76 65 6e 20 61 73 20 61 72 67 75 6d 65 6e 74 iven as argument
30b0: 20 74 6f 20 74 68 65 20 6f 70 74 69 6f 6e 2e 0a to the option..
30c0: 2e 50 50 0a 49 66 20 74 68 65 20 5c 66 49 2d 69 .PP.If the \fI-i
30d0: 6e 64 65 6e 74 5c 66 52 20 6f 70 74 69 6f 6e 20 ndent\fR option
30e0: 69 73 20 67 69 76 65 6e 20 61 6e 64 20 74 68 65 is given and the
30f0: 20 61 72 67 75 6d 65 6e 74 0a 67 69 76 65 6e 20 argument.given
3100: 74 6f 20 74 68 69 73 20 6f 70 74 69 6f 6e 20 69 to this option i
3110: 73 6e 27 74 20 22 6e 6f 6e 65 22 20 74 68 65 6e sn't "none" then
3120: 20 74 68 65 20 72 65 74 75 72 6e 65 64 20 4a 53 the returned JS
3130: 4f 4e 0a 73 74 72 69 6e 67 20 69 73 20 22 70 72 ON.string is "pr
3140: 65 74 74 79 2d 70 72 69 6e 74 65 64 22 2e 20 54 etty-printed". T
3150: 68 65 20 6e 75 6d 65 72 69 63 20 61 72 67 75 6d he numeric argum
3160: 65 6e 74 20 74 6f 20 74 68 69 73 0a 6f 70 74 69 ent to this.opti
3170: 6f 6e 20 64 65 66 69 6e 65 73 20 74 68 65 20 6e on defines the n
3180: 75 6d 62 65 72 20 6f 66 20 73 70 61 63 65 73 20 umber of spaces
3190: 66 6f 72 20 61 6e 79 20 69 6e 64 65 6e 74 61 74 for any indentat
31a0: 69 6f 6e 0a 6c 65 76 65 6c 2e 20 54 68 65 20 64 ion.level. The d
31b0: 65 66 61 75 6c 74 20 69 73 20 74 6f 20 6e 6f 74 efault is to not
31c0: 20 65 6d 69 74 20 61 6e 79 20 61 64 64 69 74 69 emit any additi
31d0: 6f 6e 61 6c 0a 77 68 69 74 65 20 73 70 61 63 65 onal.white space
31e0: 2e 0a 2e 52 45 0a 2e 54 50 0a 5c 26 5c 66 42 5c ...RE..TP.\&\fB\
31f0: 66 42 70 75 62 6c 69 63 49 64 5c 66 50 20 5c 66 fBpublicId\fP \f
3200: 49 3f 70 75 62 6c 69 63 49 64 3f 5c 66 42 0a 5c I?publicId?\fB.\
3210: 26 5c 66 52 52 65 74 75 72 6e 73 20 74 68 65 20 &\fRReturns the
3220: 70 75 62 6c 69 63 20 69 64 65 6e 74 69 66 69 65 public identifie
3230: 72 20 6f 66 20 74 68 65 20 64 6f 63 74 79 70 65 r of the doctype
3240: 20 64 65 63 6c 61 72 61 74 69 6f 6e 20 6f 66 20 declaration of
3250: 74 68 65 0a 64 6f 63 75 6d 65 6e 74 2c 20 69 66 the.document, if
3260: 20 74 68 65 72 65 20 69 73 20 6f 6e 65 2c 20 6f there is one, o
3270: 74 68 65 72 77 69 73 65 20 74 68 65 20 65 6d 70 therwise the emp
3280: 74 79 20 73 74 72 69 6e 67 2e 20 49 66 20 74 68 ty string. If th
3290: 65 72 65 20 69 73 20 61 20 76 61 6c 75 65 0a 67 ere is a value.g
32a0: 69 76 65 6e 20 74 6f 20 74 68 65 20 6d 65 74 68 iven to the meth
32b0: 6f 64 2c 20 74 68 65 20 70 75 62 6c 69 63 20 69 od, the public i
32c0: 64 65 6e 74 69 66 69 65 72 20 6f 66 20 74 68 65 dentifier of the
32d0: 20 64 6f 63 75 6d 65 6e 74 20 69 73 20 73 65 74 document is set
32e0: 20 74 6f 20 74 68 69 73 0a 76 61 6c 75 65 2e 0a to this.value..
32f0: 2e 54 50 0a 5c 26 5c 66 42 5c 66 42 73 79 73 74 .TP.\&\fB\fBsyst
3300: 65 6d 49 64 5c 66 50 20 5c 66 49 3f 73 79 73 74 emId\fP \fI?syst
3310: 65 6d 49 64 3f 5c 66 42 0a 5c 26 5c 66 52 52 65 emId?\fB.\&\fRRe
3320: 74 75 72 6e 73 20 74 68 65 20 73 79 73 74 65 6d turns the system
3330: 20 69 64 65 6e 74 69 66 69 65 72 20 6f 66 20 74 identifier of t
3340: 68 65 20 64 6f 63 74 79 70 65 20 64 65 63 6c 61 he doctype decla
3350: 72 61 74 69 6f 6e 20 6f 66 20 74 68 65 0a 64 6f ration of the.do
3360: 63 75 6d 65 6e 74 2c 20 69 66 20 74 68 65 72 65 cument, if there
3370: 20 69 73 20 6f 6e 65 2c 20 6f 74 68 65 72 77 69 is one, otherwi
3380: 73 65 20 74 68 65 20 65 6d 70 74 79 20 73 74 72 se the empty str
3390: 69 6e 67 2e 20 49 66 20 74 68 65 72 65 20 69 73 ing. If there is
33a0: 20 61 20 76 61 6c 75 65 0a 67 69 76 65 6e 20 74 a value.given t
33b0: 6f 20 74 68 65 20 6d 65 74 68 6f 64 2c 20 74 68 o the method, th
33c0: 65 20 73 79 73 74 65 6d 20 69 64 65 6e 74 69 66 e system identif
33d0: 69 65 72 20 6f 66 20 74 68 65 20 64 6f 63 75 6d ier of the docum
33e0: 65 6e 74 20 69 73 20 73 65 74 20 74 6f 20 74 68 ent is set to th
33f0: 69 73 0a 76 61 6c 75 65 2e 0a 2e 54 50 0a 5c 26 is.value...TP.\&
3400: 5c 66 42 5c 66 42 69 6e 74 65 72 6e 61 6c 53 75 \fB\fBinternalSu
3410: 62 73 65 74 5c 66 50 20 5c 66 49 3f 69 6e 74 65 bset\fP \fI?inte
3420: 72 6e 61 6c 53 75 62 73 65 74 3f 5c 66 42 0a 5c rnalSubset?\fB.\
3430: 26 5c 66 52 52 65 74 75 72 6e 73 20 74 68 65 20 &\fRReturns the
3440: 69 6e 74 65 72 6e 61 6c 20 73 75 62 73 65 74 20 internal subset
3450: 6f 66 20 74 68 65 20 64 6f 63 74 79 70 65 20 64 of the doctype d
3460: 65 63 6c 61 72 61 74 69 6f 6e 20 6f 66 20 74 68 eclaration of th
3470: 65 0a 64 6f 63 75 6d 65 6e 74 2c 20 69 66 20 74 e.document, if t
3480: 68 65 72 65 20 69 73 20 6f 6e 65 2c 20 6f 74 68 here is one, oth
3490: 65 72 77 69 73 65 20 74 68 65 20 65 6d 70 74 79 erwise the empty
34a0: 20 73 74 72 69 6e 67 2e 20 49 66 20 74 68 65 72 string. If ther
34b0: 65 20 69 73 20 61 20 76 61 6c 75 65 0a 67 69 76 e is a value.giv
34c0: 65 6e 20 74 6f 20 74 68 65 20 6d 65 74 68 6f 64 en to the method
34d0: 2c 20 74 68 65 20 69 6e 74 65 72 6e 61 6c 20 73 , the internal s
34e0: 75 62 73 65 74 20 6f 66 20 74 68 65 20 64 6f 63 ubset of the doc
34f0: 75 6d 65 6e 74 20 69 73 20 73 65 74 20 74 6f 20 ument is set to
3500: 74 68 69 73 0a 76 61 6c 75 65 2e 20 4e 6f 74 65 this.value. Note
3510: 20 74 68 61 74 20 6e 6f 6e 65 20 6f 66 20 74 68 that none of th
3520: 65 20 70 61 72 73 69 6e 67 20 6d 65 74 68 6f 64 e parsing method
3530: 73 20 70 72 65 73 65 72 76 65 20 74 68 65 20 69 s preserve the i
3540: 6e 74 65 72 6e 61 6c 20 73 75 62 73 65 74 0a 6f nternal subset.o
3550: 66 20 61 20 64 6f 63 75 6d 65 6e 74 3b 20 61 20 f a document; a
3560: 66 72 65 73 68 6c 79 20 70 61 72 73 65 64 20 64 freshly parsed d
3570: 6f 63 75 6d 65 6e 74 20 77 69 6c 6c 20 61 6c 77 ocument will alw
3580: 61 79 73 20 68 61 76 65 20 61 6e 20 65 6d 70 74 ays have an empt
3590: 79 20 69 6e 74 65 72 6e 61 6c 0a 73 75 62 73 65 y internal.subse
35a0: 74 2e 20 41 6c 73 6f 20 6e 6f 74 65 2c 20 74 68 t. Also note, th
35b0: 61 74 20 74 68 65 20 6d 65 74 68 6f 64 20 64 6f at the method do
35c0: 65 73 6e 27 74 20 64 6f 20 61 6e 79 20 73 79 6e esn't do any syn
35d0: 74 61 63 74 69 63 61 6c 20 63 68 65 63 6b 20 6f tactical check o
35e0: 6e 20 61 0a 67 69 76 65 6e 20 69 6e 74 65 72 6e n a.given intern
35f0: 61 6c 20 73 75 62 73 65 74 2e 0a 2e 54 50 0a 5c al subset...TP.\
3600: 26 5c 66 42 5c 66 42 63 64 61 74 61 53 65 63 74 &\fB\fBcdataSect
3610: 69 6f 6e 45 6c 65 6d 65 6e 74 73 5c 66 50 20 5c ionElements\fP \
3620: 66 49 28 3f 55 52 49 3a 3f 6c 6f 63 61 6c 6e 61 fI(?URI:?localna
3630: 6d 65 7c 2a 29 20 3f 3c 62 6f 6f 6c 65 61 6e 3e me|*) ?<boolean>
3640: 3f 5c 66 42 0a 5c 26 5c 66 52 54 68 69 73 20 6d ?\fB.\&\fRThis m
3650: 65 74 68 6f 64 20 61 6c 6c 6f 77 73 20 6f 6e 65 ethod allows one
3660: 20 74 6f 20 63 6f 6e 74 72 6f 6c 20 66 6f 72 20 to control for
3670: 77 68 69 63 68 20 65 6c 65 6d 65 6e 74 20 6e 6f which element no
3680: 64 65 73 0a 74 68 65 20 74 65 78 74 20 6e 6f 64 des.the text nod
3690: 65 20 63 68 69 6c 64 72 65 6e 20 77 69 6c 6c 20 e children will
36a0: 62 65 20 73 65 72 69 61 6c 69 7a 65 64 20 61 73 be serialized as
36b0: 20 43 44 41 54 41 20 73 65 63 74 69 6f 6e 73 20 CDATA sections
36c0: 28 74 68 69 73 20 61 66 66 65 63 74 73 20 6f 6e (this affects on
36d0: 6c 79 0a 73 65 72 69 61 6c 69 7a 61 74 69 6f 6e ly.serialization
36e0: 20 77 69 74 68 20 74 68 65 20 61 73 58 4d 4c 20 with the asXML
36f0: 6d 65 74 68 6f 64 2c 20 6e 6f 20 74 65 78 74 20 method, no text
3700: 6e 6f 64 65 20 69 73 20 61 6c 74 65 72 65 64 20 node is altered
3710: 69 6e 20 61 6e 79 0a 77 61 79 20 62 79 20 74 68 in any.way by th
3720: 69 73 20 6d 65 74 68 6f 64 29 2e 20 49 46 20 74 is method). IF t
3730: 68 65 20 6d 65 74 68 6f 64 20 69 73 20 63 61 6c he method is cal
3740: 6c 65 64 20 77 69 74 68 20 61 6e 20 65 6c 65 6d led with an elem
3750: 65 6e 74 20 6e 61 6d 65 20 61 73 0a 66 69 72 73 ent name as.firs
3760: 74 20 61 72 67 75 6d 65 6e 74 20 61 6e 64 20 61 t argument and a
3770: 20 62 6f 6f 6c 65 61 6e 20 77 69 74 68 20 76 61 boolean with va
3780: 6c 75 65 20 74 72 75 65 20 61 73 20 73 65 63 6f lue true as seco
3790: 6e 64 20 61 72 67 75 6d 65 6e 74 2c 20 65 76 65 nd argument, eve
37a0: 72 79 0a 74 65 78 74 20 6e 6f 64 65 20 63 68 69 ry.text node chi
37b0: 6c 64 20 6f 66 20 65 76 65 72 79 20 65 6c 65 6d ld of every elem
37c0: 65 6e 74 20 6e 6f 64 65 20 69 6e 20 74 68 65 20 ent node in the
37d0: 64 6f 63 75 6d 65 6e 74 20 77 69 74 68 20 74 68 document with th
37e0: 65 20 73 61 6d 65 0a 6e 61 6d 65 20 61 73 20 74 e same.name as t
37f0: 68 65 20 66 69 72 73 74 20 61 72 67 75 6d 65 6e he first argumen
3800: 74 20 77 69 6c 6c 20 62 65 20 73 65 72 69 61 6c t will be serial
3810: 69 7a 65 64 20 61 73 20 43 44 41 54 41 20 73 65 ized as CDATA se
3820: 63 74 69 6f 6e 2e 20 49 66 20 74 68 65 0a 73 65 ction. If the.se
3830: 63 6f 6e 64 20 61 72 67 75 6d 65 6e 74 20 69 73 cond argument is
3840: 20 61 20 62 6f 6f 6c 65 61 6e 20 77 69 74 68 20 a boolean with
3850: 76 61 6c 75 65 20 66 61 6c 73 65 2c 20 61 6c 6c value false, all
3860: 20 74 65 78 74 20 6e 6f 64 65 73 20 6f 66 20 61 text nodes of a
3870: 6c 6c 0a 65 6c 65 6d 65 6e 74 73 20 77 69 74 68 ll.elements with
3880: 20 74 68 65 20 73 61 6d 65 20 6e 61 6d 65 20 61 the same name a
3890: 73 20 74 68 65 20 66 69 72 73 74 20 61 72 67 75 s the first argu
38a0: 6d 65 6e 74 20 77 69 6c 6c 20 62 65 20 73 65 72 ment will be ser
38b0: 69 61 6c 69 7a 65 64 0a 61 73 20 75 73 75 61 6c ialized.as usual
38c0: 2e 20 4e 61 6d 65 73 70 61 63 65 64 20 65 6c 65 . Namespaced ele
38d0: 6d 65 6e 74 20 6e 61 6d 65 73 20 68 61 76 65 20 ment names have
38e0: 74 6f 20 62 65 20 67 69 76 65 6e 20 69 6e 20 74 to be given in t
38f0: 68 65 20 66 6f 72 6d 0a 6e 61 6d 65 73 70 61 63 he form.namespac
3900: 65 5f 55 52 49 3a 6c 6f 63 61 6c 6e 61 6d 65 2c e_URI:localname,
3910: 20 6e 6f 74 20 69 6e 20 74 68 65 20 6f 74 68 65 not in the othe
3920: 72 77 69 73 65 20 75 73 75 61 6c 20 70 72 65 66 rwise usual pref
3930: 69 78 3a 6c 6f 63 61 6c 6e 61 6d 65 0a 66 6f 72 ix:localname.for
3940: 6d 2e 20 57 69 74 68 20 74 77 6f 20 61 72 67 75 m. With two argu
3950: 6d 65 6e 74 73 20 63 61 6c 6c 65 64 2c 20 74 68 ments called, th
3960: 65 20 6d 65 74 68 6f 64 20 72 65 74 75 72 6e 73 e method returns
3970: 20 74 68 65 20 75 73 65 64 20 62 6f 6f 6c 65 61 the used boolea
3980: 6e 0a 76 61 6c 75 65 2e 20 49 66 20 74 68 65 20 n.value. If the
3990: 6d 65 74 68 6f 64 20 69 73 20 63 61 6c 6c 65 64 method is called
39a0: 20 77 69 74 68 20 6f 6e 6c 79 20 61 6e 20 65 6c with only an el
39b0: 65 6d 65 6e 74 20 6e 61 6d 65 2c 20 69 74 20 77 ement name, it w
39c0: 69 6c 6c 0a 72 65 74 75 72 6e 20 61 20 62 6f 6f ill.return a boo
39d0: 6c 65 61 6e 20 76 61 6c 75 65 2c 20 69 6e 64 69 lean value, indi
39e0: 63 61 74 69 6e 67 20 74 68 61 74 20 74 68 65 20 cating that the
39f0: 74 65 78 74 20 6e 6f 64 65 20 63 68 69 6c 64 72 text node childr
3a00: 65 6e 20 6f 66 20 61 6c 6c 0a 65 6c 65 6d 65 6e en of all.elemen
3a10: 74 73 20 77 69 74 68 20 74 68 61 74 20 6e 61 6d ts with that nam
3a20: 65 20 69 6e 20 74 68 65 20 64 6f 63 75 6d 65 6e e in the documen
3a30: 74 20 77 69 6c 6c 20 62 65 20 73 65 72 69 61 6c t will be serial
3a40: 69 7a 65 64 20 61 73 20 43 44 41 54 41 0a 73 65 ized as CDATA.se
3a50: 63 74 69 6f 6e 20 65 6c 65 6d 65 6e 74 73 20 28 ction elements (
3a60: 72 65 74 75 72 6e 20 76 61 6c 75 65 20 31 29 20 return value 1)
3a70: 6f 72 20 6e 6f 74 20 28 72 65 74 75 72 6e 20 76 or not (return v
3a80: 61 6c 75 65 20 30 29 2e 20 49 66 20 74 68 65 0a alue 0). If the.
3a90: 6d 65 74 68 6f 64 20 69 73 20 63 61 6c 6c 65 64 method is called
3aa0: 20 77 69 74 68 20 6f 6e 6c 79 20 6f 6e 65 20 61 with only one a
3ab0: 72 67 75 6d 65 6e 74 20 61 6e 64 20 74 68 61 74 rgument and that
3ac0: 20 61 72 67 75 6d 65 6e 74 20 69 73 20 61 6e 0a argument is an.
3ad0: 61 73 74 65 72 69 73 6b 20 28 27 2a 27 29 2c 20 asterisk ('*'),
3ae0: 74 68 65 6e 20 74 68 65 20 6d 65 74 68 6f 64 20 then the method
3af0: 72 65 74 75 72 6e 73 20 61 6e 20 75 6e 6f 72 64 returns an unord
3b00: 65 72 65 64 20 6c 69 73 74 20 6f 66 20 61 6c 6c ered list of all
3b10: 0a 65 6c 65 6d 65 6e 74 20 6e 61 6d 65 73 20 6f .element names o
3b20: 66 20 74 68 65 20 64 6f 63 75 6d 65 6e 74 2c 20 f the document,
3b30: 66 6f 72 20 77 68 69 63 68 20 74 68 65 20 74 65 for which the te
3b40: 78 74 20 6e 6f 64 65 20 63 68 69 6c 64 72 65 6e xt node children
3b50: 20 77 69 6c 6c 20 62 65 0a 73 65 72 69 61 6c 69 will be.seriali
3b60: 7a 65 64 20 61 73 20 43 44 41 54 41 20 73 65 63 zed as CDATA sec
3b70: 74 69 6f 6e 20 6e 6f 64 65 73 2e 0a 2e 54 50 0a tion nodes...TP.
3b80: 5c 26 5c 66 42 5c 66 42 73 65 6c 65 63 74 4e 6f \&\fB\fBselectNo
3b90: 64 65 73 4e 61 6d 65 73 70 61 63 65 73 5c 66 50 desNamespaces\fP
3ba0: 20 5c 66 42 3f 70 72 65 66 69 78 55 72 69 4c 69 \fB?prefixUriLi
3bb0: 73 74 3f 5c 66 50 0a 5c 26 5c 66 52 54 68 69 73 st?\fP.\&\fRThis
3bc0: 20 6d 65 74 68 6f 64 20 61 6c 6c 6f 77 73 20 6f method allows o
3bd0: 6e 65 20 74 6f 20 63 6f 6e 74 72 6f 6c 20 61 20 ne to control a
3be0: 64 6f 63 75 6d 65 6e 74 20 67 6c 6f 62 61 6c 20 document global
3bf0: 70 72 65 66 69 78 0a 74 6f 20 6e 61 6d 65 73 70 prefix.to namesp
3c00: 61 63 65 20 55 52 49 20 6d 61 70 70 69 6e 67 2c ace URI mapping,
3c10: 20 77 68 69 63 68 20 77 69 6c 6c 20 62 65 20 75 which will be u
3c20: 73 65 64 20 66 6f 72 20 73 65 6c 65 63 74 4e 6f sed for selectNo
3c30: 64 65 73 0a 6d 65 74 68 6f 64 20 63 61 6c 6c 73 des.method calls
3c40: 20 28 6f 6e 20 64 6f 63 75 6d 65 6e 74 20 61 73 (on document as
3c50: 20 77 65 6c 6c 20 61 73 20 6f 6e 20 61 6c 6c 20 well as on all
3c60: 6e 6f 64 65 73 2c 20 77 68 69 63 68 0a 62 65 6c nodes, which.bel
3c70: 6f 6e 67 73 20 74 6f 20 74 68 65 20 64 6f 63 75 ongs to the docu
3c80: 6d 65 6e 74 29 20 69 66 20 69 74 20 69 73 20 6e ment) if it is n
3c90: 6f 74 20 6f 76 65 72 77 72 69 74 74 65 6e 20 62 ot overwritten b
3ca0: 79 20 75 73 69 6e 67 0a 74 68 65 20 2d 6e 61 6d y using.the -nam
3cb0: 65 73 70 61 63 65 73 20 6f 70 74 69 6f 6e 20 6f espaces option o
3cc0: 66 20 74 68 65 20 73 65 6c 65 63 74 4e 6f 64 65 f the selectNode
3cd0: 73 20 6d 65 74 68 6f 64 2e 20 41 6e 79 0a 6e 61 s method. Any.na
3ce0: 6d 65 73 70 61 63 65 20 70 72 65 66 69 78 20 77 mespace prefix w
3cf0: 69 74 68 69 6e 20 61 6e 20 78 70 61 74 68 20 65 ithin an xpath e
3d00: 78 70 72 65 73 73 69 6f 6e 20 77 69 6c 6c 20 62 xpression will b
3d10: 65 20 66 69 72 73 74 0a 72 65 73 6f 6c 76 65 64 e first.resolved
3d20: 20 61 67 61 69 6e 73 74 20 74 68 69 73 20 6c 69 against this li
3d30: 73 74 2e 20 49 66 20 74 68 65 20 6c 69 73 74 20 st. If the list
3d40: 62 69 6e 64 73 20 74 68 65 20 73 61 6d 65 20 70 binds the same p
3d50: 72 65 66 69 78 0a 74 6f 20 64 69 66 66 65 72 65 refix.to differe
3d60: 6e 74 20 6e 61 6d 65 73 70 61 63 65 73 2c 20 74 nt namespaces, t
3d70: 68 65 6e 20 74 68 65 20 66 69 72 73 74 20 62 69 hen the first bi
3d80: 6e 64 69 6e 67 20 77 69 6c 6c 20 77 69 6e 2e 20 nding will win.
3d90: 49 66 20 61 0a 70 72 65 66 69 78 20 63 6f 75 6c If a.prefix coul
3da0: 64 20 6e 6f 74 20 72 65 73 6f 6c 76 65 64 20 61 d not resolved a
3db0: 67 61 69 6e 73 74 20 74 68 65 20 64 6f 63 75 6d gainst the docum
3dc0: 65 6e 74 20 67 6c 6f 62 61 6c 20 70 72 65 66 69 ent global prefi
3dd0: 78 20 2f 0a 6e 61 6d 65 73 70 61 63 65 73 20 6c x /.namespaces l
3de0: 69 73 74 2c 20 74 68 65 6e 20 74 68 65 20 6e 61 ist, then the na
3df0: 6d 65 73 70 61 63 65 20 64 65 66 69 6e 69 74 69 mespace definiti
3e00: 6f 6e 73 20 69 6e 20 73 63 6f 70 65 20 6f 66 0a ons in scope of.
3e10: 74 68 65 20 63 6f 6e 74 65 78 74 20 6e 6f 64 65 the context node
3e20: 20 77 69 6c 6c 20 62 65 20 75 73 65 64 20 74 6f will be used to
3e30: 20 72 65 73 6f 6c 76 65 20 74 68 65 20 70 72 65 resolve the pre
3e40: 66 69 78 2c 20 61 73 20 75 73 75 61 6c 2e 0a 49 fix, as usual..I
3e50: 66 20 74 68 65 20 6f 70 74 69 6f 6e 61 6c 20 61 f the optional a
3e60: 72 67 75 6d 65 6e 74 20 5c 66 49 70 72 65 66 69 rgument \fIprefi
3e70: 78 55 72 69 4c 69 73 74 5c 66 52 20 69 73 20 67 xUriList\fR is g
3e80: 69 76 65 6e 2c 20 74 68 65 6e 0a 74 68 65 20 67 iven, then.the g
3e90: 6c 6f 62 61 6c 20 70 72 65 66 69 78 20 2f 20 6e lobal prefix / n
3ea0: 61 6d 65 73 70 61 63 65 20 6c 69 73 74 20 69 73 amespace list is
3eb0: 20 73 65 74 20 74 6f 20 74 68 69 73 20 6c 69 73 set to this lis
3ec0: 74 20 61 6e 64 0a 72 65 74 75 72 6e 73 20 69 74 t and.returns it
3ed0: 2e 20 57 69 74 68 6f 75 74 20 74 68 65 20 6f 70 . Without the op
3ee0: 74 69 6f 6e 61 6c 20 61 72 67 75 6d 65 6e 74 20 tional argument
3ef0: 74 68 65 20 6d 65 74 68 6f 64 20 72 65 74 75 72 the method retur
3f00: 6e 73 0a 74 68 65 20 63 75 72 72 65 6e 74 20 6c ns.the current l
3f10: 69 73 74 2e 20 54 68 65 20 64 65 66 61 75 6c 74 ist. The default
3f20: 20 69 73 20 74 68 65 20 65 6d 70 74 79 20 6c 69 is the empty li
3f30: 73 74 2e 0a 2e 54 50 0a 5c 26 5c 66 42 5c 66 42 st...TP.\&\fB\fB
3f40: 78 73 6c 74 5c 66 50 20 5c 66 42 3f 2d 70 61 72 xslt\fP \fB?-par
3f50: 61 6d 65 74 65 72 73 20 70 61 72 61 6d 65 74 65 ameters paramete
3f60: 72 4c 69 73 74 3f 5c 66 50 20 5c 66 42 3f 2d 69 rList?\fP \fB?-i
3f70: 67 6e 6f 72 65 55 6e 64 65 63 6c 61 72 65 64 50 gnoreUndeclaredP
3f80: 61 72 61 6d 65 74 65 72 73 3f 5c 66 50 20 5c 66 arameters?\fP \f
3f90: 42 3f 2d 6d 61 78 41 70 70 6c 79 44 65 70 74 68 B?-maxApplyDepth
3fa0: 20 69 6e 74 3f 5c 66 50 20 5c 66 42 3f 2d 78 73 int?\fP \fB?-xs
3fb0: 6c 74 6d 65 73 73 61 67 65 63 6d 64 20 73 63 72 ltmessagecmd scr
3fc0: 69 70 74 3f 5c 66 50 20 5c 66 49 73 74 79 6c 65 ipt?\fP \fIstyle
3fd0: 73 68 65 65 74 5c 66 42 20 5c 66 49 3f 6f 75 74 sheet\fB \fI?out
3fe0: 70 75 74 56 61 72 3f 5c 66 42 0a 5c 26 5c 66 52 putVar?\fB.\&\fR
3ff0: 41 70 70 6c 69 65 73 20 61 6e 20 58 53 4c 54 20 Applies an XSLT
4000: 74 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 6f transformation o
4010: 6e 20 74 68 65 20 77 68 6f 6c 65 20 64 6f 63 75 n the whole docu
4020: 6d 65 6e 74 20 6f 66 20 74 68 65 20 6e 6f 64 65 ment of the node
4030: 0a 6f 62 6a 65 63 74 20 75 73 69 6e 67 20 74 68 .object using th
4040: 65 20 58 53 4c 54 20 5c 66 49 73 74 79 6c 65 73 e XSLT \fIstyles
4050: 68 65 65 74 5c 66 52 20 28 67 69 76 65 6e 20 61 heet\fR (given a
4060: 73 20 64 6f 6d 44 6f 63 29 2e 20 52 65 74 75 72 s domDoc). Retur
4070: 6e 73 20 61 20 64 6f 63 75 6d 65 6e 74 0a 6f 62 ns a document.ob
4080: 6a 65 63 74 20 63 6f 6e 74 61 69 6e 69 6e 67 20 ject containing
4090: 74 68 65 20 72 65 73 75 6c 74 20 64 6f 63 75 6d the result docum
40a0: 65 6e 74 20 6f 66 20 74 68 65 20 74 72 61 6e 73 ent of the trans
40b0: 66 6f 72 6d 61 74 69 6f 6e 20 61 6e 64 20 73 74 formation and st
40c0: 6f 72 65 73 20 74 68 61 74 0a 64 6f 63 75 6d 65 ores that.docume
40d0: 6e 74 20 6f 62 6a 65 63 74 20 69 6e 20 74 68 65 nt object in the
40e0: 20 6f 70 74 69 6f 6e 61 6c 20 5c 66 49 6f 75 74 optional \fIout
40f0: 70 75 74 56 61 72 5c 66 52 2c 20 69 66 20 74 68 putVar\fR, if th
4100: 61 74 20 77 61 73 20 67 69 76 65 6e 2e 0a 2e 52 at was given...R
4110: 53 0a 2e 50 50 0a 54 68 65 20 6f 70 74 69 6f 6e S..PP.The option
4120: 61 6c 20 5c 66 49 2d 70 61 72 61 6d 65 74 65 72 al \fI-parameter
4130: 73 5c 66 52 20 6f 70 74 69 6f 6e 20 73 65 74 73 s\fR option sets
4140: 20 74 6f 70 20 6c 65 76 65 6c 0a 3c 78 73 6c 3a top level.<xsl:
4150: 70 61 72 61 6d 3e 20 74 6f 20 73 74 72 69 6e 67 param> to string
4160: 20 76 61 6c 75 65 73 2e 20 54 68 65 20 5c 66 49 values. The \fI
4170: 70 61 72 61 6d 65 74 65 72 4c 69 73 74 5c 66 52 parameterList\fR
4180: 20 68 61 73 20 74 6f 20 62 65 20 61 20 74 63 6c has to be a tcl
4190: 0a 6c 69 73 74 20 63 6f 6e 73 69 73 74 69 6e 67 .list consisting
41a0: 20 6f 66 20 70 61 72 61 6d 65 74 65 72 20 6e 61 of parameter na
41b0: 6d 65 20 61 6e 64 20 76 61 6c 75 65 20 70 61 69 me and value pai
41c0: 72 73 2e 0a 2e 50 50 0a 49 66 20 74 68 65 20 6f rs...PP.If the o
41d0: 70 74 69 6f 6e 20 5c 66 49 2d 69 67 6e 6f 72 65 ption \fI-ignore
41e0: 55 6e 64 65 63 6c 61 72 65 64 50 61 72 61 6d 65 UndeclaredParame
41f0: 74 65 72 73 5c 66 52 20 69 73 20 67 69 76 65 6e ters\fR is given
4200: 2c 20 74 68 65 6e 20 70 61 72 61 6d 65 74 65 72 , then parameter
4210: 0a 6e 61 6d 65 73 20 69 6e 20 74 68 65 20 5c 66 .names in the \f
4220: 49 70 61 72 61 6d 65 74 65 72 4c 69 73 74 5c 66 IparameterList\f
4230: 52 20 67 69 76 65 6e 20 74 6f 20 74 68 65 20 5c R given to the \
4240: 66 49 2d 70 61 72 61 6d 65 74 65 72 73 5c 66 52 fI-parameters\fR
4250: 20 6f 70 74 69 6f 6e 73 20 74 68 61 74 0a 61 72 options that.ar
4260: 65 20 6e 6f 74 20 64 65 63 6c 61 72 65 64 20 61 e not declared a
4270: 73 20 74 6f 70 2d 6c 65 76 65 6c 20 70 61 72 61 s top-level para
4280: 6d 65 74 65 72 73 20 69 6e 20 74 68 65 20 73 74 meters in the st
4290: 79 6c 65 73 68 65 65 74 20 61 72 65 20 73 69 6c ylesheet are sil
42a0: 65 6e 74 6c 79 0a 69 67 6e 6f 72 65 64 2e 20 57 ently.ignored. W
42b0: 69 74 68 6f 75 74 20 74 68 69 73 20 6f 70 74 69 ithout this opti
42c0: 6f 6e 2c 20 61 6e 20 65 72 72 6f 72 20 69 73 20 on, an error is
42d0: 72 61 69 73 65 64 20 69 66 20 74 68 65 20 75 73 raised if the us
42e0: 65 72 20 74 72 69 65 73 20 74 6f 20 73 65 74 20 er tries to set
42f0: 61 0a 74 6f 70 2d 6c 65 76 65 6c 20 70 61 72 61 a.top-level para
4300: 6d 65 74 65 72 20 74 68 61 74 20 69 73 20 6e 6f meter that is no
4310: 74 20 64 65 63 6c 61 72 65 64 20 69 6e 20 74 68 t declared in th
4320: 65 20 73 74 79 6c 65 73 68 65 65 74 2e 0a 2e 50 e stylesheet...P
4330: 50 0a 54 68 65 20 6f 70 74 69 6f 6e 20 5c 66 49 P.The option \fI
4340: 2d 6d 61 78 41 70 70 6c 79 44 65 70 74 68 5c 66 -maxApplyDepth\f
4350: 52 20 65 78 70 65 63 74 73 20 61 20 70 6f 73 69 R expects a posi
4360: 74 69 76 20 69 6e 74 65 67 65 72 20 61 73 0a 61 tiv integer as.a
4370: 72 67 75 6d 65 6e 74 2e 20 42 79 20 64 65 66 61 rgument. By defa
4380: 75 6c 74 2c 20 74 68 65 20 78 73 6c 74 20 65 6e ult, the xslt en
4390: 67 69 6e 65 20 61 6c 6c 6f 77 73 20 78 73 6c 74 gine allows xslt
43a0: 20 74 65 6d 70 6c 61 74 65 73 20 74 6f 20 6e 65 templates to ne
43b0: 73 74 20 75 70 0a 74 6f 20 33 30 30 30 20 6c 65 st up.to 3000 le
43c0: 76 65 6c 73 20 28 61 6e 64 20 72 61 69 73 65 73 vels (and raises
43d0: 20 65 72 72 6f 72 20 69 66 20 74 68 65 79 20 6e error if they n
43e0: 65 73 74 20 64 65 65 70 65 72 29 2e 20 54 68 69 est deeper). Thi
43f0: 73 20 6c 69 6d 69 74 20 63 61 6e 0a 62 65 20 73 s limit can.be s
4400: 65 74 20 62 79 20 74 68 65 20 5c 66 49 2d 6d 61 et by the \fI-ma
4410: 78 41 70 70 6c 79 44 65 70 74 68 5c 66 52 20 6f xApplyDepth\fR o
4420: 70 74 69 6f 6e 2e 0a 2e 50 50 0a 54 68 65 20 5c ption...PP.The \
4430: 66 49 2d 78 73 6c 74 6d 65 73 73 61 67 65 63 6d fI-xsltmessagecm
4440: 64 5c 66 52 20 6f 70 74 69 6f 6e 20 73 65 74 73 d\fR option sets
4450: 20 61 20 63 61 6c 6c 62 61 63 6b 20 66 6f 72 20 a callback for
4460: 78 73 6c 74 3a 6d 65 73 73 61 67 65 20 65 6c 65 xslt:message ele
4470: 6d 65 6e 74 73 0a 69 6e 20 74 68 65 20 73 74 79 ments.in the sty
4480: 6c 65 73 68 65 65 74 2e 20 54 68 65 20 61 63 74 lesheet. The act
4490: 75 61 6c 20 63 6f 6d 6d 61 6e 64 20 63 6f 6e 73 ual command cons
44a0: 69 73 74 73 20 6f 66 20 74 68 65 20 73 63 72 69 ists of the scri
44b0: 70 74 2c 20 67 69 76 65 6e 20 61 73 20 61 72 67 pt, given as arg
44c0: 75 6d 65 6e 74 0a 74 6f 20 74 68 65 20 6f 70 74 ument.to the opt
44d0: 69 6f 6e 2c 20 61 70 70 65 6e 64 65 64 20 77 69 ion, appended wi
44e0: 74 68 20 74 68 65 20 58 4d 4c 20 46 72 61 67 6d th the XML Fragm
44f0: 65 6e 74 20 66 72 6f 6d 20 69 6e 73 74 61 6e 74 ent from instant
4500: 69 61 74 69 6e 67 20 74 68 65 0a 78 73 6c 3a 6d iating the.xsl:m
4510: 65 73 73 61 67 65 20 65 6c 65 6d 65 6e 74 20 63 essage element c
4520: 6f 6e 74 65 6e 74 20 61 73 20 73 74 72 69 6e 67 ontent as string
4530: 20 28 61 73 20 69 66 20 74 68 65 20 58 50 61 74 (as if the XPat
4540: 68 20 73 74 72 69 6e 67 28 29 20 66 75 6e 63 74 h string() funct
4550: 69 6f 6e 20 77 6f 75 6c 64 0a 68 61 76 65 20 62 ion would.have b
4560: 65 65 6e 20 61 70 70 6c 69 65 64 20 74 6f 20 74 een applied to t
4570: 68 65 20 58 4d 4c 20 46 72 61 67 6d 65 6e 74 29 he XML Fragment)
4580: 20 61 6e 64 20 61 20 66 6c 61 67 2c 20 77 68 69 and a flag, whi
4590: 63 68 20 69 6e 64 69 63 61 74 65 73 2c 20 69 66 ch indicates, if
45a0: 20 74 68 65 0a 78 73 6c 3a 6d 65 73 73 61 67 65 the.xsl:message
45b0: 20 68 61 73 20 61 6e 20 61 74 74 72 69 62 75 74 has an attribut
45c0: 65 20 22 74 65 72 6d 69 6e 61 74 65 22 20 77 69 e "terminate" wi
45d0: 74 68 20 74 68 65 20 76 61 6c 75 65 20 22 79 65 th the value "ye
45e0: 73 22 2e 20 49 66 20 74 68 65 0a 63 61 6c 6c 65 s". If the.calle
45f0: 64 20 73 63 72 69 70 74 20 72 65 74 75 72 6e 73 d script returns
4600: 20 61 6e 79 74 68 69 6e 67 20 65 6c 73 65 20 74 anything else t
4610: 68 65 6e 20 54 43 4c 5f 4f 4b 20 74 68 65 6e 20 hen TCL_OK then
4620: 74 68 65 20 78 73 6c 74 0a 74 72 61 6e 73 66 6f the xslt.transfo
4630: 72 6d 61 74 69 6f 6e 20 77 69 6c 6c 20 62 65 20 rmation will be
4640: 61 62 6f 72 74 65 64 2c 20 72 65 74 75 72 6e 69 aborted, returni
4650: 6e 67 20 65 72 72 6f 72 2e 20 49 66 20 74 68 65 ng error. If the
4660: 20 63 61 6c 6c 65 64 20 73 63 72 69 70 74 0a 72 called script.r
4670: 65 74 75 72 6e 73 20 2d 63 6f 64 65 20 62 72 65 eturns -code bre
4680: 61 6b 2c 20 74 68 65 20 65 72 72 6f 72 20 6d 65 ak, the error me
4690: 73 73 61 67 65 20 69 73 20 65 6d 70 74 79 2c 20 ssage is empty,
46a0: 6f 74 68 65 72 77 69 73 65 20 74 68 65 20 72 65 otherwise the re
46b0: 73 75 6c 74 0a 63 6f 64 65 20 69 73 20 72 65 70 sult.code is rep
46c0: 6f 72 74 65 64 2e 20 49 6e 20 63 61 73 65 20 6f orted. In case o
46d0: 66 20 74 65 72 6d 69 6e 61 74 65 64 20 74 72 61 f terminated tra
46e0: 6e 73 66 6f 72 6d 61 74 69 6f 6e 2c 20 74 68 65 nsformation, the
46f0: 20 6f 75 74 70 75 74 56 61 72 2c 0a 69 66 20 67 outputVar,.if g
4700: 69 76 65 6e 2c 20 69 73 20 73 65 74 20 74 6f 20 iven, is set to
4710: 74 68 65 20 65 6d 70 74 79 20 73 74 72 69 6e 67 the empty string
4720: 2e 0a 2e 52 45 0a 2e 54 50 0a 5c 26 5c 66 42 5c ...RE..TP.\&\fB\
4730: 66 42 74 6f 58 53 4c 54 63 6d 64 5c 66 50 20 3f fBtoXSLTcmd\fP ?
4740: 5c 66 49 6f 62 6a 56 61 72 5c 66 42 3f 0a 5c 26 \fIobjVar\fB?.\&
4750: 5c 66 52 49 66 20 74 68 65 20 44 4f 4d 20 74 72 \fRIf the DOM tr
4760: 65 65 20 72 65 70 72 65 73 65 6e 74 73 20 61 20 ee represents a
4770: 76 61 6c 69 64 20 58 53 4c 54 20 73 74 79 6c 65 valid XSLT style
4780: 73 68 65 65 74 2c 20 74 68 69 73 20 6d 65 74 68 sheet, this meth
4790: 6f 64 0a 74 72 61 6e 73 66 6f 72 6d 73 20 74 68 od.transforms th
47a0: 65 20 44 4f 4d 20 74 72 65 65 20 69 6e 74 6f 20 e DOM tree into
47b0: 61 6e 20 78 73 6c 74 20 63 6f 6d 6d 61 6e 64 2c an xslt command,
47c0: 20 6f 74 68 65 72 77 69 73 65 20 69 74 20 72 65 otherwise it re
47d0: 74 75 72 6e 73 20 65 72 72 6f 72 2e 20 54 68 65 turns error. The
47e0: 0a 63 72 65 61 74 65 64 20 78 73 6c 74 43 6d 64 .created xsltCmd
47f0: 20 69 73 20 72 65 74 75 72 6e 65 64 20 61 6e 64 is returned and
4800: 20 73 74 6f 72 65 64 20 69 6e 20 74 68 65 20 5c stored in the \
4810: 66 49 6f 62 6a 56 61 72 5c 66 52 2c 20 69 66 20 fIobjVar\fR, if
4820: 61 20 76 61 72 20 6e 61 6d 65 20 77 61 73 0a 67 a var name was.g
4830: 69 76 65 6e 2e 20 41 20 73 75 63 63 65 73 73 66 iven. A successf
4840: 75 6c 20 74 72 61 6e 73 66 6f 72 6d 61 74 69 6f ul transformatio
4850: 6e 20 6f 66 20 74 68 65 20 44 4f 4d 20 74 72 65 n of the DOM tre
4860: 65 20 74 6f 20 61 6e 20 78 73 6c 74 43 6d 64 20 e to an xsltCmd
4870: 72 65 6d 6f 76 65 73 20 74 68 65 0a 64 6f 6d 44 removes the.domD
4880: 6f 63 20 63 6d 64 20 61 6e 64 20 61 6c 6c 20 6e oc cmd and all n
4890: 6f 64 65 43 6d 64 73 20 6f 66 20 74 68 65 20 64 odeCmds of the d
48a0: 6f 63 75 6d 65 6e 74 2e 0a 2e 52 53 0a 2e 50 50 ocument...RS..PP
48b0: 0a 54 68 65 20 73 79 6e 74 61 78 20 6f 66 20 74 .The syntax of t
48c0: 68 65 20 63 72 65 61 74 65 64 20 78 73 6c 74 43 he created xsltC
48d0: 6d 64 20 69 73 3a 0a 0a 20 0a 0a 2e 43 53 0a 0a md is:.. ...CS..
48e0: 5c 26 5c 66 42 78 73 6c 74 43 6d 64 5c 66 50 20 \&\fBxsltCmd\fP
48f0: 5c 66 42 6d 65 74 68 6f 64 5c 66 50 20 5c 66 42 \fBmethod\fP \fB
4900: 3f 61 72 67 20 2e 2e 2e 3f 5c 66 50 0a 0a 2e 43 ?arg ...?\fP...C
4910: 45 0a 2e 50 50 0a 54 68 65 20 76 61 6c 69 64 20 E..PP.The valid
4920: 6d 65 74 68 6f 64 73 20 61 72 65 3a 0a 2e 54 50 methods are:..TP
4930: 0a 5c 26 5c 66 42 5c 66 42 74 72 61 6e 73 66 6f .\&\fB\fBtransfo
4940: 72 6d 5c 66 50 20 5c 66 42 3f 2d 70 61 72 61 6d rm\fP \fB?-param
4950: 65 74 65 72 73 20 70 61 72 61 6d 65 74 65 72 4c eters parameterL
4960: 69 73 74 3f 5c 66 50 20 5c 66 42 3f 2d 69 67 6e ist?\fP \fB?-ign
4970: 6f 72 65 55 6e 64 65 63 6c 61 72 65 64 50 61 72 oreUndeclaredPar
4980: 61 6d 65 74 65 72 73 3f 5c 66 50 20 5c 66 42 3f ameters?\fP \fB?
4990: 2d 6d 61 78 41 70 70 6c 79 44 65 70 74 68 20 69 -maxApplyDepth i
49a0: 6e 74 3f 5c 66 50 20 20 5c 66 42 3f 2d 78 73 6c nt?\fP \fB?-xsl
49b0: 74 6d 65 73 73 61 67 65 63 6d 64 20 73 63 72 69 tmessagecmd scri
49c0: 70 74 3f 5c 66 50 20 5c 66 49 64 6f 6d 44 6f 63 pt?\fP \fIdomDoc
49d0: 5c 66 42 20 5c 66 49 3f 6f 75 74 70 75 74 56 61 \fB \fI?outputVa
49e0: 72 3f 5c 66 42 0a 5c 26 5c 66 52 41 70 70 6c 69 r?\fB.\&\fRAppli
49f0: 65 73 20 58 53 4c 54 20 74 72 61 6e 73 66 6f 72 es XSLT transfor
4a00: 6d 61 74 69 6f 6e 20 6f 6e 20 74 68 65 20 64 6f mation on the do
4a10: 63 75 6d 65 6e 74 0a 5c 26 5c 66 49 64 6f 6d 44 cument.\&\fIdomD
4a20: 6f 63 5c 66 52 2e 20 52 65 74 75 72 6e 73 20 61 oc\fR. Returns a
4a30: 20 64 6f 63 75 6d 65 6e 74 20 6f 62 6a 65 63 74 document object
4a40: 20 63 6f 6e 74 61 69 6e 69 6e 67 20 74 68 65 0a containing the.
4a50: 72 65 73 75 6c 74 20 64 6f 63 75 6d 65 6e 74 20 result document
4a60: 6f 66 20 74 68 61 74 20 74 72 61 6e 73 66 6f 72 of that transfor
4a70: 6d 61 74 69 6f 6e 20 61 6e 64 20 73 74 6f 72 65 mation and store
4a80: 73 20 69 74 20 69 6e 20 74 68 65 20 6f 70 74 69 s it in the opti
4a90: 6f 6e 61 6c 0a 5c 26 5c 66 49 6f 75 74 70 75 74 onal.\&\fIoutput
4aa0: 56 61 72 5c 66 52 2e 0a 2e 52 53 0a 2e 50 50 0a Var\fR...RS..PP.
4ab0: 54 68 65 20 6f 70 74 69 6f 6e 61 6c 20 5c 66 49 The optional \fI
4ac0: 2d 70 61 72 61 6d 65 74 65 72 73 5c 66 52 20 6f -parameters\fR o
4ad0: 70 74 69 6f 6e 20 73 65 74 73 20 74 6f 70 20 6c ption sets top l
4ae0: 65 76 65 6c 0a 3c 78 73 6c 3a 70 61 72 61 6d 3e evel.<xsl:param>
4af0: 20 74 6f 20 73 74 72 69 6e 67 20 76 61 6c 75 65 to string value
4b00: 73 2e 20 54 68 65 20 5c 66 49 70 61 72 61 6d 65 s. The \fIparame
4b10: 74 65 72 4c 69 73 74 5c 66 52 20 68 61 73 20 74 terList\fR has t
4b20: 6f 20 62 65 20 61 20 74 63 6c 0a 6c 69 73 74 20 o be a tcl.list
4b30: 63 6f 6e 73 69 73 74 69 6e 67 20 6f 66 20 70 61 consisting of pa
4b40: 72 61 6d 65 74 65 72 20 6e 61 6d 65 20 61 6e 64 rameter name and
4b50: 20 76 61 6c 75 65 20 70 61 69 72 73 2e 0a 2e 50 value pairs...P
4b60: 50 0a 49 66 20 74 68 65 20 6f 70 74 69 6f 6e 20 P.If the option
4b70: 5c 66 49 2d 69 67 6e 6f 72 65 55 6e 64 65 63 6c \fI-ignoreUndecl
4b80: 61 72 65 64 50 61 72 61 6d 65 74 65 72 73 5c 66 aredParameters\f
4b90: 52 20 69 73 20 67 69 76 65 6e 2c 20 74 68 65 6e R is given, then
4ba0: 20 70 61 72 61 6d 65 74 65 72 0a 6e 61 6d 65 73 parameter.names
4bb0: 20 69 6e 20 74 68 65 20 5c 66 49 70 61 72 61 6d in the \fIparam
4bc0: 65 74 65 72 4c 69 73 74 5c 66 52 20 67 69 76 65 eterList\fR give
4bd0: 6e 20 74 6f 20 74 68 65 20 5c 66 49 2d 70 61 72 n to the \fI-par
4be0: 61 6d 65 74 65 72 73 5c 66 52 20 6f 70 74 69 6f ameters\fR optio
4bf0: 6e 73 20 74 68 61 74 0a 61 72 65 20 6e 6f 74 20 ns that.are not
4c00: 64 65 63 6c 61 72 65 64 20 61 73 20 74 6f 70 2d declared as top-
4c10: 6c 65 76 65 6c 20 70 61 72 61 6d 65 74 65 72 73 level parameters
4c20: 20 69 6e 20 74 68 65 20 73 74 79 6c 65 73 68 65 in the styleshe
4c30: 65 74 20 61 72 65 20 73 69 6c 65 6e 74 6c 79 0a et are silently.
4c40: 69 67 6e 6f 72 65 64 2e 20 57 69 74 68 6f 75 74 ignored. Without
4c50: 20 74 68 69 73 20 6f 70 74 69 6f 6e 2c 20 61 6e this option, an
4c60: 20 65 72 72 6f 72 20 69 73 20 72 61 69 73 65 64 error is raised
4c70: 20 69 66 20 74 68 65 20 75 73 65 72 20 74 72 69 if the user tri
4c80: 65 73 20 74 6f 20 73 65 74 20 61 0a 74 6f 70 2d es to set a.top-
4c90: 6c 65 76 65 6c 20 70 61 72 61 6d 65 74 65 72 2c level parameter,
4ca0: 20 77 68 69 63 68 20 69 73 20 6e 6f 74 20 64 65 which is not de
4cb0: 63 6c 61 72 65 64 20 69 6e 20 74 68 65 20 73 74 clared in the st
4cc0: 79 6c 65 73 68 65 65 74 2e 0a 2e 50 50 0a 54 68 ylesheet...PP.Th
4cd0: 65 20 6f 70 74 69 6f 6e 20 5c 66 49 2d 6d 61 78 e option \fI-max
4ce0: 41 70 70 6c 79 44 65 70 74 68 5c 66 52 20 65 78 ApplyDepth\fR ex
4cf0: 70 65 63 74 73 20 61 20 70 6f 73 69 74 69 76 20 pects a positiv
4d00: 69 6e 74 65 67 65 72 20 61 73 0a 61 72 67 75 6d integer as.argum
4d10: 65 6e 74 2e 20 42 79 20 64 65 66 61 75 6c 74 2c ent. By default,
4d20: 20 74 68 65 20 78 73 6c 74 20 65 6e 67 69 6e 65 the xslt engine
4d30: 20 61 6c 6c 6f 77 73 20 78 73 6c 74 20 74 65 6d allows xslt tem
4d40: 70 6c 61 74 65 73 20 74 6f 20 6e 65 73 74 20 75 plates to nest u
4d50: 70 0a 74 6f 20 33 30 30 30 20 6c 65 76 65 6c 73 p.to 3000 levels
4d60: 20 28 61 6e 64 20 72 61 69 73 65 73 20 65 72 72 (and raises err
4d70: 6f 72 20 69 66 20 74 68 65 79 20 6e 65 73 74 20 or if they nest
4d80: 64 65 65 70 65 72 29 2e 20 54 68 69 73 20 6c 69 deeper). This li
4d90: 6d 69 74 20 63 61 6e 0a 62 65 20 73 65 74 20 62 mit can.be set b
4da0: 79 20 74 68 65 20 5c 66 49 2d 6d 61 78 41 70 70 y the \fI-maxApp
4db0: 6c 79 44 65 70 74 68 5c 66 52 20 6f 70 74 69 6f lyDepth\fR optio
4dc0: 6e 2e 0a 2e 50 50 0a 54 68 65 20 5c 66 49 2d 78 n...PP.The \fI-x
4dd0: 73 6c 74 6d 65 73 73 61 67 65 63 6d 64 5c 66 52 sltmessagecmd\fR
4de0: 20 6f 70 74 69 6f 6e 20 73 65 74 73 20 61 20 63 option sets a c
4df0: 61 6c 6c 62 61 63 6b 20 66 6f 72 20 78 73 6c 74 allback for xslt
4e00: 3a 6d 65 73 73 61 67 65 20 65 6c 65 6d 65 6e 74 :message element
4e10: 73 0a 69 6e 20 74 68 65 20 73 74 79 6c 65 73 68 s.in the stylesh
4e20: 65 65 74 2e 20 54 68 65 20 61 63 74 75 61 6c 20 eet. The actual
4e30: 63 6f 6d 6d 61 6e 64 20 63 6f 6e 73 69 73 74 73 command consists
4e40: 20 6f 66 20 74 68 65 20 73 63 72 69 70 74 2c 20 of the script,
4e50: 67 69 76 65 6e 20 61 73 20 61 72 67 75 6d 65 6e given as argumen
4e60: 74 0a 74 6f 20 74 68 65 20 6f 70 74 69 6f 6e 2c t.to the option,
4e70: 20 61 70 70 65 6e 64 65 64 20 77 69 74 68 20 74 appended with t
4e80: 68 65 20 58 4d 4c 20 46 72 61 67 6d 65 6e 74 20 he XML Fragment
4e90: 66 72 6f 6d 20 69 6e 73 74 61 6e 74 69 61 74 69 from instantiati
4ea0: 6e 67 20 74 68 65 0a 78 73 6c 3a 6d 65 73 73 61 ng the.xsl:messa
4eb0: 67 65 20 65 6c 65 6d 65 6e 74 20 63 6f 6e 74 65 ge element conte
4ec0: 6e 74 20 61 73 20 73 74 72 69 6e 67 20 28 61 73 nt as string (as
4ed0: 20 69 66 20 74 68 65 20 58 50 61 74 68 20 73 74 if the XPath st
4ee0: 72 69 6e 67 28 29 20 66 75 6e 63 74 69 6f 6e 20 ring() function
4ef0: 77 6f 75 6c 64 0a 68 61 76 65 20 62 65 65 6e 20 would.have been
4f00: 61 70 70 6c 69 65 64 20 74 6f 20 74 68 65 20 58 applied to the X
4f10: 4d 4c 20 46 72 61 67 6d 65 6e 74 29 20 61 6e 64 ML Fragment) and
4f20: 20 61 20 66 6c 61 67 2c 20 77 68 69 63 68 20 69 a flag, which i
4f30: 6e 64 69 63 61 74 65 73 2c 20 69 66 20 74 68 65 ndicates, if the
4f40: 0a 78 73 6c 3a 6d 65 73 73 61 67 65 20 68 61 73 .xsl:message has
4f50: 20 61 6e 20 61 74 74 72 69 62 75 74 65 20 22 74 an attribute "t
4f60: 65 72 6d 69 6e 61 74 65 22 20 77 69 74 68 20 74 erminate" with t
4f70: 68 65 20 76 61 6c 75 65 20 22 79 65 73 22 2e 0a he value "yes"..
4f80: 2e 52 45 0a 2e 54 50 0a 5c 26 5c 66 42 5c 66 42 .RE..TP.\&\fB\fB
4f90: 64 65 6c 65 74 65 5c 66 50 0a 5c 26 5c 66 52 44 delete\fP.\&\fRD
4fa0: 65 6c 65 74 65 73 20 74 68 65 20 78 73 6c 74 43 eletes the xsltC
4fb0: 6d 64 20 61 6e 64 20 63 6c 65 61 6e 73 20 75 70 md and cleans up
4fc0: 20 61 6c 6c 20 75 73 65 64 20 72 65 63 6f 75 72 all used recour
4fd0: 73 65 73 0a 2e 50 50 0a 49 66 20 74 68 65 20 66 ses..PP.If the f
4fe0: 69 72 73 74 20 61 72 67 75 6d 65 6e 74 20 74 6f irst argument to
4ff0: 20 61 6e 20 78 73 6c 74 43 6d 64 20 69 73 20 61 an xsltCmd is a
5000: 20 64 6f 6d 44 6f 63 20 6f 72 20 73 74 61 72 74 domDoc or start
5010: 73 20 77 69 74 68 20 61 20 22 2d 22 2c 0a 74 68 s with a "-",.th
5020: 65 6e 20 74 68 65 20 63 6f 6d 6d 61 6e 64 20 69 en the command i
5030: 73 20 70 72 6f 63 65 73 73 65 64 20 69 6e 20 74 s processed in t
5040: 68 65 20 73 61 6d 65 20 77 61 79 20 61 73 0a 5c he same way as.\
5050: 26 5c 66 49 3c 78 73 6c 74 43 6d 64 3e 20 74 72 &\fI<xsltCmd> tr
5060: 61 6e 73 66 6f 72 6d 5c 66 52 2e 0a 2e 52 45 0a ansform\fR...RE.
5070: 2e 54 50 0a 5c 26 5c 66 42 5c 66 42 6e 6f 72 6d .TP.\&\fB\fBnorm
5080: 61 6c 69 7a 65 5c 66 50 20 5c 66 49 3f 2d 66 6f alize\fP \fI?-fo
5090: 72 58 50 61 74 68 3f 5c 66 42 0a 5c 26 5c 66 52 rXPath?\fB.\&\fR
50a0: 50 75 74 73 20 61 6c 6c 20 74 65 78 74 20 6e 6f Puts all text no
50b0: 64 65 73 20 69 6e 20 74 68 65 20 64 6f 63 75 6d des in the docum
50c0: 65 6e 74 0a 69 6e 74 6f 20 61 20 22 6e 6f 72 6d ent.into a "norm
50d0: 61 6c 22 20 66 6f 72 6d 20 77 68 65 72 65 20 6f al" form where o
50e0: 6e 6c 79 20 73 74 72 75 63 74 75 72 65 20 28 65 nly structure (e
50f0: 2e 67 2e 2c 20 65 6c 65 6d 65 6e 74 73 2c 0a 63 .g., elements,.c
5100: 6f 6d 6d 65 6e 74 73 2c 20 70 72 6f 63 65 73 73 omments, process
5110: 69 6e 67 20 69 6e 73 74 72 75 63 74 69 6f 6e 73 ing instructions
5120: 20 61 6e 64 20 43 44 41 54 41 0a 73 65 63 74 69 and CDATA.secti
5130: 6f 6e 73 29 20 73 65 70 61 72 61 74 65 73 20 74 ons) separates t
5140: 65 78 74 20 6e 6f 64 65 73 2c 20 69 2e 65 2e 2c ext nodes, i.e.,
5150: 20 74 68 65 72 65 0a 61 72 65 20 6e 65 69 74 68 there.are neith
5160: 65 72 20 61 64 6a 61 63 65 6e 74 20 74 65 78 74 er adjacent text
5170: 20 6e 6f 64 65 73 20 6e 6f 72 20 65 6d 70 74 79 nodes nor empty
5180: 20 74 65 78 74 20 6e 6f 64 65 73 2e 20 49 66 20 text nodes. If
5190: 74 68 65 20 6f 70 74 69 6f 6e 0a 5c 26 5c 66 49 the option.\&\fI
51a0: 2d 66 6f 72 58 50 61 74 68 5c 66 52 20 69 73 20 -forXPath\fR is
51b0: 67 69 76 65 6e 2c 20 61 6c 6c 20 43 44 41 54 41 given, all CDATA
51c0: 20 73 65 63 74 69 6f 6e 73 20 69 6e 20 74 68 65 sections in the
51d0: 20 6e 6f 64 65 73 20 61 72 65 0a 63 6f 6e 76 65 nodes are.conve
51e0: 72 74 65 64 20 74 6f 20 74 65 78 74 20 6e 6f 64 rted to text nod
51f0: 65 73 2c 20 61 73 20 61 20 66 69 72 73 74 20 73 es, as a first s
5200: 74 65 70 20 62 65 66 6f 72 65 20 74 68 65 0a 6e tep before the.n
5210: 6f 72 6d 61 6c 69 7a 61 74 69 6f 6e 2e 0a 2e 54 ormalization...T
5220: 50 0a 5c 26 5c 66 42 5c 66 42 6e 6f 64 65 54 79 P.\&\fB\fBnodeTy
5230: 70 65 5c 66 50 0a 5c 26 5c 66 52 52 65 74 75 72 pe\fP.\&\fRRetur
5240: 6e 73 20 74 68 65 20 6e 6f 64 65 20 74 79 70 65 ns the node type
5250: 20 6f 66 20 74 68 65 20 64 6f 63 75 6d 65 6e 74 of the document
5260: 20 6e 6f 64 65 2e 20 54 68 69 73 20 69 73 20 61 node. This is a
5270: 6c 77 61 79 73 0a 44 4f 43 55 4d 45 4e 54 5f 4e lways.DOCUMENT_N
5280: 4f 44 45 2e 0a 2e 54 50 0a 5c 26 5c 66 42 5c 66 ODE...TP.\&\fB\f
5290: 42 67 65 74 45 6c 65 6d 65 6e 74 42 79 49 64 5c BgetElementById\
52a0: 66 50 20 5c 66 49 69 64 5c 66 42 0a 5c 26 5c 66 fP \fIid\fB.\&\f
52b0: 52 52 65 74 75 72 6e 73 20 74 68 65 20 6e 6f 64 RReturns the nod
52c0: 65 20 68 61 76 69 6e 67 20 61 20 69 64 20 61 74 e having a id at
52d0: 74 72 69 62 75 74 65 20 77 69 74 68 20 76 61 6c tribute with val
52e0: 75 65 0a 5c 26 5c 66 49 69 64 5c 66 52 20 6f 72 ue.\&\fIid\fR or
52f0: 20 74 68 65 20 65 6d 70 74 79 20 73 74 72 69 6e the empty strin
5300: 67 2c 20 69 66 20 6e 6f 20 6e 6f 64 65 20 68 61 g, if no node ha
5310: 73 20 61 6e 20 69 64 20 61 74 74 72 69 62 75 74 s an id attribut
5320: 65 20 77 69 74 68 20 74 68 61 74 20 76 61 6c 75 e with that valu
5330: 65 2e 0a 2e 54 50 0a 5c 26 5c 66 42 5c 66 42 66 e...TP.\&\fB\fBf
5340: 69 72 73 74 43 68 69 6c 64 5c 66 50 20 5c 66 42 irstChild\fP \fB
5350: 3f 6f 62 6a 56 61 72 3f 5c 66 50 0a 5c 26 5c 66 ?objVar?\fP.\&\f
5360: 52 52 65 74 75 72 6e 73 20 74 68 65 20 66 69 72 RReturns the fir
5370: 73 74 20 74 6f 70 20 6c 65 76 65 6c 20 6e 6f 64 st top level nod
5380: 65 20 6f 66 20 74 68 65 20 64 6f 63 75 6d 65 6e e of the documen
5390: 74 2e 0a 2e 54 50 0a 5c 26 5c 66 42 5c 66 42 6c t...TP.\&\fB\fBl
53a0: 61 73 74 43 68 69 6c 64 5c 66 50 20 5c 66 42 3f astChild\fP \fB?
53b0: 6f 62 6a 56 61 72 3f 5c 66 50 0a 5c 26 5c 66 52 objVar?\fP.\&\fR
53c0: 52 65 74 75 72 6e 73 20 74 68 65 20 6c 61 73 74 Returns the last
53d0: 20 74 6f 70 20 6c 65 76 65 6c 20 6e 6f 64 65 20 top level node
53e0: 6f 66 20 74 68 65 20 64 6f 63 75 6d 65 6e 74 2e of the document.
53f0: 0a 2e 54 50 0a 5c 26 5c 66 42 5c 66 42 61 70 70 ..TP.\&\fB\fBapp
5400: 65 6e 64 43 68 69 6c 64 5c 66 50 20 5c 66 49 6e endChild\fP \fIn
5410: 65 77 43 68 69 6c 64 5c 66 42 0a 5c 26 5c 66 52 ewChild\fB.\&\fR
5420: 41 70 70 65 6e 64 20 5c 66 49 6e 65 77 43 68 69 Append \fInewChi
5430: 6c 64 5c 66 52 20 74 6f 20 74 68 65 20 65 6e 64 ld\fR to the end
5440: 20 6f 66 20 74 68 65 20 6c 69 73 74 20 6f 66 20 of the list of
5450: 74 6f 70 20 6c 65 76 65 6c 20 6e 6f 64 65 73 0a top level nodes.
5460: 6f 66 20 74 68 65 20 64 6f 63 75 6d 65 6e 74 2e of the document.
5470: 0a 2e 54 50 0a 5c 26 5c 66 42 5c 66 42 72 65 6d ..TP.\&\fB\fBrem
5480: 6f 76 65 43 68 69 6c 64 5c 66 50 20 5c 66 49 63 oveChild\fP \fIc
5490: 68 69 6c 64 5c 66 42 0a 5c 26 5c 66 52 52 65 6d hild\fB.\&\fRRem
54a0: 6f 76 65 73 20 5c 66 49 63 68 69 6c 64 5c 66 52 oves \fIchild\fR
54b0: 20 66 72 6f 6d 20 74 68 65 20 6c 69 73 74 20 6f from the list o
54c0: 66 20 74 6f 70 20 6c 65 76 65 6c 20 6e 6f 64 65 f top level node
54d0: 73 20 6f 66 20 74 68 65 0a 64 6f 63 75 6d 65 6e s of the.documen
54e0: 74 2e 20 5c 66 49 63 68 69 6c 64 5c 66 52 20 77 t. \fIchild\fR w
54f0: 69 6c 6c 20 62 65 20 70 61 72 74 20 6f 66 20 74 ill be part of t
5500: 68 65 20 64 6f 63 75 6d 65 6e 74 20 66 72 61 67 he document frag
5510: 6d 65 6e 74 20 6c 69 73 74 0a 61 66 74 65 72 20 ment list.after
5520: 74 68 69 73 20 6f 70 65 72 61 74 69 6f 6e 2e 20 this operation.
5530: 49 74 20 69 73 20 6e 6f 74 20 70 68 79 73 69 63 It is not physic
5540: 61 6c 6c 79 20 64 65 6c 65 74 65 64 2e 0a 2e 54 ally deleted...T
5550: 50 0a 5c 26 5c 66 42 5c 66 42 68 61 73 43 68 69 P.\&\fB\fBhasChi
5560: 6c 64 4e 6f 64 65 73 5c 66 50 0a 5c 26 5c 66 52 ldNodes\fP.\&\fR
5570: 52 65 74 75 72 6e 73 20 31 20 69 66 20 74 68 65 Returns 1 if the
5580: 20 64 6f 63 75 6d 65 6e 74 20 68 61 73 20 61 6e document has an
5590: 79 20 6e 6f 64 65 73 20 69 6e 20 74 68 65 20 74 y nodes in the t
55a0: 72 65 65 2e 20 4f 74 68 65 72 77 69 73 65 20 30 ree. Otherwise 0
55b0: 20 69 73 20 72 65 74 75 72 6e 65 64 2e 0a 2e 54 is returned...T
55c0: 50 0a 5c 26 5c 66 42 5c 66 42 63 68 69 6c 64 4e P.\&\fB\fBchildN
55d0: 6f 64 65 73 5c 66 50 0a 5c 26 5c 66 52 52 65 74 odes\fP.\&\fRRet
55e0: 75 72 6e 73 20 61 20 6c 69 73 74 20 6f 66 20 74 urns a list of t
55f0: 68 65 20 74 6f 70 20 6c 65 76 65 6c 20 6e 6f 64 he top level nod
5600: 65 73 20 6f 66 20 74 68 65 20 64 6f 63 75 6d 65 es of the docume
5610: 6e 74 2e 0a 2e 54 50 0a 5c 26 5c 66 42 5c 66 42 nt...TP.\&\fB\fB
5620: 6f 77 6e 65 72 44 6f 63 75 6d 65 6e 74 5c 66 50 ownerDocument\fP
5630: 20 5c 66 42 3f 64 6f 6d 4f 62 6a 56 61 72 3f 5c \fB?domObjVar?\
5640: 66 50 0a 5c 26 5c 66 52 52 65 74 75 72 6e 73 20 fP.\&\fRReturns
5650: 74 68 65 20 64 6f 63 75 6d 65 6e 74 20 69 74 73 the document its
5660: 65 6c 66 2e 0a 2e 54 50 0a 5c 26 5c 66 42 5c 66 elf...TP.\&\fB\f
5670: 42 69 6e 73 65 72 74 42 65 66 6f 72 65 5c 66 50 BinsertBefore\fP
5680: 20 5c 66 49 6e 65 77 43 68 69 6c 64 5c 66 42 20 \fInewChild\fB
5690: 20 5c 66 49 72 65 66 43 68 69 6c 64 5c 66 42 0a \fIrefChild\fB.
56a0: 5c 26 5c 66 52 49 6e 73 65 72 74 20 5c 66 49 6e \&\fRInsert \fIn
56b0: 65 77 43 68 69 6c 64 5c 66 52 20 62 65 66 6f 72 ewChild\fR befor
56c0: 65 20 74 68 65 20 5c 66 49 72 65 66 43 68 69 6c e the \fIrefChil
56d0: 64 5c 66 52 20 69 6e 74 6f 20 74 68 65 20 6c 69 d\fR into the li
56e0: 73 74 20 6f 66 0a 74 6f 70 20 6c 65 76 65 6c 20 st of.top level
56f0: 6e 6f 64 65 73 20 6f 66 20 74 68 65 20 64 6f 63 nodes of the doc
5700: 75 6d 65 6e 74 2e 20 49 66 20 5c 66 49 72 65 66 ument. If \fIref
5710: 43 68 69 6c 64 5c 66 52 20 69 73 20 74 68 65 20 Child\fR is the
5720: 65 6d 70 74 79 20 73 74 72 69 6e 67 2c 20 69 6e empty string, in
5730: 73 65 72 74 73 0a 5c 26 5c 66 49 6e 65 77 43 68 serts.\&\fInewCh
5740: 69 6c 64 5c 66 52 20 61 74 20 74 68 65 20 65 6e ild\fR at the en
5750: 64 20 6f 66 20 74 68 65 20 74 6f 70 20 6c 65 76 d of the top lev
5760: 65 6c 20 6e 6f 64 65 73 2e 0a 2e 54 50 0a 5c 26 el nodes...TP.\&
5770: 5c 66 42 5c 66 42 72 65 70 6c 61 63 65 43 68 69 \fB\fBreplaceChi
5780: 6c 64 5c 66 50 20 5c 66 49 6e 65 77 43 68 69 6c ld\fP \fInewChil
5790: 64 5c 66 42 20 20 5c 66 49 6f 6c 64 43 68 69 6c d\fB \fIoldChil
57a0: 64 5c 66 42 0a 5c 26 5c 66 52 52 65 70 6c 61 63 d\fB.\&\fRReplac
57b0: 65 73 20 5c 66 49 6f 6c 64 43 68 69 6c 64 5c 66 es \fIoldChild\f
57c0: 52 20 77 69 74 68 20 5c 66 49 6e 65 77 43 68 69 R with \fInewChi
57d0: 6c 64 5c 66 52 20 69 6e 20 74 68 65 20 6c 69 73 ld\fR in the lis
57e0: 74 20 6f 66 0a 63 68 69 6c 64 72 65 6e 20 6f 66 t of.children of
57f0: 20 74 68 61 74 20 6e 6f 64 65 2e 20 54 68 65 20 that node. The
5800: 5c 66 49 6f 6c 64 43 68 69 6c 64 5c 66 52 20 6e \fIoldChild\fR n
5810: 6f 64 65 20 77 69 6c 6c 20 62 65 20 70 61 72 74 ode will be part
5820: 20 6f 66 20 74 68 65 0a 64 6f 63 75 6d 65 6e 74 of the.document
5830: 20 66 72 61 67 6d 65 6e 74 20 6c 69 73 74 20 61 fragment list a
5840: 66 74 65 72 20 74 68 69 73 20 6f 70 65 72 61 74 fter this operat
5850: 69 6f 6e 2e 0a 2e 54 50 0a 5c 26 5c 66 42 5c 66 ion...TP.\&\fB\f
5860: 42 61 70 70 65 6e 64 46 72 6f 6d 4c 69 73 74 5c BappendFromList\
5870: 66 50 20 5c 66 49 6c 69 73 74 5c 66 42 0a 5c 26 fP \fIlist\fB.\&
5880: 5c 66 52 50 61 72 73 65 73 20 5c 66 49 6c 69 73 \fRParses \fIlis
5890: 74 5c 66 52 20 2c 20 63 72 65 61 74 65 73 20 61 t\fR , creates a
58a0: 6e 20 61 63 63 6f 72 64 69 6e 67 20 44 4f 4d 20 n according DOM
58b0: 73 75 62 74 72 65 65 20 61 6e 64 0a 61 70 70 65 subtree and.appe
58c0: 6e 64 73 20 74 68 69 73 20 73 75 62 74 72 65 65 nds this subtree
58d0: 20 61 74 20 74 68 65 20 65 6e 64 20 6f 66 20 74 at the end of t
58e0: 68 65 20 63 75 72 72 65 6e 74 20 6c 69 73 74 20 he current list
58f0: 6f 66 20 74 6f 70 20 6c 65 76 65 6c 20 6e 6f 64 of top level nod
5900: 65 73 20 6f 66 20 74 68 65 20 64 6f 63 75 6d 65 es of the docume
5910: 6e 74 2e 0a 2e 54 50 0a 5c 26 5c 66 42 5c 66 42 nt...TP.\&\fB\fB
5920: 61 70 70 65 6e 64 58 4d 4c 5c 66 50 20 5c 66 49 appendXML\fP \fI
5930: 58 4d 4c 73 74 72 69 6e 67 5c 66 42 0a 5c 26 5c XMLstring\fB.\&\
5940: 66 52 50 61 72 73 65 73 20 5c 66 49 58 4d 4c 73 fRParses \fIXMLs
5950: 74 72 69 6e 67 5c 66 52 2c 20 63 72 65 61 74 65 tring\fR, create
5960: 73 20 61 6e 20 61 63 63 6f 72 64 69 6e 67 20 44 s an according D
5970: 4f 4d 20 73 75 62 74 72 65 65 20 61 6e 64 0a 61 OM subtree and.a
5980: 70 70 65 6e 64 73 20 74 68 69 73 20 73 75 62 74 ppends this subt
5990: 72 65 65 20 61 74 20 74 68 65 20 65 6e 64 20 6f ree at the end o
59a0: 66 20 74 68 65 20 63 75 72 72 65 6e 74 20 6c 69 f the current li
59b0: 73 74 20 6f 66 20 74 6f 70 20 6c 65 76 65 6c 20 st of top level
59c0: 6e 6f 64 65 73 20 6f 66 20 74 68 65 20 64 6f 63 nodes of the doc
59d0: 75 6d 65 6e 74 2e 0a 2e 54 50 0a 5c 26 5c 66 42 ument...TP.\&\fB
59e0: 5c 66 42 73 65 6c 65 63 74 4e 6f 64 65 73 5c 66 \fBselectNodes\f
59f0: 50 20 5c 66 42 3f 2d 6e 61 6d 65 73 70 61 63 65 P \fB?-namespace
5a00: 73 20 70 72 65 66 69 78 55 72 69 4c 69 73 74 3f s prefixUriList?
5a10: 5c 66 50 20 5c 66 42 3f 2d 63 61 63 68 65 20 3c \fP \fB?-cache <
5a20: 62 6f 6f 6c 65 61 6e 3e 3f 5c 66 50 20 5c 66 49 boolean>?\fP \fI
5a30: 78 70 61 74 68 51 75 65 72 79 5c 66 42 20 5c 66 xpathQuery\fB \f
5a40: 42 3f 74 79 70 65 56 61 72 3f 5c 66 50 0a 5c 26 B?typeVar?\fP.\&
5a50: 5c 66 52 0a 2e 52 53 0a 2e 50 50 0a 52 65 74 75 \fR..RS..PP.Retu
5a60: 72 6e 73 20 74 68 65 20 72 65 73 75 6c 74 20 6f rns the result o
5a70: 66 20 61 70 70 6c 79 69 6e 67 20 74 68 65 20 58 f applying the X
5a80: 50 61 74 68 20 71 75 65 72 79 0a 5c 26 5c 66 49 Path query.\&\fI
5a90: 78 70 61 74 68 51 75 65 72 79 5c 66 52 20 74 6f xpathQuery\fR to
5aa0: 20 74 68 65 20 64 6f 63 75 6d 65 6e 74 2e 20 54 the document. T
5ab0: 68 65 20 63 6f 6e 74 65 78 74 20 6e 6f 64 65 20 he context node
5ac0: 6f 66 20 74 68 65 20 71 75 65 72 79 20 69 73 20 of the query is
5ad0: 74 68 65 20 72 6f 6f 74 0a 6e 6f 64 65 20 69 6e the root.node in
5ae0: 20 74 68 65 20 73 65 6e 73 65 20 6f 66 20 74 68 the sense of th
5af0: 65 20 58 50 61 74 68 20 72 65 63 6f 6d 6d 65 6e e XPath recommen
5b00: 64 61 74 69 6f 6e 20 28 6e 6f 74 20 74 68 65 20 dation (not the
5b10: 64 6f 63 75 6d 65 6e 74 20 65 6c 65 6d 65 6e 74 document element
5b20: 29 2e 20 54 68 65 0a 72 65 73 75 6c 74 20 63 61 ). The.result ca
5b30: 6e 20 62 65 20 61 20 73 74 72 69 6e 67 2f 76 61 n be a string/va
5b40: 6c 75 65 2c 20 61 20 6c 69 73 74 20 6f 66 20 73 lue, a list of s
5b50: 74 72 69 6e 67 73 2c 20 61 20 6c 69 73 74 20 6f trings, a list o
5b60: 66 20 6e 6f 64 65 73 20 6f 72 20 61 20 6c 69 73 f nodes or a lis
5b70: 74 0a 6f 66 20 61 74 74 72 69 62 75 74 65 20 6e t.of attribute n
5b80: 61 6d 65 20 2f 20 76 61 6c 75 65 20 70 61 69 72 ame / value pair
5b90: 73 2e 20 49 66 20 5c 66 49 74 79 70 65 56 61 72 s. If \fItypeVar
5ba0: 5c 66 52 20 69 73 20 67 69 76 65 6e 0a 74 68 65 \fR is given.the
5bb0: 20 72 65 73 75 6c 74 20 74 79 70 65 20 6e 61 6d result type nam
5bc0: 65 20 69 73 20 73 74 6f 72 65 64 20 69 6e 74 6f e is stored into
5bd0: 20 74 68 61 74 20 76 61 72 69 61 62 6c 65 20 28 that variable (
5be0: 65 6d 70 74 79 2c 0a 62 6f 6f 6c 2c 20 6e 75 6d empty,.bool, num
5bf0: 62 65 72 2c 20 73 74 72 69 6e 67 2c 20 6e 6f 64 ber, string, nod
5c00: 65 73 2c 20 61 74 74 72 6e 6f 64 65 73 20 6f 72 es, attrnodes or
5c10: 20 6d 69 78 65 64 29 2e 0a 2e 50 50 0a 54 68 65 mixed)...PP.The
5c20: 20 61 72 67 75 6d 65 6e 74 20 5c 66 49 78 70 61 argument \fIxpa
5c30: 74 68 51 75 65 72 79 5c 66 52 20 68 61 73 20 74 thQuery\fR has t
5c40: 6f 20 62 65 20 61 20 76 61 6c 69 64 20 58 50 61 o be a valid XPa
5c50: 74 68 0a 65 78 70 72 65 73 73 69 6f 6e 2e 20 48 th.expression. H
5c60: 6f 77 65 76 65 72 2c 20 74 68 65 72 65 20 69 73 owever, there is
5c70: 20 6f 6e 65 20 65 78 63 65 70 74 69 6f 6e 20 74 one exception t
5c80: 6f 20 74 68 61 74 20 72 75 6c 65 2e 20 54 63 6c o that rule. Tcl
5c90: 20 76 61 72 69 61 62 6c 65 0a 6e 61 6d 65 73 20 variable.names
5ca0: 63 61 6e 20 61 70 70 65 61 72 20 69 6e 20 74 68 can appear in th
5cb0: 65 20 58 50 61 74 68 20 73 74 61 74 65 6d 65 6e e XPath statemen
5cc0: 74 20 61 74 20 61 6e 79 20 70 6f 73 69 74 69 6f t at any positio
5cd0: 6e 20 77 68 65 72 65 20 69 74 20 69 73 0a 6c 65 n where it is.le
5ce0: 67 61 6c 20 61 63 63 6f 72 64 69 6e 67 20 74 6f gal according to
5cf0: 20 74 68 65 20 72 75 6c 65 73 20 6f 66 20 74 68 the rules of th
5d00: 65 20 58 50 61 74 68 20 73 79 6e 74 61 78 20 74 e XPath syntax t
5d10: 6f 20 70 75 74 20 61 6e 20 58 50 61 74 68 0a 76 o put an XPath.v
5d20: 61 72 69 61 62 6c 65 2e 20 54 68 65 20 76 61 6c ariable. The val
5d30: 75 65 20 6f 66 20 74 68 65 20 76 61 72 69 61 62 ue of the variab
5d40: 6c 65 20 69 73 20 73 75 62 73 74 69 74 75 74 65 le is substitute
5d50: 64 20 66 6f 72 20 74 68 65 20 76 61 72 69 61 62 d for the variab
5d60: 6c 65 0a 6e 61 6d 65 2e 20 49 67 6e 6f 72 69 6e le.name. Ignorin
5d70: 67 20 74 68 65 20 73 79 6e 74 61 78 20 72 75 6c g the syntax rul
5d80: 65 73 20 6f 66 20 58 50 61 74 68 20 74 68 65 20 es of XPath the
5d90: 54 63 6c 20 76 61 72 69 61 62 6c 65 20 6e 61 6d Tcl variable nam
5da0: 65 20 6d 61 79 20 62 65 0a 61 6e 79 20 6c 65 67 e may be.any leg
5db0: 61 6c 20 54 63 6c 20 76 61 72 20 6e 61 6d 65 3a al Tcl var name:
5dc0: 20 6c 6f 63 61 6c 20 76 61 72 69 61 62 6c 65 73 local variables
5dd0: 2c 20 67 6c 6f 62 61 6c 20 76 61 72 69 61 62 6c , global variabl
5de0: 65 73 2c 20 61 72 72 61 79 0a 65 6e 74 72 69 65 es, array.entrie
5df0: 73 20 61 6e 64 20 73 6f 20 6f 6e 2e 20 20 54 68 s and so on. Th
5e00: 65 20 76 61 6c 75 65 20 77 69 6c 6c 20 61 6c 77 e value will alw
5e10: 61 79 73 20 62 65 20 73 65 65 6e 20 61 73 20 73 ays be seen as s
5e20: 74 72 69 6e 67 20 6c 69 74 65 72 61 6c 20 62 79 tring literal by
5e30: 0a 74 68 65 20 78 70 61 74 68 20 65 6e 67 69 6e .the xpath engin
5e40: 65 2e 20 43 61 73 74 20 74 68 65 20 76 61 6c 75 e. Cast the valu
5e50: 65 20 65 78 70 6c 69 63 69 74 6c 79 20 77 69 74 e explicitly wit
5e60: 68 20 74 68 65 20 61 63 63 6f 72 64 69 6e 67 20 h the according
5e70: 78 70 61 74 68 0a 66 75 6e 63 74 69 6f 6e 73 20 xpath.functions
5e80: 28 6e 75 6d 62 65 72 28 29 2c 20 62 6f 6f 6c 65 (number(), boole
5e90: 61 6e 28 29 29 20 74 6f 20 61 6e 6f 74 68 65 72 an()) to another
5ea0: 20 64 61 74 61 20 74 79 70 65 2c 20 69 66 20 6e data type, if n
5eb0: 65 65 64 65 64 2e 0a 2e 50 50 0a 54 68 65 20 6f eeded...PP.The o
5ec0: 70 74 69 6f 6e 20 5c 66 49 2d 6e 61 6d 65 73 70 ption \fI-namesp
5ed0: 61 63 65 73 5c 66 52 20 65 78 70 65 63 74 73 20 aces\fR expects
5ee0: 61 20 74 63 6c 20 6c 69 73 74 20 77 69 74 68 20 a tcl list with
5ef0: 70 72 65 66 69 78 20 2f 0a 6e 61 6d 65 73 70 61 prefix /.namespa
5f00: 63 65 20 70 61 69 72 73 20 61 73 20 61 72 67 75 ce pairs as argu
5f10: 6d 65 6e 74 2e 20 49 66 20 74 68 69 73 20 6f 70 ment. If this op
5f20: 74 69 6f 6e 20 69 73 20 6e 6f 74 20 67 69 76 65 tion is not give
5f30: 6e 2c 20 74 68 65 6e 20 61 6e 79 0a 6e 61 6d 65 n, then any.name
5f40: 73 70 61 63 65 20 70 72 65 66 69 78 20 77 69 74 space prefix wit
5f50: 68 69 6e 20 74 68 65 20 78 70 61 74 68 20 65 78 hin the xpath ex
5f60: 70 72 65 73 73 69 6f 6e 20 77 69 6c 6c 20 62 65 pression will be
5f70: 20 66 69 72 73 74 20 72 65 73 6f 6c 76 65 64 0a first resolved.
5f80: 61 67 61 69 6e 73 74 20 74 68 65 20 6c 69 73 74 against the list
5f90: 20 6f 66 20 70 72 65 66 69 78 20 2f 20 6e 61 6d of prefix / nam
5fa0: 65 73 70 61 63 65 20 70 61 69 72 73 20 73 65 74 espace pairs set
5fb0: 20 77 69 74 68 20 74 68 65 0a 73 65 6c 65 63 74 with the.select
5fc0: 4e 6f 64 65 73 4e 61 6d 65 73 70 61 63 65 73 20 NodesNamespaces
5fd0: 6d 65 74 68 6f 64 20 66 6f 72 20 74 68 65 20 64 method for the d
5fe0: 6f 63 75 6d 65 6e 74 20 74 68 65 20 6e 6f 64 65 ocument the node
5ff0: 20 62 65 6c 6f 6e 67 73 20 74 6f 2e 20 49 66 0a belongs to. If.
6000: 74 68 69 73 20 66 61 69 6c 73 2c 20 74 68 65 6e this fails, then
6010: 20 74 68 65 20 6e 61 6d 65 73 70 61 63 65 20 64 the namespace d
6020: 65 66 69 6e 69 74 69 6f 6e 73 20 69 6e 20 73 63 efinitions in sc
6030: 6f 70 65 20 6f 66 20 74 68 65 20 63 6f 6e 74 65 ope of the conte
6040: 78 74 0a 6e 6f 64 65 20 77 69 6c 6c 20 62 65 20 xt.node will be
6050: 75 73 65 64 20 74 6f 20 72 65 73 6f 6c 76 65 20 used to resolve
6060: 74 68 65 20 70 72 65 66 69 78 2e 20 49 66 20 74 the prefix. If t
6070: 68 69 73 20 6f 70 74 69 6f 6e 20 69 73 20 67 69 his option is gi
6080: 76 65 6e 2c 20 61 6e 79 0a 6e 61 6d 65 73 70 61 ven, any.namespa
6090: 63 65 20 70 72 65 66 69 78 20 77 69 74 68 69 6e ce prefix within
60a0: 20 74 68 65 20 78 70 61 74 68 20 65 78 70 72 65 the xpath expre
60b0: 73 73 69 6f 6e 20 77 69 6c 6c 20 62 65 20 66 69 ssion will be fi
60c0: 72 73 74 20 72 65 73 6f 6c 76 65 64 0a 61 67 61 rst resolved.aga
60d0: 69 6e 73 74 20 74 68 61 74 20 67 69 76 65 6e 20 inst that given
60e0: 6c 69 73 74 20 28 61 6e 64 20 69 67 6e 6f 72 69 list (and ignori
60f0: 6e 67 20 74 68 65 20 64 6f 63 75 6d 65 6e 74 20 ng the document
6100: 67 6c 6f 62 61 6c 20 70 72 65 66 69 78 20 2f 0a global prefix /.
6110: 6e 61 6d 65 73 70 61 63 65 20 6c 69 73 74 29 2e namespace list).
6120: 20 49 66 20 74 68 65 20 6c 69 73 74 20 62 69 6e If the list bin
6130: 64 73 20 74 68 65 20 73 61 6d 65 20 70 72 65 66 ds the same pref
6140: 69 78 20 74 6f 20 64 69 66 66 65 72 65 6e 74 0a ix to different.
6150: 6e 61 6d 65 73 70 61 63 65 73 2c 20 74 68 65 6e namespaces, then
6160: 20 74 68 65 20 66 69 72 73 74 20 62 69 6e 64 69 the first bindi
6170: 6e 67 20 77 69 6c 6c 20 77 69 6e 2e 20 20 49 66 ng will win. If
6180: 20 74 68 69 73 20 66 61 69 6c 73 2c 20 74 68 65 this fails, the
6190: 6e 20 74 68 65 0a 6e 61 6d 65 73 70 61 63 65 20 n the.namespace
61a0: 64 65 66 69 6e 69 74 69 6f 6e 73 20 69 6e 20 73 definitions in s
61b0: 63 6f 70 65 20 6f 66 20 74 68 65 20 63 6f 6e 74 cope of the cont
61c0: 65 78 74 20 6e 6f 64 65 20 77 69 6c 6c 20 62 65 ext node will be
61d0: 20 75 73 65 64 20 74 6f 0a 72 65 73 6f 6c 76 65 used to.resolve
61e0: 20 74 68 65 20 70 72 65 66 69 78 2c 20 61 73 20 the prefix, as
61f0: 75 73 75 61 6c 2e 0a 2e 50 50 0a 49 66 20 74 68 usual...PP.If th
6200: 65 20 5c 66 49 2d 63 61 63 68 65 5c 66 52 20 6f e \fI-cache\fR o
6210: 70 74 69 6f 6e 20 69 73 20 75 73 65 64 20 77 69 ption is used wi
6220: 74 68 20 61 20 74 72 75 65 20 76 61 6c 75 65 2c th a true value,
6230: 20 74 68 65 6e 20 74 68 65 0a 5c 26 5c 66 49 78 then the.\&\fIx
6240: 70 61 74 68 51 75 65 72 79 5c 66 52 20 77 69 6c pathQuery\fR wil
6250: 6c 20 62 65 20 6c 6f 6f 6b 65 64 20 75 70 20 69 l be looked up i
6260: 6e 20 61 20 64 6f 63 75 6d 65 6e 74 20 73 70 65 n a document spe
6270: 63 69 66 69 63 20 63 61 63 68 65 2e 20 49 66 0a cific cache. If.
6280: 74 68 65 20 71 75 65 72 79 20 69 73 20 66 6f 75 the query is fou
6290: 6e 64 2c 20 74 68 65 6e 20 74 68 65 20 73 74 6f nd, then the sto
62a0: 72 65 64 20 70 72 65 2d 63 6f 6d 70 69 6c 65 64 red pre-compiled
62b0: 20 71 75 65 72 79 20 77 69 6c 6c 20 62 65 20 75 query will be u
62c0: 73 65 64 2e 0a 49 66 20 74 68 65 20 71 75 65 72 sed..If the quer
62d0: 79 20 69 73 6e 27 74 20 66 6f 75 6e 64 2c 20 69 y isn't found, i
62e0: 74 20 77 69 6c 6c 20 62 65 20 63 6f 6d 70 69 6c t will be compil
62f0: 65 64 20 61 6e 64 20 73 74 6f 72 65 64 20 69 6e ed and stored in
6300: 20 74 68 65 20 63 61 63 68 65 2c 0a 66 6f 72 20 the cache,.for
6310: 75 73 65 20 69 6e 20 66 75 72 74 68 65 72 20 63 use in further c
6320: 61 6c 6c 73 2e 20 50 6c 65 61 73 65 20 6e 6f 74 alls. Please not
6330: 69 63 65 2c 20 74 68 61 74 20 74 68 65 20 5c 66 ice, that the \f
6340: 49 78 70 61 74 68 51 75 65 72 79 5c 66 52 20 61 IxpathQuery\fR a
6350: 73 0a 67 69 76 65 6e 20 61 73 20 73 74 72 69 6e s.given as strin
6360: 67 20 69 73 20 75 73 65 64 20 61 73 20 6b 65 79 g is used as key
6370: 20 66 6f 72 20 74 68 65 20 63 61 63 68 65 2e 20 for the cache.
6380: 54 68 69 73 20 6d 65 61 6e 73 20 74 68 61 74 20 This means that
6390: 65 71 75 61 6c 0a 58 50 61 74 68 20 65 78 70 72 equal.XPath expr
63a0: 65 73 73 69 6f 6e 73 2c 20 77 68 69 63 68 20 64 essions, which d
63b0: 69 66 66 65 72 20 6f 6e 6c 79 20 69 6e 20 77 68 iffer only in wh
63c0: 69 74 65 20 73 70 61 63 65 2c 20 61 72 65 20 74 ite space, are t
63d0: 72 65 61 74 65 64 20 61 73 0a 64 69 66 66 65 72 reated as.differ
63e0: 65 6e 74 20 63 61 63 68 65 20 65 6e 74 72 69 65 ent cache entrie
63f0: 73 2e 20 53 70 65 63 69 61 6c 20 63 61 72 65 20 s. Special care
6400: 69 73 20 6e 65 65 64 65 64 20 69 66 20 74 68 65 is needed if the
6410: 20 58 50 61 74 68 0a 65 78 70 72 65 73 73 69 6f XPath.expressio
6420: 6e 20 69 6e 63 6c 75 64 65 73 20 6e 61 6d 65 73 n includes names
6430: 70 61 63 65 20 70 72 65 66 69 78 65 73 20 6f 72 pace prefixes or
6440: 20 72 65 66 65 72 65 6e 63 65 73 20 74 6f 20 74 references to t
6450: 63 6c 20 76 61 72 69 61 62 6c 65 73 2e 0a 42 6f cl variables..Bo
6460: 74 68 20 6e 61 6d 65 73 70 61 63 65 20 70 72 65 th namespace pre
6470: 66 69 78 65 73 20 61 6e 64 20 74 63 6c 20 76 61 fixes and tcl va
6480: 72 69 61 62 6c 65 20 72 65 66 65 72 65 6e 63 65 riable reference
6490: 73 20 77 69 6c 6c 20 62 65 20 72 65 73 6f 6c 76 s will be resolv
64a0: 65 64 0a 61 63 63 6f 72 64 69 6e 67 20 74 6f 20 ed.according to
64b0: 74 68 65 20 58 4d 4c 20 70 72 65 66 69 78 20 6e the XML prefix n
64c0: 61 6d 65 73 70 61 63 65 20 6d 61 70 70 69 6e 67 amespace mapping
64d0: 73 20 61 6e 64 20 74 63 6c 20 76 61 72 69 61 62 s and tcl variab
64e0: 6c 65 20 76 61 6c 75 65 73 0a 61 74 20 65 78 70 le values.at exp
64f0: 72 65 73 73 69 6f 6e 20 63 6f 6d 70 69 6c 61 74 ression compilat
6500: 69 6f 6e 20 74 69 6d 65 2e 20 49 66 20 74 68 65 ion time. If the
6510: 20 73 61 6d 65 20 58 50 61 74 68 20 65 78 70 72 same XPath expr
6520: 65 73 73 69 6f 6e 20 69 73 20 75 73 65 64 0a 6c ession is used.l
6530: 61 74 65 72 20 6f 6e 20 69 6e 20 61 20 63 6f 6e ater on in a con
6540: 74 65 78 74 20 77 69 74 68 20 6f 74 68 65 72 20 text with other
6550: 58 4d 4c 20 70 72 65 66 69 78 20 6e 61 6d 65 73 XML prefix names
6560: 70 61 63 65 20 6d 61 70 70 69 6e 67 73 20 6f 72 pace mappings or
6570: 0a 76 61 6c 75 65 73 20 6f 66 20 74 68 65 20 75 .values of the u
6580: 73 65 64 20 74 63 6c 20 76 61 72 69 61 62 6c 65 sed tcl variable
6590: 73 2c 20 6d 61 6b 65 20 73 75 72 65 20 74 6f 20 s, make sure to
65a0: 66 69 72 73 74 20 72 65 6d 6f 76 65 20 74 68 65 first remove the
65b0: 0a 63 6f 6d 70 69 6c 65 64 20 65 78 70 72 65 73 .compiled expres
65c0: 73 69 6f 6e 20 66 72 6f 6d 20 74 68 65 20 63 61 sion from the ca
65d0: 63 68 65 20 77 69 74 68 20 74 68 65 20 68 65 6c che with the hel
65e0: 70 20 6f 66 20 74 68 65 0a 5c 26 5c 66 42 64 65 p of the.\&\fBde
65f0: 6c 65 74 65 58 50 61 74 68 43 61 63 68 65 5c 66 leteXPathCache\f
6600: 50 20 6d 65 74 68 6f 64 2c 20 74 6f 20 66 6f 72 P method, to for
6610: 63 65 20 61 20 72 65 63 6f 6d 70 69 6c 61 74 69 ce a recompilati
6620: 6f 6e 2e 0a 57 69 74 68 6f 75 74 20 75 73 69 6e on..Without usin
6630: 67 20 74 68 65 20 5c 66 49 2d 63 61 63 68 65 5c g the \fI-cache\
6640: 66 52 20 6f 70 74 69 6f 6e 20 73 75 63 68 20 63 fR option such c
6650: 6f 6e 73 69 64 65 72 61 74 69 6f 6e 20 69 73 20 onsideration is
6660: 6e 65 76 65 72 0a 6e 65 65 64 65 64 2e 0a 2e 50 never.needed...P
6670: 50 0a 45 78 61 6d 70 6c 65 73 3a 0a 0a 20 20 20 P.Examples:..
6680: 20 20 20 20 20 20 20 0a 2e 43 53 0a 73 65 74 20 ..CS.set
6690: 70 61 72 61 67 72 61 70 68 4e 6f 64 65 73 20 5b paragraphNodes [
66a0: 24 6e 6f 64 65 20 73 65 6c 65 63 74 4e 6f 64 65 $node selectNode
66b0: 73 20 7b 63 68 61 70 74 65 72 5b 33 5d 2f 2f 70 s {chapter[3]//p
66c0: 61 72 61 5b 40 74 79 70 65 3d 27 77 61 72 6e 69 ara[@type='warni
66d0: 6e 67 27 20 6f 72 20 40 74 79 70 65 3d 27 65 72 ng' or @type='er
66e0: 72 6f 72 27 7d 20 5d 0a 66 6f 72 65 61 63 68 20 ror'} ].foreach
66f0: 70 61 72 61 67 72 61 70 68 20 24 70 61 72 61 67 paragraph $parag
6700: 72 61 70 68 4e 6f 64 65 73 20 7b 0a 20 20 20 20 raphNodes {.
6710: 6c 61 70 70 65 6e 64 20 20 76 61 6c 75 65 73 20 lappend values
6720: 5b 24 70 61 72 61 67 72 61 70 68 20 73 65 6c 65 [$paragraph sele
6730: 63 74 4e 6f 64 65 73 20 61 74 74 72 69 62 75 74 ctNodes attribut
6740: 65 3a 3a 74 79 70 65 5d 0a 7d 0a 0a 73 65 74 20 e::type].}..set
6750: 64 6f 63 20 5b 64 6f 6d 20 70 61 72 73 65 20 7b doc [dom parse {
6760: 3c 64 6f 63 20 78 6d 6c 6e 73 3d 22 68 74 74 70 <doc xmlns="http
6770: 3a 2f 2f 77 77 77 2e 64 65 66 61 75 6c 74 6e 61 ://www.defaultna
6780: 6d 65 73 70 61 63 65 2e 6f 72 67 22 3e 3c 63 68 mespace.org"><ch
6790: 69 6c 64 2f 3e 3c 2f 64 6f 63 3e 7d 5d 0a 73 65 ild/></doc>}].se
67a0: 74 20 72 6f 6f 74 20 5b 24 64 6f 63 20 64 6f 63 t root [$doc doc
67b0: 75 6d 65 6e 74 45 6c 65 6d 65 6e 74 5d 0a 73 65 umentElement].se
67c0: 74 20 63 68 69 6c 64 4e 6f 64 65 73 20 5b 24 72 t childNodes [$r
67d0: 6f 6f 74 20 73 65 6c 65 63 74 4e 6f 64 65 73 20 oot selectNodes
67e0: 2d 6e 61 6d 65 73 70 61 63 65 73 20 7b 64 65 66 -namespaces {def
67f0: 61 75 6c 74 20 68 74 74 70 3a 2f 2f 77 77 77 2e ault http://www.
6800: 64 65 66 61 75 6c 74 6e 61 6d 65 73 70 61 63 65 defaultnamespace
6810: 2e 6f 72 67 7d 20 64 65 66 61 75 6c 74 3a 63 68 .org} default:ch
6820: 69 6c 64 5d 0a 2e 43 45 0a 2e 52 45 0a 2e 54 50 ild]..CE..RE..TP
6830: 0a 5c 26 5c 66 42 5c 66 42 62 61 73 65 55 52 49 .\&\fB\fBbaseURI
6840: 5c 66 50 20 5c 66 49 3f 55 52 49 3f 5c 66 42 0a \fP \fI?URI?\fB.
6850: 5c 26 5c 66 52 52 65 74 75 72 6e 73 20 74 68 65 \&\fRReturns the
6860: 20 70 72 65 73 65 6e 74 20 62 61 73 65 55 52 49 present baseURI
6870: 20 6f 66 20 74 68 65 20 64 6f 63 75 6d 65 6e 74 of the document
6880: 2e 20 49 66 20 74 68 65 20 6f 70 74 69 6f 6e 61 . If the optiona
6890: 6c 0a 61 72 67 75 6d 65 6e 74 20 55 52 49 20 69 l.argument URI i
68a0: 73 20 67 69 76 65 6e 2c 20 73 65 74 73 20 74 68 s given, sets th
68b0: 65 20 62 61 73 65 20 55 52 49 20 6f 66 20 74 68 e base URI of th
68c0: 65 20 64 6f 63 75 6d 65 6e 74 20 74 6f 20 74 68 e document to th
68d0: 65 20 67 69 76 65 6e 20 55 52 49 2e 0a 2e 54 50 e given URI...TP
68e0: 0a 5c 26 5c 66 42 5c 66 42 61 70 70 65 6e 64 46 .\&\fB\fBappendF
68f0: 72 6f 6d 53 63 72 69 70 74 5c 66 50 20 5c 66 49 romScript\fP \fI
6900: 74 63 6c 53 63 72 69 70 74 5c 66 42 0a 5c 26 5c tclScript\fB.\&\
6910: 66 52 41 70 70 65 6e 64 73 20 74 68 65 20 6e 6f fRAppends the no
6920: 64 65 73 20 63 72 65 61 74 65 64 20 62 79 20 74 des created by t
6930: 68 65 20 5c 66 49 74 63 6c 53 63 72 69 70 74 5c he \fItclScript\
6940: 66 52 20 62 79 0a 54 63 6c 20 66 75 6e 63 74 69 fR by.Tcl functi
6950: 6f 6e 73 2c 20 77 68 69 63 68 20 68 61 76 65 20 ons, which have
6960: 62 65 65 6e 20 62 75 69 6c 74 20 75 73 69 6e 67 been built using
6970: 20 5c 66 49 64 6f 6d 20 63 72 65 61 74 65 4e 6f \fIdom createNo
6980: 64 65 43 6d 64 5c 66 52 2c 20 61 74 20 74 68 65 deCmd\fR, at the
6990: 20 65 6e 64 0a 6f 66 20 74 68 65 20 63 75 72 72 end.of the curr
69a0: 65 6e 74 20 6c 69 73 74 20 6f 66 20 74 6f 70 20 ent list of top
69b0: 6c 65 76 65 6c 20 6e 6f 64 65 73 20 6f 66 20 74 level nodes of t
69c0: 68 65 20 64 6f 63 75 6d 65 6e 74 2e 0a 2e 54 50 he document...TP
69d0: 0a 5c 26 5c 66 42 5c 66 42 69 6e 73 65 72 74 42 .\&\fB\fBinsertB
69e0: 65 66 6f 72 65 46 72 6f 6d 53 63 72 69 70 74 5c eforeFromScript\
69f0: 66 50 20 5c 66 49 74 63 6c 53 63 72 69 70 74 5c fP \fItclScript\
6a00: 66 42 20 5c 66 49 72 65 66 43 68 69 6c 64 5c 66 fB \fIrefChild\f
6a10: 42 0a 5c 26 5c 66 52 49 6e 73 65 72 74 73 20 74 B.\&\fRInserts t
6a20: 68 65 20 6e 6f 64 65 73 20 63 72 65 61 74 65 64 he nodes created
6a30: 20 69 6e 20 74 68 65 20 5c 66 49 74 63 6c 53 63 in the \fItclSc
6a40: 72 69 70 74 5c 66 52 20 62 79 20 54 63 6c 0a 66 ript\fR by Tcl.f
6a50: 75 6e 63 74 69 6f 6e 73 2c 20 77 68 69 63 68 20 unctions, which
6a60: 68 61 76 65 20 62 65 65 6e 20 62 75 69 6c 74 20 have been built
6a70: 75 73 69 6e 67 20 5c 66 49 64 6f 6d 0a 63 72 65 using \fIdom.cre
6a80: 61 74 65 4e 6f 64 65 43 6d 64 5c 66 52 2c 20 62 ateNodeCmd\fR, b
6a90: 65 66 6f 72 65 20 74 68 65 20 5c 66 49 72 65 66 efore the \fIref
6aa0: 43 68 69 6c 64 5c 66 52 20 69 6e 74 6f 20 74 6f Child\fR into to
6ab0: 20 74 68 65 20 6c 69 73 74 0a 6f 66 20 74 6f 70 the list.of top
6ac0: 20 6c 65 76 65 6c 20 6e 6f 64 65 73 20 6f 66 20 level nodes of
6ad0: 74 68 65 20 64 6f 63 75 6d 65 6e 74 2e 20 49 66 the document. If
6ae0: 20 5c 66 49 72 65 66 43 68 69 6c 64 5c 66 52 20 \fIrefChild\fR
6af0: 69 73 20 74 68 65 0a 65 6d 70 74 79 20 73 74 72 is the.empty str
6b00: 69 6e 67 2c 20 74 68 65 20 6e 65 77 20 6e 6f 64 ing, the new nod
6b10: 65 73 20 77 69 6c 6c 20 62 65 20 61 70 70 65 6e es will be appen
6b20: 64 65 64 2e 0a 2e 54 50 0a 5c 26 5c 66 42 5c 66 ded...TP.\&\fB\f
6b30: 42 64 65 6c 65 74 65 58 50 61 74 68 43 61 63 68 BdeleteXPathCach
6b40: 65 5c 66 50 20 5c 66 49 3f 78 70 61 74 68 51 75 e\fP \fI?xpathQu
6b50: 65 72 79 3f 5c 66 42 0a 5c 26 5c 66 52 49 66 20 ery?\fB.\&\fRIf
6b60: 63 61 6c 6c 65 64 20 77 69 74 68 6f 75 74 20 74 called without t
6b70: 68 65 20 6f 70 74 69 6f 6e 61 6c 20 61 72 67 75 he optional argu
6b80: 6d 65 6e 74 2c 20 61 6c 6c 20 63 61 63 68 65 64 ment, all cached
6b90: 20 58 50 61 74 68 0a 65 78 70 72 65 73 73 69 6f XPath.expressio
6ba0: 6e 73 20 6f 66 20 74 68 65 20 64 6f 63 75 6d 65 ns of the docume
6bb0: 6e 74 20 61 72 65 20 66 72 65 65 64 2e 20 49 66 nt are freed. If
6bc0: 20 63 61 6c 6c 65 64 20 77 69 74 68 20 74 68 65 called with the
6bd0: 20 6f 70 74 69 6f 6e 61 6c 0a 61 72 67 75 6d 65 optional.argume
6be0: 6e 74 20 5c 66 49 78 70 61 74 68 51 75 65 72 79 nt \fIxpathQuery
6bf0: 5c 66 52 2c 20 74 68 69 73 20 73 69 6e 67 6c 65 \fR, this single
6c00: 20 58 50 61 74 68 20 71 75 65 72 79 20 77 69 6c XPath query wil
6c10: 6c 20 62 65 20 72 65 6d 6f 76 65 64 0a 66 72 6f l be removed.fro
6c20: 6d 20 74 68 65 20 63 61 63 68 65 2c 20 69 66 20 m the cache, if
6c30: 69 74 20 69 73 20 74 68 65 72 65 2e 20 54 68 65 it is there. The
6c40: 20 6d 65 74 68 6f 64 20 61 6c 77 61 79 73 20 72 method always r
6c50: 65 74 75 72 6e 73 20 61 6e 0a 65 6d 70 74 79 20 eturns an.empty
6c60: 73 74 72 69 6e 67 2e 0a 2e 50 50 0a 4f 74 68 65 string...PP.Othe
6c70: 72 77 69 73 65 2c 20 69 66 20 61 6e 20 75 6e 6b rwise, if an unk
6c80: 6e 6f 77 6e 20 6d 65 74 68 6f 64 20 6e 61 6d 65 nown method name
6c90: 20 69 73 20 67 69 76 65 6e 2c 20 74 68 65 20 63 is given, the c
6ca0: 6f 6d 6d 61 6e 64 20 77 69 74 68 20 74 68 65 0a ommand with the.
6cb0: 73 61 6d 65 20 6e 61 6d 65 20 61 73 20 74 68 65 same name as the
6cc0: 20 67 69 76 65 6e 20 6d 65 74 68 6f 64 20 77 69 given method wi
6cd0: 74 68 69 6e 20 74 68 65 20 6e 61 6d 65 73 70 61 thin the namespa
6ce0: 63 65 20 5c 66 42 3a 3a 64 6f 6d 3a 3a 64 6f 6d ce \fB::dom::dom
6cf0: 44 6f 63 5c 66 52 20 69 73 0a 74 72 69 65 64 20 Doc\fR is.tried
6d00: 74 6f 20 62 65 20 65 78 65 63 75 74 65 64 2e 20 to be executed.
6d10: 54 68 69 73 20 61 6c 6c 6f 77 73 20 71 75 69 63 This allows quic
6d20: 6b 20 6d 65 74 68 6f 64 20 61 64 64 69 74 69 6f k method additio
6d30: 6e 73 20 6f 6e 20 54 63 6c 20 6c 65 76 65 6c 2e ns on Tcl level.
6d40: 0a 2e 50 50 0a 4e 65 77 6c 79 20 63 72 65 61 74 ..PP.Newly creat
6d50: 65 64 20 6e 6f 64 65 73 20 61 72 65 20 61 70 70 ed nodes are app
6d60: 65 6e 64 65 64 20 74 6f 20 61 20 68 69 64 64 65 ended to a hidde
6d70: 6e 20 66 72 61 67 6d 65 6e 74 20 6c 69 73 74 2e n fragment list.
6d80: 20 49 66 20 74 68 65 79 0a 61 72 65 20 6e 6f 74 If they.are not
6d90: 20 6d 6f 76 65 64 20 69 6e 74 6f 20 74 68 65 20 moved into the
6da0: 74 72 65 65 20 74 68 65 79 20 61 72 65 20 61 75 tree they are au
6db0: 74 6f 6d 61 74 69 63 61 6c 6c 79 20 64 65 6c 65 tomatically dele
6dc0: 74 65 64 20 61 73 20 73 6f 6f 6e 20 61 73 20 74 ted as soon as t
6dd0: 68 65 20 77 68 6f 6c 65 0a 64 6f 63 75 6d 65 6e he whole.documen
6de0: 74 20 67 65 74 73 20 64 65 6c 65 74 65 64 2e 0a t gets deleted..
6df0: 2e 53 48 20 22 53 45 45 20 41 4c 53 4f 22 0a 64 .SH "SEE ALSO".d
6e00: 6f 6d 2c 20 64 6f 6d 4e 6f 64 65 0a 2e 53 48 20 om, domNode..SH
6e10: 4b 45 59 57 4f 52 44 53 0a 44 4f 4d 20 6e 6f 64 KEYWORDS.DOM nod
6e20: 65 20 63 72 65 61 74 69 6f 6e 2c 20 64 6f 63 75 e creation, docu
6e30: 6d 65 6e 74 20 65 6c 65 6d 65 6e 74 0a ment element.