EditiX XML Editor 2013 sp1 - Manual

Upgrade to the 2021 release now

[Home] | [Download] | [Purchase]

Note

EditiX is a cross-platform and multi-purposes XML Editor, Visual Schema Editor and XSLT Debugger.

An EditiX Version Number is built with :
- A Year (like 2013) bound to major features
- A Service Pack adding minor features and fixing various bugs (like SP1)
- A Build number (like 020109) including bugs fixing for a service pack.

1. General Interface

a. Global view

The user interface has four components :
  1. A set of menus which are active depending on the current document type*
  2. A toolbar varying with the current document type (look at 1b).
  3. A tab list of opened documents with an icon and a file name depending on the current document type* and the current document path
  4. A status bar with data about the current editing state
  5. A panel on the left side containing various windows like a file browser, a project manager, an xpath evaluator...

(*) A document type is choosen when opening a document or creating a new one.

b. Document type

Each document has a document type that has to be choosen when opening a file according to the selected filter from the file dialog box. You may update this document type using the File Info panel (from the "File" menu).
When opening a document from the "Open recent" menu item or by opening a project from the "Open project" menu item, the document type is always restored. User may also change the default file encoding. User cannot define a new document type but it is always possible to assign another document type for a template document from the "Template" menu and the "Edit templates" item.

Here a list of available document types :

Document Type
Role
Icon
XML Standard XML document
XML
DTD Document Type declaration document
XSD
TEXT Simple text document without XML content
TEXT
XSLT XSL Transformations document
XSLT
XSLT2 XSL Transformations 2.0 document
XSLT
XQR XQuery document
XHTML XHTML document
XHTML
FO XSL-FO document
XSLT
RNG XML RelaxNG document
XSD
XSD W3C XML Schema document
XSD
SVG Scalable Vector Graphics document
XHTML
DOCBOOK DocBook document
DOCBOOK
EXML Very large XML document. EditiX will use minimal functions for saving the memory. You will not have a tree for sample.
XML
EXF XML Form Designer
editix form designer
XXF XML Form Editor
xml form editor
ANT Ant project document
ANT
XFL XML Scenario XML Scenario

Note : Blue color is usually for user XML documents, Green color is for transformation documents (like XSLT), Red color is for validation (like DTD), Yellow color is for visual documents (like SVG).

The document's icon is shown in the tab list of opened documents and when opening a recent document from the "File" menu.

c. Menu content

The visibility of each menu item depends on the current document type. The following table contains each menu detail with the supported document type. When a document type is mentionned, it means this menu item will be activated for this document type otherwise it will be disabled.

- File menu

Menu item
Role

Shortkey*

Document type
New... Create a new document from the available templates
N
All
Open... Open a document from the file system
O
All
Open recent... Shows documents that were most recently loaded, in order to select one to open.

All
Insert file... Insert a document at the caret location

All
Close Close the current document. A dialog box will be prompted if the document must be saved before closing.
Alt F4
All
Close all Close all the opened document. A dialog box will ask to save changed documents that are not saved.

All
Close and Delete Close the current document and delete it. User can't read it again. A dialog will ask to confirm deleting.

All
Import/HTML
Insert an HTML document converting to XHTML

All
Import/CSV
Import an Excel CSV file format. User can choose the column separators.

All
Import/JSON Import a JSON (.json or .jso) file format to XML   All
Import/SQL Convert an SQL query to XML using JDBC Driver (by default with ODBC)   All
Export/Java classes Create Java classes from the XML document. It will generate too a SAX handler for using objects rather than DOM nodes with this document.   All
Export/JSON Export your XML document to the JSON format   All
XML Databases Open a panel for managing XML databases content   All
Style library... Panel for storing/restoring CSS style in any documents   All
Save Save the current document for the file system, ftp, zip, xml databases. The user doesn't have to worry about the way the file has been loaded.
S
All
Save as... Save the current document to the local file system.

All
Save as template... Store the current document as a template for the "New..."  item usage. User can delete it from the "Template" menu.

All
Save all Save all the opened documents

All
Open by HTTP... Open a document by HTTP using the GET or the POST methods and the user can insert request parameters. The HTML reply can be converted to XML.   All
Browse files Show or hide the file browser. This is a facility for editing quickly a document from the file system. alt 1 All
Browse files by FTP... Browse an FTP server for editing a file. User will have to specify the host, user name and password. If a proxy is needed, it is required to update the "proxy" preference. Use the "Save" item for saving.

All
Browse files by ZIP... Browse a zip or jar file for editing a file. Use the "Save" item for saving.


Project/Project Manager Display the project panel. alt 2 All
Project/New project Create a new project file and use it. It will display too the project panel if required.   All
Project/Open project... Open a collection of documents using a project file (*.pre)

All
Project/Open recent project Shows the most recently opened projects in order to choose one to open.

All
Project/Save project Save all the opened documents from the current project (*.pre)

All
Project/Save project as... Save all opened documents inside a project (*.pre) browsing the file system

All
Project/Export project as a ZIP document Create a ZIP document using the project content. Note that it will create relative path, thus your work will be accessible for other machines. All parameters like XSLT parameters will be changed to relative ones too. An EditiX project will be available too.   All
Project/Close project Close all opened documents from the current project. A dialog asks to save modified documents.

All
File info Panel with the current file encoding and document type. User can also change these values. alt 3 All
Encoding Select a file encoding (like UTF-8 e.g.) for reading or writing a file. In case of uncertainty about encoding the "AUTOMATIC" value is recommended. This value is also available inside the preferences through the "file" category or when opening a new document. In the AUTOMATIC mode the encoding will be read from the XML prolog (encoding property), if missing it will use UTF-8.   All
Print... Print the current document
P
All
Quit Exit from editiX. (Quit EditiX)

All

* By default with ctrl or command (under Mac OS X)

- Edit menu

Menu item Role Shortkey* Document type
Undo Undo the last action. This is unauthorized if you format the document.
Z
All
Redo Redo the last action.
Y
All
Cut Cut the selection.
X
All
Paste Paste the clipboard
V
All
From the current node/Cut Cut the current node shift X All
From the current node/Copy Copy the current node. Use the Paste action after. shift C All
From the current node/Duplicate the previous sibling Copy the previous node sharing a same parent node from the current node. shift P All
From the current node/Duplicate the following sibling Copy the next node sharing a same parent node from the current node. shift F All
From the current node/Add a bookmark Store the current node inside the bookmark. Look at the search menu for usage. B All
From the current node/select Select the current node (element or text). shift A All
Copy XPath location Copy to the clibboard the current xpath location at the caret.

XML;XHTML;DOCBOOK;XXF
Copy File location Copy to the clipboard the current file location. Path separator will be '/'.   All
Select all Select the whole document
A
All
Surround by a Tag... Surround the selection by a tag. If a schema is available, the user has to select the surrounding tag from the schema.
shift T
XML;XSLT;XHTML;XSD;RNG;FO;DOCBOOK;XXF
Comment or Uncomment Comment/Uncomment the current text selection. If there's no selection, the current node will be commented.
M
DTD;XML;XSLT;XHTML;XSD;RNG;FO;DOCBOOK;XXF
Surround by a CDATA Section Surround the selection by an XML CDATA section.

XML;XSLT;XHTML;XSD;RNG;FO;DOCBOOK;XXF
Spell checker language Select the document's language for the spell checker. This selection will be stored in the project or when reopening from the file menu.   All
Spell checker Active the spell checker regarding the spell checker language. Wrong words are underlined, proposals are available from the popup menu.   All

* By default with ctrl or command (under Mac OS X)

- Search menu

Menu item Role Shortkey* Document type
Find/Replace... Search/Replace a character string in the whole document.
F
All
Search again
Repeat the last search
F3
All
File Search... Open a panel for searching an expression in project or a directory using text, xpath or regexp.   All
Bookmarks/Go to This is sub menu with all stored bookmarks. The sub menu content can be stored using a project.   All
Bookmarks/Add a bookmark Add the current node inside the bookmark or the cursor location (for DTD as sample) B All
Bookmarks/Remove all bookmarks Remove all the stored bookmarks   All
Search in a tree clone... Show a dialog box with a tree clone to navigate in the whole document.

XML;XSLT;XHTML;XSD;RNG;FO;DOCBOOK;XXF
Node search
Search a part of the document with XML criterias like an element name, an attribute name or value or a namespace...

XML;XSLT;XHTML;XSD;RNG;FO;DOCBOOK;XXF
Display the current element occurences Display in a left panel all the occurences of the current element. F2 All
Show next node Move the caret from the current location o the next tag. shift U
XML;XSLT;XHTML;XSD;RNG;FO;DOCBOOK;XXF
Show previous node Move the caret from the current location to the previous tag.
shift I
XML;XSLT;XHTML;XSD;RNG;FO;DOCBOOK;XXF
Show the begin of the element node Show without moving the caret the beginning of the tag.
shift L
XML;XSLT;XHTML;XSD;RNG;FO;DOCBOOK;XXF
Show the end of the element node Show the end of the tag without moving the caret.
shift P
XML;XSLT;XHTML;XSD;RNG;FO;DOCBOOK;XXF
Go to/line... Choose a line number where to move the caret.
G
All
Go to/offset... Choose an offset from the beginning of the document   All

* By default with ctrl or command (under Mac OS X)

- XML menu

