APP in Arbortext Styler > Components of Documents and Templates > Conditional Text Formatting > Conditional Formatting
  
Conditional Formatting
Basic Principles
Many XML formatting engines allow you to test the hierarchy of content and associate formatting properties based on the result of those tests. Arbortext Advanced Print Publisher provides this functionality, using XPath and counters, and has other information available to provide additional flexibility.
Arbortext Advanced Print Publisher provides these tools to template developers for conditional formatting:
Attribute testing — classed as separate from XPath with the way Arbortext Advanced Print Publisher passes attributes to the tags selected during text formatting
Refer to Attribute Handling for information.
Formatting results — a powerful tool to use to specify formatting based on information Arbortext Advanced Print Publisher generates while it is formatting
Formatting results are obtained from Arbortext Advanced Print Publisher’s getvar variables.
Refer to Format Result Testing for information.
XPath — a standard language to test XML content hierarchy and long-range content structures
Refer to Content and Context Tests with XPath for information.
Refer to XPath in Arbortext Advanced Print Publisher for a general description of XPath support.
Global variables — can be passed between documents and are always available from any content stream, tag, or script
Refer to System Information with Global Variables for information.
Counters — a format-safe way to store information that can be tested later
Refer to Tracking Formatting with Counters
Tag information — graphic and text information can be used to further drive conditional formatting
Environment information — information such as date and time, user name, operating system, and Arbortext Advanced Print Publisher deployment accessed from Arbortext Advanced Print Publisher
The majority of this information is available through JavaScript. It may be necessary use other methods to access some of the information, for example using showstrings or Perl.