Purpose: An implementation of XMLReader for parsing XMLFragment Nodes into SAX events.
Responsibilities:
| Modifier and Type | Field and Description |
|---|---|
| protected NamespaceResolver | |
| protected List | |
| protected Map |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected void | cleanupNamespaceResolvers(Element elem)
Remove any temporary namespace resolvers created while processing a given element. |
| protected void | endDocument()
Overrides org. |
| protected void | endPrefixMappings(Element elem)
Overrides org. |
| protected NamespaceResolver | Returns: the namespace resolver in the map for elem, or a new resolver if none existsReturns the namespace resolver in the map of temporary namespace resolvers for a given element |
| protected void | handleNewNamespaceDeclaration(Element elem, String prefix, String namespaceURI)
Overrides org. |
| protected void | handlePrefixedAttribute(Element elem)
Overrides org. |
| protected void | |
| public void | parse(Node node, String uri, String name)
Overrides org. |
| protected void | processParentNamespaces(Element element)
Overrides org. |
| protected void | |
| protected String | Returns: true if a URI exists in one of the resolvers in the list, false otherwiseConvenience method that iterates over each namespace resolver in the resolver list until it locates a uri for 'prefix' or the final resolver is reached w/o success. |
| protected void | startDocument()
Overrides org. |
| nsresolver | back to summary |
|---|---|
| protected NamespaceResolver nsresolver | |
| nsresolverList | back to summary |
|---|---|
| protected List<NamespaceResolver> nsresolverList | |
| tmpresolverMap | back to summary |
|---|---|
| protected Map<Element, NamespaceResolver> tmpresolverMap | |
| XMLFragmentReader | back to summary |
|---|---|
| public XMLFragmentReader(NamespaceResolver namespaceResolver) | |
| cleanupNamespaceResolvers | back to summary |
|---|---|
| protected void cleanupNamespaceResolvers(Element elem) Remove any temporary namespace resolvers created while processing a given element. | |
| endDocument | back to summary |
|---|---|
| protected void endDocument() throws SAXException Overrides org. Trigger an endDocument event on the contenthandler.
| |
| endPrefixMappings | back to summary |
|---|---|
| protected void endPrefixMappings(Element elem) throws SAXException Overrides org. If there is a temporary namespace resolver for a given element, each entry contains a prefix that requires an endPrefixMapping event to be triggered
| |
| getTempResolver | back to summary |
|---|---|
| protected NamespaceResolver getTempResolver(Element elem) Returns the namespace resolver in the map of temporary namespace resolvers for a given element
| |
| handleNewNamespaceDeclaration | back to summary |
|---|---|
| protected void handleNewNamespaceDeclaration(Element elem, String prefix, String namespaceURI) Overrides org.
| |
| handlePrefixedAttribute | back to summary |
|---|---|
| protected void handlePrefixedAttribute(Element elem) throws SAXException Overrides org. Handle prefixed attribute - may need to declare the namespace URI locally.
| |
| handleXsiTypeAttribute | back to summary |
|---|---|
| protected void handleXsiTypeAttribute(Attr attr) throws SAXException Overrides org.
| |
| parse | back to summary |
|---|---|
| public void parse(Node node, String uri, String name) throws SAXException Overrides org.
| |
| processParentNamespaces | back to summary |
|---|---|
| protected void processParentNamespaces(Element element) throws SAXException Overrides org. Process namespace declarations on parent elements if not the root. For each parent node from current to root place puch each onto a stack, then pop each off, calling startPrefixMapping for each XMLNS attribute. Using a stack ensures that the parent nodes are processed top down.
| |
| reportElementEvents | back to summary |
|---|---|
| protected void reportElementEvents(Element elem) throws SAXException Overrides org.
| |
| resolveNamespacePrefix | back to summary |
|---|---|
| protected String resolveNamespacePrefix(String prefix) Convenience method that iterates over each namespace resolver in the resolver list until it locates a uri for 'prefix' or the final resolver is reached w/o success.
| |
| startDocument | back to summary |
|---|---|
| protected void startDocument() throws SAXException Overrides org. Trigger a startDocument event on the contenthandler.
| |