[Table of Contents] [docx version]

WordprocessingML Reference Material - Table of Contents

encoding (Output Encoding When Saving as Web Page)

This element specifies the encoding which shall be used for the contents of this WordprocessingML document when it is saved as an HTML web page. The set of encodings supported by this element shall be derived from the standard set of character set definitions provided at http://www.iana.org/assignments/character-sets.

If this element is omitted, then the default encoding for the current system shall be used when this document is saved as a web page. If the value of the val attribute is unknown or supported by an application, then the default encoding for the current system shall be used when this document is saved as a web page.

[Example: Consider a WordprocessingML document which contains the following content within the web settings part:

<w:webSettings>
<w:encoding w:val="utf-8" />
</w:webSettings>

The encoding element's val attribute has a value of utf-8, which specifies that this document shall be encoded in the UTF-8 format when it is saved as a web page. end example]

Parent Elements

webSettings2.15.2.44)

 

Attributes

Description

val (String Value)

Specifies that its contents will contain a string.

 

The contents of this string are interpreted based on the context of the parent XML element.

 

[Example: Consider the following WordprocessingML fragment:

 

<w:pPr>

<w:pStyle w:val="heading1" />

</w:pPr>

 

The value of the val attribute is the ID of the associated paragraph style's styleId.

 

However, consider the following fragment:

 

<w:sdtPr>

<w:alias w:val="SDT Title Example" />

...

</w:sdtPr>

 

In this case, the decimal number in the val attribute is the caption of the parent structured document tag. In each case, the value is interpreted in the context of the parent element. end example]

 

The possible values for this attribute are defined by the ST_String simple type2.18.89).

The following XML Schema fragment defines the contents of this element:

<complexType name="CT_String">

   <attribute name="val" type="ST_String" use="required"/>

</complexType>