Java Code Examples for com.sun.xml.internal.fastinfoset.util.LocalNameQualifiedNamesMap#Entry
The following examples show how to use
com.sun.xml.internal.fastinfoset.util.LocalNameQualifiedNamesMap#Entry .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Encoder.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
/** * Encode a qualified name of an Element Informaiton Item on the third bit * of an octet. * Implementation of clause C.18 of ITU-T Rec. X.891 | ISO/IEC 24824-1. * * <p> * The index of the qualified name will be encoded if the name is present * in the vocabulary otherwise the qualified name will be encoded literally * (see {@link #encodeLiteralElementQualifiedNameOnThirdBit}). * * @param namespaceURI the namespace URI of the qualified name. * @param prefix the prefix of the qualified name. * @param localName the local name of the qualified name. */ protected final void encodeElementQualifiedNameOnThirdBit(String namespaceURI, String prefix, String localName) throws IOException { LocalNameQualifiedNamesMap.Entry entry = _v.elementName.obtainEntry(localName); if (entry._valueIndex > 0) { QualifiedName[] names = entry._value; for (int i = 0; i < entry._valueIndex; i++) { if ((prefix == names[i].prefix || prefix.equals(names[i].prefix)) && (namespaceURI == names[i].namespaceName || namespaceURI.equals(names[i].namespaceName))) { encodeNonZeroIntegerOnThirdBit(names[i].index); return; } } } encodeLiteralElementQualifiedNameOnThirdBit(namespaceURI, prefix, localName, entry); }
Example 2
Source File: DOMDocumentSerializer.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
protected final void encodeElement(String namespaceURI, String qName, String localName) throws IOException { LocalNameQualifiedNamesMap.Entry entry = _v.elementName.obtainEntry(qName); if (entry._valueIndex > 0) { final QualifiedName[] names = entry._value; for (int i = 0; i < entry._valueIndex; i++) { if ((namespaceURI == names[i].namespaceName || namespaceURI.equals(names[i].namespaceName))) { encodeNonZeroIntegerOnThirdBit(names[i].index); return; } } } // Was DOM node created using an NS-aware call? if (localName != null) { encodeLiteralElementQualifiedNameOnThirdBit(namespaceURI, getPrefixFromQualifiedName(qName), localName, entry); } else { encodeLiteralElementQualifiedNameOnThirdBit(namespaceURI, "", qName, entry); } }
Example 3
Source File: Encoder.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
/** * Encode a qualified name of an Attribute Informaiton Item on the third bit * of an octet. * Implementation of clause C.17 of ITU-T Rec. X.891 | ISO/IEC 24824-1. * * <p> * The index of the qualified name will be encoded if the name is present * in the vocabulary otherwise the qualified name will be encoded literally * (see {@link #encodeLiteralAttributeQualifiedNameOnSecondBit}). * * @param namespaceURI the namespace URI of the qualified name. * @param prefix the prefix of the qualified name. * @param localName the local name of the qualified name. */ protected final void encodeAttributeQualifiedNameOnSecondBit(String namespaceURI, String prefix, String localName) throws IOException { LocalNameQualifiedNamesMap.Entry entry = _v.attributeName.obtainEntry(localName); if (entry._valueIndex > 0) { QualifiedName[] names = entry._value; for (int i = 0; i < entry._valueIndex; i++) { if ((prefix == names[i].prefix || prefix.equals(names[i].prefix)) && (namespaceURI == names[i].namespaceName || namespaceURI.equals(names[i].namespaceName))) { encodeNonZeroIntegerOnSecondBitFirstBitZero(names[i].index); return; } } } encodeLiteralAttributeQualifiedNameOnSecondBit(namespaceURI, prefix, localName, entry); }
Example 4
Source File: SAXDocumentSerializerWithPrefixMapping.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
protected final boolean encodeAttribute(String namespaceURI, String qName, String localName) throws IOException { LocalNameQualifiedNamesMap.Entry entry = _v.attributeName.obtainEntry(localName); if (entry._valueIndex > 0) { if (encodeAttributeMapEntry(entry, namespaceURI)) return true; // Check the entry is a member of the read only map if (_v.attributeName.isQNameFromReadOnlyMap(entry._value[0])) { entry = _v.attributeName.obtainDynamicEntry(localName); if (entry._valueIndex > 0) { if (encodeAttributeMapEntry(entry, namespaceURI)) return true; } } } return encodeLiteralAttributeQualifiedNameOnSecondBit(namespaceURI, getPrefix(namespaceURI), localName, entry); }
Example 5
Source File: SAXDocumentSerializerWithPrefixMapping.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
protected final boolean encodeAttribute(String namespaceURI, String qName, String localName) throws IOException { LocalNameQualifiedNamesMap.Entry entry = _v.attributeName.obtainEntry(localName); if (entry._valueIndex > 0) { if (encodeAttributeMapEntry(entry, namespaceURI)) return true; // Check the entry is a member of the read only map if (_v.attributeName.isQNameFromReadOnlyMap(entry._value[0])) { entry = _v.attributeName.obtainDynamicEntry(localName); if (entry._valueIndex > 0) { if (encodeAttributeMapEntry(entry, namespaceURI)) return true; } } } return encodeLiteralAttributeQualifiedNameOnSecondBit(namespaceURI, getPrefix(namespaceURI), localName, entry); }
Example 6
Source File: SAXDocumentSerializer.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
protected void encodeElement(String namespaceURI, String qName, String localName) throws IOException { LocalNameQualifiedNamesMap.Entry entry = _v.elementName.obtainEntry(qName); if (entry._valueIndex > 0) { QualifiedName[] names = entry._value; for (int i = 0; i < entry._valueIndex; i++) { final QualifiedName n = names[i]; if ((namespaceURI == n.namespaceName || namespaceURI.equals(n.namespaceName))) { encodeNonZeroIntegerOnThirdBit(names[i].index); return; } } } encodeLiteralElementQualifiedNameOnThirdBit(namespaceURI, getPrefixFromQualifiedName(qName), localName, entry); }
Example 7
Source File: Encoder.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
/** * Encode a qualified name of an Element Informaiton Item on the third bit * of an octet. * Implementation of clause C.18 of ITU-T Rec. X.891 | ISO/IEC 24824-1. * * <p> * The index of the qualified name will be encoded if the name is present * in the vocabulary otherwise the qualified name will be encoded literally * (see {@link #encodeLiteralElementQualifiedNameOnThirdBit}). * * @param namespaceURI the namespace URI of the qualified name. * @param prefix the prefix of the qualified name. * @param localName the local name of the qualified name. */ protected final void encodeElementQualifiedNameOnThirdBit(String namespaceURI, String prefix, String localName) throws IOException { LocalNameQualifiedNamesMap.Entry entry = _v.elementName.obtainEntry(localName); if (entry._valueIndex > 0) { QualifiedName[] names = entry._value; for (int i = 0; i < entry._valueIndex; i++) { if ((prefix == names[i].prefix || prefix.equals(names[i].prefix)) && (namespaceURI == names[i].namespaceName || namespaceURI.equals(names[i].namespaceName))) { encodeNonZeroIntegerOnThirdBit(names[i].index); return; } } } encodeLiteralElementQualifiedNameOnThirdBit(namespaceURI, prefix, localName, entry); }
Example 8
Source File: SAXDocumentSerializerWithPrefixMapping.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
protected final boolean encodeAttribute(String namespaceURI, String qName, String localName) throws IOException { LocalNameQualifiedNamesMap.Entry entry = _v.attributeName.obtainEntry(localName); if (entry._valueIndex > 0) { if (encodeAttributeMapEntry(entry, namespaceURI)) return true; // Check the entry is a member of the read only map if (_v.attributeName.isQNameFromReadOnlyMap(entry._value[0])) { entry = _v.attributeName.obtainDynamicEntry(localName); if (entry._valueIndex > 0) { if (encodeAttributeMapEntry(entry, namespaceURI)) return true; } } } return encodeLiteralAttributeQualifiedNameOnSecondBit(namespaceURI, getPrefix(namespaceURI), localName, entry); }
Example 9
Source File: SerializerVocabulary.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
private void addToNameTable(QName n, LocalNameQualifiedNamesMap m) { int namespaceURIIndex = -1; int prefixIndex = -1; if (n.getNamespaceURI().length() > 0) { namespaceURIIndex = namespaceName.obtainIndex(n.getNamespaceURI()); if (namespaceURIIndex == KeyIntMap.NOT_PRESENT) { namespaceURIIndex = namespaceName.get(n.getNamespaceURI()); } if (n.getPrefix().length() > 0) { prefixIndex = prefix.obtainIndex(n.getPrefix()); if (prefixIndex == KeyIntMap.NOT_PRESENT) { prefixIndex = prefix.get(n.getPrefix()); } } } int localNameIndex = localName.obtainIndex(n.getLocalPart()); if (localNameIndex == KeyIntMap.NOT_PRESENT) { localNameIndex = localName.get(n.getLocalPart()); } QualifiedName name = new QualifiedName(n.getPrefix(), n.getNamespaceURI(), n.getLocalPart(), m.getNextIndex(), prefixIndex, namespaceURIIndex, localNameIndex); LocalNameQualifiedNamesMap.Entry entry = null; if (_useLocalNameAsKey) { entry = m.obtainEntry(n.getLocalPart()); } else { String qName = (prefixIndex == -1) ? n.getLocalPart() : n.getPrefix() + ":" + n.getLocalPart(); entry = m.obtainEntry(qName); } entry.addQualifiedName(name); }
Example 10
Source File: SAXDocumentSerializerWithPrefixMapping.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
protected boolean encodeAttributeMapEntry(LocalNameQualifiedNamesMap.Entry entry, String namespaceURI) throws IOException { QualifiedName[] names = entry._value; for (int i = 0; i < entry._valueIndex; i++) { if ((namespaceURI == names[i].namespaceName || namespaceURI.equals(names[i].namespaceName))) { encodeNonZeroIntegerOnSecondBitFirstBitZero(names[i].index); return true; } } return false; }
Example 11
Source File: SAXDocumentSerializerWithPrefixMapping.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
protected boolean encodeElementMapEntry(LocalNameQualifiedNamesMap.Entry entry, String namespaceURI) throws IOException { QualifiedName[] names = entry._value; for (int i = 0; i < entry._valueIndex; i++) { if ((namespaceURI == names[i].namespaceName || namespaceURI.equals(names[i].namespaceName))) { encodeNonZeroIntegerOnThirdBit(names[i].index); return true; } } return false; }
Example 12
Source File: StAXDocumentSerializer.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
private boolean encodeAttribute(String namespaceURI, String prefix, String localName) throws IOException { final LocalNameQualifiedNamesMap.Entry entry = _v.attributeName.obtainEntry(localName); for (int i = 0; i < entry._valueIndex; i++) { final QualifiedName name = entry._value[i]; if ((prefix == name.prefix || prefix.equals(name.prefix)) && (namespaceURI == name.namespaceName || namespaceURI.equals(name.namespaceName))) { encodeNonZeroIntegerOnSecondBitFirstBitZero(name.index); return true; } } entry.addQualifiedName(new QualifiedName(prefix, namespaceURI, localName, "", _v.attributeName.getNextIndex())); return false; }
Example 13
Source File: SerializerVocabulary.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
private void addToNameTable(QName n, LocalNameQualifiedNamesMap m) { int namespaceURIIndex = -1; int prefixIndex = -1; if (n.getNamespaceURI().length() > 0) { namespaceURIIndex = namespaceName.obtainIndex(n.getNamespaceURI()); if (namespaceURIIndex == KeyIntMap.NOT_PRESENT) { namespaceURIIndex = namespaceName.get(n.getNamespaceURI()); } if (n.getPrefix().length() > 0) { prefixIndex = prefix.obtainIndex(n.getPrefix()); if (prefixIndex == KeyIntMap.NOT_PRESENT) { prefixIndex = prefix.get(n.getPrefix()); } } } int localNameIndex = localName.obtainIndex(n.getLocalPart()); if (localNameIndex == KeyIntMap.NOT_PRESENT) { localNameIndex = localName.get(n.getLocalPart()); } QualifiedName name = new QualifiedName(n.getPrefix(), n.getNamespaceURI(), n.getLocalPart(), m.getNextIndex(), prefixIndex, namespaceURIIndex, localNameIndex); LocalNameQualifiedNamesMap.Entry entry = null; if (_useLocalNameAsKey) { entry = m.obtainEntry(n.getLocalPart()); } else { String qName = (prefixIndex == -1) ? n.getLocalPart() : n.getPrefix() + ":" + n.getLocalPart(); entry = m.obtainEntry(qName); } entry.addQualifiedName(name); }
Example 14
Source File: StAXDocumentSerializer.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
private boolean encodeAttribute(String namespaceURI, String prefix, String localName) throws IOException { final LocalNameQualifiedNamesMap.Entry entry = _v.attributeName.obtainEntry(localName); for (int i = 0; i < entry._valueIndex; i++) { final QualifiedName name = entry._value[i]; if ((prefix == name.prefix || prefix.equals(name.prefix)) && (namespaceURI == name.namespaceName || namespaceURI.equals(name.namespaceName))) { encodeNonZeroIntegerOnSecondBitFirstBitZero(name.index); return true; } } entry.addQualifiedName(new QualifiedName(prefix, namespaceURI, localName, "", _v.attributeName.getNextIndex())); return false; }
Example 15
Source File: SAXDocumentSerializerWithPrefixMapping.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
protected boolean encodeElementMapEntry(LocalNameQualifiedNamesMap.Entry entry, String namespaceURI) throws IOException { QualifiedName[] names = entry._value; for (int i = 0; i < entry._valueIndex; i++) { if ((namespaceURI == names[i].namespaceName || namespaceURI.equals(names[i].namespaceName))) { encodeNonZeroIntegerOnThirdBit(names[i].index); return true; } } return false; }
Example 16
Source File: VocabularyGenerator.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
public void addToNameTable(String namespaceURI, String qName, String localName, Set v, LocalNameQualifiedNamesMap m, QualifiedNameArray a, boolean isAttribute) throws SAXException { LocalNameQualifiedNamesMap.Entry entry = m.obtainEntry(qName); if (entry._valueIndex > 0) { QualifiedName[] names = entry._value; for (int i = 0; i < entry._valueIndex; i++) { if ((namespaceURI == names[i].namespaceName || namespaceURI.equals(names[i].namespaceName))) { return; } } } String prefix = getPrefixFromQualifiedName(qName); int namespaceURIIndex = -1; int prefixIndex = -1; int localNameIndex = -1; if (namespaceURI.length() > 0) { namespaceURIIndex = _serializerVocabulary.namespaceName.get(namespaceURI); if (namespaceURIIndex == KeyIntMap.NOT_PRESENT) { throw new SAXException(CommonResourceBundle.getInstance(). getString("message.namespaceURINotIndexed", new Object[]{Integer.valueOf(namespaceURIIndex)})); } if (prefix.length() > 0) { prefixIndex = _serializerVocabulary.prefix.get(prefix); if (prefixIndex == KeyIntMap.NOT_PRESENT) { throw new SAXException(CommonResourceBundle.getInstance(). getString("message.prefixNotIndexed", new Object[]{Integer.valueOf(prefixIndex)})); } } } localNameIndex = _serializerVocabulary.localName.obtainIndex(localName); if (localNameIndex == KeyIntMap.NOT_PRESENT) { _parserVocabulary.localName.add(localName); localNameIndex = _parserVocabulary.localName.getSize() - 1; } QualifiedName name = new QualifiedName(prefix, namespaceURI, localName, m.getNextIndex(), prefixIndex, namespaceURIIndex, localNameIndex); if (isAttribute) { name.createAttributeValues(DuplicateAttributeVerifier.MAP_SIZE); } entry.addQualifiedName(name); a.add(name); v.add(name.getQName()); }
Example 17
Source File: Encoder.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
/** * Encode a literal qualified name of an Attribute Informaiton Item on the * third bit of an octet. * Implementation of clause C.17 of ITU-T Rec. X.891 | ISO/IEC 24824-1. * * @param namespaceURI the namespace URI of the qualified name. * @param prefix the prefix of the qualified name. * @param localName the local name of the qualified name. */ protected final boolean encodeLiteralAttributeQualifiedNameOnSecondBit(String namespaceURI, String prefix, String localName, LocalNameQualifiedNamesMap.Entry entry) throws IOException { int namespaceURIIndex = KeyIntMap.NOT_PRESENT; int prefixIndex = KeyIntMap.NOT_PRESENT; if (namespaceURI.length() > 0) { namespaceURIIndex = _v.namespaceName.get(namespaceURI); if (namespaceURIIndex == KeyIntMap.NOT_PRESENT) { if (namespaceURI == EncodingConstants.XMLNS_NAMESPACE_NAME || namespaceURI.equals(EncodingConstants.XMLNS_NAMESPACE_NAME)) { return false; } else { throw new IOException(CommonResourceBundle.getInstance().getString("message.namespaceURINotIndexed", new Object[]{namespaceURI})); } } if (prefix.length() > 0) { prefixIndex = _v.prefix.get(prefix); if (prefixIndex == KeyIntMap.NOT_PRESENT) { throw new IOException(CommonResourceBundle.getInstance().getString("message.prefixNotIndexed", new Object[]{prefix})); } } } int localNameIndex = _v.localName.obtainIndex(localName); QualifiedName name = new QualifiedName(prefix, namespaceURI, localName, "", _v.attributeName.getNextIndex()); entry.addQualifiedName(name); _b = EncodingConstants.ATTRIBUTE_LITERAL_QNAME_FLAG; if (namespaceURI.length() > 0) { _b |= EncodingConstants.LITERAL_QNAME_NAMESPACE_NAME_FLAG; if (prefix.length() > 0) { _b |= EncodingConstants.LITERAL_QNAME_PREFIX_FLAG; } } write(_b); if (namespaceURIIndex >= 0) { if (prefixIndex >= 0) { encodeNonZeroIntegerOnSecondBitFirstBitOne(prefixIndex); } encodeNonZeroIntegerOnSecondBitFirstBitOne(namespaceURIIndex); } else if (namespaceURI != "") { // XML prefix and namespace name encodeNonEmptyOctetStringOnSecondBit("xml"); encodeNonEmptyOctetStringOnSecondBit("http://www.w3.org/XML/1998/namespace"); } if (localNameIndex >= 0) { encodeNonZeroIntegerOnSecondBitFirstBitOne(localNameIndex); } else { encodeNonEmptyOctetStringOnSecondBit(localName); } return true; }
Example 18
Source File: Encoder.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
/** * Encode a literal qualified name of an Attribute Informaiton Item on the * third bit of an octet. * Implementation of clause C.17 of ITU-T Rec. X.891 | ISO/IEC 24824-1. * * @param namespaceURI the namespace URI of the qualified name. * @param prefix the prefix of the qualified name. * @param localName the local name of the qualified name. */ protected final boolean encodeLiteralAttributeQualifiedNameOnSecondBit(String namespaceURI, String prefix, String localName, LocalNameQualifiedNamesMap.Entry entry) throws IOException { int namespaceURIIndex = KeyIntMap.NOT_PRESENT; int prefixIndex = KeyIntMap.NOT_PRESENT; if (namespaceURI.length() > 0) { namespaceURIIndex = _v.namespaceName.get(namespaceURI); if (namespaceURIIndex == KeyIntMap.NOT_PRESENT) { if (namespaceURI == EncodingConstants.XMLNS_NAMESPACE_NAME || namespaceURI.equals(EncodingConstants.XMLNS_NAMESPACE_NAME)) { return false; } else { throw new IOException(CommonResourceBundle.getInstance().getString("message.namespaceURINotIndexed", new Object[]{namespaceURI})); } } if (prefix.length() > 0) { prefixIndex = _v.prefix.get(prefix); if (prefixIndex == KeyIntMap.NOT_PRESENT) { throw new IOException(CommonResourceBundle.getInstance().getString("message.prefixNotIndexed", new Object[]{prefix})); } } } int localNameIndex = _v.localName.obtainIndex(localName); QualifiedName name = new QualifiedName(prefix, namespaceURI, localName, "", _v.attributeName.getNextIndex()); entry.addQualifiedName(name); _b = EncodingConstants.ATTRIBUTE_LITERAL_QNAME_FLAG; if (namespaceURI.length() > 0) { _b |= EncodingConstants.LITERAL_QNAME_NAMESPACE_NAME_FLAG; if (prefix.length() > 0) { _b |= EncodingConstants.LITERAL_QNAME_PREFIX_FLAG; } } write(_b); if (namespaceURIIndex >= 0) { if (prefixIndex >= 0) { encodeNonZeroIntegerOnSecondBitFirstBitOne(prefixIndex); } encodeNonZeroIntegerOnSecondBitFirstBitOne(namespaceURIIndex); } else if (namespaceURI != "") { // XML prefix and namespace name encodeNonEmptyOctetStringOnSecondBit("xml"); encodeNonEmptyOctetStringOnSecondBit("http://www.w3.org/XML/1998/namespace"); } if (localNameIndex >= 0) { encodeNonZeroIntegerOnSecondBitFirstBitOne(localNameIndex); } else { encodeNonEmptyOctetStringOnSecondBit(localName); } return true; }
Example 19
Source File: VocabularyGenerator.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
public void addToNameTable(String namespaceURI, String qName, String localName, Set v, LocalNameQualifiedNamesMap m, QualifiedNameArray a, boolean isAttribute) throws SAXException { LocalNameQualifiedNamesMap.Entry entry = m.obtainEntry(qName); if (entry._valueIndex > 0) { QualifiedName[] names = entry._value; for (int i = 0; i < entry._valueIndex; i++) { if ((namespaceURI == names[i].namespaceName || namespaceURI.equals(names[i].namespaceName))) { return; } } } String prefix = getPrefixFromQualifiedName(qName); int namespaceURIIndex = -1; int prefixIndex = -1; int localNameIndex = -1; if (namespaceURI.length() > 0) { namespaceURIIndex = _serializerVocabulary.namespaceName.get(namespaceURI); if (namespaceURIIndex == KeyIntMap.NOT_PRESENT) { throw new SAXException(CommonResourceBundle.getInstance(). getString("message.namespaceURINotIndexed", new Object[]{Integer.valueOf(namespaceURIIndex)})); } if (prefix.length() > 0) { prefixIndex = _serializerVocabulary.prefix.get(prefix); if (prefixIndex == KeyIntMap.NOT_PRESENT) { throw new SAXException(CommonResourceBundle.getInstance(). getString("message.prefixNotIndexed", new Object[]{Integer.valueOf(prefixIndex)})); } } } localNameIndex = _serializerVocabulary.localName.obtainIndex(localName); if (localNameIndex == KeyIntMap.NOT_PRESENT) { _parserVocabulary.localName.add(localName); localNameIndex = _parserVocabulary.localName.getSize() - 1; } QualifiedName name = new QualifiedName(prefix, namespaceURI, localName, m.getNextIndex(), prefixIndex, namespaceURIIndex, localNameIndex); if (isAttribute) { name.createAttributeValues(DuplicateAttributeVerifier.MAP_SIZE); } entry.addQualifiedName(name); a.add(name); v.add(name.getQName()); }
Example 20
Source File: Encoder.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
/** * Encode a literal qualified name of an Element Informaiton Item on the * third bit of an octet. * Implementation of clause C.18 of ITU-T Rec. X.891 | ISO/IEC 24824-1. * * @param namespaceURI the namespace URI of the qualified name. * @param prefix the prefix of the qualified name. * @param localName the local name of the qualified name. */ protected final void encodeLiteralElementQualifiedNameOnThirdBit(String namespaceURI, String prefix, String localName, LocalNameQualifiedNamesMap.Entry entry) throws IOException { QualifiedName name = new QualifiedName(prefix, namespaceURI, localName, "", _v.elementName.getNextIndex()); entry.addQualifiedName(name); int namespaceURIIndex = KeyIntMap.NOT_PRESENT; int prefixIndex = KeyIntMap.NOT_PRESENT; if (namespaceURI.length() > 0) { namespaceURIIndex = _v.namespaceName.get(namespaceURI); if (namespaceURIIndex == KeyIntMap.NOT_PRESENT) { throw new IOException(CommonResourceBundle.getInstance().getString("message.namespaceURINotIndexed", new Object[]{namespaceURI})); } if (prefix.length() > 0) { prefixIndex = _v.prefix.get(prefix); if (prefixIndex == KeyIntMap.NOT_PRESENT) { throw new IOException(CommonResourceBundle.getInstance().getString("message.prefixNotIndexed", new Object[]{prefix})); } } } int localNameIndex = _v.localName.obtainIndex(localName); _b |= EncodingConstants.ELEMENT_LITERAL_QNAME_FLAG; if (namespaceURIIndex >= 0) { _b |= EncodingConstants.LITERAL_QNAME_NAMESPACE_NAME_FLAG; if (prefixIndex >= 0) { _b |= EncodingConstants.LITERAL_QNAME_PREFIX_FLAG; } } write(_b); if (namespaceURIIndex >= 0) { if (prefixIndex >= 0) { encodeNonZeroIntegerOnSecondBitFirstBitOne(prefixIndex); } encodeNonZeroIntegerOnSecondBitFirstBitOne(namespaceURIIndex); } if (localNameIndex >= 0) { encodeNonZeroIntegerOnSecondBitFirstBitOne(localNameIndex); } else { encodeNonEmptyOctetStringOnSecondBit(localName); } }