# Jaxe Config File Editor

Author: Soufiane Ayadi

- Create/Edit a Config file
- Languages choice
- Schema choice
- Choice of roots
- Main menu
- Other configuration
- File saving options
- Menus
- Node display
- Display types
- Exports
- Strings
- Save the config file

# Jaxe Config File Editor

This editor is used to create a Jaxe's config file to define an environment to edit XML elements. Using its simplified GUI, the user can easily create or edit config files.

## Required configuration

An OS (Mac, UNIX, Windows or other) with a recent Java version (at least 1.5). To test your OS Java version, you can type "`java -version`" in the command line.

## Application launch

This usually just requires double-clicking on it on MacOS X and Windows, or right-clicking on it and choosing "Open with Sun Java Runtime" on Linux.

## How to use Jaxe Config File Editor

- user's guide

## Licence

GPL

# Create/Edit a Config file

Initial menu
Open a config file

New: create a new config file

Open: open and edit an existing config file. Go to main menu .

Exit: exit the application

# Languages choice

Set one or several languages
Add a language
Language list

You must add at least one language !

# Schema choice

Schema choice
Selection of a xml schema in the config directory

Choose a W3C schema, select the schema file in your config directory.

# Choice of roots

Choice of one or several root elements

The list on the left represents the elements which may be root elements. Select one and add it to the list of roots. Don't forget to commit the changes by clicking the OK button.

When opening an existing configuration file, you will see the existing roots in the list of roots.

It is necessary to give Jaxe one or several possible root elements to use for new documents.

# Main menu

Main menu

The main menu provides access to different parts of the editor:

- Root : Choice the possible roots in the config file
- Other configuration : Included Jaxe configuration
- File saving options : Edit the file saving options
- Menus Editor : Edit the menus, insertion menu and function menu
- Elements Editor : Edit node display
- Exports Editor : Edit exports
- General Texts Editor : Edit strings

# Other configuration

Choice of another configuration file

Another Jaxe configuration, to include another one in this config.

# File saving options

File saving options

## Element definition

- `Encoding`

  Character encoding to use for new documents. Jaxe uses ISO-8859-1 by default if nothing is specified.

- `Doctype`

  Document type definition, if a DTD must be specified in the document headers.

- `Schema Location`

  To save the location of the XML schema in XML documents.

- `Namespace prefix`

  Prefix to use for a given namespace. It is possible to specify several namespace prefixes.

# Menus

Create a new menu
Create a new menu
Add an insertion menu
Create a new function menu
Create a new function menu
Edit the menu strings
Edit the insertion menu strings

Menus defined in config files are displayed above Jaxe's text area. They are not mixed with Jaxe's menubar, which is above (on top of the screen on Macs).

## The interface

The list on the right displays xml elements from the XML schema. These elements can be filtered through the text field. When opening an existing config file, the list shows only the remaining elements

## Element definition

- `New Menu`

  Create a main menu, possibly containing sub-menus.

- `Menu insertion`

  Using the 'Add' and 'Remove' buttons, you can add or remove an insertion menu. The node name and the node type (element by default) must be specified. It is also possible to specify a keyboard shortcut, with the corresponding key.

- `Function menu`

  Menu to execute a function with its Java class. The only predefined function in Jaxe is `jaxe.FonctionNormal`, which is used to remove all the styles in a text area. Other functions can be added as plugins.

- `Parameter`

  A parameter to pass to the function.

- `Edit the texts`

  You can edit the texts of selected menu by clicking on the button Edit texts. Set title and documentation for each language (pre-defined before).

# Node display

Edit of selected element
Edit the element strings
Filter the list of elements
Suggest attribute values
Display parameter
Edit the attribute strings

An essential feature in Jaxe is the possibility to display and edit XML elements 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 goal is to ease document editing, without losing of sight the 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

- `Type`

  Specifies how an element will be displayed in Jaxe.

- `Suggested value`

  Value suggested to the user when the schema does not limit authorized values.

  You can specify suggested values ​​of an element only if Type is typesimple or plugin

- `Attribute display`

  Can be used to suggest attribute values.

- `Parameter`

  A display parameter, depending on the display type.

- `Edit the texts`

  You can edit the texts of the selected element by clicking on the button Edit texts. Set title and documentation for each language (pre-defined before).

  For attribute strings, title can also be defined.

# Display types

