|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.felix.scrplugin.xml.IOUtils.NamespaceAsAttributes
public static class IOUtils.NamespaceAsAttributes
A pipe that ensures that all namespace prefixes are also present as 'xmlns:' attributes. This used to circumvent Xalan's serialization behaviour which is to ignore namespaces if they're not present as 'xmlns:xxx' attributes.
Constructor Summary | |
---|---|
IOUtils.NamespaceAsAttributes(ContentHandler ch)
|
Method Summary | |
---|---|
void |
characters(char[] ch,
int start,
int length)
|
void |
endDocument()
|
void |
endElement(String eltUri,
String eltLocalName,
String eltQName)
Receive notification of the end of an element. |
void |
endPrefixMapping(String prefix)
End the scope of a prefix-URI mapping: remove entry from mapping tables. |
void |
ignorableWhitespace(char[] ch,
int start,
int length)
|
void |
processingInstruction(String target,
String data)
|
void |
setDocumentLocator(Locator locator)
|
void |
skippedEntity(String name)
|
void |
startDocument()
|
void |
startElement(String eltUri,
String eltLocalName,
String eltQName,
Attributes attrs)
Ensure all namespace declarations are present as xmlns: attributes
and add those needed before calling superclass. |
void |
startPrefixMapping(String prefix,
String uri)
Track mappings to be able to add xmlns: attributes
in startElement() . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IOUtils.NamespaceAsAttributes(ContentHandler ch)
Method Detail |
---|
public void startDocument() throws SAXException
startDocument
in interface ContentHandler
SAXException
public void startPrefixMapping(String prefix, String uri) throws SAXException
xmlns:
attributes
in startElement()
.
startPrefixMapping
in interface ContentHandler
SAXException
public void startElement(String eltUri, String eltLocalName, String eltQName, Attributes attrs) throws SAXException
xmlns:
attributes
and add those needed before calling superclass. This is a workaround for a Xalan bug
(at least in version 2.0.1) : org.apache.xalan.serialize.SerializerToXML
ignores start/endPrefixMapping()
.
startElement
in interface ContentHandler
SAXException
public void endElement(String eltUri, String eltLocalName, String eltQName) throws SAXException
endElement
in interface ContentHandler
SAXException
public void endPrefixMapping(String prefix) throws SAXException
endPrefixMapping
in interface ContentHandler
SAXException
public void endDocument() throws SAXException
endDocument
in interface ContentHandler
SAXException
ContentHandler.endDocument()
public void characters(char[] ch, int start, int length) throws SAXException
characters
in interface ContentHandler
SAXException
ContentHandler.characters(char[], int, int)
public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException
ignorableWhitespace
in interface ContentHandler
SAXException
ContentHandler.ignorableWhitespace(char[], int, int)
public void processingInstruction(String target, String data) throws SAXException
processingInstruction
in interface ContentHandler
SAXException
ContentHandler.processingInstruction(java.lang.String, java.lang.String)
public void setDocumentLocator(Locator locator)
setDocumentLocator
in interface ContentHandler
ContentHandler.setDocumentLocator(org.xml.sax.Locator)
public void skippedEntity(String name) throws SAXException
skippedEntity
in interface ContentHandler
SAXException
ContentHandler.skippedEntity(java.lang.String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |