Daxe configuration files


Introduction

To provide a user interface for a given XML language, Daxe needs the language definition (given with an XML schema) and a configuration file describing the user interface for the language. It works in the same way as Jaxe, but the config files use a different language. An XSLT stylesheet is available in the config directory to transform a Jaxe configuration file into a Daxe one.

Specifically, configuration files contain basic information about the XML language (a link to the schema and a list of root elements), saving options, menus (especially to insert the elements), display types for the elements, and all the strings used in the interface, depending on the user language.

They are located in Daxe's config directory, and their names end with "_config.xml".


Definition of the XML language

Element definition

Element tree

Element tree under Language :


File saving options

Element definition

Element tree

Element tree under Saving :


Menus

Menus defined in config files are displayed above Daxe's text area, after the file and edit menus.

Element definition

Element tree

Element tree under Menus :


Node display

An essential feature in Daxe is the possibility to display and edit XML element in different ways, whatever their types in the XML schema. For instance, a table element can be displayed as a table, and an element linking to an image can be displayed as an image. The objective is to ease document editing, without losing of sight their semantics : elements will not be displayed as they will be seen in web pages or PDF documents, but simply with a user interface making edition easier and highlighting the meaning of the elements.

Element definition

Element tree

Element tree under Display :


Display types

Type Description Display
division Two bars extending to the window's right side, clearly separating large areas in the document. images_types/division.png
area Two tags and carriage returns, to separate areas smaller than with division. images_types/zone.png
block A block hiding the start and end tags, as an alternative to division and area. Attributes are displayed on top, in a short or editable view, and the block can be collapsed with a button. images_types/block.png
string Two tags to identify a small string, without any carriage return. images_types/string.png
empty A single tag, typically for an empty element. images_types/vide.png
table Table display allowing the use of XML elements inside the cells. Also handles the rowspan and colspan attributes to gather cells vertically and horizontally. images_types/tabletexte.png
tr Table row.
td Table cell.
style For use in the case (very rare if the XML language encodes the meaning as opposed to the presentation) where an XML element only conveys a style information. Displays the characters in the chosen style (bold, italic, ...), without any tag. An alternative is to use the string type, which can also use a style, but displays the tags. images_types/style.png
file Displays an image based on its path on the disk coming from an attribute of the XML element (to be defined). It is possible to copy/paste images and Daxe will automatically create the XML element and save the image file whenever possible, using the first element of type file. images_types/fichier.png
symbol Special character stored as a UNICODE character within the element tags. If no element has this type, users will still be able to insert UNICODE characters from a table.
list For an element representing a bulleted or ordered list. The sub-element must use the item type. The tags are displayed as for area, with a '+' button to create new items. images_types/liste.png
item List item in a list displayed with the list type. Displayed with bullets or numbers, depending on the list type. images_types/item.png
wlist Displays a list with the default browser display for the HTML ul element. This provides a more WYSIWYG interface than list, because the list tags are hidden (which might also make it harder to edit the XML precisely). The witem type must be used for items. images_types/wlist.png
witem Must be used for items in a list using the wlist type. images_types/witem.png
simpletype Displays an element having a simple value, in a small panel. Usable only for the elements with a simple type in the XML schema. The precise display (text field, menu or checkbox) and the validation are done based on the XML schema constraints. images_types/typesimple.png
equationmem Displays the image of an equation. The equation can be edited by a simple click on the image, with a dialog showing at the same time the text of the equation (using a very simple syntax specific to Jaxe/Daxe) and the corresponding image. The text of the equation is store as an attribute, and the image is encoded in base64 and added as text inside the element. int(1/sqrt(x);x;1;infty)
equatexmem This works in the same way as the previous type, but using a TeX syntax. images_types/equatex.png
form Displays an element and all its sub-elements as a form. Beware not to use this type with elements that could have an infinitely deep subtree ! Sub-elements can be displayed as fields with the field type, or with other types (using other types within a form is only possible with Daxe, not Jaxe). images_types/formulaire.png
field Form field see above
anchor This is used to display WYSIWYG links with the HTML a element. images_types/anchor.png
hiddenp Provides a WYSIWYG interface to paragraph elements. Tags are not displayed, and entering a newline where the paragraph element is allowed automatically triggers the insertion of a new paragraph. images_types/hiddenp.png
hiddendiv Hides elements such as the HTML div to provide a more WYSIWYG interface. A new menu appears in the contextual menu to remove a parent div.
stylespan Normally used on an HTML span element, this makes Daxe use the element with this type to add style to text. Note that it is better to provide semantic elements rather than style ones like span.
hr Displayed as a horizontal line, as for the HTML hr element. images_types/hr.png
br Displayed as a line break, as the HTML br element. This display type might not play well with hiddenp, and should be avoided in general.

Parameters can be specified for some display types, with the Parameter element under Element display.

Display types division and area can have a parameter specifying the name of the attribute to use as a title for the element display.

Display types file and symbol must have a parameter specifying the attribute with the file name.

Display types table must have parameters specifying the elements for the rows and the cells.

Display types style must have a parameter specifying the style.

Display types area and string can have a parameter specifying the style, a parameter with the font family, and a parameter with the font size.

Display types equationmem and equatexmem must have a parameter specifying the attribute to use for the equation text.

Here is a list of all the parameters:

type parameter name description
division and area titleAtt attribute for the title
division, area, string and empty visibleAttributes displays all the attributes on the start tag (true|false)
table colspanAttr attribute to merge columns
table rowspanAttr attribute to merge rows
table alignAttr attribute to align text
wlist type type of list (ul|ol) (unordered/ordered)
style, area and string style BOLD | ITALIC | SUPERSCRIPT | SUBSCRIPT | UNDERLINE | STRIKETHROUGH | FOREGROUND[###,###,###] | BACKGROUND[###,###,###]
area and string font font family
area and string size font size
file srcAtt attribute with the file name
file chooser when set to "true", the file chooser is used to select a file, from the XML file directory
file widthAtt the name of the attribute with the width (in pixels)
file heightAtt the name of the attribute with the width (in pixels)
item image1 first bullet image
item image2 second bullet image
equationmem and equatexmem textAtt attribute with the equation text
anchor nameAtt the name of the name attribute
anchor hrefAtt the name of the href attribute
hiddenp, hiddendiv and stylespan styleAtt the name of the CSS style attribute

Strings

All the texts (also called strings) may have to be changed in the interface created with the configuration. Either to improve readability without having to change the schema, or to provide an interface in another natural language for the same schema. Texts may also have to be provided for a set of languages, so that users can edit the same documents, with the same Daxe configuration, but with an interface entirely in their native language.

For these reasons, the Strings element represents a set of strings for a given language and country, and it is possible to specify several in the same config file. On can use for instance language="pt" country="BR" for Brazilian Portuguese, or just language="en" so specify English without any precision about the country.

You may have noticed that the real config file XML elements have French names, even though you see them in English in Daxe and in this documentation. This is because the config file for config files is using these Strings elements to define titles to use for elements when the user's system language is English.

Element definition

Element tree

Element tree under Strings :