APP in Arbortext Styler > Components of Documents and Templates > Text Processing > Element-based Tag Selection
  
Element-based Tag Selection
When it is using element-based tag selection, Arbortext Advanced Print Publisher processes any markup it encounters in content depending on the type:
If the mark-up is an element, given as an angle bracket delimited name with or without attributes, for example <element>
Arbortext Advanced Print Publisher looks for a tag with the same name as the element. If Arbortext Advanced Print Publisher namespaces are in use, it refers to the namespace search list order (if set) to determine which namespaces to search, and in what order. See Namespaces in Arbortext Advanced Print Publisher for information.
When Arbortext Advanced Print Publisher finds a tag with the same name, it processes that tag. If the tag is not JavaScript, it is processed as a text stream. If the tag is JavaScript it is run as JavaScript.
Arbortext Advanced Print Publisher treats a closing tag, an angle bracket followed by a slash, for example </element>, in the same way as the start tag. It looks for a tag of the same name with the slash prefix. Using closing tags is an important concept when working with Arbortext Advanced Print Publisher. It does not by default deactivate the formatting set by the open tag when exiting an XML context. The template designer must configure this action.
If an empty element is found, for example <element/>, Arbortext Advanced Print Publisher processes both the element tag and the /element tag in order.
If the markup is an entity reference, given as a & and ; delimited name with or without attributes, for example &reference;
Arbortext Advanced Print Publisher processes an entity reference in the same way as an element.
Arbortext Advanced Print Publisher provides the standard predefined entities for XML, for example &lt; and &amp;. It is possible to change Arbortext Advanced Print Publisher’s behavior when it encounters these references.
If the mark-up is a processing instruction, given as an angle bracket followed by a question mark, for example <?th 12pt>
Arbortext Advanced Print Publisher examines the name of the processing instruction. If the name matches one of Arbortext Advanced Print Publisher’s own processing instructions it uses the content of its own processing instruction as parameters for the encountered processing instruction. The parameters could affect the formatting properties, perform a specific task, or output content.
If the mark-up is a comment, given as an angle bracket followed by an exclamation mark, for example <!- - comment - ->
Arbortext Advanced Print Publisher ignores a comment.