org.apache.xerces.impl.xs

Class SchemaNamespaceSupport

Implemented Interfaces:
org.apache.xerces.xni.NamespaceContext

public class SchemaNamespaceSupport
extends NamespaceSupport

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.
Version:
$Id: SchemaNamespaceSupport.java 320573 2005-09-08 01:48:39Z mrglavas $
Author:
Neil Graham, IBM

Nested Class Summary

Nested classes/interfaces inherited from class org.apache.xerces.util.NamespaceSupport

NamespaceSupport.Prefixes

Field Summary

Fields inherited from class org.apache.xerces.util.NamespaceSupport

fContext, fCurrentContext, fNamespace, fNamespaceSize, fPrefixes

Fields inherited from interface org.apache.xerces.xni.NamespaceContext

XMLNS_URI, XML_URI

Constructor Summary

SchemaNamespaceSupport(SchemaNamespaceSupport nSupport)
SchemaNamespaceSupport(org.w3c.dom.Element schemaRoot, SymbolTable symbolTable)

Method Summary

String[]
getEffectiveLocalContext()
This method returns an array of Strings, as would be stored in a NamespaceSupport object.
String
getURI(String prefix)
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.

Methods inherited from class org.apache.xerces.util.NamespaceSupport

containsPrefix, declarePrefix, getAllPrefixes, getDeclaredPrefixAt, getDeclaredPrefixCount, getPrefix, getURI, popContext, pushContext, reset

Constructor Details

SchemaNamespaceSupport

public SchemaNamespaceSupport(SchemaNamespaceSupport nSupport)

SchemaNamespaceSupport

public SchemaNamespaceSupport(org.w3c.dom.Element schemaRoot,
                              SymbolTable symbolTable)

Method Details

getEffectiveLocalContext

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.

getURI

public String getURI(String prefix)
Specified by:
getURI in interface org.apache.xerces.xni.NamespaceContext
Overrides:
getURI in interface NamespaceSupport

makeGlobal

public void makeGlobal()

setEffectiveContext

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.

Copyright B) 1999-2006 The Apache Software Foundation. All Rights Reserved.