RELAX NG Schema for XInclude for Paloose Template
Author: Hugh Field-Richards
Date: 2006-08-16T19:30

The following is derived from the W3C XInclude Working Draft. The content

See the specification for more on these attributes.

xi.include — Warning! not used within this schema file.
define : xi.include
element : xi:include
optional
attribute : href
Any text
optional
attribute : xpointer
Any text
optional
attribute : encoding
Any text
optional
attribute : accept
Any text
optional
attribute : accept-language
Any text
optional
attribute : parse
choice
value = "xml"
value = "text"
refxi.fallback
<define name="xi.include">
   <element name="xi:include">
      <optional>
         <attribute name="href">
            <text/>
         </attribute>
      </optional>
      <optional>
         <attribute name="xpointer">
            <text/>
         </attribute>
      </optional>
      <optional>
         <attribute name="encoding">
            <text/>
         </attribute>
      </optional>
      <optional>
         <attribute name="accept">
            <text/>
         </attribute>
      </optional>
      <optional>
         <attribute name="accept-language">
            <text/>
         </attribute>
      </optional>
      <optional>
         <attribute name="parse">
            <choice>
               <value>xml</value>
               <value>text</value>
            </choice>
         </attribute>
      </optional>
      <ref name="xi.fallback"/>
   </element>
</define>

The fallback element allows a mechanism for error recovery. When a resource error is found the include element is replaced with the fallback element. In this case it can be any horizontal content.

define : xi.fallback
element : xi:fallback
zeroOrMore
reftext.horizontalContent
<define name="xi.fallback">
   <element name="xi:fallback">
      <zeroOrMore>
         <ref name="text.horizontalContent"/>
      </zeroOrMore>
   </element>
</define>