Top Description Inners Fields Constructors Methods
org.apache.xerces.impl.xs

public Class SchemaNamespaceSupport

extends NamespaceSupport
Class Inheritance
Imports
org.apache.xerces.impl.xs.opti.ElementImpl, org.apache.xerces.util.NamespaceSupport, .SymbolTable, .XMLSymbols, org.apache.xerces.xni.NamespaceContext, .QName, org.w3c.dom.Attr, .Document, .Element, .NamedNodeMap, .Node

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.
Author
Neil Graham, IBM
Version
$Id: SchemaNamespaceSupport.java 446734 2006-09-15 20:51:23Z mrglavas $

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
SchemaNamespaceSupport.SchemaRootContext

This class keeps track of the namespace bindings declared on ancestors of the schema root.

Field Summary

Modifier and TypeField and Description
private SchemaNamespaceSupport.SchemaRootContext
Inherited from org.apache.xerces.util.NamespaceSupport:
fContextfCurrentContextfNamespacefNamespaceSizefPrefixes

Constructor Summary

AccessConstructor and Description
public
SchemaNamespaceSupport(Element schemaRoot, SymbolTable symbolTable)

public

Method Summary

Modifier and TypeMethod and Description
public String[]
getEffectiveLocalContext()

This method returns an array of Strings, as would be stored in a NamespaceSupport object.

public String
getURI(String
The prefix to look up.
prefix
)

Overrides org.apache.xerces.util.NamespaceSupport.getURI.

Implements org.apache.xerces.xni.NamespaceContext.getURI.

Look up a prefix and get the currently-mapped Namespace URI.
public void
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.

Inherited from org.apache.xerces.util.NamespaceSupport:
containsPrefixdeclarePrefixgetAllPrefixesgetDeclaredPrefixAtgetDeclaredPrefixCountgetPrefixpopContextpushContextreset

Field Detail

fSchemaRootContextback to summary
private SchemaNamespaceSupport.SchemaRootContext fSchemaRootContext

Constructor Detail

SchemaNamespaceSupportback to summary
public SchemaNamespaceSupport(Element schemaRoot, SymbolTable symbolTable)
SchemaNamespaceSupportback to summary
public SchemaNamespaceSupport(SchemaNamespaceSupport nSupport)

Method Detail

getEffectiveLocalContextback to summary
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.

getURIback to summary
public String getURI(String prefix)

Overrides org.apache.xerces.util.NamespaceSupport.getURI.

Implements org.apache.xerces.xni.NamespaceContext.getURI.

Doc from org.apache.xerces.xni.NamespaceContext.getURI.

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:String

The prefix to look up.

Returns:String

The associated Namespace URI, or null if the prefix is undeclared in this context.

makeGlobalback to summary
public void makeGlobal()
setEffectiveContextback to summary
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.

org.apache.xerces.impl.xs back to summary

pack-priv final Class SchemaNamespaceSupport.SchemaRootContext

extends Object
Class Inheritance
  • java.lang.Object
  • org.apache.xerces.impl.xs.SchemaNamespaceSupport.SchemaRootContext

This class keeps track of the namespace bindings declared on ancestors of the schema root.

Field Summary

Modifier and TypeField and Description
private final QName
fAttributeQName

Temporary storage for attribute QNames.

pack-priv boolean
fDOMContextBuilt

Flag indicating whether the namespace context has been from the root node's ancestors.

pack-priv String[]
fNamespace

Namespace binding information.

pack-priv int
fNamespaceSize

The size of the namespace information array.

private final Element
fSchemaRoot

Schema root.

private final SymbolTable
fSymbolTable

Symbol table.

Constructor Summary

AccessConstructor and Description
pack-priv
SchemaRootContext(Element schemaRoot, SymbolTable symbolTable)

Method Summary

Modifier and TypeMethod and Description
private void
pack-priv void
private void
fillQName(QName toFill, Node node)

pack-priv String
getURI(String prefix)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

fAttributeQNameback to summary
private final QName fAttributeQName

Temporary storage for attribute QNames.

fDOMContextBuiltback to summary
pack-priv boolean fDOMContextBuilt

Flag indicating whether the namespace context has been from the root node's ancestors.

fNamespaceback to summary
pack-priv String[] fNamespace

Namespace binding information. This array is composed of a series of tuples containing the namespace binding information: <prefix, uri>.

fNamespaceSizeback to summary
pack-priv int fNamespaceSize

The size of the namespace information array.

fSchemaRootback to summary
private final Element fSchemaRoot

Schema root.

fSymbolTableback to summary
private final SymbolTable fSymbolTable

Symbol table.

Constructor Detail

SchemaRootContextback to summary
pack-priv SchemaRootContext(Element schemaRoot, SymbolTable symbolTable)

Method Detail

declarePrefixback to summary
private void declarePrefix(String prefix, String uri)
fillNamespaceContextback to summary
pack-priv void fillNamespaceContext()
fillQNameback to summary
private void fillQName(QName toFill, Node node)
getURIback to summary
pack-priv String getURI(String prefix)