Chapter 8. The <xxe-app> custom HTML element Previous topic Parent topic Child topic Next topic

The <xxe-app> custom HTML element implements the sample XML editor application included in the XMLmind XML Editor Web Edition distributions.

  autorecover = "false" | "true" : "true"
  autosave = Autosave_specification
  button2pastestext = "false" | "true" : "false"
  checkleaveapp = "false" | "true" : "true"
  clientproperties = Property_list
  documentstorage = "local" | "remote" | "both" : "local"
  serverurl = WebSocket_URL


A cover for <xxe-client>/@autorecover.
Specifies which files —local, remote or both— are to be automatically saved and which time interval to use to save them.
The value of this attribute has the following syntax:
value = mode [ S interval ]? [ S enabled ]?
mode = local | remote | both 
interval = strictly_positive_number s | m | h
enabled = on | off
Examples: "remote", "both 2m", "remote 3Os on", "both off".
Autosave modes are:
Automatically save local files (when this is technically possible, i.e. on Chrome, not on Firefox).
Automatically save remote files.
Automatically save both local and remote files.
Autosave interval units are:
Default interval is "30s". Minimal interval is "10s".
The default value of enabled is "on". This flag specifies whether the autosave feature is initially enabled. The user may change this setting at any time using the Autosave checkbox found in the Options menu.
Unless this attribute is specified, the autosave facility of the sample XML editor application is disabled (the "Autosave" checkbox is grayed).
A cover for <xxe-client>/@button2pastestext.
If set to "true", when the document being edited has unsaved changes, ask the user to confirm that she/he really wants to leave the page containing the application. Default value: "true".

Figure 8-1. The “leave page” confirmation dialog box of Google Chrome™

A cover for <xxe-client>/@clientproperties.
Specifies which files <xxe-app> can access:
Default value. <xxe-app> can access files found on the computer running the web browser. These are called local files.
<xxe-app> can access found on the computer running xxeserver. These are called remote files.
Which remote files may be accessed and how these files are accessed —read-write or read-only— may be configured in xxeserver. See Chapter 7. xxeserver command-line options.
<xxe-app> can access both local and remote files.
It's not possible to Save As a local file as a remote file. It's not possible to Save As a remote file as a local file.
A cover for <xxe-client>/@serverurl.

JavaScript API

The <xxe-app> custom HTML element is defined as follows:
window.customElements.define("xxe-app", XMLEditorApp);
The JavaScript API of class XMLEditorApp is found here Opens in new window.