Type | Description | Display
--- | --- | ---
`division` | Two bars extending to the window's right side, clearly separating large areas in the document. |
`area` | Two tags and carriage returns, to separate areas smaller than with `division`. |
`string` | Two tags to identify a small string, without any carriage return. |
`empty` | A single tag, typically for an empty element. |
`table` | Spreadsheet style table display (with the Swing component JTable). Handy for tables of numbers, but does not allow the use of XML elements inside the cells (use `text table` to do that). |
`text 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. |
`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. |
`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 Jaxe will automatically create the XML element and the image file on the disk, using the first element of type `file`. |
`symbol` | Displays an image chosen within a set of images in an image folder. |
`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. |
`item` | List item in a list displayed with the `list` type. Displayed with bullets or numbers, depending on the list type. |
`simple type` | 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. |
`equation` | 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) and the corresponding image. |
`form` | Displays an element and all its sub-elements as a form, with a field for each sub-element. Beware not to use this type with elements that could have an infinitely deep subtree ! |
`plugin` | If you want to define your own Jaxe element, it is possible ! See the section "Creation of new Jaxe elements" in the developer guide for more information. |

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` and `text 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 `equation` must have parameters specifying the attributes to use for the equation text and the image filename.

Here is a list of all the parameters:

type | parameter name | description
--- | --- | ---
division and area | titreAtt | attribute for the title
division, area, string and empty | attributsVisibles | displays all the attributes on the start tag (true|false)
table and text table | trTag | element for a line
table and text table | tdTag | element for a cell
table and text table | thTag | element for a header cell
text table | colspanAttr | attribute to merge columns
text table | rowspanAttr | attribute to merge rows
text table | alignAttr | attribute to align text
list | typeListe | type of list (`POINTS|NUMEROS`) (bulleted/ordered)
style, area and string | style | `GRAS` (bold) | `ITALIQUE` (italic) | `EXPOSANT` (superscript) | `INDICE` (subscript) | `SOULIGNE` (underlined) | `BARRE` (strikethrough)
area and string | police | font family
area and string | taille | font size
file and symbol | srcAtt | attribute with the file name
plugin | classe | Java class derived from JaxeElement
item | image1 | first bullet image
item | image2 | second bullet image
equation | srcAtt | attribute with the image filename
equation | texteAtt | attribute with the equation text

# Exports

Add an export
Choice XSL file for export

## Element definition

- `Export`

  A possible export for the documents, using one or several successive XSLT transforms. An export to an HTML file will make an "HTML preview" menu appear in Jaxe's `Windows` menu. The other exports are available in Jaxe's `File` menu.

- `XSL file`

  An XSL file to use for the transform (XSLT 1.0). Must generate XHTML or HTML for the `HTML` output, and XSL-FO for the `PDF` output.

- `Parameter`

  A stylesheet parameter. There are magic names that make Jaxe automatically fill up values before the transform (these values cannot otherwise be obtained from XSLT) :

  - `jaxe-fichier-xml`

    The path to the XML file

  - `jaxe-uri-xml`

    The URI to the XML file

  - `jaxe-fichier-xsl`

    The path to the XSL file

  - `jaxe-uri-xsl`

    The URI to the XSL file

# Strings

Edit a menu strings
Edit an element strings
Editer an export strings
Add language
Edit the strings for a set of languages

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 Jaxe configuration, but with an interface entirely in their native language.

- You can add a language by clicking on Add. The language is added with the same menus as other languages. You can simply translate.
- To remove a language, select it and click on Remove.

## Element definition

- `Configuration description`

  Short line to describe the configuration, displayed in the dialog to create new documents with Jaxe.

- `Menu strings`

  Strings associated to a menu, identified with its name

- `Title`

  A title

- `Documentation`

  A documentation

- `Element strings`

  Strings associated to an XML element. Used to display the element, but also for this element's insertion menu if no string was defined for the menu.

- `Title for value`

  A title to use for an element or attribute value

- `Attribute strings`

  Strings associated to an attribute

- `Export strings`

  Strings associated to an export

# Save the config file

Save the XML file
Save the schema path
Schema path saving

Click on Save and choose your config directory path. Enter the file name (without _config, or .xml extension)

A dialog asks you to save the schema path. The config file and the W3C schema must be in the same directory.

If you exit without saving your XML file, a dialog will suggest to do it.