Menu item Role Shortkey* Document type
Check this document If a schema/DTD is available then parse and check the validity of the document. If no schema/DTD is available only check if the document is well-formed.
K
XML;XSLT;XHTML;XSD;RNG;FO;DOCBOOK;XXF
Check all the documents Check all the opened document including XML/DTD/CSS/XQuery. This action can only work from a current XML document. shift K XML;XSLT;XHTML;XSD;RNG;FO;DOCBOOK;XXF
Format/Pretty format (default) If the document is well-formedness then format the content with some tab characters. The number of tab caracters can be changed using the Options/Preferences menu.
R
XML;XSLT;XHTML;XSD;RNG;FO;DOCBOOK;XXF
Format/Pretty format (explicit open/close elements) This is similar to the previous menu, excep there's no empty element like that <tag/> but only <tag></tag>.   XML;XSLT;XHTML;XSD;RNG;FO;DOCBOOK;XXF
Format/Unformat This is a way to create a very short document for optimizing parsing time. This is not user friendly, only for machine.   XML;XSLT;XHTML;XSD;RNG;FO;DOCBOOK;XXF
Format/Tabulation width This is a sub menu listing possible size for the tabulation caracter. When formatting a tabulation caracter is used for each level, the visible width of this tabulation can be changed here. Note that it requires to reload EditiX.   All
Format/Indent size It will set how many tabulations you can have when formatting an XML document for separating each element level.   All
Comment... Insert or edit an XML comment.

XML;XSLT;XHTML;XSD;RNG;FO;DOCBOOK;XXF
Namespace manager... A dialog box for inserting/removing a namespace easily. It will manage prefix or default namespace.   All
Use a temporary schema for completion Generate an inner schema for having a content assitant without available schema.

XML;XXF
Disabled / Enabled syntax popup Enabled/Disable the content assistant.

All
XPath view... Builder for general XPath expressions. When editing an XSLT document, it applies only to the XML data document. A popup is available inside the history for copying/saving the XPath expressions.

XML;XSLT;XXF
XQuery builder...
Builder for XQuery expression. Useful mainly for XSLT 2.0.

XML;XSLT;XXF
XML Diff... Open an external dialog for compating both XML documents.   All
Hexadecimal editor... Open an external editor for hexadecimal usage, useful for detecting/changing wrong BOM or caracters.   All
Character Reference view...
Put an UTF 16 character reference like &#10 using a dialog box for choosing the decimal or hexadecimal value

All
XML Snippets View This is a panel for storing and reusing easily XML structure like an HTML table.   XML;XSLT;XHTML;XSD;RNG;FO;DOCBOOK;XXF
Lock/Unlock Tag update Avoid the user to corrupt a tag. So when locking use can only update the text part. This action will be saved inside the current project.

XML;XSLT;XHTML;XSD;RNG;FO;XXF
XML Catalog...
Use a set of OASIS XML Catalogs for working with custom DTD or Schema location

ALL

* By default with ctrl or command (under Mac OS X)

- DTD/Schema menu

Menu item Role Shortkey* Document type
Assign DTD to document... Insert a DTD declaration inside the current XML document.

XML;XXF
Assign W3C XML Schema to document... Insert a W3C XML Schema declaration inside the current XML document. Note that the user will have to move the inserted part if the initial document was not empty.

XML;XXF
Assign XML Relax NG Schema to document...
It will bind your document to a Relax NG schema. Thus the code assistant and the "Check or Validate" action will work with it. Note that using a project you can save this relation.

XML;XXF
Check this DTD Scan the current DTD and check for invalid declaration or usage.

DTD
Generate a DTD from this document Generate a new DTD from the current XML document. Thus the user will be able to validate its document.

XML;XXF
Generate a W3C XML Schema from this document Generate a new W3C XML Schema from the current XML document. Thus the user will be able to validate its document.

XML;XXF
Generate a documentation from this DTD Generate an HTML documentation with the DTD content   DTD
Generate a documentation from this Schema Generate an HTML document with the W3C Schema content.   XSD
Convert DTD to W3C XML Schema Convert the current DTD to a W3C XM Schema.

DTD
Convert DTD to XML RelaxNG Convert the current DTD to a XML RelaxNG Schema.

DTD
Convert XML RelaxNG to W3C XML Schema Convert the current XML RelaxNG schema to a W3C XML Schema.

RNG
Convert XML RelaxNG to DTD Convert the current XML RelaxNG schema to a DTD.

RNG

* By default with ctrl or command (under Mac OS X)

- XSLT/XQuery menu

Menu item Role Shortkey* Document type
Assign XSLT to this document... Insert an XML processing instruction for binding an XSLT document to the current one. Thus some browsers like IE will transform the document automatically.

XML;DOCBOOK;XXF
Assign CSS to this document... Insert an XML processing instruction for binding a CSS document to the current one. Thus some browsers like IE will transform the document automatically.
XML;DOCBOOK;XXF
Map a W3C Schema Assign a schema to the current XSLT document for the content assistant. It helps for creating the output document.   XSLT
Transform using an XQuery request... Transform the current XML document using a XQuery request.   XML;XXF
Transform a document with this XQuery request... Transform an XML document using the current XQuery request.   XML;XXF
Transform using XSLT... It will display a dialog box with the XSLT parameters like the data source, the XSLT document and the final result document. Once the parameters fixed, the transformation will operate.

XML;DOCBOOK;XXF
Transform a document with this XSLT... This is very similar to the previous one except the XSLT document will be the current one. Once the parameters fixed, the transformation will operate.
XSLT
Enabled/Disabled XSLT completion By default enabled, if disabled the content assistant will not be shown for avoiding conflicts between the stylesheet tags and the result document tags.

XSLT
Start XSLT debug Start the XSL transformation in a debug mode for analysis the way the processing is completed. This action requires to have at least one breakpoint.

XSLT
Run until the next breakpoint Run in a debug mode to the next breakpoint.
shift B
XSLT
Run step by step Run in a debug mode until the next tag.
shift E
XSLT
Terminate XSLT debug Conclude the XSL Transformation in a debug mode. It will show the final result.

XSLT
List of breakpoints Display a dialog box with the user's breakpoints

XSLT
XSL Scenarios Store and use any XSL transformations. It includes XQuery too.   All
Repeat last transformation Redo the last XSL transformation.
J XML;DOCBOOK;XSLT;XXF

* By default with ctrl or command (under Mac OS X)

- FO menu

Menu item Role Shortkey* Document type
FO Transformation... Display a dialog box for choosing the parameters of the FO Transformation like the final document type (PDF...).

FO
Repeat last transformation Repeat the last transformation with the parameters from the previous item.

FO

* By default with ctrl or command (under Mac OS X)

- DocBook menu

Menu item Role Shortkey* Document type
DocBook Transformation... Display a dialog box for choosing the parameters of the DocBook Transformation like the final document type (PDF...).

DOCBOOK
Repeat last transformation Repeat the last transformation with the parameters from the previous item.
ctrl shift J
DOCBOOK

* By default with ctrl or command (under Mac OS X)

- Template menu

Document type Role Shortkey* Document type
Edit templates... This is a dialog box for updating the templates parameters like the assigned extensions or the icon...

All
Generate a minimal template... It will analysis the current document and produce a minimal document that can be used as a template for the next usage.

All
Insert template param It will insert a template parameter (current date, version, author, encoding...) used when creating a new document from the template

All

* By default with ctrl or command (under Mac OS X)

- View menu

Document type Role Shortkey* Document type
Split/Unsplit Vertically Split or unsplit the current document vertically. Thus the user can modify one view and look at another one.

All
Split/Unsplit Horizontally Split or unsplit the current document horizontally. Thus the user can modify one view and look at another one.

All
Hide/Show tree Hide or show the document tree. Hide will maximize the user editing space.

All
Select... Display a dialog box for selecting a document from its file path.

All
Previous Selected File Select or Open the previous document Alt - Left All
Next Selected File Roll back to the last document (when selecting the previous action) Alt - Right All
Windows Sub menu with all the windows (shown in the left panel side).
All
Extract the current editor Will open the current editor in a new individual window. This is useful when requiring to compare multiple documents. It can be used too on the editor tabs with a popup menu.   All
Extracted editors Show the extracted editors due to the previous action. This the selected window will be put in the frontground.   All
System preview It will call the current system viewer for this document. For example with an XHTML document it may call your navigator like IE or FireFox depending on your operating system.

All
SVG preview Display a dialog box with an SVG preview. Take a little delay into account before the first content display.

All
Whitespace display Display or not each whitespace from the current document.   All

* By default with ctrl or command (under Mac OS X)

- Options menu

Menu item Role Shortkey* Document type
Preferences... Display a dialog box with the user's preferences. Such preference will modify the way EditiX is working. Note that it is required to restart editix after changing a value.

All
EditiX Descriptor Display the application descriptor, you can update menus, toolbars and add your own actions   All
External Tools... Show a dialog box for running an external command. This command can contain some macros like the current document path...

All
Check the last version... It will ask to the EditiX site the last available version.

All
Install a custom parser...
Install and use a java JAXP compatible XML parser

All
Install a custom transformer...
Install and use a java JAXP compatible XSLT transformer

All
Clean the last opened files history... Remove the file from the open recent submenu in the file menu   All

* By default with ctrl or command (under Mac OS X)

- Help menu

Document type Role

Shortkey*

Document type
User Manual...
The Editix Manual download from http://www.japisoft.com/doc-editix/manual/index.html

All
User interface... It will generate and show an HTML document will all the menu content and each item tooltip.

All
Tip of the day... Display a tip for the day. This dialog box can be shown when starting editiX.

All
FAQ... This is a minimal documentation about XML and XSLT. It contains some external references for learning more.

All
Support... Dialog box with all the links for contacting the editiX team.

All
Reference documentation Standard HTML references mainly with W3C links. 1 ... n or alt + 1 .. n All
Release NEWS... It displays the list of changes for each version

All
Report a bug...
Report a bug if your internet connection is enabled

All
Feature request...
Send a feature request if your internet connection is enabled

