public final class AttributeGroupReference extends SchemaStructure implements ComponentReference
Constructor and Description |
---|
AttributeGroupReference(EnterpriseConfiguration config,
StructuredQName target)
Creates a new AttributeGroup reference
|
Modifier and Type | Method and Description |
---|---|
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.
|
boolean |
fixup(SchemaCompiler compiler)
Fix up references to other elements in the schema.
|
AttributeWildcard |
getAttributeWildcard(SchemaCompiler compiler)
Returns the attribute wildcard in the referenced attribute group, if any.
|
protected AttributeWildcard |
getAttributeWildcard(SchemaCompiler compiler,
java.util.Stack<AttributeGroupDecl> stack) |
int |
getSymbolSpace()
Get the symbol space of the target of this reference
|
SchemaComponent |
getTarget()
Resolves the attribute group reference
Note this method doesn't bind irrevocably to the target attribute group declaration,
because this may change following a redefine.
|
StructuredQName |
getTargetComponentName()
Get the name of the target of this reference
|
boolean |
isDangling()
Ask whether this is known to be a dangling reference
|
boolean |
isResolved()
Determine whether this reference has been resolved
|
void |
lookForCycles(java.util.Stack references,
SchemaCompiler compiler)
Check for cycles in the attribute group.
|
void |
setTargetComponentName(StructuredQName target)
Set the fingerprint of the target of this reference
|
void |
tryToResolve(SchemaCompiler compiler)
Attempt to resolve this reference using the groups defined in a given schema.
|
boolean |
validate(SchemaCompiler compiler)
Checks the validity of this Schema component.
|
getColumnNumber, getConfiguration, getFixupStatus, getGeneratedId, getLineNumber, getPublicId, getRedefinitionLevel, getSchemaDocumentURI, getSystemId, getValidationStatus, hasSameLocation, makeXPathExpressionPropertyRecord, saveLocation, setConfiguration, setFixupStatus, setGeneratedId, setLineNumber, setLocator, setRedefinitionLevel, setSchemaDocumentURI, setSystemId, setValidationStatus
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getConfiguration
getColumnNumber, getLineNumber, getPublicId, getSystemId, saveLocation
public AttributeGroupReference(EnterpriseConfiguration config, StructuredQName target)
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)public boolean isResolved()
isResolved
in interface ComponentReference
public boolean isDangling()
isDangling
in interface ComponentReference
public int getSymbolSpace()
getSymbolSpace
in interface ComponentReference
public void setTargetComponentName(StructuredQName target)
target
- the the name of the referenced attribute grouppublic StructuredQName getTargetComponentName()
getTargetComponentName
in interface ComponentReference
public AttributeWildcard getAttributeWildcard(SchemaCompiler compiler) throws MissingComponentException
compiler
- May be null if used at validation time.MissingComponentException
- if the reference to the attribute group
declaration cannot be resolvedprotected AttributeWildcard getAttributeWildcard(SchemaCompiler compiler, java.util.Stack<AttributeGroupDecl> stack) throws MissingComponentException
MissingComponentException
public boolean fixup(SchemaCompiler compiler) throws SchemaException
fixup
in class SchemaStructure
compiler
- the schema compilerSchemaException
- if a fatal error occurspublic boolean validate(SchemaCompiler compiler) throws SchemaException
compiler
- the schema compilerSchemaException
public void lookForCycles(java.util.Stack references, SchemaCompiler compiler) throws SchemaException
lookForCycles
in class SchemaStructure
references
- A list of attribute groups that reference this one,
directly or indirectly.compiler
- the schema compilerSchemaException
- if a circularity is detected.public void tryToResolve(SchemaCompiler compiler)
tryToResolve
in interface ComponentReference
compiler
- The compiler being used to compile the referring component.
This is assumed to know about the schema containing the candidate target components for the reference. If
null, the schema containing the reference is used.public SchemaComponent getTarget() throws MissingComponentException
getTarget
in interface ComponentReference
MissingComponentException
- if the reference has not been resolved.public void elaborate(SchemaCompiler compiler) throws SchemaException
elaborate
in class SchemaStructure
compiler
- the schema compilerSchemaException
Copyright (c) 2004-2018 Saxonica Limited. All rights reserved.