### Saxon.Api

- BinaryResource
- CatalogCollection
- DirectoryCollection
- DocumentBuilder
- DomDestination
- DynamicContext
- DynamicError
- EmptyEnumerator<T>
- ErrorReporter
- ErrorReporterToStaticError
- ErrorReporterWrapper
- ExtensionFunction
- ExtensionFunctionCall
- ExtensionFunctionDefinition
- Feature<T>
- FeatureKeys
- HostLanguage
- ICollectionFinder
- IErrorReporter
- IInvalidityHandler
- IMessageListener
- IMessageListener2
- InvalidityHandlerWrapper
- IPredicate<in XdmItem>
- IQueryResolver
- IResource
- IResourceCollection
- IResourceFactory
- IResultDocumentHandler
- IXmlLocation
- JarCollection
- NamespaceConstant
- NullDestination
- Predicate<T>
- Predicates
- Processor
- QName
- RawDestination
- RecoveryPolicy
- Resource
- ResourceCollection
- SchemaManager
- SchemaResolver
- SchemaValidationMode
- SchemaValidator
- Serializer
- StandardCollectionFinder
- StandardLogger
- StaticContext
- StaticError
- Step<TInput, TResult>
- Steps
- TextWriterDestination
- TreeModel
- URIQueryParameters
- ValidationFailure
- WhitespacePolicy
- XdmAnyArrayType
- XdmAnyFunctionType
- XdmAnyItemType
- XdmAnyMapType
- XdmAnyNodeType
- XdmArray
- XdmAtomicType
- XdmAtomicValue
- XdmAxis
- XdmDestination
  - - TreeProtector
- XdmEmptySequence
- XdmExternalObjectValue
- XdmFunctionItem
- XdmItem
- XdmItemType
- XdmMap
- XdmNode
- XdmNodeKind
- XdmSequenceType
- XdmValue
- XmlDestination
- XmlProcessingError
- XmlResource
- XPathCompiler
- XPathExecutable
- XPathSelector
- XQueryCompiler
- XQueryEvaluator
- XQueryExecutable
- Xslt30Transformer
- XsltCompiler
- XsltExecutable
  - - ParameterDetails
- XsltPackage
- XsltTransformer

### Saxon.Api

# Class StaticContext

public class StaticContext

The class `StaticContext` provides information about the static context of an expression

### Property Summary
Uri | BaseUri The static base URI of the expression. Often the same as the URI of the containing module, but not necessarily so, for example in a stylesheet that uses external XML entities or the `xml:base` attribute
net.sf.saxon.expr.StaticContext | Implementation The underlying object in the Saxon implementation, an instance of class `net.sf.saxon.expr.StaticContext`
Uri | ModuleUri The URI of the module where an expression appears, suitable for use in diagnostics
Processor | Processor The `Processor` that was used to create the query or stylesheet from which this extension function was invoked.

### Method Summary
string | GetNamespaceForPrefix(string Prefix) Resolve an in-scope namespace prefix to obtain the corresponding namespace URI. If the prefix is a zero-length string, the default namespace for elements and types is returned.

## Property Detail

### BaseUri

public Uri BaseUri {get; }

The static base URI of the expression. Often the same as the URI of the containing module, but not necessarily so, for example in a stylesheet that uses external XML entities or the `xml:base` attribute

### Implementation

public net.sf.saxon.expr.StaticContext Implementation {get; }

The underlying object in the Saxon implementation, an instance of class `net.sf.saxon.expr.StaticContext`

This property provides access to internal methods in the Saxon engine that are not specifically exposed in the .NET API. In general these methods should be considered to be less stable than the classes in the Saxon.Api namespace.

The internal methods follow Java naming conventions rather than .NET conventions.

Information about the returned object (and the objects it provides access to) is included in the Saxon JavaDoc documentation, see net.sf.saxon.expr.StaticContext.

### ModuleUri

public Uri ModuleUri {get; }

The URI of the module where an expression appears, suitable for use in diagnostics

### Processor

public Processor Processor {get; }

The `Processor` that was used to create the query or stylesheet from which this extension function was invoked.

This property is useful if the extension function wishes to create new nodes (the `Processor` can be used to obtain a `DocumentBuilder`), or to execute XPath expressions or queries.

There may be circumstances in which the `Processor` is not available, in which case this method may return null, or may return a different `Processor`. This will happen only if low-level interfaces have been used to cause a `Configuration` to be shared between several `Processor` instances, or between a `Processor` and other applications.

## Method Detail

### GetNamespaceForPrefix

public string GetNamespaceForPrefix(string Prefix)

Resolve an in-scope namespace prefix to obtain the corresponding namespace URI. If the prefix is a zero-length string, the default namespace for elements and types is returned.

Parameters:

`Prefix` - The namespace prefix

Returns:

The corresponding namespace URI if there is one, or null otherwise