ISSUE-57 - include pattern

I took an ACTION-65 to craft a chameleon (chamaeleon in English :) schema
for ISSUE-57 - xs:include pattern. 

Given "include" might be basic, but including a schema without
a targetNamespace will be "advanced" (ISSUE-27). 
Should this be a separate ISSUE?

As with our Relative include and other import and include examples,
we need to develop a technique to reference Schemas with symbols
not used elsewhere - otherwise we have a clash when we build the
examples.xsd and examples.wsdl catch-alls.

I therefore suggest adding a "name" attribute to our <ex:types>
element which can be used to construct a relative sub-schema 
document. We'll need to do some magic to mangle relative paths when 
generating the all-in-one example.xsd and example.wsdl:

"""
     <ex:example xml:id="ChameleonInclude" element="ex:chameleonInclude">
      <ex:types name="ChameleonIncluded">
        <xs:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
          <xs:complexType name="ChameleonCollection">
            <xs:sequence>
              <xs:element name="item1" type="ex:ChameleonItem"/>
              <xs:element name="item2" type="ex:ChameleonItem"/>
            </xs:sequence>
          </xs:complexType>
          <xs:complexType name="ChameleonItem">
            <xs:sequence>
              <xs:element name="name" type="xs:string"/>
            </xs:sequence>
          </xs:complexType>
        </xs:schema>
      </ex:types>
      <ex:typedef>
         <xs:include schemaLocation="ChameleonIncluded.xsd"/>
         <xs:element name="chameleonInclude" type="ex:ChameleonCollection"/>
      </ex:typedef>
      <ex:instance xml:id="ChameleonInclude01">
        <ex:chameleonInclude>
          <ex:item1>
              <ex:name>green</ex:name>
          </ex:item1>
          <ex:item2>
              <ex:name>black</ex:name>
          </ex:item2>
        </ex:chameleonInclude>
      </ex:instance>
   </ex:example>
"""


I can commit this later when I'm outside this stupid firewall,
assuming the WG agrees ..

Paul

Received on Tuesday, 19 September 2006 13:10:41 UTC