<lock> (Locking Setting)

This element specifies the set of behaviors which shall be applied to the contents of the parent structured document tag when the contents of this documents are edited by an application (whether through a user interface or directly). The type of locking applied to the structured document tag is specified via the value of the associated @val attribute.

If this element is omitted, then the locking settings implied for the structured document tag shall be as follows:

  • If the structured document tag specifies that it is a group via the <group> element (§2.5.2.17), then the contents of the structured document tag shall be editable, but the entire tag may be deleted.

  • For all other types, no locking settings shall be applied to the structured document tag.

example:
<w:sdt>
  <w:sdtPr>
    <w:lock w:val="sdtLocked"/><w:text/>
  </w:sdtPr></w:sdt>

This plain text structured document tag's properties contain a <lock> element, specifying locking behaviors for the structured document tag. Since the locking @val attribute value is sdtLocked, this locking setting shall specify that the contents of the structured document tag may be edited, but the structured document tag itself shall not be deleted from the document. ]

Parent Elements

<sdtPr>2.5.2.37)

Attributes

Description

<val> (Locking Type)

Specifies the type of locking which shall be applied to the parent structured document tag.

If this attribute is omitted, this its value shall be assumed to be unlocked (using the defaults stated above).

<w:sdtPr>
  <w:lock w:val="contentLocked"/><w:text/>
</w:sdtPr>

The @val attribute value is contentLocked, therefore this locking setting shall specify that the contents of the structured document tag shall not be edited, but the structured document tag itself may be deleted from the document. ]

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

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

<complexType name="CT_Lock">
	<attribute name="val" type="ST_Lock"/>
</complexType>