About Arbortext Styler > Creating Conditions > Nested and If, Else/If, and Else Conditions in Exported Stylesheets
  
Nested and If, Else/If, and Else Conditions in Exported Stylesheets
Nested conditions are not supported natively in FOSI or XSL. For this reason, when a stylesheet is exported to XSL or FOSI any nested and/or If, Else If and Else conditions will be flattened to a single layer.
Nested and/or If, Else If and Else conditions are converted into a series of single top layer conditions, some with additional tests that make the new condition equivalent to the original nested condition. Note the use of the ifSense=”false” attribute on the Tests element to provide the additional testing that brings the new condition in line with the original one:
The flattened conditions can then be translated directly into XSL using standard XSL language features.
To translate the flattened conditions into FOSI attribute tests, you may take advantage of the testgroup construct in the FOSI definition. The construct can occur in an attribute test (att element) where a specval or fillval can occur and contains any combination of specval and fillval attributes. The testrgoup construct is useful when you want to map a Tests ifSense=”false” element in the flattened style file into a FOSI attribute test, as it is mapped into testgroup sense=”false”. Furthermore, using a testgroup element with a logic value that differs from that held by the att element would allow you to test a set of specval and fillval attributes, related by “and” or “or”, in a single attribute test. The testgroup element is available for use in any FOSI instance, whether it is generated by Arbortext Styler or created elsewhere.