Conditionals 1.0

This specification was marked final on 2015-03-28.

The Mallard Conditionals extension provides a standard mechanism for run-time conditional processing. Conditional processing is handled with simple but flexible expressions in the test attribute that control whether or not content is shown. Test expressions are logical expressions built from test tokens.

In addition to single conditional tests, the Conditionals extension provides the if:choose element to support branching and fallback content for different conditions.

Schema

The formal definition of the Mallard Conditionals extension is maintained in RELAX NG Compact Syntax in code blocks within this specification. This is the namespace declaration for the schema.

# This schema cannot be used on its own. It is designed to be combined
# with the core Mallard schema using the version attribute.
namespace if = "http://projectmallard.org/if/1.0/"
© 2011, 2012 Shaun McCance
cc-by-sa 3.0 (us)

This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.

As a special exception, the copyright holders give you permission to copy, modify, and distribute the example code contained in this document under the terms of your choosing, without restriction.

Powered by
Mallard