Partager via


Level Class

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

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlCompositeElement
      DocumentFormat.OpenXml.Wordprocessing.Level

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

Syntax

'Declaration
<ChildElementInfoAttribute(GetType(StartNumberingValue))> _
<ChildElementInfoAttribute(GetType(NumberingFormat))> _
<ChildElementInfoAttribute(GetType(LevelRestart))> _
<ChildElementInfoAttribute(GetType(ParagraphStyleIdInLevel))> _
<ChildElementInfoAttribute(GetType(IsLegalNumberingStyle))> _
<ChildElementInfoAttribute(GetType(LevelSuffix))> _
<ChildElementInfoAttribute(GetType(LevelText))> _
<ChildElementInfoAttribute(GetType(LevelPictureBulletId))> _
<ChildElementInfoAttribute(GetType(LegacyNumbering))> _
<ChildElementInfoAttribute(GetType(LevelJustification))> _
<ChildElementInfoAttribute(GetType(PreviousParagraphProperties))> _
<ChildElementInfoAttribute(GetType(NumberingSymbolRunProperties))> _
Public Class Level _
    Inherits OpenXmlCompositeElement
'Usage
Dim instance As Level
[ChildElementInfoAttribute(typeof(StartNumberingValue))]
[ChildElementInfoAttribute(typeof(NumberingFormat))]
[ChildElementInfoAttribute(typeof(LevelRestart))]
[ChildElementInfoAttribute(typeof(ParagraphStyleIdInLevel))]
[ChildElementInfoAttribute(typeof(IsLegalNumberingStyle))]
[ChildElementInfoAttribute(typeof(LevelSuffix))]
[ChildElementInfoAttribute(typeof(LevelText))]
[ChildElementInfoAttribute(typeof(LevelPictureBulletId))]
[ChildElementInfoAttribute(typeof(LegacyNumbering))]
[ChildElementInfoAttribute(typeof(LevelJustification))]
[ChildElementInfoAttribute(typeof(PreviousParagraphProperties))]
[ChildElementInfoAttribute(typeof(NumberingSymbolRunProperties))]
public class Level : OpenXmlCompositeElement

Remarks

The following table lists the possible child types:

  • StartNumberingValue <w:start>

  • NumberingFormat <w:numFmt>

  • LevelRestart <w:lvlRestart>

  • ParagraphStyleIdInLevel <w:pStyle>

  • IsLegalNumberingStyle <w:isLgl>

  • LevelSuffix <w:suff>

  • LevelText <w:lvlText>

  • LevelPictureBulletId <w:lvlPicBulletId>

  • LegacyNumbering <w:legacy>

  • LevelJustification <w:lvlJc>

  • PreviousParagraphProperties <w:pPr>

  • NumberingSymbolRunProperties <w:rPr>

[ISO/IEC 29500-1 1st Edition]

17.9.6 lvl (Numbering Level Override Definition)

This element specifies the appearance and behavior of a specific numbering level within a given numbering level definition override defined using the lvlOverride element (§17.9.9).

A numbering level override definition is identical to a numbering level definition, except for the fact that it is defined as part of a numbering definition instance using the num element (§17.9.16) rather than as part of an abstract numbering definition using the abstractNum element (§17.9.1).

[Example: Consider a numbering definition instance which inherits its information from the abstract numbering definition with abstractNumId of 4, but should use a different set of properties for level 0 of the numbering definition. The resulting WordprocessingML would look like:

<w:num w:numId="6">
<w:abstractNumId w:val="4" />
<w:lvlOverride w:ilvl="0">
<w:lvl w:ilvl="0">
<w:start w:val="4" />
<w:lvlText w:val="%1)" />
<w:lvlJc w:val="left" />
<w:pPr>
<w:ind w:left="360" w:hanging="360" />
</w:pPr>
</w:lvl>
</w:lvlOverride>
</w:num>

This numbering definition instance overrides level 0 of the list with the specified numbering level override definition, replacing those in the abstract numbering level definition. end example]

