File: instant.1

package info (click to toggle)
docbook-to-man 1%3A2.0.0-32
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,332 kB
  • ctags: 868
  • sloc: ansic: 5,819; sh: 1,371; makefile: 158
file content (196 lines) | stat: -rw-r--r-- 10,552 bytes parent folder | download | duplicates (5)
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
.\" -*- nroff -*-
.\" Copyright (c) 1994  
.\" Open Software Foundation, Inc. 
.\"  
.\" Permission is hereby granted to use, copy, modify and freely distribute 
.\" the software in this file and its documentation for any purpose without 
.\" fee, provided that the above copyright notice appears in all copies and 
.\" that both the copyright notice and this permission notice appear in 
.\" supporting documentation.  Further, provided that the name of Open 
.\" Software Foundation, Inc. ("OSF") not be used in advertising or 
.\" publicity pertaining to distribution of the software without prior 
.\" written permission from OSF.  OSF makes no representations about the 
.\" suitability of this software for any purpose.  It is provided "as is" 
.\" without express or implied warranty. 
.\"
.\" Copyright (c) 1996 X Consortium
.\" Copyright (c) 1996 Dalrymple Consulting
.\" 
.\" Permission is hereby granted, free of charge, to any person obtaining a copy
.\" of this software and associated documentation files (the "Software"), to deal
.\" in the Software without restriction, including without limitation the rights
.\" to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
.\" copies of the Software, and to permit persons to whom the Software is
.\" furnished to do so, subject to the following conditions:
.\" 
.\" The above copyright notice and this permission notice shall be included in
.\" all copies or substantial portions of the Software.
.\" 
.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
.\" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
.\" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
.\" X CONSORTIUM OR DALRYMPLE CONSULTING BE LIABLE FOR ANY CLAIM, DAMAGES OR
.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
.\" OTHER DEALINGS IN THE SOFTWARE.
.\" 
.\" Except as contained in this notice, the names of the X Consortium and
.\" Dalrymple Consulting shall not be used in advertising or otherwise to
.\" promote the sale, use or other dealings in this Software without prior
.\" written authorization.
.\"
.\" Translated with /usr/local/lib/tpt/ref-man.ts by fld on cord, Wed 07 Feb 1996, 21:59
.TH "instant" "1" "user cmd"
.SH "Name"
instant - manipulates ESIS from parsed SGML instance
.SH "Synopsis"
.na
.PP
\fBinstant\fP [ \fB-bhuvxHISW\fP ]  [ \fB-t\fP \fIfile\fP]  [ \fB-s\fP \fIfile\fP]  [ \fB-c\fP \fIfile\fP]  [ \fB-o\fP \fIfile\fP]  [ \fB-D\fP \fIvariable\fP\fB=\fP\fIvalue\fP ...]  [ \fB-i\fP \fIid\fP]  [ \fB-l\fP \fIdirectory\fP]  [\fIfile\fP] 
.ad
.SH "Description"
.PP
The \fBinstant\fP program manipulates an SGML document instance in a variety of ways, 
including translating into a form suitable for a formatting application and printing information about this instance. 
Input to \fBinstant\fP is the output of \fBnsgmls\fP, whose format is called Element Structure Information Set (ESIS).
.SH "Flags"
.PP
The following are the possible command line options to \fBinstant\fP. Output is sent to the standard output, except where otherwise noted.
'br\" labeled list
.IP "\fB-t\fP \fIfile\fP"
Translate the SGML instance to another form, usually suitable for a formatting application. 
The \fIfile\fP is called a translation spec, which specifies how the tags are to be translated. See \fBtranspec\fP(5). 
By convention, names for \fIfile\fP use the suffix \fB.ts\fP, for \fItranslation spec\fP.
.IP "\fB-s\fP \fIfile\fP "
Specifies a file of mappings for SDATA entities in the instance. 
The file is of two columns, separated by one or more tabs. 
Spaces can \fInot\fP be used as the separator because spaces are allowable as the content of the columns. 
The first column is the entity data to map, the second is the string that the data is mapped to. 
The entity data is typically what is found in public ISO entity sets, such as the General Technical and Publishing sets. 
The mappings are specific to the formatting application used. 
For example, to map the em dash entity, \fB[mdash ]\fP, in the Publishing set to the TeX representation, 
the first column would be \fB[mdash ]\fP and the second column \fB---\fR.
Lines beginning with a \fB#\fP are comments, and are ignored. Empty lines are also ignored.
.IP "\fB-c\fP \fIfile\fP "
Specifies a file of string mappings for characters in the instance. 
The file is of two columns, separated by white space. 
The first is the character to map, the second is the string that the character is mapped to. 
The mappings are specific to the formatting application used. 
Lines beginning with a \fB#\fP are comments, and are ignored. Empty lines are also ignored.
.IP "\fB-d\fP"
strip newline at the beginning of data records
.IP "\fB-f \fIlength\fR"
Set the threshold for the length, in characters,
of an <Entry>, over which it is called a block of filled text, to \fIlength\fR.
.IP "\fB-o\fP \fIfile\fP "
Write all output (except error and warning messages) to file \fIfile\fP. By default, output goes to stdout.
.IP "\fB-h\fP"
Print a text representation of the hierarchy of the instance elements. 
The deeper an element is in the tree, the more it is indented. The data content is not printed.
.IP "\fB-u\fP"
Print a summary of the usage of each element in the instance. 
Information given includes attributes, number of children, and depth in the hierarchy. 
.IP "\fB-S\fP"
Print some statistics about element usage in the instance, including how often each element is used 
and how much PCDATA is contained.
.IP "\fB-x\fP"
Print the context of each element in the instance, from each element to the root of the document tree.
.IP "\fB-v\fP"
Validate the SGML instance based on the set of constraints or descriptions in the transpec file. 
This flags tells \fBinstant\fP to turn off normal output, leaving only diagnostics. 
.IP "\fB-l\fP \fIdirectory\fP"
Try to read the translation specs or other files from in the directory \fIdirectory\fP 
if not found in the current directory. 
This is called the library directory. 
The environment variable \fITPT_LIB\fP may also be used to specify this.
.IP "\fB-b\fP"
Interactive browser mode. The user is prompted for actions, 
which include moving among and examining the various nodes in the hierarchy of the instance, displaying information about them, etc.
.IP "\fB-I\fP"
List the IDs of all elements in the instance that have an ID.  The format is more suitable for other programs than humans. 
Lines show the ID, element GI, filename, and line, separated by colons. 
(This depends on the \fB-l\fP option to \fBnsgmls\fP which provide filenames and line numbers.)
.IP "\fB-i\fP \fIid\fP"
When translating the instance, begin processing at the element whose ID is \fIid\fP instead of the topmost element.
.IP "\fB-D\fP \fIvariable\fP\fB=\fP\fIvalue\fP"
Define the variable \fIvariable\fP with value \fIvalue\fP. 
.IP "\fB-W\fP"
Do not print warning messages.
.IP "\fB-H\fP"
Print a help message briefly describing the options.
.IP "\fIfile\fP"
Read the instance from the file \fIfile\fP. 
This is expected to be the output of the program \fBnsgmls\fP.
If not specified, \fBinstant\fP reads the instance from its standard input.
'br\" labeled list end
.PP
In some cases it makes no sense to combine options. 
This is especially true if one of the options is to perform a translation. No checking is done for this.
.SH "Interactive Browser"
.PP
These are the commands to the interactive browser:
'br\" labeled list
.IP "\fBcd\fP \fIargs ...\fP"
Change to a different element in the hierarchy. 
\fBcd\fP \fBid\fP \fIid\fP will change to the element whose ID is \fIid\fP. 
\fBcd\fP \fIN\fP will change to the \fIN\fPth child element of the current element. 
Several values of \fIN\fP may be specified, so the program will change to successively descending elements in the hierarchy. 
The string \fB..\fP may appear for \fIN\fP to move up a level in the hierarchy (like in a unix file system).
A \fB/\fP may be specified for \fIN\fP to change to the top of the hierarchy.
.IP "\fBcont\fP"
Print the context of each element.
.IP "\fBdata\fP \fIN\fP"
Show the data content (PCDATA, RCDATA, and DATA) of child node N.
.IP "\fBfind\fP \fIspec\fP"
Find paths to elements matching \fIspec\fP, where \fIspec\fP may be one of:
'br\" labeled list
.RS +\n(INu
.IP "\fBparent\fP \fIgi\fP"
Find all elements whose parent element is \fIgi\fP. 
.IP "\fBchild\fP \fIgi\fP"
Find all elements which have a child element \fIgi\fP. 
.IP "\fBgi\fP \fIgi\fP"
Find all elements whose name is \fIgi\fP. 
.IP "\fBattr\fP \fIname\fP \fIvalue\fP"
Find all elements that have a attribute \fIname\fP that have a value \fIvalue\fP. 
.RE
'br\" labeled list end
.IP "\fBid\fP \fIID\fP"
Show location of element whose ID is \fIID\fP.
If \fIID\fP is \fB?\fP, it will list all IDs with the paths to them. 
.IP "\fBls\fP"
List information about the current element in the hierarchy. 
This includes element name, line number in instance, context, attributes and their values, child elements, data directly within this element, 
and the order of the current element among its siblings.
.IP "\fBq\fP \fIrelation\fP \fIelement\fP"
Report whether or not the current element has the relation \fIrelation\fP to the named element \fIelement\fP. 
Values of \fIrelation\fP are the same as for \fB_followrel\fP in \fBtranspec\fP reference page.
.IP "\fBstat\fP"
Show statistics about the hierarchy. 
.IP "\fBsum\fP"
Show a tag usage summary about the hierarchy. 
.IP "\fBtran\fP \fItranspec\fP \fIoutfile\fP"
Write translated output using trans spec \fItranspec\fP to file \fIoutfile\fP. 
If \fIoutfile\fP is not specified, output is sent to stdout.
.IP "\fBtree\fP"
Print a textual representation of the hierarchy of the instance, where deeper elements are indented more. 
.IP "\fBwhere\fP"
Show current position in the hierarchy. 
.IP "<\fBcontrol-D\fP>"
Exits the program. 
'br\" labeled list end
.PP
The \fBstat\fP, \fBsum\fP, \fBtree\fP, \fBcont\fP commands take an optional first argument (of any value),
which means to only consider the entire instance instead of the hierarchy from the current element.
.SH "Files"
'br\" labeled list
.IP "\fIfile\fP\fB.ts\fP"
Translation specification file.
.IP "\fIfile\fP\fB.sdata\fP"
SDATA entity mapping file.
.IP "\fIfile\fP\fB.cmap\fP"
Character mapping file.
'br\" labeled list end
.SH "Related Information"
.PP
\fBtranspec\fP(5), \fBnsgmls\fP(1), Standard Generalized Markup Language (SGML), ISO 8879.