Skip to main content

 Element reference

PSML elements from <author> to <xref>

<item>

Summary

Item in a list or a numbered list.

Usage context

Element categorylist
PSML levelportable
Permitted contentText with character-style elements or <block> <blockxref> <image> <list> <nlist> <para> <preformat> <table>
Permitted parent<list> <nlist>
HTML equivalent<li> 
OpenXML equivalent<w:p> with <w:numPr> property

A list item can either contain mixed content directly, an image, or another block element such as another list, block, table or paragraph.

If the item content only includes formatted text, using a paragraph is unnecessary and generally not recommended as it is likely to affect margins around the list item. Use paragraphs only when the item contains other block elements.

The numbering of the item is determined by the position in a numbered list. The indentation is determined by the nesting level of the list.

Consider using numbered or prefixed paragraphs if you need to control numbering or indentation more precisely.

Attributes

This element does not have any attributes.

Examples

A list item in the context of a list:

<list>
  <item>apples</item>
  <item>oranges</item>
​</list>

This would generally be transformed in HTML as:

<ul>
  <li>apples</li>
  <li>oranges</li>
</ul>

Schema

XML Schema

<xs:element name="item">
  <xs:complexType mixed="true">

    <xs:choice  minOccurs="0" maxOccurs="unbounded">
      <xs:group ref="character-style-group"/>     
      <xs:element ref="list"/>
      <xs:element ref="nlist"/>
      <xs:element ref="para"/>
      <xs:element ref="block"/>
      <xs:element ref="blockxref"/>
      <xs:element ref="image"/>
      <xs:element ref="preformat"/>
      <xs:element ref="table"/>
    </xs:choice>

  </xs:complexType>
</xs:element>

Relax Schema

element item {
   ( character-style-group
   | list | nlist | para | block | blockxref | image | preformat | table)*
}

Compatibility

This element was introduced in the first draft of PSML and is well-supported from PageSeeder 5.1.

Created on , last edited on