Class XmlSchemaCatalog

java.lang.Object
org.rumbledb.xml.schema.XmlSchemaCatalog

public final class XmlSchemaCatalog extends Object
Wrapper around Xerces’s model It can find schema type definitions and map them to RumbleDB ItemTypes or typed values.
  • Method Details

    • getTypeDefinition

      public Optional<org.apache.xerces.xs.XSTypeDefinition> getTypeDefinition(@NonNull @NonNull Name name)
    • getSchemaElementTest

      public SchemaElementNodeItemType getSchemaElementTest(Name name, ExceptionMetadata metadata)
      Resolves a global declaration and the substitutions allowed by its blocking constraints.
    • getSchemaAttributeTest

      public AttributeNodeItemType getSchemaAttributeTest(Name name, ExceptionMetadata metadata)
      Attribute declaration tests have the same matching rules as a named, typed attribute test.
    • containsNamespace

      public boolean containsNamespace(String namespace)
    • getTypeHierarchy

      public List<Name> getTypeHierarchy(@NonNull @NonNull Name name, @NonNull @NonNull ExceptionMetadata metadata)
      Returns the named schema type followed by its base-type chain.
    • isSchemaCastTarget

      public boolean isSchemaCastTarget(Name name)
      Whether the schema caster handles this target (imported simple types and built-in lists).
    • getSimpleTypeCastResultType

      public SequenceType getSimpleTypeCastResultType(Name name)
      Returns the XDM sequence type produced by a schema cast. XML Schema list types are cast targets, not XDM item types, so their item type and cardinality describe the list's typed-value sequence.
    • castSimpleType

      public List<Item> castSimpleType(Name name, Item item, NamespaceBindingUtils.NamespaceResolver namespaceResolver, ExceptionMetadata metadata)
      Casts one atomized value with the matching definition from this catalog.
    • getNamedGeneralizedAtomicItemTypes

      public List<ItemType> getNamedGeneralizedAtomicItemTypes()