Class XSDFacet

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

public class XSDFacet extends AnnotationParent
An element in an XML Schema document representing a facet, for example minLength or pattern or enumeration: any facet except assertion, which is represented by the XSDAssert class
  • Constructor Details

    • XSDFacet

      public XSDFacet()
      Creates a new Facet 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
    • validate

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

      public Facet getFacet()
      Get the Facet "component" created from this facet definition
      Returns:
      the Facet component (not strictly a schema component, but effectively part of one)