R. Dernison wrote:
> After reading the documents, I still have some questions.

We strongly recommend to write at least one XHTML page containing lists
and tables using XXE before attempting to extend it. We don't see how a
developer could extend a software which is unfamiliar to her/him. For
example, you cannot understand the following explanations if you have
not used XXE to write at least an actual document.



> Is it possible to intercept the save event of a document? So that before the 
> document is closed, elements - such as prolog and author - can be added 
> automatically?

Yes. A validateHook can change the document being saved. Implement a
validateHook in Java and declare it in your configuration file using the
<validaHook> configuration element.

See
http://www.xmlmind.com/xmleditor/_distrib/doc/api/com/xmlmind/xmleditapp/validatehook/ValidateHook.html

See http://www.xmlmind.com/xmleditor/_distrib/doc/dev/validatehook.html

See
http://www.xmlmind.com/xmleditor/_distrib/doc/configure/validateHook.html




> Another thing is: is it possible to manipulate the context menu so that 
> custom elements can be added to the current element?

--> If you are talking about the menu and/or the toolbar buttons which
are specific to a given document type (e.g. DocBook, XHTML, your custom
DTD), then the answer is yes.

These menu and/or the toolbar buttons are entirely specified in a
configuration file. You have to specify the <menu> and <toolBar>
configuration elements. Please use the existing configurations (e.g.
DocBook, XHTML, etc) as examples. Such configuration files are found in
XXE_install_dir/addon/config/.

See http://www.xmlmind.com/xmleditor/_distrib/doc/configure/menu.html

See http://www.xmlmind.com/xmleditor/_distrib/doc/configure/toolBar.html



--> If you are talking about the Edit tool which displays the list of
elements you are allowed to insert after current element. The answer is
even simpler:

The Edit tool uses the DTD or schema to find out which elements are
allowed at a given location. Therefore adding custom elements means
modifying the DTD or schema being used for your documents in order to
declare such elements.

The Edit tool can also display custom element templates. For example,
instead of displaying just a single table item, it can display several
table items, each one having a different predefined content:
table(head_row), table(head_row_column), etc. Custom element templates
are declared in a configuration file using the <elementTemplate>
configuration element.

See
http://www.xmlmind.com/xmleditor/_distrib/doc/configure/elementTemplate.html
 
--
XMLmind XML Editor Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xmleditor-support

Reply via email to