Section 2.3.2 [current] o One of the following: o An element attribute information item .... o A type attribute information item .... [proposed addition] o An attribute information item in any namespace except the null namespace or "http://www.w3.org/@@@@/@@/wsdl" indicating the validation rules for this part in an alternative schema language. [current] A part that carries either an element or type attribute information item uses XML Schema [...] as its type system. Other qualified attribute information items MAY be used to type information in some other type system. Such attribute information items are not defined by this specification. [replacement] A part carries information about its type system by the reference contained in the type, element, or alternative (namespaced) attribute information item. The schema language used is determined by examining the referred-to namespace and associating it with an imported or embedded schema. XML Schema uses the type and element attribute information items; alternative schema languages may do so as well. If the concepts embodied by the type and element attribute information items are not appropriate for an alternative schema language, that language should specify an alternative attribute with prescribed semantics. Such attribute information items are not defined by this specification. Section 3. Types [add introductory para] At the abstract level, the Types Component is a container for imported and embedded schema components. By design, WSDL supports any schema language for which the syntax and semantics of import or embed have been defined. Support for the W3C XML Schema Description Language (XSDL) is required of all processors. Instances of WSDL may require support for an alternative schema language by using the standard wsdl:required attribute information item (any imported or embedded XSDL element information items may be regarded as having this attribute information item set). Only the XSDL implementation is defined in this specification. [add additional para, maybe] The schemas defined or referenced in the Types Component provide the type system used for message parts. Message parts indicate their structure and content by using the standard attribute information items type and element, or for alternate schema languages in which these concepts do not map well, by defining alternative attribute information item extensions to the part element information item. [remainder of this section as is] [ISSUE: when a WSDL includes both XSDL and an alternative schema construct, which are intended to be identical (same XML instances are valid/invalid; different schema languages), should this be supported? Should the WSDL author be able to indicate this in some fashion?] [ISSUE: it seems as though some mention of namespace uniqueness ought to be in here somewhere ... note that this would interact interestingly with the above issue.] 3.1 Using W3C XML Schema Description Language [title change: remove "guidelines," use formal language name] [current content is a mix of best practice recommendations and requirements. The requirements are here revised and clarified. Discussion of wire formats and the like seem rather out of place.] XSDL MAY be used as the schema language, via import or embedding. Each method defines a different element information item. All processors MUST support XSDL type definitions. Importing XSDL Importing an XSDL schema uses the xsd:import mechanism defined by XSDL, with its syntax and semantics, plus some restrictions. A child element information item of the types element information item is defined with the Infoset properties as follows: o A [local name] of import. o A [namespace name] of "http://www.w3.org/2001/XMLSchema". o One or two attribute information items as follows: o A namespace attribute information item as described below. o An optional schemaLocation attribute information item as described below. namespace attribute information item The namespace attribute information item defines the namespace of the type and element definitions imported from the referenced schema. If the referenced schema contains a targetNamespace attribute information item on its schema element information item, then these values of these two attribute information items must be identical. If the schema does not have a targetNamespace attribute, then the namespace specified here is applied to all components of the schema as if it contained a corresponding targetNamespace declaration. The namespace attribute information item contains the following Infoset properties: o A [local name] of namespace. o A [namespace name] which has no value. The type of the namespace attribute information item is xsd:anyURI. schemaLocation attribute information item The schemaLocation attribute information item, if present, provides a hint to the processor as to where the schema may be located. Caching and cataloging technologies may provide better information than this hint. The location attribute information item has the following infoset properties: o A [local name] of schemaLocation. o A [namespace name] that has no value. The type of the schemaLocation attribute information item is xsd:anyURI. Embedding XSDL Embedding an XSDL schema uses the existing top-level xsd:schema element information item. It may be viewed as simply cutting and pasting an existing, stand-alone schema, to a location inside the Types Component. The xsd:schema element information item has the following Infoset properties: o A [local name] of schema. o A [namespace name] of "http://www.w3.org/2001/XMLSchema". o A targetNamespace attribute information item, as described below. o Additional attribute information items as specified for the schema element information item in the XSDL specification. o Child element information items as specified for the schema element information item in the XSDL specification. targetNamespace attribute information item The targetNamespace attribute information item defines the namespace of the type and element definitions embedded in this schema. WSDL modifies the XSDL definition of the schema element information item to make this attribute information item required. The targetNamespace attribute information item has the following infoset properties: o A [local name] of targetNamespace. o A [namespace name] that has no value. The type of the targetNamespace attribute information item is xsd:anyURI. References to Type and Element Definitions Whether embedded or imported, the type and element definitions present in a schema may be referenced from a message part. A named, global xsd:simpleType or xsd:complexType definition may be referenced from the part element information item using the type attribute information item. The QName is constructed from the targetNamespace of the schema and the content of the name attribute of the simpleType or complexType element information item. A type attribute information item may not be used to refer to an xsd:element element information item. A named, global xsd:element definition may be referenced from the part element information item using the element attribute information item. The QName is constructed from the targetNamespace of the schema and the content of the name attribute of the element element information item. An element attribute information item may not be used to refer to an xsd:simpleType or xsd:complexType element information item. 3.2 Using Other Schema Languages [title change: describe as schema language rather than type system] [Replace current para; note that much language is preserved with slight mods] Since it is unreasonable to expect that a single schema language can be used to describe all possible message parts and their constraints, WSDL allows alternate schema languages to be specified via extensibility elements. An extensibility element information item MAY appear under the types element information item to identify the schema language employed, and to locate the schema instance defining the grammar for message parts. Depending upon the schema language used, an element information item MAY be defined to allow embedding, if and only if the schema language can be expressed in XML. A specification of extension syntax for an alternative schema language MUST include an element information item definition, intended for inclusion in the Types Component, which references, names, and locates the schema instance (an "import" element information item). [the following material was developed in order to see if the above "works"] ANNEX: Non-Normative. Examples of Specifications of Extension Elements for Alternative Schema Language Support. Example 1: DTD -------------- A DTD may be used as the schema language for WSDL. It may not be embedded; it must be imported. A namespace must be assigned. DTD types may be referenced only by the element attribute information item; DTDs do not have a construct corresponding to the type attribute information item. The namespace for the required element information item is http://www.example.org/dtd/. The name of the required element information item is import. The common prefix, used throughout the following, is dtd. The dtd:import element information item references an external Document Type Definition, and has the following infoset properties: o A [local name] of import. o A [namespace name] of "http://www.example.org/dtd". o One or two attribute information items, as follows: o A namespace attribute information item as described below. o An optional location attribute information item as described below. namespace attribute information item The namespace attribute information item sets the namespace to be used with all imported element definitions described in the DTD. It has the following infoset properties: o A [local name] of namespace. o A [namespace name] that has no value. The type of the namespace attribute information item is xsd:anyURI. The WSDL author should ensure that a prefix is associated with the namespace at the proper scope (probably document scope). location attribute information item The location attribute information item, if present, provides a hint to the processor as to where the DTD may be located. Caching and cataloging technologies may provide better information than this hint. The location attribute information item has the following infoset properties: o A [local name] of location. o A [namespace name] that has no value. The type of the location attribute information item is xsd:anyURI. References to Element Definitions In referring to an element definition () from a message part, the type attribute information item may not be used. The element attribute information item must be used. Its value must correspond to the content of the namespace attribute information item of the dtd:import element information item. The local name part must correspond to an element defined in the DTD. Note that this pattern does not attempt to make DTDs namespace-aware. It applies namespaces externally, in the import phase. Example 2: RELAX NG ------------------- A RELAX NG schema may be used as the schema language for WSDL. It may be embedded or imported; import is preferred. A namespace must be specified; if an imported schema specifies one, then the namespace attribute in the import element must match. RELAX NG provides both type and element definitions. The following discussion supplies the prefix rng which is mapped to the URI http://www.relaxng.org/ns/structure/1.0". Importing RELAX NG [note: this version doesn't allow redefines; they're possible in a more sophisticated version; XSDL doesn't allow redefine in WSDL either, does it?] Importing a RELAX NG schema uses the rng:include mechanism defined by RNG, with restrictions on its syntax and semantics. A child element information item of the types element information item is defined with the Infoset properties as follows: o A [local name] of include. o A [namespace name] of "http://www.relaxng.org/ns/structure/1.0". o Two attribute information items as follows: o A ns attribute information item as described below. o A href attribute information item as described below. o Additional attribute information items as defined by the RNG specification. ns attribute information item The ns attribute information item defines the namespace of the type and element definitions imported from the referenced schema. If the referenced schema contains an ns attribute information item on its grammar element information item, then the values of these two attribute information items must be identical. If the imported grammar does not have an ns attribute, then the namespace specified here is applied to all components of the schema as if it did contain such an attribute. The ns attribute information item contains the following Infoset properties: o A [local name] of ns o A [namespace name] which has no value. The type of the ns attribute information item is xsd:anyURI. href attribute information item The href attribute information item must be present, according to the rules of the RNG specification. However, WSDL allows it to be empty, and considers it only a hint. Caching and cataloging technologies may provide better information that this hint. The href attribute information item has the following Infoset properties: o A [local name] of href. o A [namespace name] that has no value. The type of the href attribute information item is xsd:anyURI. Note that WSDL restricts the rng:include element to be empty. That is, it cannot redefine start and define element information items; it may be used solely to import a schema. Embedding RELAX NG Embedding an RNG schema uses the existing top-level rng:grammar element information item. It may be viewed as simply cutting and pasting an existing, stand-alone schema to a location inside the Types Component. The rng:grammar element information item has the following Infoset properties: o A [local name] of grammar. o A [namespace name] of "http://www.relaxng.org/ns/structure/1.0". o An ns attribute information items as described below. o Additional attribute information items as specified for the grammar element information item in the RNG specification. o Child element information items as specified for the grammar element information item in the RNG specification. ns attribute information item The ns attribute information item defines the namespace of the type and element definitions embedded in this schema. WSDL modifies the RNG definition of the grammar element information item to make this attribute information item required. The ns attribute information item has the following infoset properties: o A [local name] of ns. o A [namespace name] that has no value. The type of the ns attribute information item is xsd:anyURI. References to Type and Element Definitions Whether embedded or imported, the type and element definitions present in a schema may be referenced from a message part. A named rng:define definition may be referenced from the part element information item using the type attribute information item. The QName is constructed from the namespace (ns attribute information item) of the schema and the content of the name attribute of the define element information item. A type attribute information item may not be used to refer to an rng:element element information item. A named rng:element definition may be referenced from the part element information item using the element attribute information item. The QName is constructed from the namespace (ns attribute information item) of the schema and the content of the name attribute of the element element information item. An element attribute information item may not be used to refer to an rng:define element information item.