public void setSpecified(int attrIndex, boolean specified) { attributes.setSpecified(attrIndex, specified); }
private void fillXMLAttributes(Attributes atts) { fAttributes.removeAllAttributes(); final int attrCount = atts.getLength(); for (int i = 0; i < attrCount; ++i) { fillQName(fAttributeQName, atts.getURI(i), atts.getLocalName(i), atts.getQName(i)); String type = atts.getType(i); fAttributes.addAttributeNS(fAttributeQName, (type != null) ? type : XMLSymbols.fCDATASymbol, atts.getValue(i)); fAttributes.setSpecified(i, true); } }
/** Fills in the XMLAttributes object. */ private void fillXMLAttributes(Attributes att) { fAttributes.removeAllAttributes(); final int len = att.getLength(); for (int i = 0; i < len; ++i) { fillXMLAttribute(att, i); fAttributes.setSpecified(i, true); } }
private void fillXMLAttributes(XMLStreamReader input) { fAttributes.removeAllAttributes(); final int len = input.getAttributeCount(); for (int i = 0; i < len; ++i) { fillQName(fAttributeQName, input.getAttributeNamespace(i), input.getAttributeLocalName(i), input.getAttributePrefix(i)); String type = input.getAttributeType(i); fAttributes.addAttributeNS(fAttributeQName, (type != null) ? type : XMLSymbols.fCDATASymbol, input.getAttributeValue(i)); fAttributes.setSpecified(i, input.isAttributeSpecified(i)); } }
/** Fills in the XMLAttributes object. */ private void fillXMLAttributes(StartElement event) { fAttributes.removeAllAttributes(); final Iterator attrs = event.getAttributes(); while (attrs.hasNext()) { Attribute attr = (Attribute) attrs.next(); fillQName(fAttributeQName, attr.getName()); String type = attr.getDTDType(); int idx = fAttributes.getLength(); fAttributes.addAttributeNS(fAttributeQName, (type != null) ? type : XMLSymbols.fCDATASymbol, attr.getValue()); fAttributes.setSpecified(idx, attr.isSpecified()); } }
private void fillXMLAttributes(StartElement event) { fAttributes.removeAllAttributes(); final Iterator attrs = event.getAttributes(); while (attrs.hasNext()) { Attribute attr = (Attribute) attrs.next(); fillQName(fAttributeQName, attr.getName()); String type = attr.getDTDType(); int idx = fAttributes.getLength(); fAttributes.addAttributeNS(fAttributeQName, (type != null) ? type : XMLSymbols.fCDATASymbol, attr.getValue()); fAttributes.setSpecified(idx, attr.isSpecified()); } }
/** Fills in the XMLAttributes object. */ private void fillXMLAttributes(XMLStreamReader reader) { fAttributes.removeAllAttributes(); final int len = reader.getAttributeCount(); for (int i = 0; i < len; ++i) { fillQName(fAttributeQName, reader.getAttributeNamespace(i), reader.getAttributeLocalName(i), reader.getAttributePrefix(i)); String type = reader.getAttributeType(i); fAttributes.addAttributeNS(fAttributeQName, (type != null) ? type : XMLSymbols.fCDATASymbol, reader.getAttributeValue(i)); fAttributes.setSpecified(i, reader.isAttributeSpecified(i)); } }
private void processAttributes(NamedNodeMap attrMap) { final int attrCount = attrMap.getLength(); fAttributes.removeAllAttributes(); for (int i = 0; i < attrCount; ++i) { Attr attr = (Attr) attrMap.item(i); String value = attr.getValue(); if (value == null) { value = XMLSymbols.EMPTY_STRING; } fillQName(fAttributeQName, attr); // REVISIT: Assuming all attributes are of type CDATA. The actual type may not matter. -- mrglavas fAttributes.addAttributeNS(fAttributeQName, XMLSymbols.fCDATASymbol, value); fAttributes.setSpecified(i, attr.getSpecified()); // REVISIT: Should we be looking at non-namespace attributes // for additional mappings? Should we detect illegal namespace // declarations and exclude them from the context? -- mrglavas if (fAttributeQName.uri == NamespaceContext.XMLNS_URI) { // process namespace attribute if (fAttributeQName.prefix == XMLSymbols.PREFIX_XMLNS) { fNamespaceContext.declarePrefix(fAttributeQName.localpart, value.length() != 0 ? fSymbolTable.addSymbol(value) : null); } else { fNamespaceContext.declarePrefix(XMLSymbols.EMPTY_STRING, value.length() != 0 ? fSymbolTable.addSymbol(value) : null); } } } }
/** Fills in the XMLAttributes object. */ private void fillXMLAttributes2(Attributes2 att) { fAttributes.removeAllAttributes(); final int len = att.getLength(); for (int i = 0; i < len; ++i) { fillXMLAttribute(att, i); fAttributes.setSpecified(i, att.isSpecified(i)); if (att.isDeclared(i)) { fAttributes.getAugmentations(i).putItem(Constants.ATTRIBUTE_DECLARED, Boolean.TRUE); } } }
fQName.setValues(null, aname, aname, null); attributes.addAttribute(fQName, "CDATA", ""); attributes.setSpecified(attributes.getLength()-1, true); if (fAugmentations) { addLocationItem(attributes, attributes.getLength() - 1); fQName.setValues(null, aname, aname, null); attributes.addAttribute(fQName, "CDATA", ""); attributes.setSpecified(attributes.getLength()-1, true); if (fAugmentations) { addLocationItem(attributes, attributes.getLength() - 1); attributes.setSpecified(lastattr, true); attributes.setNonNormalizedValue(lastattr, fNonNormAttr.toString()); if (fAugmentations) { attributes.setSpecified(lastattr, true); attributes.setNonNormalizedValue(lastattr, fNonNormAttr.toString()); if (fAugmentations) { fQName.setValues(null, aname, aname, null); attributes.addAttribute(fQName, "CDATA", ""); attributes.setSpecified(attributes.getLength()-1, true); fCurrentEntity.rewind(); if (fAugmentations) {
fQName.setValues(null, aname, aname, null); attributes.addAttribute(fQName, "CDATA", ""); attributes.setSpecified(attributes.getLength()-1, true); if (fAugmentations) { addLocationItem(attributes, attributes.getLength() - 1); fQName.setValues(null, aname, aname, null); attributes.addAttribute(fQName, "CDATA", ""); attributes.setSpecified(attributes.getLength()-1, true); if (fAugmentations) { addLocationItem(attributes, attributes.getLength() - 1); attributes.setSpecified(lastattr, true); attributes.setNonNormalizedValue(lastattr, fNonNormAttr.toString()); if (fAugmentations) { attributes.setSpecified(lastattr, true); attributes.setNonNormalizedValue(lastattr, fNonNormAttr.toString()); if (fAugmentations) { fQName.setValues(null, aname, aname, null); attributes.addAttribute(fQName, "CDATA", ""); attributes.setSpecified(attributes.getLength()-1, true); fCurrentEntity.rewind(); if (fAugmentations) {
fQName.setValues(null, aname, aname, null); attributes.addAttribute(fQName, "CDATA", ""); attributes.setSpecified(attributes.getLength() - 1, true); if (fAugmentations) { addLocationItem(attributes, attributes.getLength() - 1); fQName.setValues(null, aname, aname, null); attributes.addAttribute(fQName, "CDATA", ""); attributes.setSpecified(attributes.getLength() - 1, true); if (fAugmentations) { addLocationItem(attributes, attributes.getLength() - 1); attributes.setSpecified(lastattr, true); attributes.setNonNormalizedValue(lastattr, fNonNormAttr.toString()); if (fAugmentations) { attributes.setSpecified(lastattr, true); attributes.setNonNormalizedValue(lastattr, fNonNormAttr.toString()); if (fAugmentations) { fQName.setValues(null, aname, aname, null); attributes.addAttribute(fQName, "CDATA", ""); attributes.setSpecified(attributes.getLength() - 1, true); fCurrentEntity.rewind(); if (fAugmentations) {
fQName.setValues(null, aname, aname, null); attributes.addAttribute(fQName, "CDATA", ""); attributes.setSpecified(attributes.getLength()-1, true); if (fAugmentations) { addLocationItem(attributes, attributes.getLength() - 1); fQName.setValues(null, aname, aname, null); attributes.addAttribute(fQName, "CDATA", ""); attributes.setSpecified(attributes.getLength()-1, true); if (fAugmentations) { addLocationItem(attributes, attributes.getLength() - 1); attributes.setSpecified(lastattr, true); attributes.setNonNormalizedValue(lastattr, fNonNormAttr.toString()); if (fAugmentations) { attributes.setSpecified(lastattr, true); attributes.setNonNormalizedValue(lastattr, fNonNormAttr.toString()); if (fAugmentations) { fQName.setValues(null, aname, aname, null); attributes.addAttribute(fQName, "CDATA", ""); attributes.setSpecified(attributes.getLength()-1, true); fCurrentEntity.offset--; fCurrentEntity.characterOffset--;
fQName.setValues(null, aname, aname, null); attributes.addAttribute(fQName, "CDATA", ""); attributes.setSpecified(attributes.getLength() - 1, true); if (fAugmentations) { addLocationItem(attributes, attributes.getLength() - 1); fQName.setValues(null, aname, aname, null); attributes.addAttribute(fQName, "CDATA", ""); attributes.setSpecified(attributes.getLength() - 1, true); if (fAugmentations) { addLocationItem(attributes, attributes.getLength() - 1); attributes.setSpecified(lastattr, true); attributes.setNonNormalizedValue(lastattr, fNonNormAttr.toString()); if (fAugmentations) { attributes.setSpecified(lastattr, true); attributes.setNonNormalizedValue(lastattr, fNonNormAttr.toString()); if (fAugmentations) { fQName.setValues(null, aname, aname, null); attributes.addAttribute(fQName, "CDATA", ""); attributes.setSpecified(attributes.getLength() - 1, true); fCurrentEntity.rewind(); if (fAugmentations) {
attributes.setNonNormalizedValue(attrIndex, fTempString2.toString()); attributes.setSpecified(attrIndex, true);
attributes.setNonNormalizedValue(attrIndex, fTempString2.toString()); attributes.setSpecified(attrIndex, true);