Amaya

Saving and publishing documents

You can save (X)HTML documents either in (X)HTML or as plain text. Other documents (SVG, MathML, XML or CSS) are saved according to their original format. You can save both remote and local documents with three different commands, Save, Save as, and Save all.

In addition, you can change a number of publishing options using the Publishing Preferences dialog. Open this dialog by choosing Preferences / Publishing from the Edit menu (or amaya / Preferences on Mac OS X).

Amaya does not provide any global view of a set of pages installed on a server. However, you can save files from a remote server in the same way you save local files, using the Save as commands. During these operations, Amaya can also save the resources you have associated with the document (images, style sheets, scripts).

The save command

The Save command saves the current document to its original location, be it local or remote. You can access the Save command by choosing Save from the File menu, clicking the Save button floppy on the button bar, or by using keyboard shortcuts Ctrl-s. Newly added images are saved in the same directory automatically; confirmation is only requested when the document was downloaded from a web server and its name is unknown.

You can also fetch a document from web servers by specifying only the server directory name, but not the file name. This may be useful when browsing, but a file name is required by the HTTP Put method. In this case, Amaya detects that the document name is missing and asks you either to use a default name or to provide one.

Note: Use the Save As command to save your document to a different location.

The save all command

The Save all command allows you to save all documents open in Amaya that have been modified and not saved yet. It works exactly like the Save command, but for all the modified documents, not only the current one.

This command may be called from the File menu or by clicking the floppybutton on the button bar.

The save as command

Choosing Save As (Ctrl-Shift-s) from the File menu opens the Save As dialog, which allows you to save the current document with a different format and to a different location.

You can:

The dialog box contains two tabs and two buttons. The first tab is about the document itself. The second tab is about its associated resources (images, styles sheets, scripts).

The Document tab contains:

The Images, Styles and Scripts tab contains:

Two buttons complete this dialog:

Saving and characters encoding (charset)

Three standard encodings are considered:

If an XML or HTML document contains a character that is not available in the character set (charset) available with the encoding, a special representation is required. XML offers two such representations of characters:

  1. Character references represent the position (in decimal or hexadecimal) of the character in the UCS. For example, the greek letter α (alpha) is represented as α (hexadecimal) or α (decimal)
  2. Entity references use a name to represent a content (in that case a character). For example the greek letter α is represented as α

Character references may be used in any XML or HTML document, but entity references are allowed only if the document itself contains a means to resolve the name.

Entity name resolution is provided by the Document type definition which refers to the DTD where names and their associated contents are defined. Practically, this means that you can use entity references only if the <!DOCTYPE ...> is present and refers to a DTD that defines the names you use.

By default, Amaya preserves the initial encoding of the document, that is the encoding that was associated with the document at loading time. You can check this encoding with command Views/Document info (Charset field). The Save and Save all commands save the document with that encoding, while the Save As command allows you to choose another encoding (Charset field).

When saving a document (Save, Save all, or Save As commands), all characters that are available in the charset of the encoding are just written using the encoding. Only the other characters are written using character or entity references. The choice between these two options is made according to the doctype. If there is a doctype that refers to a DTD that defines a name for the character, an entity reference is used (i.e. a name), otherwise Amaya generates a character reference in hexadecimal.

Note: command Tools/Change doctype allows you to associate, to change or to remove the doctype of a document at any time. This allows you to make Amaya generate either character references or entity references.

Saving documents as text

You can save your document as plain text using the Save as command from the File menu. HTML mark-up is replaced by spaces, new lines, and so on. A list of all URIs used in the document is appended to the file.

To save your document as text:

  1. Choose Save as from the File menu to open the Save as dialog box.

  2. Click the Text button in the Document format section to save the document in text format.