org.apache.xerces.util.XMLAttributesImpl.setSpecified()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(10.0k)|赞(0)|评价(0)|浏览(115)

本文整理了Java中org.apache.xerces.util.XMLAttributesImpl.setSpecified()方法的一些代码示例,展示了XMLAttributesImpl.setSpecified()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XMLAttributesImpl.setSpecified()方法的具体详情如下:
包路径:org.apache.xerces.util.XMLAttributesImpl
类名称:XMLAttributesImpl
方法名:setSpecified

XMLAttributesImpl.setSpecified介绍

[英]Sets whether an attribute is specified in the instance document or not.
[中]设置是否在实例文档中指定属性。

代码示例

代码示例来源:origin: org.seasar.teeda/teeda-extension

public void setSpecified(int attrIndex, boolean specified) {
  attributes.setSpecified(attrIndex, specified);
}

代码示例来源:origin: com.rackspace.apache/xerces2-xsd11

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);
  }
}

代码示例来源:origin: com.rackspace.apache/xerces2-xsd11

/** 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);
  }
}

代码示例来源:origin: com.rackspace.apache/xerces2-xsd11

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));
  }
}

代码示例来源:origin: com.rackspace.apache/xerces2-xsd11

/** 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());
  }
}

代码示例来源:origin: com.rackspace.apache/xerces2-xsd11

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());
  }
}

代码示例来源:origin: com.rackspace.apache/xerces2-xsd11

/** 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));
  }
}

代码示例来源:origin: com.rackspace.apache/xerces2-xsd11

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);
      }
    }
  }
}

代码示例来源:origin: com.rackspace.apache/xerces2-xsd11

/** 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);
    }
  }
}

代码示例来源:origin: net.sourceforge.nekohtml/nekohtml

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) {

代码示例来源:origin: net.sourceforge.htmlunit/neko-htmlunit

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) {

代码示例来源:origin: com.googlecode.gwt-test-utils/gwt-test-utils

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) {

代码示例来源:origin: net.sourceforge.nekohtml/com.springsource.org.cyberneko.html

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--;

代码示例来源:origin: gwt-test-utils/gwt-test-utils

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) {

代码示例来源:origin: com.rackspace.apache/xerces2-xsd11

attributes.setNonNormalizedValue(attrIndex, fTempString2.toString());
attributes.setSpecified(attrIndex, true);

代码示例来源:origin: com.rackspace.apache/xerces2-xsd11

attributes.setNonNormalizedValue(attrIndex, fTempString2.toString());
attributes.setSpecified(attrIndex, true);

相关文章