com.icl.saxon.expr
Class DummyStaticContext

java.lang.Object
  |
  +--com.icl.saxon.expr.DummyStaticContext
All Implemented Interfaces:
StaticContext

public class DummyStaticContext
extends java.lang.Object
implements StaticContext

A DummyStaticContext provides a minimal context for parsing an expression or pattern


Constructor Summary
DummyStaticContext()
           
 
Method Summary
 Binding bindVariable(int fingerprint)
          Bind a variable used in this element to the XSLVariable element in which it is declared
 boolean forwardsCompatibleModeIsEnabled()
          Determine whether forwards-compatible mode is enabled
 int getFingerprint(java.lang.String qname, boolean useDefault)
          Make a NameCode, using this Element as the context for namespace resolution
 int getLineNumber()
          Get the line number of the expression within that container Returns -1 if no line number is available
 Function getStyleSheetFunction(int fingerprint)
           
 java.lang.String getSystemId()
          Get the system id (URL) of the container of the expression
 java.lang.String getURIForPrefix(java.lang.String prefix)
          Get the URI for a prefix, using this Element as the context for namespace resolution
 boolean isElementAvailable(int fingerprint)
          Determine if an extension element is available
 boolean isExtensionNamespace(short uriCode)
          Determine whether a given URI identifies an extension element namespace
 int makeNameCode(java.lang.String qname, boolean useDefault)
          Make a NameCode, using this Element as the context for namespace resolution
 NamespaceTest makeNamespaceTest(short nodeType, java.lang.String prefix)
          Make a NamespaceTest, using this element as the context for namespace resolution
 NameTest makeNameTest(short nodeType, java.lang.String qname, boolean useDefault)
          Make a NameTest, using this element as the context for namespace resolution
 StaticContext makeRuntimeContext(NamePool pool)
          Copy the context with a different namepool
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DummyStaticContext

public DummyStaticContext()
Method Detail

makeRuntimeContext

public StaticContext makeRuntimeContext(NamePool pool)
Copy the context with a different namepool
Specified by:
makeRuntimeContext in interface StaticContext

getSystemId

public java.lang.String getSystemId()
Get the system id (URL) of the container of the expression
Specified by:
getSystemId in interface StaticContext

getLineNumber

public int getLineNumber()
Get the line number of the expression within that container Returns -1 if no line number is available
Specified by:
getLineNumber in interface StaticContext

getURIForPrefix

public java.lang.String getURIForPrefix(java.lang.String prefix)
                                 throws org.xml.sax.SAXException
Get the URI for a prefix, using this Element as the context for namespace resolution
Specified by:
getURIForPrefix in interface StaticContext
Parameters:
prefix - The prefix

makeNameCode

public final int makeNameCode(java.lang.String qname,
                              boolean useDefault)
                       throws org.xml.sax.SAXException
Make a NameCode, using this Element as the context for namespace resolution
Specified by:
makeNameCode in interface StaticContext
Parameters:
qname - The name as written, in the form "[prefix:]localname"

getFingerprint

public final int getFingerprint(java.lang.String qname,
                                boolean useDefault)
                         throws org.xml.sax.SAXException
Make a NameCode, using this Element as the context for namespace resolution
Specified by:
getFingerprint in interface StaticContext
Parameters:
qname - The name as written, in the form "[prefix:]localname"

makeNameTest

public NameTest makeNameTest(short nodeType,
                             java.lang.String qname,
                             boolean useDefault)
                      throws org.xml.sax.SAXException
Make a NameTest, using this element as the context for namespace resolution
Specified by:
makeNameTest in interface StaticContext

makeNamespaceTest

public NamespaceTest makeNamespaceTest(short nodeType,
                                       java.lang.String prefix)
                                throws org.xml.sax.SAXException
Make a NamespaceTest, using this element as the context for namespace resolution
Specified by:
makeNamespaceTest in interface StaticContext

bindVariable

public Binding bindVariable(int fingerprint)
                     throws org.xml.sax.SAXException
Bind a variable used in this element to the XSLVariable element in which it is declared
Specified by:
bindVariable in interface StaticContext
Following copied from interface: com.icl.saxon.expr.StaticContext
Parameters:
fingerprint - The fingerprint of the variable name
Returns:
a Binding object that can be used to identify it in the Bindery
Throws:
org.xml.sax.SAXException - if the variable has not been declared, or if the context does not allow the use of variables

isExtensionNamespace

public boolean isExtensionNamespace(short uriCode)
Determine whether a given URI identifies an extension element namespace
Specified by:
isExtensionNamespace in interface StaticContext

forwardsCompatibleModeIsEnabled

public boolean forwardsCompatibleModeIsEnabled()
Determine whether forwards-compatible mode is enabled
Specified by:
forwardsCompatibleModeIsEnabled in interface StaticContext

getStyleSheetFunction

public Function getStyleSheetFunction(int fingerprint)
                               throws org.xml.sax.SAXException
Specified by:
getStyleSheetFunction in interface StaticContext

isElementAvailable

public boolean isElementAvailable(int fingerprint)
                           throws org.xml.sax.SAXException
Determine if an extension element is available
Specified by:
isElementAvailable in interface StaticContext