Consider the following case. A schema A, shown in Figure 1, “schema-a.sch, includes a pattern from a different schema B, shown in Figure 2, “schema-b.sch.

Figure 1. schema-a.sch

<sch:schema xmlns:sch="" queryBinding="xslt2">
  <sch:ns prefix="example" uri=""/>
  <sch:include href="schema-b.sch#pattern-b"/>

Figure 2. schema-b.sch

<sch:schema xmlns:sch="" queryBinding="xslt2">
  <sch:ns prefix="ex" uri=""/>
  <sch:let name="allowedTypes" value="tokenize('foo bar', ' ')"/>
  <sch:pattern id="pattern-b">
    <sch:rule context="ex:element[@type = $allowedTypes]">
      <sch:assert test="false()"/>

Simply replacing the sch:include element in A with the pattern from B does not produce a working schema.

In general, the interaction of schema composition with rule based validation is underspecified.