write (Command)
write [ -ct [ original | changesapplied | changeshighlighted]] [ -sgml | -untagged | -xml] [ -encodingstring] [ -paste | -bufferbuffername | -all] [ -ok] [ -header | -noheader] [ -pi | -nopi] [ -eoc | -noeoc] [ -nonasciichar [ entref | numref | char]] [ -public pubident] [ -sysid sysident] [ -nobreakattag] [ -flatten [ file | text | both]] filename
The write command saves a version of the document, or a portion of the document, to the file specified by filename.
|
The write command does not test for available space. If you need to test for available space, use the save command.
|
filename can be any of the following:
• The name of a file, including path if needed.
A right angle bracket (>) preceding the file name causes the list of aliases to be appended to the end of the file. An exclamation point (!) preceding the file name causes the file to be rewritten, if it exists, without the prompt for confirmation.
• An asterisk (*) indicating the message window. If preceded by a right angle bracket (>*), the output is appended to the message window instead of replacing its contents.
The write command has the following options:
• -ct — Specifies how the document will write changes that have been made with change tracking turned on:
◦ original — Writes the document as if all pending changes were rejected.
◦ changesapplied — Writes the document as if all pending changes were accepted.
◦ changeshighlighted — Writes the document with all pending changes displayed.
The
write command defaults to the
set writechangetracking command setting. If
set writechangetracking is not set, the
write command writes out the document with all pending changes highlighted (that is, using
changeshighlighted).
The
save and
save_as commands will always write the change tracking information.
• -sgml — Writes a version of the document conforming to the SGML standard, ISO 8879. Unless the -noheader option is specified, the standard DOCTYPE header listing any private ENTITY declarations will appear at the top of this version. By default, SGML documents are written as SGML documents.
• -untagged — Writes a text-only version of the document which contains no tags. No entity expansion or substitution is attempted. write -untagged does not write equations.
• -xml — Writes the file as an XML document. By default, XML documents are written as XML documents.
• -encoding — Specifies with string the encoding of the file being written. The setting of this option overrides the encoding declaration in an XML file.
string must be one of the following encoding strings:
Supported Encodings
Adobe-Standard-Encoding
|
Shift_JIS
|
CNS11643
|
Big5
|
ISO-10646-UCS-2
|
GB2312
|
ISO-8859-1 to ISO-8859-11
|
KSC_5601
|
ISO-8859-13 to ISO-8859-16
|
EUC-JP
|
windows-1250 to windows-1258
|
CEUC
|
US-ASCII
|
TEUC
|
UTF-16
|
EUC-KR
|
UTF-8
|
cp932
|
cp949
|
cp936
|
cp950
|
|
If the command does not specify an encoding, Arbortext Editor sets the encoding using the following rules:
◦ If the original document is an SGML document and the -xml option is specified, the resulting XML file will use the original encoding if the SGML document has a byte-order mark (an ISO-10646-UCS-2 file) or a special encoding was set using edit -encoding. If there was no special encoding or it isn't an ISO-10646-UCS-2 file, then the resulting XML file will use UTF-8 encoding. UTF-8 is the default encoding for XML documents.
◦ If the original document is an SGML document and either no option is specified or the -sgml option is specified, the resulting SGML file will use the same encoding as the original document.
◦ If the original document is an XML document and the -sgml option is specified, the resulting SGML file will use the encoding used by the operating system.
◦ If the original document is an XML document and either no option is specified or the -xml option is specified, the resulting XML file will use the same encoding as the original document.
XML documents that do not contain an encoding declaration in their header are assumed to have the default XML encoding of UTF-8.
• -paste — Writes the contents of the current paste buffer to the specified file.
• -buffer — Writes the contents of the named paste buffer to the specified file.
• -all — Writes the entire document to the new file name. This is the default option.
|
If the paste buffer includes a marked section parameter entity, it is written as an undefined marked section parameter. Use the modify_ms_parameters (or its abbreviated version mmsp) command on the command line to define it.
|
• -ok — Writes the file without prompting you if a file with the same name already exists. The existing file will be overwritten. Alternatively, the file name may be preceded with an exclamation point (!) to suppress the prompt.
• -header — Specifies that the DOCTYPE header and any private ENTITY declarations that normally appear at the top of a standard DOCTYPE header are maintained.
• -noheader — Removes the DOCTYPE header and any private ENTITY declarations that normally appear at the top of a standard DOCTYPE header.
• -pi — Writes processing instructions specific to Arbortext Editor.
This is the equivalent of setting the
set writepi command to
-all.
If the
save_as,
write or
save commands do not specify whether to write
Arbortext Editor processing instructions, they use the value of the
set writepi command.
• -nopi — Removes all processing instructions (except change tracking processing instructions) specific to Arbortext Editor.
This is the equivalent of setting the set writepi command to -none.
Arbortext Editor processing instructions include those representing the _link and _font tags, user-defined tags, cursor location, detailing state. If you want to save an HTML file with no PIs, you can also use the > option that is available when editing an HTML 4.0 file.
With the -paste option, the write command also sends fragment processing instruction output indicating the context of the fragment in the paste buffer. When Arbortext Editor opens such a file, a fragment tag pair carrying this context information surrounds the contents of the file.
• -eoc — Turns on entity conversion, letting you specify how you want
Arbortext Editor to write out character entities. This setting overrides the value of the
set entityoutputconvert command.
• -noeoc — Turns off entity conversion, and, if
set entityinputconvert is
off,
Arbortext Editor writes out character entities as they were read in. This option overrides the value of the
set entityoutputconvert command.
• -nonasciichar — Specifies how Arbortext Editor writes out non-ASCII characters. -nonasciichar has the following arguments:
◦ entref — Writes out non-ASCII characters as character entity references. If Arbortext Editor cannot find matching character entity references, it writes out the non-ASCII characters as numeric character references. This is the default setting.
◦ char — Writes out non-ASCII characters as characters in the target encoding. If Arbortext Editor cannot find the characters in the target encoding, it writes out the non-ASCII characters as numeric character references.
◦ numref — Writes out non-ASCII characters as numeric character references.
A synonym for -nonasciichar is -nac.
• -public — Writes the alternate public identifier pubident on the DOCTYPE declaration instead of the original value (if any). pubident is not checked for validity as a minimum literal. If pubident is <none>, then the PUBLIC identifier will be omitted.
• -sysid — Writes the alternate system identifier
sysident on the
DOCTYPE declaration instead of the original value if any. For XML files,
sysident should be a valid URL (as created by the
filename_to_url function). If
sysident is
<none>, the
SYSTEM identifier will be omitted. Using this option overrides the setting of the
set writeabsolutesysid command.
• -nobreakattag — Specifies that breaks not be inserted at element boundaries or before the tag close character (applies to XML documents only). Such breaks may not be properly ignored by web browsers. Avoiding breaks at element boundaries tends to produce many breaks within elements. This may produce a file that is difficult to read when viewed with a text editor. Using this option overrides the setting of the
set writenobreakattag command.
• -flatten — Specifies that Arbortext Editor expand entity references on write, replacing references with the text of the entity type as specified by one of the following arguments:
◦ file — Expands all file entities recursively. Declarations for all file entities are omitted from the internal subset.
◦ text — Expands all text entities recursively. Declarations for all text entities are omitted from the internal subset.
◦ both — Expands both file and text entities. This is a shorthand combination of -flatten file -flatten text.
Examples
write -untag -paste cherdoc.txt
write -sgml proposal.xmm
write -buffer bufC oldver.sgm
Related Topics