org.apache.ws.jaxme.xs.xml

Interface XsESchema

public interface XsESchema extends XsTOpenAttrs, XsSchemaHeader

Implementation of xs:schema. Follows this specification:

  <xs:element name="schema" id="schema">
    <xs:annotation>
      <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-schema"/>
    </xs:annotation>
    <xs:complexType>
      <xs:complexContent>
        <xs:extension base="xs:openAttrs">
          <xs:sequence>
            <xs:choice minOccurs="0" maxOccurs="unbounded">
              <xs:element ref="xs:include"/>
              <xs:element ref="xs:import"/>
              <xs:element ref="xs:redefine"/>
              <xs:element ref="xs:annotation"/>
            </xs:choice>
            <xs:sequence minOccurs="0" maxOccurs="unbounded">
              <xs:group ref="xs:schemaTop"/>
              <xs:element ref="xs:annotation" minOccurs="0" maxOccurs="unbounded"/>
            </xs:sequence>
          </xs:sequence>
          <xs:attribute name="targetNamespace" type="xs:anyURI"/>
          <xs:attribute name="version" type="xs:token"/>
          <xs:attribute name="finalDefault" type="xs:derivationSet" use="optional" default=""/>
          <xs:attribute name="blockDefault" type="xs:blockSet" use="optional" default=""/>
          <xs:attribute name="attributeFormDefault" type="xs:formChoice" use="optional" default="unqualified"/>
          <xs:attribute name="elementFormDefault" type="xs:formChoice" use="optional" default="unqualified"/>
          <xs:attribute name="id" type="xs:ID"/>
          <xs:attribute ref="xml:lang"/>
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>

    <xs:key name="element">
      <xs:selector xpath="xs:element"/>
      <xs:field xpath="@name"/>
    </xs:key>
    <xs:key name="attribute">
      <xs:selector xpath="xs:attribute"/>
      <xs:field xpath="@name"/>
    </xs:key>
    <xs:key name="type">
      <xs:selector xpath="xs:complexType|xs:simpleType"/>
      <xs:field xpath="@name"/>
    </xs:key>
    <xs:key name="group">
      <xs:selector xpath="xs:group"/>
      <xs:field xpath="@name"/>
    </xs:key>
    <xs:key name="attributeGroup">
      <xs:selector xpath="xs:attributeGroup"/>
      <xs:field xpath="@name"/>
    </xs:key>
    <xs:key name="notation">
      <xs:selector xpath="xs:notation"/>
      <xs:field xpath="@name"/>
    </xs:key>
    <xs:key name="identityConstraint">
      <xs:selector xpath=".//xs:key|.//xs:unique|.//xs:keyref"/>
      <xs:field xpath="@name"/>
    </xs:key>
  </xs:element>

  <xs:group name="schemaTop">
    <xs:annotation>
      <xs:documentation>
        This group is for the
        elements which occur freely at the top level of schemas.
        All of their types are based on the "annotated" type by extension.
      </xs:documentation>
    </xs:annotation>
    <xs:choice>
      <xs:group ref="xs:redefinable"/>
      <xs:element ref="xs:element"/>
      <xs:element ref="xs:attribute"/>
      <xs:element ref="xs:notation"/>
    </xs:choice>
  </xs:group>
 

Author: Jochen Wiedmann

Method Summary
XsEAnnotationcreateAnnotation()
XsTAttributecreateAttribute()
XsTAttributeGroupcreateAttributeGroup()
XsTComplexTypecreateComplexType()
XsTTopLevelElementcreateElement()
XsTNamedGroupcreateGroup()
XsEImportcreateImport()
XsEIncludecreateInclude()
XsENotationcreateNotation()
XsERedefinecreateRedefine()
XsETopLevelSimpleTypecreateSimpleType()
Object[]getChilds()

Returns the schema's childs.

XSContextgetContext()

Returns the schema context.

voidsetAttributeFormDefault(XsFormChoice pChoice)
voidsetBlockDefault(XsBlockSet pSet)
voidsetElementFormDefault(XsFormChoice pChoice)
voidsetFinalDefault(XsDerivationSet pSet)
voidsetId(XsID pId)
voidsetTargetNamespace(XsAnyURI pAnyURI)
voidsetVersion(XsToken pToken)

Method Detail

createAnnotation

public XsEAnnotation createAnnotation()

createAttribute

public XsTAttribute createAttribute()

createAttributeGroup

public XsTAttributeGroup createAttributeGroup()

createComplexType

public XsTComplexType createComplexType()

createElement

public XsTTopLevelElement createElement()

createGroup

public XsTNamedGroup createGroup()

createImport

public XsEImport createImport()

createInclude

public XsEInclude createInclude()

createNotation

public XsENotation createNotation()

createRedefine

public XsERedefine createRedefine()

createSimpleType

public XsETopLevelSimpleType createSimpleType()

getChilds

public Object[] getChilds()

Returns the schema's childs. These are instances of {@link XsEInclude}, {@link XsEImport}, {@link XsERedefine}, {@link XsEAnnotation}, {@link XsETopLevelSimpleType}, {@link XsTComplexType}, {@link XsTGroup}, {@link XsTAttributeGroup}, {@link XsTTopLevelElement}, or {@link XsENotation}, in the order of the document. This order is the same order than by invocation of the corresponding {@link #createInclude()}, {@link #createImport()}, ... method calls.

Be aware, that a subclass of XsESchema may very well include other objects.

getContext

public XSContext getContext()

Returns the schema context.

setAttributeFormDefault

public void setAttributeFormDefault(XsFormChoice pChoice)

setBlockDefault

public void setBlockDefault(XsBlockSet pSet)

setElementFormDefault

public void setElementFormDefault(XsFormChoice pChoice)

setFinalDefault

public void setFinalDefault(XsDerivationSet pSet)

setId

public void setId(XsID pId)

setTargetNamespace

public void setTargetNamespace(XsAnyURI pAnyURI)

setVersion

public void setVersion(XsToken pToken)