|
BEA Systems, Inc. | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object weblogic.apache.xerces.dom.DOMNormalizer
public class DOMNormalizer
This class adds implementation for normalizeDocument method. It acts as if the document was going through a save and load cycle, putting the document in a "normal" form. The actual result depends on the features being set and governing what operations actually take place. See setNormalizationFeature for details. Noticeably this method normalizes Text nodes, makes the document "namespace wellformed", according to the algorithm described below in pseudo code, by adding missing namespace declaration attributes and adding or changing namespace prefixes, updates the replacement tree of EntityReference nodes, normalizes attribute values, etc. Mutation events, when supported, are generated to reflect the changes occuring on the document. See Namespace normalization for details on how namespace declaration attributes and prefixes are normalized. NOTE: There is an initial support for DOM revalidation with XML Schema as a grammar. The tree might not be validated correctly if entityReferences, CDATA sections are present in the tree. The PSVI information is not exposed, normalized data (including element default content is not available). NOTE: the implementation is experimental and methods, functionality can be modified or removed in the future.
Nested Class Summary | |
---|---|
protected class |
DOMNormalizer.XMLAttributesProxy
Deprecated. |
Field Summary | |
---|---|
protected static boolean |
DEBUG
Deprecated. Debug namespace fix up algorithm |
protected static boolean |
DEBUG_ND
Deprecated. Debug normalize document |
protected static String |
ERROR_HANDLER
Deprecated. Property identifier: error handler. |
protected Vector |
fAttributeList
Deprecated. list of attributes |
protected DOMNormalizer.XMLAttributesProxy |
fAttrProxy
Deprecated. |
protected CoreDocumentImpl |
fDocument
Deprecated. |
protected DOMErrorImpl |
fDOMError
Deprecated. DOM Error object |
protected org.apache.xerces.dom3.DOMErrorHandler |
fErrorHandler
Deprecated. error handler |
protected Grammar[] |
fGrammarPool
Deprecated. |
protected NamespaceSupport |
fLocalNSBinder
Deprecated. stores all namespace bindings on the current element |
protected DOMLocatorImpl |
fLocator
Deprecated. DOM Locator - for namespace fixup algorithm |
protected NamespaceSupport |
fNamespaceBinder
Deprecated. stores namespaces in scope |
protected int |
fNamespaceCounter
Deprecated. |
protected boolean |
fNamespaceValidation
Deprecated. |
protected QName |
fQName
Deprecated. |
protected SymbolTable |
fSymbolTable
Deprecated. symbol table |
protected RevalidationHandler |
fValidationHandler
Deprecated. Validation handler represents validator instance. |
protected static String |
PREFIX
Deprecated. prefix added by namespace fixup algorithm should follow a pattern "NS" + index |
protected static String |
SYMBOL_TABLE
Deprecated. Property identifier: symbol table. |
Constructor Summary | |
---|---|
DOMNormalizer()
Deprecated. |
Method Summary | |
---|---|
protected void |
addNamespaceDecl(String prefix,
String uri,
ElementImpl element)
Deprecated. Adds a namespace attribute or replaces the value of existing namespace attribute with the given prefix and value for URI. |
void |
cacheGrammars(String grammarType,
Grammar[] grammars)
Deprecated. |
void |
clear()
Deprecated. |
protected void |
expandEntityRef(Node node,
Node parent,
Node reference)
Deprecated. |
void |
lockPool()
Deprecated. |
protected org.apache.xerces.dom3.DOMError |
modifyDOMError(String message,
short severity,
Node node)
Deprecated. |
protected void |
namespaceFixUp(ElementImpl element,
AttributeMap attributes)
Deprecated. |
protected void |
normalizeDocument(CoreDocumentImpl document)
Deprecated. Normalizes document. |
protected Node |
normalizeNode(Node node)
Deprecated. This method acts as if the document was going through a save and load cycle, putting the document in a "normal" form. |
protected boolean |
removeDefault(Attr attribute,
AttributeMap attrMap)
Deprecated. |
protected void |
reset(XMLComponentManager componentManager)
Deprecated. |
Grammar |
retrieveGrammar(XMLGrammarDescription desc)
Deprecated. |
Grammar[] |
retrieveInitialGrammarSet(String grammarType)
Deprecated. |
protected void |
setValidationHandler(RevalidationHandler validator)
Deprecated. |
void |
unlockPool()
Deprecated. |
protected void |
updateQName(Node node,
QName qname)
Deprecated. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final boolean DEBUG_ND
protected static final boolean DEBUG
protected static final String PREFIX
protected static final String ERROR_HANDLER
protected static final String SYMBOL_TABLE
protected CoreDocumentImpl fDocument
protected final DOMNormalizer.XMLAttributesProxy fAttrProxy
protected final QName fQName
protected RevalidationHandler fValidationHandler
protected SymbolTable fSymbolTable
protected org.apache.xerces.dom3.DOMErrorHandler fErrorHandler
protected int fNamespaceCounter
protected boolean fNamespaceValidation
protected final NamespaceSupport fNamespaceBinder
protected final NamespaceSupport fLocalNSBinder
protected final Vector fAttributeList
protected final DOMErrorImpl fDOMError
protected final DOMLocatorImpl fLocator
protected final Grammar[] fGrammarPool
Constructor Detail |
---|
public DOMNormalizer()
Method Detail |
---|
protected void reset(XMLComponentManager componentManager)
protected void setValidationHandler(RevalidationHandler validator)
protected void normalizeDocument(CoreDocumentImpl document)
protected Node normalizeNode(Node node)
node
- Modified node or null. If node is returned, we need
to normalize again starting on the node returned.
protected final void expandEntityRef(Node node, Node parent, Node reference)
protected final void namespaceFixUp(ElementImpl element, AttributeMap attributes)
protected final void addNamespaceDecl(String prefix, String uri, ElementImpl element)
prefix
- uri
-
IOException
protected final boolean removeDefault(Attr attribute, AttributeMap attrMap)
protected final org.apache.xerces.dom3.DOMError modifyDOMError(String message, short severity, Node node)
protected final void updateQName(Node node, QName qname)
public Grammar[] retrieveInitialGrammarSet(String grammarType)
retrieveInitialGrammarSet
in interface XMLGrammarPool
public void cacheGrammars(String grammarType, Grammar[] grammars)
cacheGrammars
in interface XMLGrammarPool
public Grammar retrieveGrammar(XMLGrammarDescription desc)
retrieveGrammar
in interface XMLGrammarPool
public void lockPool()
lockPool
in interface XMLGrammarPool
public void unlockPool()
unlockPool
in interface XMLGrammarPool
public void clear()
clear
in interface XMLGrammarPool
|
Documentation is available at http://download.oracle.com/docs/cd/E13222_01/wls/docs92 Copyright 2006 BEA Systems Inc. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |