Arbortext Command Language > Commands > save_as
  
save_as
save_as [ -readonly] { [ -xml] | -sgml} [-pi | -nopi] [ -encodingstring] [name]
save_as copies the current version of the document or file, including any changes you have made since the last save, to the file name (and path if needed) specified by name. The document in the Edit pane will change to the document specified. If name exists, a prompt to confirm its replacement will be displayed. To suppress the prompt, prefix the name with an exclamation point (!). If name is not supplied, the Save As dialog box is displayed.
save_as has the following options:
-readonly — Saves the document as read-only.
-xml — Saves the document as XML. By default, XML documents are saved as XML documents.
-sgml — Saves the document as SGML. By default, SGML documents are saved as SGML documents.
-pi — Saves Arbortext Editor processing instructions with the document.
This is the equivalent of setting the set writepi command to -all.
-nopi — Removes all Arbortext Editor processing instructions (except change tracking processing instructions) and may be useful for exporting the document to another system.
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 File > Save for Browsers option that is available when editing an HTML 4.0 file.
-encoding — Saves the file with the encoding specified by string; string must be one of the following 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 UTF-8 encoding. UTF-8 is the default encoding for XML documents.
If the original document is an XML document and the -xml option is specified, the resulting XML 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.
Note that XML documents that do not contain an encoding declaration in their header are assumed to have the default XML encoding of UTF-8.
Examples
save_as
save_as startup.sgm
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.
Related Topics
Opening, referencing, and saving files