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.
@PreserveElements
or @PreserveAttributes
attribute. @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.