Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

oracle.cabo.share.xml
Interface ParserExtension

All Known Implementing Classes:
BaseParserExtension

public interface ParserExtension

The ParserExtension interface allows developers to extend node parsing remotely developed by adding new attributes or child elements. Clients can register one global ParserExtension per namespace. (We might restrict this to one ParserExtension per object Class, but this would require NodeParser API changes.)


Method Summary
 java.lang.Object elementEnded(ParseContext context, java.lang.String namespaceURI, java.lang.String localName, java.lang.Object parsed, java.util.Dictionary values)
          Called after parsing of the parent element has completed with extension values still to be processed.
 void elementStarted(ParseContext context, java.lang.String namespaceURI, java.lang.String localName, java.util.Dictionary attributes)
          Called before parsing of the parent element has started.
 NodeParser startExtensionElement(ParseContext context, java.lang.String namespaceURI, java.lang.String localName, org.xml.sax.Attributes attrs)
          Called to notify that a child element has been found that was not handled by the outer parser.
 

Method Detail

elementStarted

public void elementStarted(ParseContext context,
                           java.lang.String namespaceURI,
                           java.lang.String localName,
                           java.util.Dictionary attributes)
                    throws org.xml.sax.SAXParseException
Called before parsing of the parent element has started.

Parameters:
context - the parsing context
namespaceURI - the namespace of the element being processed
localName - the local name of the element
attributes - a Dictionary of all the attributes in the namespace of this extension. This dictionary does not include values handled by extension NodeParsers.

startExtensionElement

public NodeParser startExtensionElement(ParseContext context,
                                        java.lang.String namespaceURI,
                                        java.lang.String localName,
                                        org.xml.sax.Attributes attrs)
                                 throws org.xml.sax.SAXParseException
Called to notify that a child element has been found that was not handled by the outer parser. If a NodeParser is returned here, it will be used for handling that child element. The value that NodeParser returns will be stored in the Dictionary eventually passed to elementEnded() - the key used is the local name of the element.

Parameters:
context - the parsing context
namespaceURI - the namespace of the child element
localName - the local name of the element
attrs - the attributes attached to the element.
Returns:
a node parser if one should be used, or null otherwise

elementEnded

public java.lang.Object elementEnded(ParseContext context,
                                     java.lang.String namespaceURI,
                                     java.lang.String localName,
                                     java.lang.Object parsed,
                                     java.util.Dictionary values)
                              throws org.xml.sax.SAXParseException
Called after parsing of the parent element has completed with extension values still to be processed.

Parameters:
context - the parsing context
namespaceURI - the namespace of the element being processed
localName - the local name of the element
parsed - the object instantiated for the element
values - a Dictionary of all the attributes in the namespace of this extension, plus values returned by child elements.

Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

Copyright © 2002,2003, Oracle. All Rights Reserved.