17.5.2.23 lock
This element specifies the set of behaviors that shall be applied to the contents of the nearest ancestor structured document tag when the contents of this document 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 (17.5.2.17), then the
- contents of the structured document tag shall be editable, but the entire tag can be deleted.
- For all other kinds, no locking settings shall be applied to the structured document tag.
[Example: Consider the following plain text structured document tag:
<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 must specify that the contents of the structured document tag can be edited, but the structured document tag itself must not be deleted from the document. end example]
Attributes
val (Locking Type)
Specifies the type of locking which shall be applied to the nearest ancestor structured document tag.
If this attribute is omitted, this its value shall be assumed to be unlocked (using the defaults stated above).
[Example: Consider the following plain text structured document tag properties:
<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 must not be edited, but the structured document tag itself can be deleted from the document. end example]
The possible values for this attribute are defined by the ST_Lock simple type (17.18.49).
[Note: The W3C XML Schema definition of this element’s content model (CT_Lock) is located in A.1. end note]