This serializer will not preserve the original prefixes and this serializer should not be used when prefixes need to be preserved, such as the case when there are qualified names in content.
A namespace URI to prefix map is utilized such that the prefixes in the map are utilized rather than the prefixes specified in the qualified name for elements and attributes.
Any namespace declarations with a namespace URI that is not present in the map are added.
| Modifier and Type | Field and Description |
|---|---|
| protected StringIntMap | |
| protected String | |
| protected String | |
| protected Map | |
| protected Map |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private String | |
| protected final boolean | encodeAttribute(String namespaceURI, String qName, String localName)
Overrides com.
|
| protected boolean | |
| protected final void | |
| protected final void | encodeElement(String namespaceURI, String qName, String localName)
Overrides com.
|
| protected boolean | |
| protected final String | |
| protected final void | |
| public final void | startPrefixMapping(String prefix, String uri)
Overrides com. Implements org. Begin the scope of a prefix-URI Namespace mapping. |
| _declaredNamespaces | back to summary |
|---|---|
| protected StringIntMap _declaredNamespaces | |
| _lastCheckedNamespace | back to summary |
|---|---|
| protected String _lastCheckedNamespace | |
| _lastCheckedPrefix | back to summary |
|---|---|
| protected String _lastCheckedPrefix | |
| _namespaceToPrefixMapping | back to summary |
|---|---|
| protected Map<String, String> _namespaceToPrefixMapping | |
| _prefixToPrefixMapping | back to summary |
|---|---|
| protected Map<String, String> _prefixToPrefixMapping | |
| SAXDocumentSerializerWithPrefixMapping | back to summary |
|---|---|
| public SAXDocumentSerializerWithPrefixMapping(Map<String, String> namespaceToPrefixMapping) | |
| convertQName | back to summary |
|---|---|
| private String convertQName(String qName) | |
| encodeAttribute | back to summary |
|---|---|
| protected final boolean encodeAttribute(String namespaceURI, String qName, String localName) throws IOException Overrides com.
| |
| encodeAttributeMapEntry | back to summary |
|---|---|
| protected boolean encodeAttributeMapEntry(LocalNameQualifiedNamesMap. | |
| encodeAttributes | back to summary |
|---|---|
| protected final void encodeAttributes(Attributes atts) throws IOException, FastInfosetException Overrides com.
| |
| encodeElement | back to summary |
|---|---|
| protected final void encodeElement(String namespaceURI, String qName, String localName) throws IOException Overrides com.
| |
| encodeElementMapEntry | back to summary |
|---|---|
| protected boolean encodeElementMapEntry(LocalNameQualifiedNamesMap. | |
| getPrefix | back to summary |
|---|---|
| protected final String getPrefix(String namespaceURI) | |
| putPrefix | back to summary |
|---|---|
| protected final void putPrefix(String namespaceURI, String prefix) | |
| startPrefixMapping | back to summary |
|---|---|
| public final void startPrefixMapping(String prefix, String uri) throws SAXException Overrides com. Implements org. Doc from org. Begin the scope of a prefix-URI Namespace mapping. The information from this event is not necessary for
normal Namespace processing: the SAX XML reader will
automatically replace prefixes for element and attribute
names when the There are cases, however, when applications need to use prefixes in character data or in attribute values, where they cannot safely be expanded automatically; the start/endPrefixMapping event supplies the information to the application to expand prefixes in those contexts itself, if necessary. Note that start/endPrefixMapping events are not
guaranteed to be properly nested relative to each other:
all startPrefixMapping events will occur immediately before the
corresponding There should never be start/endPrefixMapping events for the "xml" prefix, since it is predeclared and immutable.
| |