Class XSDIdentityConstraint

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

public class XSDIdentityConstraint extends SchemaElement
An xs:unique, xs:key, or xs:keyref element in an XML Schema document
  • Constructor Details

    • XSDIdentityConstraint

      public XSDIdentityConstraint()
      Creates a new IdentityConstraint 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
    • isReference

      public boolean isReference()
      Ask whether this is a reference
      Returns:
      true if this is a reference (@ref attribute present)
    • getIdentityConstraint

      public IdentityConstraintReference getIdentityConstraint()
      Returns the IdentityConstraint created.
      Returns:
      the IdentityConstraint created (returns null if this is a reference)
    • validate

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

      public void postValidate(SchemaCompiler compiler) throws SchemaException
      Process the child elements after validation
      Overrides:
      postValidate in class SchemaElement
      Parameters:
      compiler - the schema compiler
      Throws:
      SchemaException - if errors are found