Overview | Package | Class | Use | Tree | Deprecated | Index | Help
|  | BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## weblogic.apache.xerces.dom
Class DOMNormalizer

    java.lang.Object
      weblogic.apache.xerces.dom.DOMNormalizer

All Implemented Interfaces:
  XMLGrammarPool

Deprecated. please use JDK supplied XML parsers and transformers

    public class DOMNormalizer

extends Object
implements XMLGrammarPool

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

### DEBUG_ND

    protected static final boolean DEBUG_ND

  Deprecated.
  Debug normalize document

  See Also:
    Constant Field Values

### DEBUG

    protected static final boolean DEBUG

  Deprecated.
  Debug namespace fix up algorithm

  See Also:
    Constant Field Values

### PREFIX

    protected static final String PREFIX

  Deprecated.
  prefix added by namespace fixup algorithm should follow a pattern "NS" + index

  See Also:
    Constant Field Values

### ERROR_HANDLER

    protected static final String ERROR_HANDLER

  Deprecated.
  Property identifier: error handler.

  See Also:
    Constant Field Values

### SYMBOL_TABLE

    protected static final String SYMBOL_TABLE

  Deprecated.
  Property identifier: symbol table.

  See Also:
    Constant Field Values

### fDocument

    protected CoreDocumentImpl fDocument

  Deprecated.

### fAttrProxy

    protected final DOMNormalizer.XMLAttributesProxy fAttrProxy

  Deprecated.

### fQName

    protected final QName fQName

  Deprecated.

### fValidationHandler

    protected RevalidationHandler fValidationHandler

  Deprecated.
  Validation handler represents validator instance.

### fSymbolTable

    protected SymbolTable fSymbolTable

  Deprecated.
  symbol table

### fErrorHandler

    protected org.apache.xerces.dom3.DOMErrorHandler fErrorHandler

  Deprecated.
  error handler

### fNamespaceCounter

    protected int fNamespaceCounter

  Deprecated.

### fNamespaceValidation

    protected boolean fNamespaceValidation

  Deprecated.

### fNamespaceBinder

    protected final NamespaceSupport fNamespaceBinder

  Deprecated.
  stores namespaces in scope

### fLocalNSBinder

    protected final NamespaceSupport fLocalNSBinder

  Deprecated.
  stores all namespace bindings on the current element

### fAttributeList

    protected final Vector fAttributeList

  Deprecated.
  list of attributes

### fDOMError

    protected final DOMErrorImpl fDOMError

  Deprecated.
  DOM Error object

### fLocator

    protected final DOMLocatorImpl fLocator

  Deprecated.
  DOM Locator - for namespace fixup algorithm

### fGrammarPool

    protected final Grammar[] fGrammarPool

  Deprecated.

Constructor Detail

### DOMNormalizer

    public DOMNormalizer()

  Deprecated.

Method Detail

### reset

    protected void reset(XMLComponentManager componentManager)

  Deprecated.

### setValidationHandler

    protected void setValidationHandler(RevalidationHandler validator)

  Deprecated.

### normalizeDocument

    protected void normalizeDocument(CoreDocumentImpl document)

  Deprecated.
  Normalizes document. Note: reset() must be called before this method.

### normalizeNode

    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. 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.

  Parameters:
    `node` - Modified node or null. If node is returned, we need to normalize again starting on the node returned.
  Returns:

### expandEntityRef

    protected final void expandEntityRef(Node node,
                                         Node parent,
                                         Node reference)

  Deprecated.

### namespaceFixUp

    protected final void namespaceFixUp(ElementImpl element,
                                        AttributeMap attributes)

  Deprecated.

### addNamespaceDecl

    protected final 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. In case prefix is empty will add/update default namespace declaration.

  Parameters:
    `prefix` -
    `uri` -
  Throws:
    `IOException`

### removeDefault

    protected final boolean removeDefault(Attr attribute,
                                          AttributeMap attrMap)

  Deprecated.

### modifyDOMError

    protected final org.apache.xerces.dom3.DOMError modifyDOMError(String message,
                                                                   short severity,
                                                                   Node node)

  Deprecated.

### updateQName

    protected final void updateQName(Node node,
                                     QName qname)

  Deprecated.

### retrieveInitialGrammarSet

    public Grammar[] retrieveInitialGrammarSet(String grammarType)

  Deprecated.
  Specified by:
    `retrieveInitialGrammarSet` in interface `XMLGrammarPool`

### cacheGrammars

    public void cacheGrammars(String grammarType,
                              Grammar[] grammars)

  Deprecated.
  Specified by:
    `cacheGrammars` in interface `XMLGrammarPool`

### retrieveGrammar

    public Grammar retrieveGrammar(XMLGrammarDescription desc)

  Deprecated.
  Specified by:
    `retrieveGrammar` in interface `XMLGrammarPool`

### lockPool

    public void lockPool()

  Deprecated.
  Specified by:
    `lockPool` in interface `XMLGrammarPool`

### unlockPool

    public void unlockPool()

  Deprecated.
  Specified by:
    `unlockPool` in interface `XMLGrammarPool`

### clear

    public void clear()

  Deprecated.
  Specified by:
    `clear` in interface `XMLGrammarPool`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Documentation is available at http://e-docs.bea.com/wls/docs92 Copyright 2006 BEA Systems Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD