com.saxonica.schema
Interface ComponentReference

All Superinterfaces:
SourceLocator
All Known Implementing Classes:
AttributeGroupReference, AttributeUse, ElementParticle, ElementWildcard, KeyRef, ModelGroupParticle, Particle, SimpleComponentReference, TypeReference

public interface ComponentReference
extends SourceLocator

A reference to a schema component. The reference may have been resolved to a specific component, or may be as yet unresolved. Any attempt to use a reference that has not yet been resolved causes an unchecked exception.


Method Summary
 SchemaAwareConfiguration getConfiguration()
          Determine the configuration containing this reference (and its target)
 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()
          Get the schema component identified by this reference.
 boolean isResolved()
          Determine whether this reference has been resolved
 void tryToResolve(SchemaCompiler compiler)
          Try to resolve the reference if possible, relative to components present in a given schema.
 
Methods inherited from interface javax.xml.transform.SourceLocator
getColumnNumber, getLineNumber, getPublicId, getSystemId
 

Method Detail

getConfiguration

SchemaAwareConfiguration getConfiguration()
Determine the configuration containing this reference (and its target)


tryToResolve

void tryToResolve(SchemaCompiler compiler)
Try to resolve the reference if possible, relative to components present in a given schema. No error occurs if the reference cannot yet be resolved.

Parameters:
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.

isResolved

boolean isResolved()
Determine whether this reference has been resolved


getTarget

SchemaComponent getTarget()
                          throws UnresolvedReferenceException
Get the schema component identified by this reference.

Returns:
the schema component if the reference has been resolved.
Throws:
UnresolvedReferenceException - if the reference has not been resolved. Note that this is an unchecked exception.

getFingerprint

int getFingerprint()
Get the fingerprint of the target of this reference


getSymbolSpace

int getSymbolSpace()
Get the symbol space of the target of this reference



Copyright (C) Michael H. Kay. All rights reserved.