[Note: The ability to set level overrides optimizes use of numbering in WordprocessingML as it prevents writing out redundant abstract numbering definitions if numbering sets only slightly differ.

Consider using WordprocessingML to create two numbered sets that only differ only in the appearance and style of the first numbering level. Both could use the same abstract numbering definition as long as each references a different numbering definition instance with one of the numbering definition instances leveraging a level override for the first numbering level. Below is WordprocessingML that illustrates this:

<w:num w:numId="5">
<w:abstractNumId w:val="4" />
</w:num>
<w:num w:numId="6">
<w:abstractNumId w:val="4" />
<w:lvlOverride w:ilvl="0">
<w:lvl w:ilvl="0">
<w:start w:val="4" />
<w:lvlText w:val="%1)" />
<w:lvlJc w:val="left" />
<w:pPr>
<w:ind w:left="360" w:hanging="360" />
</w:pPr>
</w:lvl>
</w:lvlOverride>
</w:num>

end note]

Parent Elements

lvlOverride (§17.9.9)

Child Elements

Subclause

isLgl (Display All Levels Using Arabic Numerals)

§17.9.4

legacy (Legacy Numbering Level Properties)

§17.9.5

lvlJc (Justification)

§17.9.8

lvlPicBulletId (Picture Numbering Symbol Definition Reference)

§17.9.10

lvlRestart (Restart Numbering Level Symbol)

§17.9.11

lvlText (Numbering Level Text)

§17.9.12

numFmt (Numbering Format)

§17.9.18

pPr (Numbering Level Associated Paragraph Properties)

§17.9.23

