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 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271
|
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML Strict//EN">
<HTML>
<HEAD>
<TITLE>SPAM</TITLE>
</HEAD>
<BODY>
<H1>SPAM</H1>
<H4>
An SGML System Conforming to
International Standard ISO 8879 --<BR>
Standard Generalized Markup Language
</H4>
<H2>
SYNOPSIS
</H2>
<P>
<CODE>spam</CODE>
[
<CODE>-Cehilprvx</CODE>
]
[
<CODE>-c<VAR>catalog_file</VAR></CODE>
]
[
<CODE>-D<VAR>directory</VAR></CODE>
]
[
<CODE>-f<VAR>file</VAR></CODE>
]
[
<CODE>-m<VAR>markup_option</VAR></CODE>
]
[
<CODE>-o<VAR>entity_name</VAR></CODE>
]
[
<CODE>-w<VAR>warning_type</VAR></CODE>
]
<CODE><VAR>sysid...</VAR></CODE>
<H2>DESCRIPTION</H2>
<P>
Spam (SP Add Markup)
is an SGML markup stream editor implemented using the SP parser.
Spam parses the SGML document contained in
<CODE><VAR>sysid...</VAR></CODE>
and copies to the standard output
the portion of the document entity containing the document
instance, adding or changing markup as specified by the
<CODE>-m</CODE> options.
The <CODE>-p</CODE>
option can be used to include the SGML declaration and prolog
in the output.
The <CODE>-o</CODE>
option can be used to output other entities.
The
<CODE>-x</CODE>
option can be used to expand entity references.
<P>
The following options are available:
<DL>
<DT>
<CODE>-c<VAR>file</VAR></CODE>
<DD>
Use the catalog entry file
<CODE><VAR>file</VAR></CODE>.
<DT>
<CODE>-C</CODE>
<DD>
This has the same effect as in <A HREF="nsgmls.htm#optC">nsgmls</A>.
<DT>
<CODE>-D<VAR>directory</VAR></CODE>
<DD>
Search
<CODE><VAR>directory</VAR></CODE>
for files specified in system identifiers.
This has the same effect as in <A HREF="nsgmls.htm#optD">nsgmls</A>.
<DT>
<CODE>-e</CODE>
<DD>
Describe open entities in error messages.
<DT>
<CODE>-f<VAR>file</VAR></CODE>
<DD>
Redirect errors to
<CODE><VAR>file</VAR></CODE>.
This is useful mainly with shells that do not support redirection
of stderr.
<DT>
<CODE>-h</CODE>
<DD>
Hoist omitted tags out from the start of internal entities.
If the text at the beginning of an internal entity causes
a tag to be implied,
the tag will usually be treated as being in that internal entity;
this option will instead cause it to be treated as being in the entity
that referenced the internal entity.
This option makes a difference in conjunction with
<CODE>-momittag</CODE>
or
<CODE>-x -x</CODE>.
<DT>
<CODE>-i<VAR>name</VAR></CODE>
<DD>
This has the same effect as in <A HREF="nsgmls.htm#opti">nsgmls</A>.
<DT>
<CODE>-l</CODE>
<DD>
Prefer lower-case.
Added names that were subject to upper-case substitution
will be converted to lower-case.
<DT>
<CODE>-m<VAR>markup_option</VAR></CODE>
<DD>
Change the markup in the output according to the value
of
<CODE><VAR>markup_option</VAR></CODE>
as follows:
<DL>
<DT>
<CODE>omittag</CODE>
<DD>
Add tags that were omitted using omitted tag minimization.
End tags that were omitted because the element has
a declared content of <SAMP>EMPTY</SAMP>
or an explicit content reference
will not be added.
<DT>
<CODE>shortref</CODE>
<DD>
Replace short references by named entity references.
<DT>
<CODE>net</CODE>
<DD>
Change null end-tags
into unminimized end-tags,
and change net-enabling start-tags
into unminimized start-tags.
<DT>
<CODE>emptytag</CODE>
<DD>
Change empty tags into unminimized tags.
<DT>
<CODE>unclosed</CODE>
<DD>
Change unclosed tags into unminimized tags.
<DT>
<CODE>attname</CODE>
<DD>
Add omitted attribute names and
<CODE>vi</CODE>s.
<DT>
<CODE>attvalue</CODE>
<DD>
Add literal delimiters omitted from attribute values.
<DT>
<CODE>attspec</CODE>
<DD>
Add omitted attribute specifications.
<DT>
<CODE>current</CODE>
<DD>
Add omitted attribute specifications for current attributes.
This option is implied by the
<CODE>attspec</CODE>
option.
<DT>
<CODE>shorttag</CODE>
<DD>
Equivalent to combination of
<CODE>net</CODE>,
<CODE>emptytag</CODE>,
<CODE>unclosed</CODE>,
<CODE>attname</CODE>,
<CODE>attvalue</CODE>
and
<CODE>attspec</CODE>
options.
<DT>
<CODE>rank</CODE>
<DD>
Add omitted rank suffixes.
<DT>
<CODE>reserved</CODE>
<DD>
Put reserved names in upper-case.
<DT>
<CODE>ms</CODE>
<DD>
Remove marked section declarations whose effective status
is IGNORE, and replace each marked section declaration
whose effective status is INCLUDE by its marked section.
In the document instance, empty comments will be added
before or after the marked section declaration to ensure
that ignored record ends remain ignored.
</DL>
<P>
Multiple
<CODE>-m</CODE>
options are allowed.
<DT>
<CODE>-o<VAR>name</VAR></CODE>
<DD>
Output the general entity
<CODE><VAR>name</VAR></CODE>
instead of the document entity.
The output will correspond to the first time
that the entity is referenced in content.
<DT>
<CODE>-p</CODE>
<DD>
Output the part of the document entity containing the SGML declaration
(if it was explicitly present in the document entity)
and the prolog before anything else.
If this option is specified two or more times,
then all entity references occurring between declarations
in the prolog will be expanded;
this includes the implicit reference to the entity
containing the external subset of the DTD, if there is one.
Note that the SGML declaration will not be included if it was
specified by an SGMLDECL entry in a catalog.
<DT>
<CODE>-r</CODE>
<DD>
Don't perform any conversion on RSs and REs when outputting the entity.
The entity would typically have the storage manager attribute
<CODE>records=asis</CODE>.
<DT>
<CODE>-v</CODE>
<DD>
Print the version number.
<DT>
<CODE>-w<VAR>type</VAR></CODE>
<DD>
Control warnings and errors according to
<CODE><VAR>type</VAR></CODE>.
This has the same effect as in <A HREF="nsgmls.htm#optw">nsgmls</A>.
<DT>
<CODE>-x</CODE>
<DD>
Expand references to entities that are changed.
If this option is specified two or more times,
then all references to entities that contain tags
will be expanded.
</DL>
<H2>BUGS</H2>
<P>
Omitted tags are added at the point where they are
implied by the SGML parser (except as modified
by the
<CODE>-h</CODE>
option); this is often not quite where they are wanted.
<P>
The case of general delimiters is not preserved.
<P>
Incorrect results may be produced if a variant concrete syntax is used
which is such that there are delimiters in markup to be added that have a
prefix that is a proper suffix of some other delimiter.
<P>
If an entity reference in a default value uses the default entity and
an entity with that name is subsequently defined and that default
value is added to the document instance, then the resulting document
may not be equivalent to the original document.
Spam will give a warning when the first two conditions are met.
<P>
<ADDRESS>
James Clark<BR>
jjc@jclark.com
</ADDRESS>
</BODY>
</HTML>
|