DITA Storm browser-based DITA XML Editor
by Inmedius Inc.
 

Task: Creating Custom XML Element

Description: This documents describes how to create (or modify existing) XML element.

Pre-Requisite
You have DITA Storm editor installed and working.
Steps
  1. Create new <element...> entry
    Info: New elements along with all existing DITA XML elements are defined in DITAStorm/config/model.xml file. As part of this procedure you would be able to identify childs of element along with list of available attributes. For more information on model.xml see corresponded section.
  2. Register with other elements
    Info: Identify other elements which would contain new element and add it to the list of allowed elements in <group allows='...'>
  3. Specify how new element will be rendered.
    Info: You have two options now:
    1. First, you can rely on DITA Storm to generate a default (outline-linke) representation of new element. To exercise this option use genericRenderer attribute of <element...>:
      <element name='my' ... genericRenderer='true'>... 
    2. Second option is to use XSL rendering engine. To exersize this option modify DITAStorm/config/simple.xsl. As an alternative you can create your own XSL document and define rendering for your elements there. For details about available XSL rendering options see corresponded section.
  4. Compile your changes.
    Info: To make your changes to model.xml and XSL available to DITA Storm you would need to compile them. DITA Storm uses compilation to optimize editor performance and download time.
Result
When all necessary steps performed you will be able to insert newly created element into XML, edit its attributes and store it along with containing XML document.

Using XML customization options of DITA Storm you will also be able to build entire new XML structure. Here is an example of how it might look like: Invoice Demo.

Copyright © 2007
Inmedius Inc.