public class

SchemaNamespaceSupport

extends NamespaceSupport
java.lang.Object
   ↳ org.apache.xerces.util.NamespaceSupport
     ↳ org.apache.xerces.impl.xs.SchemaNamespaceSupport

Class Overview

This class customizes the behaviour of the util.NamespaceSupport class in order to easily implement some features that we need for efficient schema handling. It will not be generally useful.

Summary

[Expand]
Inherited Fields
From class org.apache.xerces.util.NamespaceSupport
From interface org.apache.xerces.xni.NamespaceContext
Public Constructors
SchemaNamespaceSupport(Element schemaRoot, SymbolTable symbolTable)
SchemaNamespaceSupport(SchemaNamespaceSupport nSupport)
Public Methods
String[] getEffectiveLocalContext()
This method returns an array of Strings, as would be stored in a NamespaceSupport object.
String getURI(String prefix)
Look up a prefix and get the currently-mapped Namespace URI.
void makeGlobal()
void setEffectiveContext(String[] namespaceDecls)
This method takes a set of Strings, as stored in a NamespaceSupport object, and "fools" the object into thinking that this is one unified context.
[Expand]
Inherited Methods
From class org.apache.xerces.util.NamespaceSupport
From class java.lang.Object
From interface org.apache.xerces.xni.NamespaceContext

Public Constructors

public SchemaNamespaceSupport (Element schemaRoot, SymbolTable symbolTable)

public SchemaNamespaceSupport (SchemaNamespaceSupport nSupport)

Public Methods

public String[] getEffectiveLocalContext ()

This method returns an array of Strings, as would be stored in a NamespaceSupport object. This array contains all declarations except those at the global level.

public String getURI (String prefix)

Look up a prefix and get the currently-mapped Namespace URI.

This method looks up the prefix in the current context. If no mapping is found, this methods will continue lookup in the parent context(s). Use the empty string ("") for the default Namespace.

Parameters
prefix The prefix to look up.
Returns
  • The associated Namespace URI, or null if the prefix is undeclared in this context.

public void makeGlobal ()

public void setEffectiveContext (String[] namespaceDecls)

This method takes a set of Strings, as stored in a NamespaceSupport object, and "fools" the object into thinking that this is one unified context. This is meant to be used in conjunction with things like local elements, whose declarations may be deeply nested but which for all practical purposes may be regarded as being one level below the global element--at least with regard to namespace declarations. It's worth noting that the context from which the strings are being imported had better be using the same SymbolTable.