Class XSDElement

All Implemented Interfaces:
Source, SourceLocator, ActiveSource, GroundedValue, Item, MutableNodeInfo, NamespaceResolver, NodeInfo, Sequence, Location, SteppingNode, SiblingCountingNode, Locator

public class XSDElement extends SchemaElement
An xs:element element in a schema document
  • Constructor Details

    • XSDElement

      public XSDElement()
      Creates a new XSDElement element
  • Method Details

    • prepareAttributes

      protected void prepareAttributes() throws SchemaException
      Validate and process the attributes on this element in the schema document
      Specified by:
      prepareAttributes in class SchemaElement
      Throws:
      SchemaException - if any errors are found in the attributes
    • getElementDeclaration

      public ElementDecl getElementDeclaration()
      Return the element declaration schema component corresponding to this xs:element element
      Returns:
      the schema component representing the element declaration
    • getElementParticle

      public ElementParticle getElementParticle()
      Return the element particle schema component
      Returns:
      the schema component representing the element particle
    • validate

      public void validate(SchemaCompiler compiler) throws SchemaException
      Validate this schema element, checking all document-level constraints
      Overrides:
      validate in class SchemaElement
      Parameters:
      compiler - used for reporting errors
      Throws:
      SchemaException - if any XML representation constraints are violated
    • isFinalState

      protected boolean isFinalState(int state)
      Description copied from class: SchemaElement
      For elements whose content model is parsed using a finite state machine, test whether a given state is a final state. The default implementation of this method is never used; it exists for the benefit of subclasses that do not use this mechanism
      Overrides:
      isFinalState in class SchemaElement
      Parameters:
      state - the state to be tested
      Returns:
      true if the given state is a final state
    • postValidate

      public void postValidate(SchemaCompiler compiler) throws SchemaException
      Additional processing after all the children of this element have been validated.
      Overrides:
      postValidate in class SchemaElement
      Parameters:
      compiler - used primarily for reporting errors
      Throws:
      SchemaException - if errors are found