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.

<xxe-app
  autosave = Autosave_specification
  button2pastestext = "false" | "true" : "false"
  clientproperties = Property_list
  documentstorage = "local" | "remote" | "both" : "local"
  serverurl = WebSocket_URL
>

Attributes

@autosave
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:
local
Automatically save local files (when this is technically possible, i.e. on Chrome, not on Firefox).
remote
Automatically save remote files.
both
Automatically save both local and remote files.
Autosave interval units are:
s
Seconds.
m
Minutes.
h
Hours.
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.
Remember
Remember
Unless this attribute is specified, the autosave facility of the sample XML editor application is disabled (the "Autosave" checkbox is grayed).
@button2pastestext
A cover for <xxe-client>/@button2pastestext.
@clientproperties
A cover for <xxe-client>/@clientproperties.
@documentstorage
Specifies which files <xxe-app> can access:
local
Default value. <xxe-app> can access files found on the computer running the web browser. These are called local files.
remote
<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.
both
<xxe-app> can access both local and remote files.
Remember
Remember
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.
@serverurl
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.