20.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.

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.1. 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.2. DITA listItemSpecification

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

Example 6.3. 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>