@Override public void attribute(Name name, String value) throws IOException { fiout.writeLowLevelStartAttributes(); final int qNameIndex = tables.attributeIndexes[name.qNameIndex] - tables.indexOffset; if (qNameIndex >= 0) { fiout.writeLowLevelAttributeIndexed(qNameIndex); } else { tables.attributeIndexes[name.qNameIndex] = fiout.getNextAttributeIndex() + tables.indexOffset; final int namespaceURIId = name.nsUriIndex; if (namespaceURIId == -1) { writeLiteral(EncodingConstants.ATTRIBUTE_LITERAL_QNAME_FLAG, name, "", ""); } else { final int prefix = nsUriIndex2prefixIndex[namespaceURIId]; writeLiteral(EncodingConstants.ATTRIBUTE_LITERAL_QNAME_FLAG, name, nsContext.getPrefix(prefix), nsContext.getNamespaceURI(prefix)); } } fiout.writeLowLevelAttributeValue(value); }
@Override public void attribute(Name name, String value) throws IOException { fiout.writeLowLevelStartAttributes(); final int qNameIndex = tables.attributeIndexes[name.qNameIndex] - tables.indexOffset; if (qNameIndex >= 0) { fiout.writeLowLevelAttributeIndexed(qNameIndex); } else { tables.attributeIndexes[name.qNameIndex] = fiout.getNextAttributeIndex() + tables.indexOffset; final int namespaceURIId = name.nsUriIndex; if (namespaceURIId == -1) { writeLiteral(EncodingConstants.ATTRIBUTE_LITERAL_QNAME_FLAG, name, "", ""); } else { final int prefix = nsUriIndex2prefixIndex[namespaceURIId]; writeLiteral(EncodingConstants.ATTRIBUTE_LITERAL_QNAME_FLAG, name, nsContext.getPrefix(prefix), nsContext.getNamespaceURI(prefix)); } } fiout.writeLowLevelAttributeValue(value); }
@Override public void attribute(Name name, String value) throws IOException { fiout.writeLowLevelStartAttributes(); final int qNameIndex = tables.attributeIndexes[name.qNameIndex] - tables.indexOffset; if (qNameIndex >= 0) { fiout.writeLowLevelAttributeIndexed(qNameIndex); } else { tables.attributeIndexes[name.qNameIndex] = fiout.getNextAttributeIndex() + tables.indexOffset; final int namespaceURIId = name.nsUriIndex; if (namespaceURIId == -1) { writeLiteral(EncodingConstants.ATTRIBUTE_LITERAL_QNAME_FLAG, name, "", ""); } else { final int prefix = nsUriIndex2prefixIndex[namespaceURIId]; writeLiteral(EncodingConstants.ATTRIBUTE_LITERAL_QNAME_FLAG, name, nsContext.getPrefix(prefix), nsContext.getNamespaceURI(prefix)); } } fiout.writeLowLevelAttributeValue(value); }
@Override public void attribute(Name name, String value) throws IOException { fiout.writeLowLevelStartAttributes(); final int qNameIndex = tables.attributeIndexes[name.qNameIndex] - tables.indexOffset; if (qNameIndex >= 0) { fiout.writeLowLevelAttributeIndexed(qNameIndex); } else { tables.attributeIndexes[name.qNameIndex] = fiout.getNextAttributeIndex() + tables.indexOffset; final int namespaceURIId = name.nsUriIndex; if (namespaceURIId == -1) { writeLiteral(EncodingConstants.ATTRIBUTE_LITERAL_QNAME_FLAG, name, "", ""); } else { final int prefix = nsUriIndex2prefixIndex[namespaceURIId]; writeLiteral(EncodingConstants.ATTRIBUTE_LITERAL_QNAME_FLAG, name, nsContext.getPrefix(prefix), nsContext.getNamespaceURI(prefix)); } } fiout.writeLowLevelAttributeValue(value); }