|
DITA Storm
browser-based DITA XML Editor
by Inmedius Inc.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Customizing XML Structure - model.xml
Description: This file describes contents of XML structure definition file model.xml
DITA Storm editor is preconfigured to work with DITA XML, but also capable of operating with user-defined XML structure. It could be customized DITA XML or something completely unrelated as XML for invoice handling (see example here). At this moment DITA Storm does not support direct use of DTD or Schema file to control structure of edited XML document. This has to do with performance and size restrictions of browser-based applications. Instead DITA Storm operates by using XML configuration file similar in nature to Schema but besides description of the XML structure it contains additional information such as user-defined actions and presentation details.
Note: For step-by-step element creation/customizaiton instructions see this section.
For your reference file DITAStorm/config/model.dtd contains DTD defintion of the structure of model.xml. Reference: model
Description: Root element for entire DITA Storm XML structure definition.
Syntax<!ELEMENT model (element*,editor*)> Example:<model>
<element.../>
...
<editor.../>
...
</model>
Reference: element
Description: Describes a single element in the set of all elements supported by the editor.
Syntax<!ELEMENT element (group*,action*,default?)> Properties
Example:<element name='topic' title='Topic' addToNewButton='true' attributeEditor='topic' doctypePublicId='-//OASIS//DTD DITA Topic//EN' doctypeFile='topic.dtd' confirmDelete='true'> <group allows='title' card='1'/> <group allows='shortdesc'/> <group allows='prolog'/> <group allows='body'/> <group allows='related-links'/> <group allows='topic,task,concept,reference' card='0..n'/> <default><![CDATA[<topic><title/><shortdesc/><body><p/></body></topic>]]></default> </element> Reference: group
Description: Represents group of childs of enclosing element. Group elements are ordered and can not contain repetitive elements.
Syntax<!ELEMENT group EMPTY> Properties
Example:
Lets take for example following DTD definition of the Topic and see how it gets translated to model.xml
<!ELEMENT topic (title,body?,(topic|reference|concept|task)*)>here is the equivalent defined in model.xml: <element name='topic' ...>
<group allows='title' card='1'/>
<group allows='body' card='0..1'/>
<group allows='topic,reference,concept,task' card='0..n'/>
</element>
Reference: default
Description: Defines fragment of XML which will be used to populate newly created element. For example for convenience UL should be created with inner LI.
Syntax<!ELEMENT default (#PCDATA)> Example:<element ...> ... <default><![CDATA[<topic><title/><shortdesc/><body><p/></body></topic>]]></default> </element> Reference: editor
Description: Describes element attributes and provides editor necessary information to organize editing process. Editor can reuse fields defined in other editor by using <fields.../> element.
Syntax<!ELEMENT editor (fields|field)*> Properties
Example:<editor name="created">
<field attribute="date" title="Creation Date" type="date"/>
...
</editor>
Reference: fields
Description: Imports fields defined in a different editor element with specified name. This can be useful to organize commonly used attributes in the groups for later reuse.
Syntax<!ELEMENT fields EMPTY> Properties
Example:<editor name="xref">
<field attribute="href" title="Hyperlink URL" type="conref"/>
...
<fields name="univ-atts"/>
</editor>
Reference: field
Description: Defines a single attribute editing control. If field is of type 'choice' then 'option' child elements are available to define list of possible attribute values.
Syntax<!ELEMENT field (option*)> Properties
Example:<editor...>
<field attribute="href" title="Image URL" type="conref"/>
<field attribute="alt" title="Alt Text" type="string"/>
...
</editor>
Reference: option
Description: Describes one of the possible values of attributes/fields defined with type 'choice'.
Syntax<!ELEMENT option EMPTY> Properties
Example:<field attribute="align" title="Alignment" type="choice">
<option title="" value=""/>
<option title="Left" value="left"/>
<option title="Right" value="right"/>
<option title="Center" value="center"/>
</field>
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Copyright © 2007
Inmedius Inc. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||