File: idx_structure.man

package info (click to toggle)
tcllib 1.21%2Bdfsg-1
  • links: PTS
  • area: main
  • in suites: bookworm
  • size: 69,456 kB
  • sloc: tcl: 266,493; ansic: 14,259; sh: 2,936; xml: 1,766; yacc: 1,145; pascal: 881; makefile: 112; perl: 84; f90: 84; python: 33; ruby: 13; php: 11
file content (129 lines) | stat: -rw-r--r-- 4,124 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin doctools::idx::structure n 0.1]
[keywords deserialization]
[keywords docidx]
[keywords doctools]
[keywords serialization]
[copyright {2009 Andreas Kupries <andreas_kupries@users.sourceforge.net>}]
[moddesc   {Documentation tools}]
[titledesc {Docidx serialization utilities}]
[category  {Documentation tools}]
[require doctools::idx::structure [opt 0.1]]
[require Tcl 8.4]
[require logger]
[require snit]
[description]

This package provides commands to work with the serializations of
keyword indices as managed by the doctools system v2, and specified in
section [sectref {Keyword index serialization format}].

[para]

This is an internal package of doctools, for use by the higher level
packages handling keyword indices and their conversion into and out of
various other formats, like documents written using [term docidx]
markup.

[section API]

[list_begin definitions]

[call [cmd ::doctools::idx::structure] [method verify] \
	[arg serial] [opt [arg canonvar]]]

This command verifies that the content of [arg serial] is a valid
[term regular] serialization of a keyword index and will throw an
error if that is not the case. The result of the command is the empty
string.

[para]

If the argument [arg canonvar] is specified it is interpreted as the
name of a variable in the calling context. This variable will be
written to if and only if [arg serial] is a valid regular
serialization. Its value will be a boolean, with [const True]
indicating that the serialization is not only valid, but also
[term canonical]. [const False] will be written for a valid, but
non-canonical serialization.

[para]

For the specification of regular and canonical keyword index
serializations see the section
[sectref {Keyword index serialization format}].

[call [cmd ::doctools::idx::structure] [method verify-as-canonical] \
	[arg serial]]

This command verifies that the content of [arg serial] is a valid
[term canonical] serialization of a keyword index and will throw an
error if that is not the case. The result of the command is the empty
string.

[para]

For the specification of canonical keyword index serializations see
the section [sectref {Keyword index serialization format}].

[call [cmd ::doctools::idx::structure] [method canonicalize] [arg serial]]

This command assumes that the content of [arg serial] is a valid
[term regular] serialization of a keyword index and will throw an
error if that is not the case.

[para]

It will then convert the input into the [term canonical] serialization
of the contained keyword index and return it as its result. If the
input is already canonical it will be returned unchanged.

[para]

For the specification of regular and canonical keyword index
serializations see the section
[sectref {Keyword index serialization format}].

[call [cmd ::doctools::idx::structure] [method print] [arg serial]]

This command assumes that the argument [arg serial] contains a valid
regular serialization of a keyword index and returns a string
containing that index in a human readable form.

[para]

The exact format of this form is not specified and cannot be relied on
for parsing or other machine-based activities.

[para]

For the specification of regular keyword index serializations see the
section [sectref {Keyword index serialization format}].

[call [cmd ::doctools::idx::structure] [method merge] \
	[arg seriala] [arg serialb]]

This command accepts the regular serializations of two keyword indices
and uses them to create their union.  The result of the command is the
canonical serialization of this unified keyword index.

[para]

Title and label of the resulting index are taken from the index
contained in [arg serialb]. The set of keys, references and their
connections is the union of the set of keys and references of the two
inputs.

[para]

For the specification of regular and canonical keyword index
serializations see the section
[sectref {Keyword index serialization format}].

[list_end]

[include include/serialization.inc]

[vset CATEGORY doctools]
[include ../common-text/feedback.inc]
[manpage_end]