org.apache.jackrabbit.commons.xml
Class XmlnsContentHandler
java.lang.Object
org.xml.sax.helpers.DefaultHandler
org.apache.jackrabbit.commons.xml.ProxyContentHandler
org.apache.jackrabbit.commons.xml.XmlnsContentHandler
- All Implemented Interfaces:
- ContentHandler, DTDHandler, EntityResolver, ErrorHandler
public class XmlnsContentHandler
- extends ProxyContentHandler
Content handler proxy that adds explicit "xmlns" attributes for all
namespace mappings introduced through
startPrefixMapping(String, String)
calls.
Method Summary |
void |
startElement(String namespaceURI,
String localName,
String qName,
Attributes atts)
Adds the recorded namespace mappings (if any) as "xmlns" attributes
before passing the call on to the proxied content handler. |
void |
startPrefixMapping(String prefix,
String uri)
Records the namespace mapping and passes the call to the proxied
content handler. |
XmlnsContentHandler
public XmlnsContentHandler(ContentHandler handler)
startPrefixMapping
public void startPrefixMapping(String prefix,
String uri)
throws SAXException
- Records the namespace mapping and passes the call to the proxied
content handler.
- Specified by:
startPrefixMapping
in interface ContentHandler
- Overrides:
startPrefixMapping
in class ProxyContentHandler
- Parameters:
prefix
- passed throughuri
- passed through
- Throws:
SAXException
- if an error occurs
startElement
public void startElement(String namespaceURI,
String localName,
String qName,
Attributes atts)
throws SAXException
- Adds the recorded namespace mappings (if any) as "xmlns" attributes
before passing the call on to the proxied content handler.
- Specified by:
startElement
in interface ContentHandler
- Overrides:
startElement
in class ProxyContentHandler
- Parameters:
namespaceURI
- passed throughlocalName
- passed throughqName
- passed throughatts
- passed through
- Throws:
SAXException
- if an error occurs
Copyright © 2004-2009 The Apache Software Foundation. All Rights Reserved.