PreserveElements and PreserveAttributes Attributes

The @Ignorable attribute presents a challenge unique to markup editors in deciding when and how to preserve ignored markup in the face of modification and when to discard ignored markup. In the absence of explicit knowledge of the specification governing the unrecognized ignored markup, it is difficult for a markup editor to preserve ignored markup while simultaneously maintaining document conformance with whatever specification governs that markup. Similarly, it is difficult for the markup editor to avoid undesired change to the edited document's semantics as they would be interpreted by a markup consumer whose implementation is based on the specification governing the preserved markup.

A markup editor might use the presence of @PreserveElements and @PreserveAttributes attributes as hints for deciding what ignored elements and attributes to preserve when markup is modified. The markup editor's specific interpretation of those hints shall be governed by the markup specification or specifications that formed the basis for the markup editor's implementation.

Markup specifications should specify conditions under which markup editors should preserve ignored markup. Markup specifications should define the widest possible set ofconditions under which markup editors should preserve ignored markup.
Note: : If preservation conditions are too widely defined, future versions and extensions will be over constrained in what new semantics they can introduce.
If a markup specification lacks such guidance, markup editors for markup documents governed by that markup specification should be conservative in their preservation behavior Before preserving any ignored markup, markup editors should attempt to establish confidence that the preserved markup will be acceptable to, and interpretable with acceptable semantics by, all imaginable markup consumers that understand future versions of extensions.
Note: : Such confidence could be established by deep understanding of the base specification.
Even in the presence of explicit preservation guidance in a markup specification, any markup editor might choose to discard together all ignored markup without regard to the presence of any @PreserveElements or @PreserveAttributes attribute.
Note: The explicit presence of the @Ignorable attribute indicates that discarding such markup before editing produces a document that conforms to relevant specifications and is self-sufficient in its semantic interpretation.

A markup specification might define conditions calling for the preservation of some ignored elements or attributes without requiring the presence of any @PreserveElements or @PreserveAttributes attribute.

A markup specification might restrict preservation of elements identified by the @PreserveElements attribute to those elements that are descendants of particular elements. Likewise, a markup specification might restrict the set of elements whose ignored attributes can be preserved, as identified by the @PreserveAttributes element, to those that are descendants of particular elements. Regardless of any such restrictions, markup consumers shall always accept, but possibly disregard, @PreserveElements and @PreserveAttributes attributes on any element.