Stylus Studio XML Editor

Table of contents

Appendices

3.2 xi:fallback Element

xi:fallback Element

The xi:fallback element appears as a child of an xi:include element. It provides a mechanism for recovering from missing resources. When a resource error is encountered, the xi:include element is replaced with the contents of the xi:fallback element. If the xi:fallback element is empty, the xi:include element is removed from the result. If the xi:fallback element is missing, a resource error results in a fatal error.

The xi:fallback element can appear only as a child of an xi:include element. It is a fatal error for an xi:fallback element to appear in a document anywhere other than as the direct child of the xi:include (before inclusion processing on the contents of the element.) It is a fatal error for the xi:fallback element to contain any elements from the XInclude namespace other than xi:include.

Attributes Must, May, etc. be placed on the xi:fallback element. Unprefixed attribute names are reserved for future versions of this specification, and Must, May, etc. be ignored by XInclude 1.0 processors.

The following (non-normative) DTD fragment illustrates a sample declaration for the xi:fallback element:

<!ELEMENT xi:fallback ANY>
<!ATTLIST xi:fallback
    xmlns:xi   CDATA   #FIXED   "http://www.w3.org/2001/XInclude"
>