| # XMLmind XML Editor - Online Help |

### 5.3. Save options

Encoding

  Specifies the encoding used for XML files saved by XXE (if save options have not been specified in an XXE configuration file — see below).

  Default: the original encoding of the file.

Save characters outside encoding as entity references

  If this toggle is checked, all characters not supported by the encoding are saved as entity references.

  Example: the Euro sign is not supported by the ISO-8859-1 encoding. If this toggle is checked, the Euro sign is saved as "`&euro;`". If this toggle is not checked, the Euro sign is saved as "`&#8364;`".

  Of course, for a character to be saved as an entity reference, the corresponding entity must have been defined in the DTD.

  Example: the Euro sign is not supported by the ISO-8859-1 encoding. If there is no entity defined for this currency symbol, the Euro sign is saved as "&#8364;" whether the toggle is checked or not.

  Default: checked.

Always save these characters as entity references

  Specifies which characters, even if they are supported by the encoding, are always saved as entity references.

  Example: the Copyright sign is supported by the ISO-8859-1 encoding but you may prefer to see it saved as "`&copy;`". In such case, specify `"169"` in this text field.

  This attribute contains a list of character ranges. A character range is either a single character or an actual range ``char1`:`char2``.

  A character may be specified using its Unicode character number, in decimal (example: `233` for e acute), in hexadecimal (example: `0xE9`) or in octal (example: `0351`).

  Because names are easier to remember than numbers, a character may also be specified using its entity name as defined in the DocBook 4.2 DTD (example: `eacute`). Note these symbolic specifications are supported whatever is the DTD or schema of the document being saved.

  Examples: `nbsp` `160` `0xA0` `0240` `reg 174 0x00ae 0256 pound:yen 163:165 0xA3:0xA5 0243:0245`

  Default: empty.

  Ignored if toggle "Save characters outside encoding as entity references" is not checked.

Indent

  If this toggle is checked, XML files saved by XXE are indented (if save options have not been specified in an XXE configuration file -- see below).

  The fields and toggles that follows in the Indent frame may be used to parametrize indentation.

  Default: checked.

Indentation

  Specifies the number of space characters used to indent a child element relatively to its parent element.

  Default: 2.

Max. line length

  Specifies the maximum line length for elements containing text interspersed with child elements.

  Default: 78.

  This value is only used as a hint: XML files created by XXE may contain lines much longer than the specified length.

Add open lines

  If this toggle is checked, an open line is added between the child elements of a parent element (if the content model of the parent only allows child elements).

  Default: checked.

Do not indent unconstrained documents

  If this toggle is checked, XML files generated by XXE when saving documents not constrained by a DTD, W3C XML Schema or RELAX NG schema, are not indented, even if the Indent toggle is checked.

  Note that when this toggle is not checked, XXE uses very simple heuristics to indent unconstrained documents. Indenting such documents this way may add white space to places where it is significant.

  Default: not checked.

Override settings specified in config. files

  The above options can also be specified in a configuration file customizing XXE for a specific XML application.

  If this is the case, when the configuration is in use, what has been specified in the Options dialog box is completely ignored, unless this toggle is checked.

  Default: not checked.

Automatically save modified documents

  If this toggle is checked, XXE will automatically save modified documents.

  Default: not checked.

Max. modifications before saving

  A modified document will be automatically saved after specified number of modifications. Typing a character counts as a modification.

  Default: 300.

Idle time (seconds) before saving

  If a modified document is no longer edited during specified number of seconds, this document is automatically saved, even if the "Max. modifications before saving" count has not yet been reached.

  This option allows to make the auto-save feature as non-intrusive as possible.

  Default: 30.

Ensure that a save filename has an extension

  If this toggle is checked, XXE automatically appends an extension to the save filenames (File → Save As, File → Save Copy, etc) having no extension at all.

  The extension is guessed based on the current filename of the document to be saved. For example, if you save `/tmp/page.htm`l as `/home/john/index`, XXE automatically appends "`.html`". When the extension cannot be guessed this way, XXE fallbacks to "`.xml`".

  Note that automatically appending the proper extension to the selected save filename is not possible when option "Use the native file chooser in preference to the multi-platform file chooser" has been turned on.

  Default: checked.

Before saving, make a backup copy of the file

  If this toggle is checked, a copy of the original file is made (same name but ending with '`~`') before saving the modified copy.

  Note that backup files are created at the beginning of the editing session and not each time a file is saved. This makes the backup files much more useful. For example a diff between `foo.xml~` and `foo.xml` will show you what you did during last editing session.

  Also note that this feature is supported only for save files stored on the local file system. For example, backup files will never be created on a WebDAV server.

  Default: checked.

Automatically update references in modular documents

  If this toggle is checked, references found in modular documents are automatically updated each time a referenced document is saved to disk.

  Example: document `book.xml` references `chapter1.xml` and `chapter2.xml`. File `chapter2.xml` is modified and saved to disk using XXE. Nodes included in `book.xml` coming from `chapter2.xml` are automatically updated.

  Counter-example: document `book.xml` references `chapter1.xml` and `chapter2.xml`. File `chapter2.xml` references `section1.xml` and `section2.xml`. File `section2.xml` is modified then saved to disk using XXE. Nodes included in `book.xml` indirectly coming from `section2.xml` are not automatically updated. In such case, if you really want to update `book.xml`, you'll have to use View+Redraw (Ctrl+L) See note about Updating the references contained in a modular document.

  Default: checked.