pStyle (Paragraph Style's Associated Numbering Level)

§17.9.24

rPr (Numbering Symbol Run Properties)

§17.9.25

start (Starting Value)

§17.9.26

suff (Content Between Numbering Symbol and Paragraph Text)

§17.9.29

Attributes

Description

ilvl (Numbering Level)

Specifies the numbering level definition that is to be defined by this set of numbering properties.

This override is a zero-based index of the number of list levels in the document. [Example: A value of 2 is the 3rd list level in the document. end example]

[Example: Consider the following WordprocessingML for a numbering definition instance:

<w:num w:numId="6">
<w:abstractNumId w:val="4" />
  <w:lvlOverride w:ilvl="0">

</w:lvlOverride>
</w:num>

In this example, the first numbering level definition (with an ilvl of 0) within the referenced abstract numbering definition is overridden. end example]

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

tentative (Tentative Numbering)

Specifies that a given numbering level was been saved by a producer but was not used in the parent document. This means that this numbering level can be redefined by a future consumer without changing the actual content of the document.

A value of 1 or true for this attribute value specifies that the numbering level is not used in the current document's contents.

A value of 0 or false for this attribute value specifies that the numbering level is used in the parent document and cannot be redefined without changing its contents. This is the default value for this attribute, and is implied when this attribute is omitted.

[Example: Consider the following WordprocessingML numbering level:

<w:lvl w:ilvl="0" w:tentative="true" >

</w:lvl>

This level has the tentative attribute set to true, therefore the contents of this numbering level have not been used in the document and can be redefined by a consumer as desired. end example]

If this attribute is equal to 1 or true, the WordprocessingML for a given document contains the numbering level information associated with this numbering level, but the 'tentative' numbering level(s) shall not be represented in any of the hosting application's user interface pertaining to numbering levels.

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

tplc (Template Code)

Specifies a unique hexadecimal value which can be used to specify a location within an application's user interface in which this numbering level shall be displayed. The method by which this value is interpreted shall be application-defined.

If this attribute is omitted, then this numbering can be displayed in any location chosen by the consumer.

[Example: Consider the following abstract numbering definition:

<w:abstractNum w:abstractNumId="1" >

</w:abstractNum>

In this example the abstractNum element with attribute abstractNumId equal to 1, would appear in the area within a consumer's application user interface specified by the template code 04090019.end example]

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

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

[ISO/IEC 29500-1 1st Edition]

17.9.7 lvl (Numbering Level Definition)

This element specifies the appearance and behavior of a numbering level within a given abstract numbering definition. A numbering level contains a set of properties for the display of the numbering for a given numbering level within an abstract numbering definition.

A numbering level definition is identical to a numbering level override definition, except for the fact that it is defined as part of a numbering definition instance using the abstractNum element (§17.9.1) rather than as part of an abstract numbering definition using the num element (§17.9.16).

[Example: Consider the WordprocessingML below:

<w:abstractNum w:abstractNumId="4">
<w:nsid w:val="1DE04504" />
<w:multiLevelType w:val="hybridMultilevel" />
<w:lvl w:ilvl="0" w:tplc="0409000F">
…
</w:lvl>
<w:lvl w:ilvl="1" w:tplc="04090019">
…
</w:lvl>
<w:lvl w:ilvl="2" w:tplc="04090019">
…
</w:lvl>
<w:lvl w:ilvl="3" w:tplc="0409000F">
…
</w:lvl>
…
</w:abstractNum>

This example shows that any paragraph whose numbering properties use the ilvl elements with the attribute val set equal to 0, 1, 2, or 3 has the appearance and behavior of their first four numbered levels specified by the lvl elements given above (assuming that no level overrides have been specified). end example]

Parent Elements

abstractNum (§17.9.1)

Child Elements

Subclause

isLgl (Display All Levels Using Arabic Numerals)

§17.9.4

legacy (Legacy Numbering Level Properties)

§17.9.5

lvlJc (Justification)

§17.9.8

lvlPicBulletId (Picture Numbering Symbol Definition Reference)

§17.9.10

lvlRestart (Restart Numbering Level Symbol)

§17.9.11

lvlText (Numbering Level Text)

§17.9.12

numFmt (Numbering Format)

§17.9.18

pPr (Numbering Level Associated Paragraph Properties)

§17.9.23

pStyle (Paragraph Style's Associated Numbering Level)

§17.9.24

rPr (Numbering Symbol Run Properties)

§17.9.25

start (Starting Value)

§17.9.26

suff (Content Between Numbering Symbol and Paragraph Text)

§17.9.29

Attributes

Description

ilvl (Numbering Level)

Specifies the numbering level definition that is to be defined by this set of numbering properties.

This override is a zero-based index of the number of list levels in the document. [Example: A value of 2 is the 3rd list level in the document. end example]

[Example: Consider the following WordprocessingML for a numbering definition instance:

<w:num w:numId="6">
<w:abstractNumId w:val="4" />
  <w:lvlOverride w:ilvl="0">

</w:lvlOverride>
</w:num>

In this example, the first numbering level definition (with an ilvl of 0) within the referenced abstract numbering definition is overridden. end example]

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

tentative (Tentative Numbering)

Specifies that a given numbering level was been saved by a producer but was not used in the parent document. This means that this numbering level can be redefined by a future consumer without changing the actual content of the document.

A value of 1 or true for this attribute value specifies that the numbering level is not used in the current document's contents.

A value of 0 or false for this attribute value specifies that the numbering level is used in the parent document and cannot be redefined without changing its contents. This is the default value for this attribute, and is implied when this attribute is omitted.

[Example: Consider the following WordprocessingML numbering level:

<w:lvl w:ilvl="0" w:tentative="true" >

</w:lvl>

This level has the tentative attribute set to true, therefore the contents of this numbering level have not been used in the document and can be redefined by a consumer as desired. end example]

If this attribute is equal to 1 or true, the WordprocessingML for a given document contains the numbering level information associated with this numbering level, but the 'tentative' numbering level(s) shall not be represented in any of the hosting application's user interface pertaining to numbering levels.

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

tplc (Template Code)

Specifies a unique hexadecimal value which can be used to specify a location within an application's user interface in which this numbering level shall be displayed. The method by which this value is interpreted shall be application-defined.

If this attribute is omitted, then this numbering can be displayed in any location chosen by the consumer.

[Example: Consider the following abstract numbering definition:

<w:abstractNum w:abstractNumId="1" >

</w:abstractNum>

In this example the abstractNum element with attribute abstractNumId equal to 1, would appear in the area within a consumer's application user interface specified by the template code 04090019.end example]

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

[Note: The W3C XML Schema definition of this element’s content model (CT_Lvl) 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

Level Members

DocumentFormat.OpenXml.Wordprocessing Namespace