22.1. Configuring the promoteListItem and demoteListItem commands

Commands promoteListItem and demoteListItem expect a property called "configuration_name listItemSpecification" to be defined. This is done by the means of the property in XMLmind XML Editor - Configuration and Deployment configuration element.

This property is used to specify what elements are used to represent paragraphs, list items and lists. Syntax:

spec -> inline_spec? paragraph_spec item_spec list_spec

inline_spec -> inline= [ name_list ]? \n

paragraph_spec -> paragraph= name_list \n

item_spec -> item= name_list \n

list_spec -> list= name_list \n

name_list -> name_list_item {S name_list_item}*

name_list_item -> name | container( name )

name = non_qualified_name | {namespace_URI}local_part
inline=

This field is optional. Specifies the names of the inline elements.

If the inline= field is specified, this means that a list item may directly contain text and inline elements in addition to paragraphs, nested lists and other block elements.

Because the list of inline elements can be quite large, it is possible use the container(X) construct to specify any child element of element X. Example: container(shortdesc) which means any child element of shortdesc.

If the inline= field is not specified and system property "configuration_name inlineElementNames" is defined, then the list of inline elements is parsed from the value of this property. This property may contain a list of fully qualified element names and/or "container(container_element_name)" shorthands. See TEI example below.

Unlike the other fields, an empty inline= field is allowed and may be used to avoid parsing the value of system property "configuration_name inlineElementNames". See LwDITA example below.

paragraph=

Specifies the names of the elements which must be considered as being paragraphs.

item=

Specifies the names of the elements which must be considered as being list items.

A list item is expected to contain one or more of any of the paragraphs specified using the paragraph= field. A list item is also expected to contain nested lists and all sorts of other block elements in addition to paragraphs: blockquote, table, figure, etc.

list=

Specifies the names of the elements which must be considered as being lists.

A list is expected to be a general purpose itemized or ordered list. A list is expected to contain one or more of any of the items specified using the item= field.

Example 6.7. XHTML listItemSpecification
<property name="$c1 listItemSpecification">
  inline=container(2{http://www.w3.org/1999/xhtml}p)
  paragraph={http://www.w3.org/1999/xhtml}p3
  item={http://www.w3.org/1999/xhtml}li
  list={http://www.w3.org/1999/xhtml}ul {http://www.w3.org/1999/xhtml}ol
</property>

1

$c is a shorthand for "current configuration name".

2

The container() construct here means: any child element of p, the XHTML paragraph.

3

Namespace prefixes are not supported inside a property value. Hence, the name of an element must be specified using James Clark's notation.

Example 6.8. DITA listItemSpecification
<property name="$c listItemSpecification">
  inline=container(shortdesc) xref indexterm indextermref
  paragraph=p
  item=li
  list=ul ol
</property>

Or equivalently:

<property name="$c inlineElementNames">
  container(shortdesc)
  xref
  indexterm
  indextermref
</property>

<property name="$c listItemSpecification">
  paragraph=p
  item=li
  list=ul ol
</property>

Notice in this second listing, the implicit "inline=" field which is indirectly specified using system property "$c inlineElementNames".

Example 6.9. DocBook 5 listItemSpecification
<property name="$c listItemSpecification">
  paragraph={http://docbook.org/ns/docbook}para {http://docbook.org/ns/docbook}simpara
  item={http://docbook.org/ns/docbook}listitem
  list={http://docbook.org/ns/docbook}itemizedlist {http://docbook.org/ns/docbook}orderedlist
</property>
Example 6.10. TEI listItemSpecification
<property name="$c inlineElementNames">
  {http://www.tei-c.org/ns/1.0}abbr
  {http://www.tei-c.org/ns/1.0}add
  ...
  container({http://www.tei-c.org/ns/1.0}pc)
  ...
  {http://www.tei-c.org/ns/1.0}w
</property>

<property name="$c listItemSpecification">
  paragraph={http://www.tei-c.org/ns/1.0}p
  item={http://www.tei-c.org/ns/1.0}item
  list={http://www.tei-c.org/ns/1.0}list
</property>

Notice the implicit "inline=" field which is indirectly specified using system property "$c inlineElementNames".

Example 6.11. LwDITA listItemSpecification
<property name="$c inlineElementNames">
  container(shortdesc)
  xref
  indexterm
  indextermref
</property>

<property name="$c listItemSpecification">
  inline=
  paragraph=p
  item=li
  list=ul ol
</property>

Notice the empty "inline=" field which avoids parsing system property "$c inlineElementNames". (Unlike in full DITA, in LwDITA, an li element may not directly contain text and phrase elements..)