Package com.sun.xml.fastinfoset.sax
Class SAXDocumentSerializerWithPrefixMapping
java.lang.Object
org.xml.sax.helpers.DefaultHandler
com.sun.xml.fastinfoset.Encoder
com.sun.xml.fastinfoset.sax.SAXDocumentSerializer
com.sun.xml.fastinfoset.sax.SAXDocumentSerializerWithPrefixMapping
- All Implemented Interfaces:
FastInfosetSerializer
,EncodingAlgorithmContentHandler
,ExtendedContentHandler
,FastInfosetWriter
,PrimitiveTypeContentHandler
,RestrictedAlphabetContentHandler
,ContentHandler
,DTDHandler
,EntityResolver
,ErrorHandler
,LexicalHandler
The Fast Infoset SAX serializer that maps prefixes to user specified prefixes
that are specified in a namespace URI to prefix map.
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.
-
Field Summary
Modifier and TypeFieldDescriptionprotected StringIntMap
protected String
protected String
protected Map
protected Map
Fields inherited from class com.sun.xml.fastinfoset.sax.SAXDocumentSerializer
_charactersAsCDATA, _elementHasNamespaces
Fields inherited from class com.sun.xml.fastinfoset.Encoder
_b, _characterEncodingSchemeSystemDefault, _charBuffer, _markIndex, _octetBuffer, _octetBufferIndex, _s, _terminate, _v, _vData, attributeValueMapTotalCharactersConstraint, CHARACTER_ENCODING_SCHEME_SYSTEM_PROPERTY, characterContentChunkMapTotalCharactersConstraint, maxAttributeValueSize, maxCharacterContentChunkSize, minAttributeValueSize, minCharacterContentChunkSize
Fields inherited from interface org.jvnet.fastinfoset.FastInfosetSerializer
ATTRIBUTE_VALUE_MAP_MEMORY_CONSTRAINT, BUFFER_SIZE_PROPERTY, CHARACTER_CONTENT_CHUNK_MAP_MEMORY_CONSTRAINT, EXTERNAL_VOCABULARIES_PROPERTY, IGNORE_COMMENTS_FEATURE, IGNORE_DTD_FEATURE, IGNORE_PROCESSING_INSTRUCTIONS_FEATURE, IGNORE_WHITE_SPACE_TEXT_CONTENT_FEATURE, MAX_ATTRIBUTE_VALUE_SIZE, MAX_CHARACTER_CONTENT_CHUNK_SIZE, MIN_ATTRIBUTE_VALUE_SIZE, MIN_CHARACTER_CONTENT_CHUNK_SIZE, REGISTERED_ENCODING_ALGORITHMS_PROPERTY, UTF_16BE, UTF_8
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected final boolean
encodeAttribute
(String namespaceURI, String qName, String localName) protected boolean
encodeAttributeMapEntry
(LocalNameQualifiedNamesMap.Entry entry, String namespaceURI) protected final void
encodeAttributes
(Attributes atts) protected final void
encodeElement
(String namespaceURI, String qName, String localName) protected boolean
encodeElementMapEntry
(LocalNameQualifiedNamesMap.Entry entry, String namespaceURI) protected final String
protected final void
final void
startPrefixMapping
(String prefix, String uri) Methods inherited from class com.sun.xml.fastinfoset.sax.SAXDocumentSerializer
alphabetCharacters, booleans, bytes, characters, characters, comment, countAttributes, dateTimeCharacters, doubles, endCDATA, endDocument, endDTD, endElement, endEntity, floats, ignorableWhitespace, ints, longs, numericCharacters, object, octets, processingInstruction, reset, setDocumentLocator, shorts, skippedEntity, startCDATA, startDocument, startDTD, startElement, startEntity, uuids
Methods inherited from class com.sun.xml.fastinfoset.Encoder
canAddAttributeToTable, canAddCharacterContentToTable, encodeAIIBuiltInAlgorithmData, encodeAIIObjectAlgorithmData, encodeAIIOctetAlgorithmData, encodeAlphabetCharacters, encodeAttributeQualifiedNameOnSecondBit, encodeCharacters, encodeCharactersNoClone, encodeCIIBuiltInAlgorithmData, encodeCIIBuiltInAlgorithmDataAsCDATA, encodeCIIObjectAlgorithmData, encodeCIIOctetAlgorithmData, encodeComment, encodeCommentNoClone, encodeDateTimeFourBitCharacters, encodeDateTimeNonIdentifyingStringOnFirstBit, encodeDocumentTermination, encodeDocumentTypeDeclaration, encodeElementQualifiedNameOnThirdBit, encodeElementTermination, encodeFourBitCharacters, encodeHeader, encodeIdentifyingNonEmptyStringOnFirstBit, encodeInitialVocabulary, encodeLiteralAttributeQualifiedNameOnSecondBit, encodeLiteralElementQualifiedNameOnThirdBit, encodeNamespaceAttribute, encodeNonEmptyCharacterStringOnFifthBit, encodeNonEmptyCharacterStringOnFifthBit, encodeNonEmptyCharacterStringOnSeventhBit, encodeNonEmptyFourBitCharacterString, encodeNonEmptyFourBitCharacterStringOnSeventhBit, encodeNonEmptyNBitCharacterStringOnSeventhBit, encodeNonEmptyOctetStringOnSecondBit, encodeNonEmptyUTF8StringAsOctetString, encodeNonEmptyUTF8StringAsOctetString, encodeNonIdentifyingStringOnFirstBit, encodeNonIdentifyingStringOnFirstBit, encodeNonIdentifyingStringOnFirstBit, encodeNonIdentifyingStringOnFirstBit, encodeNonIdentifyingStringOnFirstBit, encodeNonIdentifyingStringOnThirdBit, encodeNonIdentifyingStringOnThirdBit, encodeNonIdentifyingStringOnThirdBit, encodeNonZeroInteger, encodeNonZeroIntegerOnFourthBit, encodeNonZeroIntegerOnSecondBitFirstBitOne, encodeNonZeroIntegerOnSecondBitFirstBitZero, encodeNonZeroIntegerOnThirdBit, encodeNonZeroOctetStringLength, encodeNonZeroOctetStringLengthOnFifthBit, encodeNonZeroOctetStringLengthOnSecondBit, encodeNonZeroOctetStringLengthOnSenventhBit, encodeNumericFourBitCharacters, encodeNumericNonIdentifyingStringOnFirstBit, encodeProcessingInstruction, encodeTermination, encodeUtf16String, encodeUtf16String, encodeUTF8String, encodeUTF8String, getAttributeValueMapMemoryLimit, getCharacterContentChunkMapMemoryLimit, getCharacterEncodingScheme, getIgnoreComments, getIgnoreDTD, getIgnoreProcesingInstructions, getIgnoreWhiteSpaceTextContent, getMaxAttributeValueSize, getMaxCharacterContentChunkSize, getMinAttributeValueSize, getMinCharacterContentChunkSize, getPrefixFromQualifiedName, getRegisteredEncodingAlgorithms, getVocabularyApplicationData, hasMark, isAttributeValueLengthMatchesLimit, isCharacterContentChunkLengthMatchesLimit, isWhiteSpace, isWhiteSpace, mark, resetMark, setAttributeValueMapMemoryLimit, setCharacterContentChunkMapMemoryLimit, setCharacterEncodingScheme, setExternalVocabulary, setIgnoreComments, setIgnoreDTD, setIgnoreProcesingInstructions, setIgnoreWhiteSpaceTextContent, setMaxAttributeValueSize, setMaxCharacterContentChunkSize, setMinAttributeValueSize, setMinCharacterContentChunkSize, setOutputStream, setRegisteredEncodingAlgorithms, setVocabulary, setVocabularyApplicationData, write, write, write
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endPrefixMapping, error, fatalError, notationDecl, resolveEntity, unparsedEntityDecl, warning
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.xml.sax.ContentHandler
endPrefixMapping
Methods inherited from interface org.jvnet.fastinfoset.FastInfosetSerializer
getAttributeValueMapMemoryLimit, getCharacterContentChunkMapMemoryLimit, getCharacterEncodingScheme, getIgnoreComments, getIgnoreDTD, getIgnoreProcesingInstructions, getIgnoreWhiteSpaceTextContent, getMaxAttributeValueSize, getMaxCharacterContentChunkSize, getMinAttributeValueSize, getMinCharacterContentChunkSize, getRegisteredEncodingAlgorithms, getVocabularyApplicationData, setAttributeValueMapMemoryLimit, setCharacterContentChunkMapMemoryLimit, setCharacterEncodingScheme, setExternalVocabulary, setIgnoreComments, setIgnoreDTD, setIgnoreProcesingInstructions, setIgnoreWhiteSpaceTextContent, setMaxAttributeValueSize, setMaxCharacterContentChunkSize, setMinAttributeValueSize, setMinCharacterContentChunkSize, setOutputStream, setRegisteredEncodingAlgorithms, setVocabularyApplicationData
-
Field Details
-
_namespaceToPrefixMapping
-
_prefixToPrefixMapping
-
_lastCheckedNamespace
-
_lastCheckedPrefix
-
_declaredNamespaces
-
-
Constructor Details
-
SAXDocumentSerializerWithPrefixMapping
-
-
Method Details
-
startPrefixMapping
- Specified by:
startPrefixMapping
in interfaceContentHandler
- Overrides:
startPrefixMapping
in classSAXDocumentSerializer
- Throws:
SAXException
-
encodeElement
protected final void encodeElement(String namespaceURI, String qName, String localName) throws IOException - Overrides:
encodeElement
in classSAXDocumentSerializer
- Throws:
IOException
-
encodeElementMapEntry
protected boolean encodeElementMapEntry(LocalNameQualifiedNamesMap.Entry entry, String namespaceURI) throws IOException - Throws:
IOException
-
encodeAttributes
- Overrides:
encodeAttributes
in classSAXDocumentSerializer
- Throws:
IOException
FastInfosetException
-
encodeAttribute
protected final boolean encodeAttribute(String namespaceURI, String qName, String localName) throws IOException - Overrides:
encodeAttribute
in classSAXDocumentSerializer
- Throws:
IOException
-
encodeAttributeMapEntry
protected boolean encodeAttributeMapEntry(LocalNameQualifiedNamesMap.Entry entry, String namespaceURI) throws IOException - Throws:
IOException
-
getPrefix
-
putPrefix
-