public final class AttributeGroupReference extends SchemaStructure implements ComponentReference
Constructor and Description |
---|
AttributeGroupReference(EnterpriseConfiguration config,
int fingerprint)
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,
Stack<AttributeGroupDecl> stack) |
int |
getFingerprint()
Get the fingerprint of the target of this reference
|
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.
|
boolean |
isResolved()
Determine whether this reference has been resolved
|
void |
lookForCycles(Stack references,
SchemaCompiler compiler)
Check for cycles in the attribute group.
|
void |
setFingerprint(int fingerprint)
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, getLineNumber, getPublicId, getRedefinitionLevel, getSchemaDocumentURI, getSystemId, getValidationStatus, makeXPathExpressionPropertyRecord, setConfiguration, setFixupStatus, setLineNumber, setLocator, setRedefinitionLevel, setSchemaDocumentURI, setSystemId, setValidationStatus
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getConfiguration
getColumnNumber, getLineNumber, getPublicId, getSystemId
public AttributeGroupReference(EnterpriseConfiguration config, int fingerprint)
config
- the Configuration that this AttributeGroup belongs to.fingerprint
- The NamePool fingerprint of the name of the
attribute group (that is, the name contained in the 'ref' attribute)public boolean isResolved()
isResolved
in interface ComponentReference
public int getSymbolSpace()
getSymbolSpace
in interface ComponentReference
public void setFingerprint(int fingerprint)
fingerprint
- the integer code of the name of the attribute grouppublic int getFingerprint()
getFingerprint
in interface ComponentReference
public AttributeWildcard getAttributeWildcard(SchemaCompiler compiler) throws UnresolvedReferenceException
compiler
- May be null if used at validation time.UnresolvedReferenceException
- if the reference to the attribute group
declaration cannot be resolvedprotected AttributeWildcard getAttributeWildcard(SchemaCompiler compiler, Stack<AttributeGroupDecl> stack) throws UnresolvedReferenceException
UnresolvedReferenceException
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(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()
getTarget
in interface ComponentReference
UnresolvedReferenceException
- if the reference has not been resolved. Note that
this is an unchecked exception.public void elaborate(SchemaCompiler compiler) throws SchemaException
elaborate
in class SchemaStructure
compiler
- the schema compilerSchemaException
Copyright (c) 2004-2013 Saxonica Limited. All rights reserved.