Share via


LevelText Class

Numbering Level Text.When the object is serialized out as xml, its qualified name is w:lvlText.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlLeafElement
      DocumentFormat.OpenXml.Wordprocessing.LevelText

Namespace:  DocumentFormat.OpenXml.Wordprocessing
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

Syntax

'Declaration
Public Class LevelText _
    Inherits OpenXmlLeafElement
'Usage
Dim instance As LevelText
public class LevelText : OpenXmlLeafElement

Remarks

[ISO/IEC 29500-1 1st Edition]

17.9.12 lvlText (Numbering Level Text)

This element specifies the textual content which shall be displayed when displaying a paragraph with the given numbering level.

All text in this element's val attribute shall be taken as literal text to be repeated in each instance of this numbering level, except for any use of the percent symbol (%) followed by a number, which shall be used to indicate the one-based index of the number to be used at this level. Any number of a level higher than this level shall be ignored.

When the % syntax is used, the number shall be incremented for each subsequent paragraph of that level (sequential or not), until the restart level is seen between two subsequent paragraphs of this level.

[Example: Consider the following WordprocessingML for a numbering level:

<w:lvl w:ilvl="1">
…
  <w:lvlText w:val="StringA %2 StringB %1 StringC %3"/>
  … 
</w:lvl>

This specifies that three strings (StringA, StringB, StringC) must be used as string literals in the numbering for level two (ilvl of 1) along with the numbering symbol used for level one and level zero. Although level two is also referenced here, it is ignored as it is a higher level than the current numbering level.

Therefore, assuming the numbering symbol used by numbering level zero is an Arabic numeral, and the numbering symbol used by numbering level one is a Roman numeral, a set of numbered paragraphs using this WordprocessingML numbering set must be output as:

1
  StringA I StringB 1 StringC
  StringA II StringB 1 StringC
  StringA III StringB 1 StringC
2
  StringA I StringB 2 StringC
  StringA II StringB 2 StringC

with the %1 and %2 values corresponding to the current numbering symbol value for numbering level zero and one, respectively. end example]

Parent Elements

lvl (§17.9.6); lvl (§17.9.7)

Attributes

Description

null (Level Text Is Null Character)

Specifies that a null character shall be used as the numbering symbol for a given numbering level.

If the val attribute contains any content, then this attribute shall be ignored.

If this attribute is omitted, then the null string shall not be used in place of the empty string. [Note: A null character is different from an empty string. end note]

[Example: Consider the WordprocessingML below:

<w:lvl w:ilvl="1">
  …
  <w:lvlText w:null="on" />
  …
</w:lvl>

This level text consists of a single null character, and not the empty string, as the null attribute is set. end example]

The possible values for this attribute are defined by the ST_OnOff simple type (§22.9.2.7).

val (Level Text)

Specifies the actual text to be used for the numbering level when it is referenced in the document's content.

If this attribute is not specified, then the empty string shall be used as the level's text.

[Example: Consider the WordprocessingML below:

<w:lvl w:ilvl="1">
  …
  <w:lvlText w:val="test" />
  …
</w:lvl>

Here the val attribute specifies that the literal string test is to be surfaced as the text for the given numbering level, regardless of its position. end example]

The possible values for this attribute are defined by the ST_String simple type (§22.9.2.13).

[Note: The W3C XML Schema definition of this element’s content model (CT_LevelText) is located in §A.1. end note]

© ISO/IEC29500: 2008.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

LevelText Members

DocumentFormat.OpenXml.Wordprocessing Namespace