All
Reporting List...
List of the last reported bugs or suggests with the support replying

All
Register... Dialog box for unlocking editiX. It requires to buy a key at http://www.editix.com/buy.html. You must remove any blank caracters inside the activating key.

All
About... Set of information about the product version.

All

* By default with ctrl or command (under Mac OS X)

d. ToolBar content

- Default :

Icon
Role Shortkey*
NEW
New document ctrl N
OPEN
Open a document ctrl O
SAVE
Save the current document ctrl S
SAVE TO
Save the current document to another path.  
UNDO
Undo. For some operations like surrounding a tag, you will have to use twice this action. ctrl Z
REDO
Redo ctrl Y
CUT
Cut ctrl X
COPY
Copy ctrl C
PASTE
Paste ctrl V
FIND
Search / Replace ctrl F
editix
Select the current node ctrl T
editix
Surround/Unsurround the selection or the current node by a comment. ctrl M
editix
Surround the selection or the current node by another element. It will list all the document elements for surrounding.  
branch
Copy the previous sibling element. ctrl shift P
PARSE
Check or validate the current document ctrl K
FORMAT
Format the current document  
editix
Enable or disable the content assitant. Note that this state will be saved inside the project.  
editix
Lock/Unlock the element updates. Note that this state will be saved inside the project.  
editix icon
Display the whitespaces  
editix icon
Access to the previous used XML document. It will work even if an XML document has been closed.  
editix icon
Return to the last used XML document after accessing to a previous one  
SPLIT VERT
Split vertically  
SPLIT HOR
Split horizontally  

* By default with ctrl or command (under Mac OS X)

- For XSLT document :

It contains the default toolbar and also this content.

Icon
Role Shortkey*
ELEMENT
Enabled/Disable the content assistant  
DEBUG_RUN
Start degugging  
DEBUG_NEXT
Debug until the next breakpoint ctrl shift B
DEBUG_ELEMENT
Debug step by step ctrl shift E
DEBUG_STOP
Stop debugging  
TRANSFORM
Apply a transformation  

* By default with ctrl or command (under Mac OS X)

- For XQuery document :

Icon
Role Shortkey*
TRANSFORM
Apply a transformation  

* By default with ctrl or command (under Mac OS X)

- For DTD document :

It contains the default toolbar and also this content.

Icon
PARSE_DTD
Role
Check the DTD syntax.
Shortkey


e. Status bar

The status bar located at the bottom of the screen has the following sections from the left to the right :

Background task XPath location for the caret Error message Column : Line Caps key status Num lock key status

When the mouse is over an error message a tooltip is visible.

- Background task :

It displays the following icon GEAR when a background task is working. It can be :

By clicking on this icon, the user can visualize the current tasks. When a task is terminated, a dialog box is
displayed and if there's no background tasks the icon disappears.

- XPath location for the caret/cursor :

This is an XPath location from the current caret/cursor location. This XPath location has the following structure :

/tag[ number of node ]/tag...

/a/b[2] means the second 'b' element from the root 'a'.

- Error message :

An error message appears while checking or validating a document (XML or DTD) or while transforming a document. When detecting multiple errors a red icon is added. By clicking on this icon, the user can visualize all the errors from an external list. You can select the next or the previous error with the alt down or alt up keys.

f. Location bar

The location bar displays when navigating in the XML document the node hierarchy.

editix location bar

In this sample sample, it is displayed you are in a node family, the parent of this node is the element name, etc...

editix location bar tooltip

When moving the mouse over a node of the location bar, the XPath location is displayed. When clicking on this node, the text's cursor is moved to the bound location. A menu popup is available for moving, selecting, copying or cutting the selecting node.

editix location bar popup

g. File/ZIP/FTP browser

The File/ZIP/FTP browser is a left tree available with the bound item of the File menu or the View menu. This tree browses your home directory by default (or a zip file content). This tree maintains the last selected element (file or directory) even when closing and reopening EditiX.

For using the browser, you must select a filter with the document you want to open and click on the "Open" bottom button.

A shortcut key ctrl shift 1 helps you opening or closing the File browser. For changing the default directory, use the bottom icon and select a new one, it will be saved for your next usage.

Note that you can open a ZIP file with a Drag'n Drop on EditiX. For deciding what is a ZIP or not, EditiX uses the zipBrowser/zip extensions preference containing all the ZIP file extensions.

h. Other Panels

Others panels are available on the left interface part.

The File Info Panel

It is available from the File menu. It displays the File type, the size, the encoding charset and the File path. You can copy the File path by selecting the text inside. You may also change the current document type, sometimes this is useful when you choose a wrong file type.

The Node Search Panel

It is available from the Search Menu. It displays a panel for searching nodes as elements, attributes, attribute values. This is useful when you ignore XPath expressions. You can search from the start of the document or from the current selected node (in the tree or in the text). Note that this panel can be activated for detecting occurences of the current element by the editor popup or by activating F2. By the editor popup you can also display occurences of an attribute.

Character Reference View

This is available from the XML menu. It is used for listing UTF-16 characters and inserting it easily inside the editor. Note that some characters may not be visible due to limitation of your default Font. By doucle-clicking on a character, the character reference will be inserted at your caret location.

XML Snippets View

This view is available from the XML menu. The goal of this view is to help you to build your own elements library for increasing productivity with usual XML structure. This view is composed of folders and nodes. A node in blue is an element, in green this is an attribute. You may change the element or attribute name using a popup. Drag'n and drop is available for ordering folders or nodes.

