[Table of Contents] [docx version]
WordprocessingML Reference Material - Table of Contents
latentStyles (Latent Style Information)
This element specifies the properties which shall be applied to a set of latent styles for this document. Latent styles refer to any set of style definitions known to an application which have not been included in the current document. [Example: Latent styles may include additional styles known by a particular hosting application. end example]
When a style definition is embedded in a document, it specifies two distinct groups of properties:
• Behavior properties
• Formatting properties
Obviously, embedding all the styles known to a particular application in each document which it produces would drastically increase the file size. Latent styles provide a way to store pieces of information for the first group (behavior properties) which must be specified for all styles known to an application without requiring the storage of the second group (formatting properties).
[Example: Consider a WordprocessingML document which contains text specified in one of two styles: Heading1 or Normal. Based on this, the document only needs to store the formatting properties for those two styles, saving the additional overhead which would be required to save all of the styles supported by the hosting application.
However, if the documentProtection element (§2.15.1.28) specifies that the hosting application shall prevent the use of any style whose locked element (§2.7.3.7) is set to false, then the locking state of all styles known to that application become useful and necessary to maintain the current state of the document. Using latent styles, this information may be stored without storing any formatting properties for those styles.
For example, if all styles which are not stored in the document shall be locked except for the style with a primary name (§2.7.3.9) of Heading 2. This requirement would be specified using latent styles as follows:
<w:latentStyles … w:defLockedState="true">
<w:lsdException w:name="Heading 2" w:locked="false"/>
</w:latentStyles>
The latentStyles element specifies that all latent styles known to any hosting application shall have a default locking state of true except for any style known to the hosting application with a primary name of Heading 2, whose latent style definition specifies that its locked state shall be false. end example]
Parent Elements |
styles (§2.7.3.18) |
Child Elements |
Subclause |
lsdException (Latent Style Exception) |
§2.7.3.8 |
Attributes |
Description |
count (Latent Style Count) |
Specifies the number of known styles which shall be initialized to the current latent style defaults when this document is first processed. [Note: This property may be used by an application as needed to ensure that only the number of styles known when this document was created are initialized with the defaults on the parent element, and that all new known styles use their default values. end note]
[Example: Consider a WordprocessingML document in which only the first 20 latent styles shall be initialized. This requirement would be specified as follows:
<w:latentStyles w:count="20" … >
The count attribute specifies that 20 known styles shall be initialized to the default settings when the document is first opened, and any additional styles should use the defaults defined by the application. end example]
The possible values for this attribute are defined by the ST_DecimalNumber simple type (§2.18.16). |
defLockedState (Default Style Locking Setting) |
Specifies the default setting for the locked element (§2.7.3.7) which shall be applied to any style made available by the hosting application which is not explicitly defined in the current document. This setting shall be overridden for every style for which a latent style exception (§2.7.3.8) exists.
If this element is omitted, the default locked state for all latent styles in the current document shall be false. [Example: Consider a WordprocessingML document in which all styles which are not stored in the document shall be locked. This requirement would be specified using latent styles as follows:
<w:latentStyles … w:defLockedState="true">
The defLockedState attribute specifies that all latent styles in the current document shall have a locked element setting of true by default. end example]
The possible values for this attribute are defined by the ST_OnOff simple type (§2.18.67). |
defQFormat (Default Primary Style Setting) |
Specifies the default setting for the qFormat element (§2.7.3.14) which shall be applied to any style made available by the hosting application which is not explicitly defined in the current document. This setting shall be overridden for every style for which a latent style exception (§2.7.3.8) exists.
If this element is omitted, the default qFormat state for all latent styles in the current document shall be false. [Example: Consider a WordprocessingML document in which all styles which are not stored in the document shall not be marked as primary styles. This requirement would be specified using latent styles as follows:
<w:latentStyles … w:defQFormat="false">
The defQFormat attribute specifies that all latent styles in the current document shall have a qFormat element setting of false by default. end example]
The possible values for this attribute are defined by the ST_OnOff simple type (§2.18.67). |
defSemiHidden (Default Semi-Hidden Setting) |
Specifies the default setting for the semiHidden element (§2.7.3.16) which shall be applied to any style made available by the hosting application which is not explicitly defined in the current document. This setting shall be overridden for every style for which a latent style exception (§2.7.3.8) exists.
If this element is omitted, the default semiHidden state for all latent styles in the current document shall be false. [Example: Consider a WordprocessingML document in which all styles which are not stored in the document shall not be marked as semi-hidden. This requirement would be specified using latent styles as follows:
<w:latentStyles … w:defSemiHIdden="false">
The defSemiHidden attribute specifies that all latent styles in the current document shall have a semiHidden element setting of false by default. end example]
The possible values for this attribute are defined by the ST_OnOff simple type (§2.18.67). |
defUIPriority (Default User Interface Priority Setting) |
Specifies the default setting for the uiPriority element (§2.7.3.19) which shall be applied to any style made available by the hosting application which is not explicitly defined in the current document. This setting shall be overridden for every style for which a latent style exception (§2.7.3.8) exists.
If this element is omitted, the default uiPriority state for all latent styles in the current document shall be 99. [Example: Consider a WordprocessingML document in which all styles which are not stored in the document shall not be marked as semi-hidden. This requirement would be specified using latent styles as follows:
<w:latentStyles … w:defUIPriority="10">
The defUIPriority attribute specifies that all latent styles in the current document shall have a uiPriority element setting of 10 by default. end example]
The possible values for this attribute are defined by the ST_DecimalNumber simple type (§2.18.16). |
defUnhideWhenUsed (Default Hidden Until Used Setting) |
Specifies the default setting for the unhideWhenUsed element (§2.7.3.20) which shall be applied to any style made available by the hosting application which is not explicitly defined in the current document. This setting shall be overridden for every style for which a latent style exception (§2.7.3.8) exists.
If this element is omitted, the default unhideWhenUsed state for all latent styles in the current document shall be false. [Example: Consider a WordprocessingML document in which all styles which are not stored in the document shall be hidden until they are used in the document's contents. This requirement would be specified using latent styles as follows:
<w:latentStyles … w:defUnhideWhenUsed="true">
The defUnhideWhenUsed attribute specifies that all latent styles in the current document shall have a unhideWhenUsed element setting of true by default. end example]
The possible values for this attribute are defined by the ST_OnOff simple type (§2.18.67). |
The following XML Schema fragment defines the contents of this element:
<complexType name="CT_LatentStyles">
<sequence>
<element name="lsdException" type="CT_LsdException" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attribute name="defLockedState" type="ST_OnOff"/>
<attribute name="defUIPriority" type="ST_DecimalNumber"/>
<attribute name="defSemiHidden" type="ST_OnOff"/>
<attribute name="defUnhideWhenUsed" type="ST_OnOff"/>
<attribute name="defQFormat" type="ST_OnOff"/>
<attribute name="count" type="ST_DecimalNumber"/>
</complexType>