.\" -*- 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 \fBonsgmls\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 , 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 \fBonsgmls\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 \fBonsgmls\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), \fBonsgmls\fP(1), Standard Generalized Markup Language (SGML), ISO 8879.