Class AttributeGroupReference

    • Constructor Detail

      • AttributeGroupReference

        public AttributeGroupReference​(EnterpriseConfiguration config,
                                       StructuredQName target)
        Creates a new AttributeGroup reference
        Parameters:
        config - the Configuration that this AttributeGroup belongs to.
        target - The name of the referenced attribute group (that is, the name contained in the 'ref' attribute)
    • Method Detail

      • isResolved

        public boolean isResolved()
        Determine whether this reference has been resolved
        Specified by:
        isResolved in interface ComponentReference
        Returns:
        true if the reference has been resolved to a schema component
      • isDangling

        public boolean isDangling()
        Ask whether this is known to be a dangling reference
        Specified by:
        isDangling in interface ComponentReference
        Returns:
        true if the target of this component reference is known to be absent, and if a warning has been issued to this effect
      • getSymbolSpace

        public int getSymbolSpace()
        Get the symbol space of the target of this reference
        Specified by:
        getSymbolSpace in interface ComponentReference
        Returns:
        an integer code identifying the symbol space
      • setTargetComponentName

        public void setTargetComponentName​(StructuredQName target)
        Set the fingerprint of the target of this reference
        Parameters:
        target - the name of the referenced attribute group
      • tryToResolve

        public void tryToResolve​(SchemaCompiler compiler,
                                 boolean fatal)
                          throws SchemaException
        Try to resolve the reference if possible, relative to components present in a given schema. If the reference cannot be resolved, the action depends on whether the compiler service allows dangling references to absent components. If it does, we try to patch the schema up with a dummy component (where possible). If not, the method throws an exception
        Specified by:
        tryToResolve in interface ComponentReference
        Parameters:
        compiler - The compiler being used to compile the referring component.
        fatal - true if a failure to resolve is to be treated as fatal
        Throws:
        SchemaException - if the reference cannot be resolved or repaired.
      • elaborate

        public void elaborate​(SchemaCompiler compiler)
        Elaborate the schema component: after reloading a serialized schema component model, this expands the component with derived information needed during validation episodes. The model is assumed to be valid.
        Specified by:
        elaborate in interface UserSchemaComponent
        Overrides:
        elaborate in class SchemaStructure
        Parameters:
        compiler - the schema compiler
      • getComponentAsFunction

        public FunctionItem getComponentAsFunction()
        Description copied from interface: SchemaComponent
        Get the schema component in the form of a function item. This allows schema information to be made visible to XSLT or XQuery code. The function makes available the contents of the schema component as defined in the XSD specification. The function takes a string as argument representing a property name, and returns the corresponding property of the schema component. There is also a property "class" which returns the kind of schema component, for example "Attribute Declaration".
        Specified by:
        getComponentAsFunction in interface SchemaComponent
        Overrides:
        getComponentAsFunction in class SchemaStructure
        Returns:
        the schema component represented as a function from property names to property values.