Class XSDAttribute

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

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

    • XSDAttribute

      public XSDAttribute()
      Create an XSDAttribute, representing an xs:attribute on the schema document tree
  • 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
    • getAttributeDeclaration

      public AttributeDecl getAttributeDeclaration()
      Get the attribute declaration. Returns null if this is simply a reference
      Returns:
      the attribute declaration, or null
    • getAttributeUse

      public AttributeUse getAttributeUse()
      Get the attribute use. Returns null if this is a global attribute declaration
      Returns:
      the attribute use, or null
    • 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 error messages
      Throws:
      SchemaException - if any XML representation constraints are violated
    • 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 - user for reporting error messages
      Throws:
      SchemaException - if errors are found