An element node can have two states. The first state is the default one, the element added is the same one inside the library (except that if you add an element containing a text, the XML snippets view will store that it musn't close like <MyElement/>). The element snippet is added from the current editor element node (in the tree or in the text). Note that when adding, it will not include the children, this is your job to include after each child. The second state is a repeating state that is set using the tree popup. When an element can be repeated, a dialog box when inserting will ask to the repeating number. This is useful as usage for adding a table with various rows and columns.

For adding a snippet into you XML document you may using drag'n drop from the panel, or double-click or using the first icon of the toolbar's tree. Note that the added structure is not formatted, you may after format your document using the default format action (XML menu or inside the default toolbar). If you select a text before adding, and if your element snippet could contain a text, then the selected text will be surrounded by the added element.

For adding your own snippet, you must open an XML document with the good structure. Then after selecting a folder or an element snippet you must use the second icon in the toolbar of the tree. All the attributes will be added and you may delete or change the name or the value using the popup of the tree. When adding a snippet, if your editor's element has a text content, then a special flag will be stored for avoiding an auto-closing element. Using the popup of the tree, you may add a comment for your new snippet and decide if you wish to repeat it.

All your snippets are stored in your HOME/.editix/snippets.xml.

2. File management

EditiX supports several ways for editing a file. The drag'n drop is available from the file system to editix (tabbed pane) or to the project panel. Basically the file system is supported, but it is also possible to load and handle a document by a remote access like FTP. We describe here the way the user can manage its files.

For Windows Platform, you may choose EditiX as your default editor for any XML documents, thus editix will be opened each time you will select an XML document :
- Select an XML document,
- Right click, choose "Open With"
- Browse (go to the last item) for selecting an executable from the bin directory of EditiX Installation like editix-XMLEditor.exe or run.bat.

a. Standard file access

A file is accessed following the user environment locally or by a network. In all theses cases, it is mapped to a file system. When loading a document from the file system, editiX has to guess the right document type. For helping it, the user has to choose a filter matching the good document type from the file dialog box. For each filter a set of documents are highlighted depending on the document type extensions. These extensions are defined from the template dialog box. We write here the default extensions with the bound document type.

Document type File extension

Standard XML document

or Very Large XML document

xml
Document Type Declaration (DTD)
dtd
Text
txt
XSL Transformations
xsl or xslt
XHTML 1.0 document
html or htm
DocBook
xml
W3C XML Schema
xsd
XM RelaxNG Schema
rng
Mathematical Markup Language (MathML) 1.0
mml
Scalable Vector Graphics (SVG) 1.0
svg
XSL-FO
fo
CSS css
XQuery xq or xql or xquery
ANT
xml
XML Scenario xfl

TIP : If you want to select another document without having the right file extension, select the filter "All the files" and
select the  right file and select  the document type choosing the good filter.

The user can update a file extension by editing a template from the "Template" menu and the "Edit templates..." item.
When using multiple extensions, a ';' must separate each extension for instance "htm;html".

When opening a same file more than once, EditiX will advertise the user that the document is already
edited, but the user will have also the option to continue having multiples times the same document.

When closing a document, editiX will check if the document has been modified since the last opening
moment. For this last case a dialog box will ask the user to save its work before closing. This is similar
when closing all the opened documents.

The following shortkey : ctrl (or command for MAC) S for saving the current document is useful.

b. Remote file access

As a facility, EditiX provides several protocols for editing a document. Here the following protocol for file format included :
The first one requires to choose an host name, a user account and a user password. As it uses the network, a proxy
may be specified with the proxy preference (Menu "Options" and the Item "Preferences..."). The last protocol needs an archive file
mainly with the zip or jar file extension. It is advised not to update an archive > 10 Mb for memory saving.

The last selected file is available inside the "previous files" menu and can be added inside the project file (even from a ZIP or by FTP). You can clean this "previous files" menu using the Options Menu.

c. Project

For displaying the project panel, use the File/Project/Project Manager menu item or the View/Windows/Project Manager menu item. This panel contains your favorite files with the respective parameters like transformation (XSLT, FO), maximized state... Note that when a file is not found it is colored in red.

Note : If you leave EditiX having this panel opened, it will be restored automatically at the next EditiX call.

A project is stored in a file with the ".pre" extension. You may save/load your project or use the default one.

Toolbar actions :

folder into Put the current opened document into the selected project node
folder add Add a new group
folder edit Edit the group name
delete Delete the selected node (group or file)
lock Lock enabled : The current project file will be loaded automatically when editix's loading

Menu File / Project :

- ProjectManager : Show or hide the project panel. Note that it will save the project panel visibility for the next editix usage

- Open project... : Open a project file (*.pre)

- Save project : Save the current project file (*.pre)

- Save project as... : Save the current project file (*.pre)

- Export project as a ZIP document... : Export the project content in a zip. Note that it will create relative paths even for XSLT transformation... So your ZIP file can be reused on another machine and can work directly. It will insert too an EditiX project file.

- Action / Open the selected file : Open the selected file from the project

- Action / Add the current document : Add the current opened document to the selected project node.

- Action / Add all the documents : Add the current opened documents to the selected project node.

- Action / Add a folder : Add a folder to the selected project node.

- Action / Rename a folder : Rename the selected project folder.

- Action / Delete a file reference or a folder : Delete the selected project node. Note that, it will not delete physically your file.

- Check project files : Check all files from the project. When a file is not found it is shown in red.

- Lock the project state for the next editix usage : A way to store the project panel state for the next usage.

Drag'n and drop is both available for project nodes (group or file) or from the file system. For opening your document just double-click on the file node, if the document is already opened it will be selected. When leaving the project, the visible files are saved and will be restored the next time the project will be visible.

3. Editing

The EditiX editing part is built on a tree / text synchronization system. These system gives to the user a confortable way to navigate by the tree and updating a document by the text. When a schema is provided (DTD, W3C XML Schema or RelaxNG) a content assistant is available. This content works both on the available tags for a location and the available attributes and values.

a. Tree

The tree is another view of the text part. The tree is always synchronized with the document content and the current document location. When a tree can't be synchronized to the text due to a user document error this icon is located at the root ERROR. By clicking on this icon, the user can visualize the error on the text part. A tooltip is also available with a message summing up the problems.

User can select a node by clicking on the tree, thus the corresponding element is selected inside the text. It is also possible to move or copy a node by dragging and dropping the good content(*) (Due to a problem with the JDK implementation on Mac OS X, this action is reserved to Unix/Linux and Windows). You can move a node inside the tree or move it inside the text part.

(*) The operation will not work if you copy or move into an auto-close element like <a/> you must have a node with <a></a>.

We list here the available tree actions :

Action Role
COMMENT A NODE
Comment the select node. If a comment is located inside the node, this action is rejected so in this case commenting the node will need to remove all inner comments.
COPY
Copy the selected node and its content. Note that this feature will act on the editing part.
CUT
Cut the selected node and its content. Note that this feature will act on the editing part.
FILTER
Switch to another tree view. We detail it after.

A filter FILTER displays each tree nodes with several methods we describe below :
For example with this node : <ns:node xmlns:ns="http://www.japisoft.com" att1="value"/> the previous filters will show theses values :

Default filter
node value
Prefix filter
ns node
Namespace filter
http://www.japisoft.com node
Qualified name filter
ns:node

b. Editor

General

The editor content is synchronized with a tree view except for the CSS, TEXT and DTD document types. The editor is a space for updating a document. For any document types with XML content, the editor controls that the user inserts a well-formed XML content and signals in the other case by a message the problem to the user in the status bar. The editor underlines with a red line the user errors inside the text and the status bar contains the error details. Each time the caret/cursor is updated, the status bar contains the XPath location except for the attribute or value of a tag. For sample "/content/node1[10]" means that the caret/cursor is located in the node 10 of  the document root "content". This xpath location can be stored inside the clipboard calling the "Copy XPath location" item of the "Edit" menu.

Current node

The current node is located both with a left bar and by underlining the beginning and the ending part of the node. The "Search" menu includes actions for going to the beginning  and the end of the current node. Note that the left bar contains a single action displayed as a square for selecting the current node. This left bar is also colorized in red when an error occur with a tooltip containing the main error.

When using the ctrl key with your mouse, the bound XPath location is shown

xpath current node location

Similarly, it is possible to display the attributes of the current node with the alt key with the mouse.

attributes

Node actions

For managing XML, the editor supports various actions :

- Ctrl up or down keys will select the next or the previous node (element or text node )

editix editor

- Ctrl shift up or down keys will select the next or the previous sibling node.

- Ctrl page up or down will select the next ancestor or the first child

- When your document contains errors alt up or down keys will select the next of the previous parsing error

editix editor

Note : If you double click on the error title bar, the error list view will be doubled.

- Various node selection or operations :

editix editor

Note

It is important to understand that all this operations can work only for the current node. EditiX may have a short delay depending your document size before finding the current one, it is notified by underlining the starting and the ending part of the node.

editix editor

In this sample, the current one is fo:simple-page-master (we will use it for our next examples).

Surrounding a tag (ctrl-shift T) is a way to put a new parent to the current node or the selection (in priority for this last case).

editix surroung

The result is :

editix surround result

If you don't want this result, just undo twice.

When you want to comment the current node, call the "Comment/Uncomment" (ctrl-m) action from the Edit menu, the result will be :

editix comment

If you want to uncomment, go simply into the comment and use the same command.

Popup

A popup (right mouse button) is available using the current node :

editor popup

One useful action is the "Display Occurences of", that can display any repetitions of an element name or an attribute. Using also the F2 key, it can display all the occurence of an element node.

editix popup

Here a document sample, using the popup action or F2, we have to the left part of the editor a new panel with :

editix search

Note : By clicking on the result header ("Node" / "First text") you can sort the result.

The refactor submenu is a way to change all your document, for sample supposing you wish to rename all the occurences of an element. This menu is available from the text popup.

editix refactor

The refactor actions will depend on the current node and the document type. For sample in an XSD document, you may rename an element name, it will change also all the references to this name (by reference, substitution group...).

editor refactor

References

Using the text popup menu or the ctrl key when moving the house, you may find easily node references. A node reference is a node that is bound to another one depending on the document type. For sample for the XSLT document, selecting the match value, you can find which nodes try to select this match part using an apply-select.
editix reference
In this sample, we use ctrl and the mouse, which match "person", by clicking on "person" we can go to any nodes like <apply-template select="person"/>

It will work for XSLT, W3C Schema (types and references) and XSL - FO documents (page references).

c. Content assistant

A content assistant is available inside the editor part. This content assistant will change depending on the document type. There's several content assistants, each one can be accessible with a user characters sequence. In all the cases, when available the content assistant doesn't avoid the user to insert any text but it filters the possibilities depending on the current inserted sequence, the availability of a schema or the document type.

The content assistant works when inserting a characters sequence or by using the ctrl space key.

- Default

This is available when inserting "<!". It offers an XML declaration, a Comment or a CDATA section. Using ctrl space, EditiX will be able to show you any tags or attributes even if no schema is found.

- DTD

It is available when inserting a "<!" sequence. This is a simple list of the available DTD parts like ELEMENT, ATTRIBUTE, ENTITY or NOTATION.

- A document with a schema

This last case is the more complex one and works with the following schemas :

The DTD is detected when your document contains the following content sample :

<!DOCTYPE root SYSTEM "file://myDTD.dtd">

This sequence comes before the previous document element. The path can be absolute or relativly to the document location.
It is also possible to use an HTTP protocol like "http://www.japisoft.com/myDTD.dtd" as a path.

The W3C XML Schema is detected when your document contains the following content example :

<root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="file://mySchema.xsd">

The path works in a similar way than the DTD, so it can be absolute or relative or even be an HTTP url. Note that is is also
possible to use the "noNamespaceSchemaLocation" attribute name rather that "schemaLocation".

The tag content assistant is available when inserting the '<' character. The attribute name assistant is available when inserting a space inside a tag defintion. The attribute value assistant is available when inserting a double-quote or a quote before an attribute value. The content assistant can be called using the ctrl + space combination.

For RelaxNG, the user has to use the "XML" menu and the "Use XML Relax NG..." item. By selecting it, a dialog box will
prompt the user to choose an XML RelaxNG document. Once selected both the content assistant and the "Check or Validate"
action will work with this selected RelaxNG document. Note that the user needn't to set this value each time it uses this document
by saving a project. This last act will save all the user parameters and the next time the project is loaded the content assistant will work
automatically with the relagNG document.

- Any XML document without a schema

This feature is available by the "XML" menu and the "Use a temporary schema for completion" item. This action will generate
an inner schema usable by the content assistant. For remark, this is generally better to generate a schema using for instance the
"DTD/Schema" menu and generating a W3C XM schema or a DTD.

d. Namespace Manager

The namespace manager is available inside the XML menu. This is a wizard for adding / removing namespace definitions or setting the current namespace. This user interface works with the selected node inside the text editor.

This dialog contains a table with three columns :

When adding a namespace definition without a prefix then a default namespace is added (under the format xmlns="...").

Here a sample with namespaces :

<p1:element1 xmlns:p1="http://www.p1.com" xmlns:p2="http://www.p2.com">
    <p2:element2/>
</p1:element1>

We have two namespace definitions for the URL http://www.p1.com and http://www.p2.com. The node "element1" is inside a namespace mapped to the URL http://www.p1.com and the node "element2" is mapped to a namespace with the URL http://www.p2.com.

e. Formatting

When editing an XML document, it is better to format the document for a pretty reading. Formatting is a process that will add empty spaces for aligning children nodes. These spaces will not corrupt your document because they are outside the tag content. Note that there's no Undo available when formatting, however you may save your document before and re-read it for undoing.

Formatting an XML document is available inside the default toolbar with this action FORMAT. However you may choose more sophisticated scenarios for formatting through the XML / Format Menu :

- Pretty Format : This is the default one
- Explicit Open/Close : It will replace any closing tags like <a/> by <a></a>
- Text Trimming : It will remove any white spaces before and after a tag content. Thus <a>  1   </a> will becore <a>1</a>
- Unformat : This is a way for creating a very short document by removing any unuseful spaces. Only for an application processing.

For separating each element level (parent and children as sample), EditiX uses a set of tabulations. A tabulation is a special character composed with several whitespaces. You may change the number of tabulations and the number of whitespaces in the XML/Format submenu. You may also use the Preferences option (application/file/tab-size and xml/xml-config/format-space).

EditiX manages the xml:space attribute, it may help you for maintaining white spaces somewhere in your document. This attribute can have two values : "preserve" or "default", the first one will keep whitespaces after formatting, the second one will let the application deciding.

<personnel>
<person xml:space="preserve">
<name xml:space="default"> Don't keep spaces here
</name> Keep spaces here </person>
</personnel>

f. Filter

A filter is a way for editing only a subset of your XML Document. This is a very attractive and efficient editing mode. It requires minimal knowledge with XPath Expressions (v1.0).

We suppose for our demo we have the following XML document :

<personnel>

<person id="Big.Boss" > <name><family>Boss</family> <given>Big</given></name> <email>chief@foo.com</email> <link subordinates="one.worker two.worker three.worker four.worker five.worker"/> </person>
...
</personnel>

This is a catalog of persons, this file is only a sample, it could have a totally differente structure.

Open your XML document and switch to the Filter mode using the bottom button :

editix filter

Click on this button for creating a new Query

editix

This query will filter a sub set of your XML document, for sample we will focuse only on the persons.

In the XPath Query Field, we will choose a main XPath Query that will get only major elements to edit, in our case we want to edit all the persons, so we write this XPath query : //person (meaning all the person descendant in our XML document).

In the Columns part, we choose the element part of each person we want to edit. For sample we have an id attribute for each person, a family name and a given name. We are going to write another XPath queries relative to each person :

For each person we want to edit :

Column Name Column Value
id @id
family name name/family/text()
family given name/given/text()

The column name is a free text. The Column Value is a relative XPath Expression for helping the editor to know which part of each person you want to edit. In the first line we want the id attribute value, and in the second and third we want a part of the name.

For running your XPath query, you must activate this button : editix xpath

The following grid appears :

editix grid

You can edit each column, it will be automatically set on your final XML document. If you activate the "Automatic Activation", it will run the query each time you will invoke the filter mode. Note that your XPath Queries are preserved in your Project if you add your document into it.

You may also edit or remove the current XPath Query. You can add any XPath Queries you wish.

You may also remove or duplicate a data line, it will take into account the current selection.

4. Templates

A template is a document that can be reused for creating a new document. Basically a template is
a content with several parameters. One major parameter is the document type (look at this section 1.b.).

a. Creating a template

Creating a template is available by the "File" menu and the "Save as template...". All new templates are
stored in the user directory .editix/template. Note that this is possible since the 3.0 to update a template
content, in this last case the user has to remove the bad one and save a  new one.

When saving a template, the current document type will be used, a dialog box will ask for the template name. This
template name will appear the next one by creating a new document.

b. Updating a template

Click on the "Edit templates..." item from the "Template" menu for updating a template.  Several actions are available :
If the user clicks on the "cancel" action none of the previous actions will be take into account. For updating a template content,
the template must be removed by the "Remove" action and saved again with the "Save as template..." action from the
"File" menu.

c. Using parameters

A template can have macros from the "Template" menu under the "insert... param" items. Each time an item is activated
an element under the format ${name}is inserted at the current caret/cursor location. Theses elements will be resolved when creating
a new document from the template. We provide below the meaning of these elements.
Here a sample of template for defining a default XML document.

<?xml version="1.0" encoding="${default-encoding}"?>

<!-- New document created at ${date} -->

${cursor}
c

5. XML Differencing

XML Differencing is a technology for comparing two XML documents. This is a tool that navigates through each
tree content and searches and showes the differences node by node like a "node moved" or with "other attributes".

This tool is available from the "XML" menu under the "Compare to..." item. When activating it,  a dialog box
is shown.

This interface is composed of three parts :
Selecting a document is accessible by clicking on this icon HARDDISK or by inserting a path in the left field. If your XML document
is not well-formed a dialog box will show you this is impossible to compare this document to another one.
Once both documents are choosen, EditiX will show you the differences inside the tree with the following icons and colors :

ADD
Element added
attribute
Element moved
ELEMENT
Element equal
ELEMENT_DOWN
At least, one different descendant
MINUS
Element removed

Each time the user selects a tree node,  a summary table below is updating with each known changes including all the descendants. By clicking
on a table line the bound tree node is selected. A summary table is also available from the right tree with the opposite content from the left tree.

Note that there's no icon or color for attributes or text changes but this is available inside the summary table.

a. Comparing the current document to another one

When comparing two similar documents a dialog will display a message "Both documents are equal". When editing a document, by clicking
on the "Compare to..." item from the "XML menu" the left document will be automatically the current one and the user has just to select the
right document. When clicking on a tree node, the similar text part is selected thus the user can modify its document for adapting to the change.
For comparing again the document the user must press the "enter" key inside the field containing its document location.

b. Diff content

Here we comment the summary table content. We have notified before that by selecting a node inside a tree we have a list of changes of all its descendants. The summary table has two parts :
Here a sample of summary table for the left tree :

Change Content Meaning
attributed removed
icon
The "icon" attribute has been removed. Click on this line for selecting fastly the good node.
attribute added
doc
The "doc" attribute has been added. Click on this line for selecting fastly the good node.
Element added
toolbar
The "toolbar" tag has been added. Click on this line for displaying where it is located inside the tree.
attribute changed
id=fo
The attribute "id" has a value "fo" which is not equal to the "id" attribute compared to the right document. Click on this line for showing the bound node inside the tree

6. XML Schema

A schema is a way to detect a document matching a grammar. So this is a set of rules for defining a grammar. When
"checking or validating" by this action OK , EditiX will check if this document has a schema and will "validate" automatically
if the document matches the bound grammar.  When a document has no schema, EditiX will only check if the document
is well formed from the XML point of view.

EditiX works with three schemas :

a. DTD

A DTD is not an XML document, it defines the legal building blocks of an XML document.

Here a sample :
<!ELEMENT root ( child1, child2 )>
<!ELEMENT child1 #PCDATA>
<!ELEMENT child2 #PCDATA>
It means that the root element must be a child node "child1" followed by a child node "child2". Both children
has a text content declared as a #PCDATA. For learning more about a DTD look at this link.

For building a new DTD, the user must activate the "New..." item from the "File" menu and choose the DTD item
inside the template list. Once choosen a dedicated editor is opened. Note that this editor doesn't contain a tree due
to the way a DTD is structured. This editor has a content assistant when the user insert this "<!" sequence. A
toolbar contains  this action OK (or from the "DTD/Schema" menu) for checking the content of the DTD. If a problem
is detected the status bar will contain the error message. It will only check the syntax.

Rather than building a new DTD, it is possible to generate a new one from a document instance. For using this
feature, you must edit an XML document and use the "Generate a DTD from this document" from the "DTD/Schema" menu.
A DTD will be generated factoring all the common points of your document, be sure that your document doesn't contain
some wrong parts before generating a new DTD.

Once your DTD terminated you just have to save it. The file name will be terminated by the extension "dtd".

For using a DTD, it is required to assign it to your XML document. This action is possible with the "Assign DTD to
document..." item from the "DTD/Schema" menu. You must being editing an XML document for that. When activating
this item a dialog box is shown and the user has to select the root node of the document (if it isn't filled automatically) and
a path to the DTD. This action will generate a new line inside the current XML document containing a similar declaration :

<!DOCTYPE root SYSTEM "file://myDTD.dtd">

Meaning 'check if the document starting with a root node matches the grammar of the DTD shema located inside myDTD.dtd path'

By default the declaration contains an absolute path which may be wrong if you move your schema or your document to another machine. For avoiding this problem, it is possible to use a relative path from the current document path. For instance :

<!DOCTYPE root SYSTEM "myDTD.dtd">

Meaning 'Check if the document starting with a root node matches the grammar of the DTD schema located at the same document path inside a myDTD.dtd document'

It is also possible to use an URL like that

<!DOCTYPE root SYSTEM "http://www.mysite.com/myDTD.dtd">

Meaning 'Check if the document starting with a root node matches the grammar of the DTD schema located inside the www.mysite.com web site
inside a myDTD.dtd document'

For checking that a document matches a DTD the action OK is available from the toolbar or from the "XML" menu.

Note that it is possible to convert a DTD to a W3C XML Schema or to an XML RelaxNG schema from the "DTD/schema" menu.

b. W3C XML Schema

A W3C XML Schema is an XML document containing some rules for validating that an XML document matches a grammar. For learning
more about W3C XML Schema, look at this link.

Here a sample of an W3C XML Schema for a document starting by a "root" and containing a sequence of two children "child1" and "child2" that contain a text content.
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
  <xs:element name="root">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="child1" minOccurs="1" maxOccurs="1"/>
        <xs:element ref="child2" minOccurs="1" maxOccurs="1"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="child1" type="xs:string"/>
  <xs:element name="child2" type="xs:string"/>
</xs:schema>

For building a new W3C XML Schema the user must activate the "New..." item from the "File" menu and choose the W3C XML Schema
line. An editor for XML document will be opened. The content assistant will help you to choose your tags or attributes.

For using the visual mode, click on the Visual Editor tab. editix schema editor

editix schema editor

The main table contains all your global definition. You can change an element name by double clicking on the name column. The properties panel lists all your current element properties. A property in a gray color means the property has not been used. You can set a simple type facets, list or union using the "Simple type" tab.

For editing an node content (a complex type) you must select the first column icon (editix editor) or double click on the Type column cell. It will switch to the visual mode.

editix visual schema editor

Using the right mouse click on the selected element (in blue) will show a popup for adding/removing/moving/opening.... Clicking on the square in front an element will close the element content, clicking again will opening the element content. For opening all the element content, use the popup or this toolbar action editix icon. When using a reference (element, attribute, attributegroup, group...) you can go into this reference definition by double clicking or by using this toolbar action editix icon., this is similar for external type definition. Note that the green arrows will help you to return to the previous/next element.

When switching from the visual editor to the source editor, the last selected element is shown. This is similar from the source editor to the visual editor, the cursor location is used for opening the current node.

The user can generate an HTML document for this schema using the DTD/Schema menu (Generate a documentation from this schema...). Here a sample of schema document.

Rather than building yourself a W3C XML Schema it is also possible to let editiX generating a new one from an XML document instance.
For using this feature you must open an XML document and use the "Generate a W3C XML schema from this document" item of the
"DTD/Schema" menu.

After building a schema, you must assign it to your XML document. For acting, you have the "Assign W3C XML Schema to document..." item
from the "DTD/Schema" menu.

Here a sample for the result choosing an external test.xsd schema :

<application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="file:///home/japisoft/test.xsd">
</application>
Meaning 'check if the document starting by the application element validates the schema located in the test.xsd file'.

Note that editiX will update your document root maintaining your previous attributes.
<application att1="value1" att2="value2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="test.xsd">
</application>
Meaning 'check if the document starting by the application element validates the schema located in the test.xsd file in the same path of the document'.

It is also possible to assign a schema from an URL location like this :
<application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mysite.com/test.xsd">
</application>
Meaning 'check if the document starting by the application element validates the schema located in the www.mysite.com web site inside the test.xsd file'.

For checking that a document matches a W3C XML Schema the action OK is available from the toolbar or from the "XML" menu.

c. XML RelaxNG

An XML RelaxNG is a recent schema that is more simple that a W3C XML Schema and more precise than a DTD. The wrong side is
that this is not a part of the XML spec and so there's no official way to assign an XML RelaxNG to an XML document. However, editiX
provides a way to do that. For learning more about XML RelaxNG look at this link.

Here a sample of an XML RelaxNG Schema for a document starting by a "root" and containing a sequence of two children "child1" and "child2".

?xml version="1.0"?>
<grammar xmlns="http://relaxng.org/ns/structure/1.0">
<start>
<ref name="root"/>
</start>

<define name="root">
<element>
<name ns="">root</name>
<group>
<ref name="child1"/>
<ref name="child2"/>
</group>
</element>
</define>

<define name="child1">
<element>
<name ns="">child1</name>
<empty/>
</element>
</define>

<define name="child2">
<element>
<name ns="">child2</name>
<empty/>
</element>
</define>
</grammar>

 For building a new XML RelaxNG use the "New..." item from the "File" menu and select the XML RelaxNG element.

For assigning an XML RelaxNG document to an XML document, you must use the "Use XML RelaxNG..." item from the "XML" menu, a dialog
box will wait the user to choose a location for the RelaxNG document. Such document path terminating by a "rng" extension. Once assigning,
the content assistant will operate with this schema and the document validating will work too by cliking on the OK action from the toolbar
or the "XML" menu. Each time you choose RelaxNG, you will have to assign it. However a shortcut is available by saving your document
inside a project calling the "Save project..." from the "File" menu. Then the next time you will load the project, editiX will assign automatically
the RelaxNG document to you document and you won't need to assign it.

The user can convert an XML RelaxNG schema to a W3C XML Schema or a DTD using the "DTD/Schema" menu.

7. XSLT document

An XSLT document (v1.0 or v2.0) is a set of rules for converting an XML document to another document. EditiX works with XSLT in two ways :
Here a link for learning more about XSLT.

The multi-view XSLT Editor has three main parts :
  1. An XSLT Editor in the center which is a standard XML editor with an adapted content assistant
  2. A DATA Source view which is not editable but where the user can evaluate XPath expressions
  3. A Result view which contains the transformation result document. This view has two modes : The Source mode which is a text result view and  an HTML 3.2 preview.

Template manager

The XSLT Editor displayes all the included documents and a template Manager. The template manager displayes all your template instructions, you may rename it
or move it by drag'n drop in the same or to another included document. When clicking at the beginning of a line in the template manager, the editor switches to the bound
editor and template instruction. A popup is available on each template line for inserting a new template instruction before or after this one.

Components

The XSLT Debugger has five main parts :

  1. An XSLT Editor in the center which is a standard XML editor with an adapted content assistant
  2. A set of breakpoints located beside the XSLT Editor
  3. A DATA Source view which is not editable but where user can evaluate XPath expressions
  4. A Result view which contains the transformation result document. This view has two modes : The Source mode which is a text result view and  an HTML 3.2 preview.
  5. A Debugging data view at the same location than the result view.

User can drag'n drop a node from the Data source to the XSLT editor for building template, for-each or value-of instructions.

a. Basic Transforming

For running an XSLT transformation, the user has to click on the transformation icon TRANSFORM. If the current document
has no location path, a dialog box will invite the user to save it. A dialog box is displayed for inserting the transformation
properties. This dialog box contains the following properties :

Warning : A message can appear when setting a file path "Please don't use path with whitespaces inside". You can disable it from the options menu, using the preferences dialog. Select xml / xslt and "check whitespaces in path", choose false and restart editix.

For using XSLT parameters, the user must declare the needed parameters inside the XSLT document under the root node : As sample :

<xsl:param name="test1"></xsl:param>
...

A parameter value is used with this expression sample :

<xsl:value-of select="$test1"/>
Once the XSLT properties fixed, the XSLT transformation can operate in background. "In background" means that the user can continue
working while the transformation is operating. An icon GEAR located inside the status bar showes that something is working in background. When
terminating a message is displayed to the user.  If an error is detected inside the XSLT document like a wrong XPath expression or an invalid XSLT usage the line that contains a problem is highlighted and a message is shown inside the status bar.  At the final step, the Result file is updated and the user can visualize the result in a text format or in HTML 3.2 format.

b. Assign an XSLT document

Assigning an XSLT document is a way to bind an XML document to an XSLT document. This is managed mainly by a web browser like IE. This
action will not affect the way the XSLT transformation will work. User can assign it for a current XML document using the "XSLT" menu by
activating the "Assign XSLT to this document..." item. A file dialog will ask the user to select an XSLT document. At the final step a similar
declaration will be added to the current document :
<?xml-stylesheet type="text/xsl" href="file:///home/test/test.xsl"?>
As this is an absolute path, it may be better to replace it by an http access or a relative path.

c. XSLT Debug

The XSLT debugger is a powerful way to control what's happened while a transformation is operating using the version 1.0 or 2.0 of
XSLT.

Before starting an XSLT debugging session the user must place at least one breakpoint. This breakpoint is located
 in the left column of the editor. It must be placed beside a line containing an XSLT element. When clicking this icon
BREAKPOINTS is shown and the line is selected with the same color.

If your XSLT parameters is not fixed a dialog box will invite you to specify the data source file and the result document path. You can
also test once your XSL transformation by clicking on this icon TRANSFORM.

Here the available XSLT actions from the toolbar :

DEBUG_RUN Start the XSLT Debugging. It will run until the first breakpoint
DEBUG_NEXT Run until the next breakpoint
DEBUG_ELEMENT Run step by step
DEBUG_STOP Conclude the XSLT Debugging

When stopping to a breakpoint or when running step by step the debugger showes the current line in a green color. In this case, the
user can analysis the current XSLT state from the bottom right view which has a "Debug" container. Here the available values :
For each breakpoint found by the debugger, the user can visualize the current result state and see step by step how the final document is built.

8. DocBook document

A DocBook document is an XML document for producing a pretty output like in a PDF format applying XSL Transformation. For building
a new DocBook document the user has to select the "New..." item from the "File" menu and select the DocBook template. When activating,
a new XML editor is shown and the user has accessed to the DocBook menu.

Here a sample of DocBook document :
<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"  "http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd">

<book>
    <bookinfo>
        <title>Your title</title>
        <author>
            <firstname>Your first name</firstname>
            <surname>Your surname</surname>
            <affiliation>
                <address>
                    <email>Your e-mail address</email>
                </address>
            </affiliation>
        </author>
        <copyright>
            <year>2004</year>
            <holder role="mailto:your e-mail address">Your name</holder>
        </copyright>
        <abstract>
            <para>Include an abstract of the book&apos;s contents</para>
        </abstract>
    </bookinfo>
    <part>
        <title>Part1</title>
        <chapter>
            <title>Part 1, Chapter 1</title>
            <sect1>
                <title>Part1, Chapter 1, Section1</title>
                <para>    Your Text </para>
            </sect1>
        </chapter>
    </part>
</book>
Note that when loading a docbook document the user must specify a docbook filter otherwise editix will believe this is a standard XML document
and will not activate the docbook menu.

For learning more about DocBook look at this link.

a. Basic Transforming

Go to the "DocBook" menu and activate the "DocBook Transformation..." item. A dialog box is shown with the output type and the result
document path. The output types are available below :
When activating the transformation, as this operation can take a long time this is working in background and the following icon GEAR is available
inside the status bar for notifying the user something is built. Once the transformation is terminated a dialog box is shown to the user.

b. Repeating the last transformation

For repeating the last docBook transformation, the user must select the "Repeat last transformation" item from the DocBook menu or by using the
ctrl-shift-J shortkey. If there's no previous parameters a dialob box will appear for inserting the good ones.

By saving a project, the user parameters are saved too, thus the next time the project is opened no more parameters are required.

9. XSL-FO  document

XSL-FO is an XML format for producing pretty print document using XSLT. Here a link for learning more.

Here a sample of FO document :
<?xml version="1.0"?>

<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="my-page">
<fo:region-body margin="1in"/>
</fo:simple-page-master>
</fo:layout-master-set>

<fo:page-sequence master-reference="my-page">
<fo:flow flow-name="xsl-region-body">
<fo:block>My text</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
For building a new FO document, the user must activate the "New..." item from the "File" menu and select the XSL-FO item. The "FO" menu
content is accessible.

All the XSL-FO documents have a ".fo" file extension. If you want to load a document that doesn't have this extension you can always select
it once with a right filter and change at the last step the filter to match the XSL-FO document.

a. Basic Transforming

For transforming by XSL your FO document the user must select the "FO Transformation..." item from the "FO" menu. A dialog is shown and the user must select the output document type and the result document path. Below the available document types :
Note that the operation will work in background and the following icon GEAR from the status bar is here for reminding you that the transformation is operating. When the transformation has been completed, a dialog box is shown with a result message.

b. Repeating the last transformation

For repeating the last transformation the user must activate the "Repeat last transformation" from the "FO" menu. For saving the parameters
it is required to save the document inside a project from the "File" menu.

10. XML Form

The XML Form is a way for editing an XML document using a standard form, it helps users creating or changing an XML document with a minimal knowledge. The form is built using the XML Form Designer inside EditiX. This designer works using a W3C Schema with a mapping system between some schema elements and some form fields.

a. XML Form Designer

Before using the XML Form Designer you need a W3C Schema. We propose this W3C Schema as a sample : purchaseOrder.xsd [HTML documentation]. We are building an XML Form document (*.exf) with our schema.

Step 1 [Preview] : Create a new document (Menu File, New...) and choose "EditiX XML Form Designer".

Step 2 [Preview] : In the left part (Data tab) select your schema inside the "Schema Location" field. You may have to choose a root element because a W3C schema doesn't contain information about the main container element. The document structure contains a tree with your W3C schema content starting from your element root.

Step 3 [Preview] : Drag 'n drop your fields in the main designer part. Your form fields must be bound to the W3C schema structure, it means if you have an element that is a container of other elements, then it must appear in the main designer part as a container field. Each field contains a relative XPath location showing your field location in the final document structure, this is used by EditiX to compute the XML document result.

For customizing your form, you can add labels, separators... using the components tab with a drag'n drop in the main designer. You may also change some components properties using the properties tab like the background or the foreground color... The title properties is only for the container field. You may also edit the XML Form fields switching the source editor, this is useful for some processings like a search/replace.

You may download the final form sample here.

b. XML Form Editor

For using the XML Form editor, it requires an XML Form document (*.exf), look at the previous paragraph for building it.

Step 1 [Preview] : Create a new document (Menu File, New...) and choose "EditiX XML Form Editor ".

The empty document contains a processing instruction "<?xmlform 'YOUR_FORM_PATH'?>". This processing instruction must be set with a path to your XML Form (*.exf). This path can be absolute or relative to your document location (save it firstly for this last case).

As a sample we can save our document in the same directory of our xml form (*.exf) and set the processing instruction with this value :

<?xmlform 'purchaseOrder.exf'?>

Step 2 [Preview] : Switch to the Visual Editor, it will display an XML Form for editing your XML document. You can switch to the source editor for changing the final document, the XML Form will keep any XML added parts (even if there're no fields managing it).

The result documents can be downloaded here.

For loading your XML document and edit it with a form, you must always select the File Filter "EditiX Form Editor" before choosing your XML Document inside the file chooser dialog.

11. XML Scenario

a. Creating a scenario

Create a new document and choose the XML Scenario template from the Tools category.

editix xml scenario

A new scenario document is created with

<?xml version="1.0" encoding="UTF-8"?>
<scenario></scenario>

"scenario" is a root tag containg your XML tasks. For building your scenario, you must click on the "Visual Editor" tab.

Visual XML Scenario

This is a sequence of XML tasks. Select a task, Click on the "No Action" popup and choose your task type, then define a task name by clicking on the name column. Depending on your Task type, the parameters panel will be updated, thus, you will be able to configure your task.

Here a list of task type

Task type Role
CONCAT Concat a set of XML documents to unique one. You can choose the final root tag.
COPY Copy a set of documents from File system or FTP to File system or FTP.
CSV Convert a set of CSV documents (for sample, result from excel export) to XML.
DELETE Delete a set of documents from File system or FTP.
DOCBOOK Transform a set of Docbook documents to PDF...
FOP Transform a set of XSL-FO documents to PDF,RTF...
FORMAT Pretty Format for a set of XML documents
PARSING Parse/Validate a set of XML documents
XQUERY Transform a set of XML documents using XQuery
XSLT Transform a set of XML documents using XSLT

When a task processes a set of documents, a Source filter is used with the following format : "(.*).XXX". This is a regular expression matching any file having a XXX extension. The parenthesis are here for the prefix part of the file name. For sample : (.*).xml will match any .xml documents. The postfix part of the file name is inside the parenthesis. This postfix can be reused for choosing the file target name using $1.

Sample about filter with an XSLT task

Source File Filter Target Result file
personal.xml (.*).xml $1.html personal.html
boss.xml (.*).xml $1.html boss.html
employee.xml (.*).xml $1.html employee.html

In this sample, we try to transform a set of XML documents to HTML using the same stylesheet, using the right filter and target we can have the same postfix inside the result file.

b. Running a scenario

You may run task by task (editix scenario icon) or the whole scenario (editix scenario icon) inside EditiX. When an error is found the scenario is interrupted.

It is also possible to run it outside editix using the scenario.bat (for Windows) or the scenario.sh (for Unix/Linux/Mac OS X) script from the bin directory. For Mac OS X you must download the unix/linux or raw version. In all case, you must open a terminal and pass to the script the scenario file path. You must be sure on unix/linux/Mac OS X platform to have right to run the scenario.sh script using the command line "chmod u+x scenario.sh".

12. Document preview

EditiX contains several previews from the "View" menu.

a. HTML Preview

This is a simple HTML 3.2 preview. For activating this item from the "View" menu, the user must edit an XHTML document. Note that
this preview doesn't manage all the XHTML standard and this is rather a way for detecting wrong presentation that's why it is advised
to check your document with a full XHTML compatible tool like somes browsers.

This HTML Preview is also embedded inside the XSLT Editor on the right bottom part. The user has to select the HTML 3.2 output type for
visualizing its final document.

b. SVG Preview

This SVG preview is available from the "SVG Preview" item from the "View" menu. This item is activated each time the
user is editing an SVG document. Such document is available from the "Open..." item of the "File" menu and selecting the
"SVG" filter and by building a new one from the "New..." item.

Note that this SVG preview has some limitations and we list below the supported elements :

<a>
<altGlyph>
<altGlyphDef>
<altGlyphItem>
<circle>
<clipPath>
<color-profile>
<cursor>
<defs>
<desc>
<ellipse>
<feBlend>
<feColorMatrix>
<feComponentTransfer>
<feComposite>
<feConvolveMatrix>
<feDiffuseLighting>
<feDisplacementMap>
<feDistantLight>
<feFlood>
<feFuncA>
<feFuncB>
<feFuncG>
<feFuncR>
<feGaussianBlur>
<feImage>
<feMerge>
<feMergeNode>
<feMorphology>
<feOffset>
<fePointLight>
<feSpecularLighting>
<feSpotLight>
<feTile>
<feTurbulence>
<filter>
<font>
<font-face>
<font-face-src>
<font-face-uri>
<foreignObject>
<g>
<glyph>
<glyphRef>
<hkern>
<image>
<line>
<linearGradient>
<marker>
<mask>
<metadata>
<missing-glyph>
<path>
<pattern>
<polygon>
<polyline>
<radialGradient>
<rect>
<stop>
<style>
<svg>
<switch>
<symbol>
<text>
<textPath>
<title>
<tref>
<tspan>
<use>
<view>
<vkern>

13. User preferences

The user can adapt EditiX to its wishes by using the Preferences from the "Options" menu.

Here the bound dialog box. The preferences has two parts :
A preference is a pair of name and value. A value can be modified by selecting it and pressing the
"enter" key. Once the preferences is modified, the user has to validate its choice by pressing "Ok" and
restart EditiX.

Note that the user preferences are stored in a pref.prop document inside the .editix directory from the
user home.

a. List of user preferences

We describe below each user preferences by group :

- editor

Name Usage
tagDelimiter
This is the color of the < and > characters
selection
This is the background color for the text selection
dividerLocation
This is the space in % the tree used. 20 means the tree takes 20% of the global editing space
comment
This is the color of the XML comment.
dtdentity
This is the color of the <!ENTITY dtd declaration
dtdattribute
This is the color of the <!ATTLIST dtd declaration
declaration
This is the color for <?...?>  XML declaration
litteral
This is the color of the "text" inside XML documents
tag
This is the color of the tag inside XML documents
attribute
This is the color of the attribute name
docType
This is the color of the <!DOCTYPE declaration
font
This is the editor's font
line
This is the left column color
lineWrapped
This is a mode for displaying your document with wrapped line. Note that this preference will remove the tag background color.
fullTextView
This is a mode for displaying your document with all the XML parts, it will remove the tag background color.
xsltbackgrond
Background color for each XSLT tag.
namespace
This is the color of the tag prefix <prefix:tag>
text
This is the color of the text outside a tag
background
This is the editor's background
dtdnotation
This is the color of the <!NOTATION dtd declaration
dtdelement
This is the color of the <!ELEMENT dtd declaration


- file

Name Usage
rw-encoding
This is the file encoding format for reading or writting in a file. This is required for the usage of a non local document charset. The user can also modify it from the "File" menu and the "encoding" sub-menu.
defaultXSLTResultPath
This is the default path for the resulting document.
tab-size
This is the size in characters of the tab key.
defaultPath
This is the default path when opening a document by the "Open..." menu item.
defaultXSLTPath
This is the default path when assigning an XSLT document to an XML document.

- interface

Name Usage
tipOfTheDay
This is for showing a tip-of-the-day dialog when starting editiX
lookAndFeel
This is the general interface look-and-feel.
beepForActionEnd
By default activated, it will alert the user with a "beep" for the end of a background task.
initialDocument
The user can have an initial empty document when starting editiX.

- proxy

Name Usage
host
This is the IP address for the proxy. Such proxy will be used for remote accesses by HTTP or FTP. Insert nothing for ignoring the proxy.
port
This is the TCP port for the proxy. Such proxy will be used for remote accesses by HTTP or FTP.  Insert 0 for ignoring the proxy.


- shortcut

Name Usage
lastTransform
For repeating the XSL Transformation
selectTag
Select inside the editor the current tag
selectAll
Select the whole document
find
Search a text inside the editor
format
Pretty format the XML document
save
Save the current document
new
Create a new document
commentTag
Comment the current tag
open
Open a document from the file system
nextTag
Move to the next tag from the current location
surroundTag
Surround the current selection by a tag
paste
Paste the last copy inside the editor
cut
Cut the selection inside the editor
previousTag
Move to the previous tag from the current location
xpath
Build an XPath expression
print
Print the current document
surroundComment
Surround the selection by a comment in the editor
redo
Redo the previous operation
parse
Check or validate the current XML document
copy
Copy the current selection in the editor
undo
Cancel the last operation

- template

Name Usage
phone
This is used when creating a new document from a template
firstname
This is used when creating a new document from a template
company
This is used when creating a new document from a template
email
This is used when creating a new document from a template
lastname
This is used when creating a new document from a template
default-encoding
This is used when creating a new document from a template
website
This is used when creating a new document from a template
address
This is used when creating a new document from a template

- tree

Name Usage
font
This is the font for the tree text
selection
This is the color of the tree selection
text
This is the color of the tree text
background
This is the color of the tree background

- xmlconfig

Name Usage
xinclude
Add xinclude support when parsing a document. By default activated.
parser
This is the default JAXP parser. The default value is XERCES, else it must be a valid class name.
namespaceAware
By default activated, it will check for namespace validity when parsing.
format-space
This is the number of tabulation used when formatting a document. By default 1.
format-replaceAmp
If true, an entity &amp; is generated for each & character in text or attribute value
format-replaceGt
if true, an entity &gt; is generated for each < character in text or attribute value
format-replaceLt
if true, an entity &lt; is generated for each > character in text or attribute value
format-replaceApos
if true, an entity &apos; is generated for each ' character in text or attribute value
format-replaceQuote
if true, an entity &quot; is generated for each " character in text or attribute value
transformer
This is the default JAXP transformer for XSLT. The default value is XALAN else it must be a valid class name.
default-encoding
This is the encoding inside the <?xml version="1.0" encoding="..."?> XML declaration. This is useful when creating a new XML document.
W3C XML Schema prefix
This is the default prefix when generating a new W3C XML Schema from the current document.


- xpath

Name Usage
maxVariables
This is the maximum number of XPath variables the user can manage inside its expression.
maxNamespaces
This is the maximum number of XPath namespaces the user can manage inside its expression.

- xslt

Name Usage
parameter
This is the maximum number of XSLT parameters

- docbook

Each preference will be available after at least one docbook usage for the specified output type.
Here a sample for HTML and PDF.

Name Usage
htmlstylesheet
Path for the XSL documents for the HTML output
pdfstylesheet
Path for the XSL documents for the PDF output

Note that the path is relative to the editix installation directory and is located inside the res directory.

b. Installing a new XML Parser

Click on the item 'install a custom parser' inside the Options menu. Add your java Jar(s), click on the button Search a JAXP class. If a class name appears under the class name field your JAXP parser is found. You may also enter manually the JAXP class name and check with the bound button. Press OK and the parser is enabled the next time you restart EditiX.

Another option :

You can install another JAXP compatible parser inside EditiX replacing the default one (Xerces 2.6.2). You must :
  1. Copy inside the EDITIX_INSTALL_DIRECTORY/ext/parser directory your jar file(s)
  2. Modify the xmlconfig / parser preference with your JAXP SAXParser factory class
  3. Restart EditiX
For information the default SAXParser factory has the value "XERCES" which is equal to "org.apache.xerces.jaxp.SAXParserFactoryImpl".

c. Installing a new XSLT Transformer

Click on the item 'install a custom transformer' inside the Options menu. Add your java Jar(s), click on the button Search a JAXP class. If a class name appears under the class name field your JAXP transformer is found. You may also enter manually the JAXP class name and check with the bound button. Press OK and the transformer is enabled the next time you restart EditiX.

Another possibility :

You can install another JAXP compatible XSLT Transformer inside EditiX replacing the default one (Saxon 6.5). You must :
  1. Copy inside the EDITIX_INSTALL_DIRECTORY/ext/xslt directory your jar file(s)
  2. Modify the xmlconfig / xslt preference with your JAXP Tranformer factory class
  3. Restart EditiX
Here a sample for installing a new version of the SAXON XSLT Engine :
  1. Download SAXON (http://saxon.sourceforge.net)
  2. Copy saxon.jar to the EDITIX_INSTALL_DIRECTORY/ext/xslt directory
  3. Modify inside the EditiX the preference xmlconfig / transformer with the value com.icl.saxon.TransformerFactoryImpl
  4. Restart EditiX

14. EditiX Descriptor & Plugins

a. Descriptor Dialog

EditiX is built around a main XML descriptor. This descriptor is located by default in the res subdirectory of your installation directory.

You may update this descriptor for changing Menus, Toolbars and Adding new Features to EditiX using the Options / EditiX Descriptor menu item.

editix descriptor

The tree part of the descriptor editor displays menus, toolbars, popups.

For each item selected from the tree, a set of UI properties are available inside the "User Interface" tab. Similalry, The "Java Library" displays the java code bound to the item.

When ending your descriptor change, you must activate the "Save" button for definitive usage. For testing, you must restart the application, if an error is found the default descriptor will be used.

b. Plugins

A plugin is a a java swing Action. An action is a java class bound to a menu, toolbar or popup item. For adding a plugin, you must add a new item inside the tree, with the "Java Library" tab, you will have to specify your java libraries (*.jar) and your action class.

EditiX contains a plugin API for controlling the editor (located in the editix.jar from your installation directory bin). All is available from EditiXManager class, the editor model is a collection of opened documents, each document is bound to a text or DOM source you may update.

Here a set of sample (available from the samples directory of the installation directory).

Basic : It displays a simple dialog box when activating

import java.awt.event.ActionEvent;

import javax.swing.AbstractAction;
import javax.swing.JOptionPane;

/**
 * Here a very simple basic case that can be included inside EditiX using the
 * Options/Editix Descriptor menu item.
 * @author Alexandre Brillant ( http://www.editix.com ) */
public class Basic extends AbstractAction {

	public void actionPerformed(ActionEvent e) {
		JOptionPane.showMessageDialog( null, "Hello World" );
	}

}

Note : It creates a new XML document with a note root.


import java.awt.event.ActionEvent;
import javax.swing.AbstractAction;
import com.japisoft.editix.plugin.EditiXManager;
import com.japisoft.editix.plugin.EditixDocument;

/**
 * Very simple plugin adding a new XML document with a note root
 * @author Alexandre Brillant (http://www.abrillant.com)
 */
public class Note extends AbstractAction {

	public void actionPerformed(ActionEvent e) {
		// Add a new document
		EditixDocument ed = EditiXManager.getInstance().getDocumentModel().newDocument( "XML" );
		// Fill it
		ed.setTextContent( "\n" );
	}

}

Update Content : This action will add a new item node to the current XML document root.

import java.awt.event.ActionEvent;
import java.text.SimpleDateFormat;
import java.util.Date;
import javax.swing.AbstractAction;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import com.japisoft.editix.plugin.EditiXManager;
import com.japisoft.editix.plugin.EditixDocument;

/**
 * Very simple plugin updating the current DOM
 * @author Alexandre Brillant (http://www.editix.com)
 */
public class UpdateContent extends AbstractAction {

	public void actionPerformed(ActionEvent e) {

		EditixDocument doc = EditiXManager.getInstance().getDocumentModel().getCurrentDocument();
		if ( doc == null ) {
			System.out.println( "Ignoring this action" );
		} else {
			try {
				// Get the current DOM document 
				Document dom = doc.getDOMContent();
				if ( dom == null ) {
					EditiXManager.getInstance().info( "No current XML document" );
					return;
				}

				Element root = dom.getDocumentElement();

				// Create an item element with a date attribute and a content sample
				// Add it to the document root
				Element newItem = dom.createElement( "item" );
				newItem.setAttribute( "date", new SimpleDateFormat( "dd/MM/yy" ).format( new Date() ) );
				newItem.appendChild( dom.createTextNode( "My item" ) );
				
				root.appendChild( newItem );

				// Updating the current content with this new content
				doc.setDomContent( dom );
				
				EditiXManager.getInstance().activeAction( "format" );

			} catch( Exception exc ) {
				
				EditiXManager.getInstance().info( "Invalid document " + exc.getMessage() );
				
			}
		}
		
	}

}

15. EditiX Components

This product uses :

© 2004-2013 JAPISoft