Constructs defined in this specification use names with the prefix
ai- to differentiate from the surrounding syntax.
The filtering has to be enabled in
<config> <ress> <dom-filter /> <text-filter /> </ress> </config>
These content models help to explain where DOM filter elements can be used and what content they can contain. The relevant content models are augmented flow content, transparent content, parent-transparent content, and text content.
See the definition of transparent content models in the HTML5 specification.
Some elements are described as parent-transparent; they have “parent-transparent” in the description of their content model. The content model of a parent-transparent element is derived from the content model of its grand-parent element: the elements required in the part of the content model that is “parent-transparent” are the same elements as required in the part of the content model of the grand-parent of the parent-transparent element in which the parent-transparent parent element finds itself.
Consider the following markup fragment:
<p><ai-choose> <ai-when test="foo = 1">This is <strong>important</strong></ai-when> <ai-otherwise>This is not important</ai-otherwise> </ai-choose></p>
ai-choose element is found in the
p element, whose content model is phrasing content. Thus, text and the
strong element are allowed.
Consider another markup fragment:
<p><ai-choose> <ai-when test="foo = 1"><h1>This is <strong>important</strong></h1></ai-when> <ai-otherwise><h1>This is not important</h1></ai-otherwise> </ai-choose></p>
h1 element is not phrasing content, and so, in the preceding example, not allowed in the
See the definition of text content in the HTML5 specification.