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

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

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

XMLAttributesImpl.<init>介绍

[英]Default constructor.
[中]默认构造函数。

代码示例

代码示例来源:origin: kohlschutter/boilerpipe

if (length > 0) {
  QName aqname = new QName();
  XMLAttributes newattrs = new XMLAttributesImpl();
  for (int i = 0; i < length; i++) {
    attributes.getName(i, aqname);

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

private XMLAttributes getAttributesForCTA(XMLAttributes attributes, Vector inheritableAttrList) {
  XMLAttributes ctaAttributes = new XMLAttributesImpl();
  
  // copy attributes from the original list of attributes        
  for (int attrIndx = 0; attrIndx < attributes.getLength(); attrIndx++) {
    QName attrQName = new QName();
    attributes.getName(attrIndx, attrQName);
    ctaAttributes.addAttribute(attrQName, attributes.getType(attrIndx), attributes.getValue(attrIndx));   
  }
  // add inherited attributes to the CTA attributes list
  for (int elemIndx = inheritableAttrList.size() - 1; elemIndx > -1; elemIndx--) {        
    AttributePSVI inhAttrPsvi = (AttributePSVI) inheritableAttrList.elementAt(elemIndx);
    XSAttributeDeclaration inhrAttrDecl = inhAttrPsvi.getAttributeDeclaration();
    // if an inherited attribute is not overridden by the current element, add it to the CTA attributes list
    if (!isInheritedAttributeOverridden(ctaAttributes, inhrAttrDecl)) {                
      QName attrQName = new QName();
      attrQName.setValues(null, inhrAttrDecl.getName(), inhrAttrDecl.getName(), inhrAttrDecl.getNamespace());                
      ctaAttributes.addAttribute(attrQName, null, inhAttrPsvi.getSchemaValue().getNormalizedValue());
    }
  }
  return ctaAttributes;
 
} // getAttributesForCTA

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

attributes = new XMLAttributesImpl();
attributes = new XMLAttributesImpl();
    == null) {
    if (attributes == null) {
      attributes = new XMLAttributesImpl();
    == null) {
  if (attributes == null) {
    attributes = new XMLAttributesImpl();

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

/**
 * Creates an element information object.
 * <p>
 * <strong>Note:</strong> This constructor makes a copy of the element information.
 *
 * @param element    The element qualified name.
 * @param attributes The element attributes.
 */
public Info(HTMLElements.Element element, QName qname, XMLAttributes attributes) {
  this.element = element;
  this.qname = new QName(qname);
  if (attributes != null) {
    int length = attributes.getLength();
    if (length > 0) {
      QName aqname = new QName();
      XMLAttributes newattrs = new XMLAttributesImpl();
      for (int i = 0; i < length; i++) {
        attributes.getName(i, aqname);
        String type = attributes.getType(i);
        String value = attributes.getValue(i);
        String nonNormalizedValue = attributes.getNonNormalizedValue(i);
        boolean specified = attributes.isSpecified(i);
        newattrs.addAttribute(aqname, type, value);
        newattrs.setNonNormalizedValue(i, nonNormalizedValue);
        newattrs.setSpecified(i, specified);
      }
      this.attributes = newattrs;
    }
  }
} // <init>(HTMLElements.Element,QName,XMLAttributes)

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

if (length > 0) {
  QName aqname = new QName();
  XMLAttributes newattrs = new XMLAttributesImpl();
  for (int i = 0; i < length; i++) {
    attributes.getName(i, aqname);

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

if (length > 0) {
  QName aqname = new QName();
  XMLAttributes newattrs = new XMLAttributesImpl();
  for (int i = 0; i < length; i++) {
    attributes.getName(i, aqname);

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

/**
 * Creates an element information object.
 * <p>
 * <strong>Note:</strong> This constructor makes a copy of the element information.
 *
 * @param element    The element qualified name.
 * @param attributes The element attributes.
 */
public Info(HTMLElements.Element element, QName qname, XMLAttributes attributes) {
  this.element = element;
  this.qname = new QName(qname);
  if (attributes != null) {
    int length = attributes.getLength();
    if (length > 0) {
      QName aqname = new QName();
      XMLAttributes newattrs = new XMLAttributesImpl();
      for (int i = 0; i < length; i++) {
        attributes.getName(i, aqname);
        String type = attributes.getType(i);
        String value = attributes.getValue(i);
        String nonNormalizedValue = attributes.getNonNormalizedValue(i);
        boolean specified = attributes.isSpecified(i);
        newattrs.addAttribute(aqname, type, value);
        newattrs.setNonNormalizedValue(i, nonNormalizedValue);
        newattrs.setSpecified(i, specified);
      }
      this.attributes = newattrs;
    }
  }
} // <init>(HTMLElements.Element,QName,XMLAttributes)

代码示例来源:origin: de.l3s.boilerpipe/boilerpipe

if (length > 0) {
  QName aqname = new QName();
  XMLAttributes newattrs = new XMLAttributesImpl();
  for (int i = 0; i < length; i++) {
    attributes.getName(i, aqname);

代码示例来源:origin: com.syncthemall/boilerpipe

if (length > 0) {
  QName aqname = new QName();
  XMLAttributes newattrs = new XMLAttributesImpl();
  for (int i = 0; i < length; i++) {
    attributes.getName(i, aqname);

代码示例来源:origin: Netbreeze-GmbH/boilerpipe

if (length > 0) {
  QName aqname = new QName();
  XMLAttributes newattrs = new XMLAttributesImpl();
  for (int i = 0; i < length; i++) {
    attributes.getName(i, aqname);

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

if (length > 0) {
  final QName aqname = new QName();
  final XMLAttributes newattrs = new XMLAttributesImpl();
  for (int i = 0; i < length; i++) {
    attributes.getName(i, aqname);

代码示例来源:origin: pvdlg/boilerpipe

if (length > 0) {
  QName aqname = new QName();
  XMLAttributes newattrs = new XMLAttributesImpl();
  for (int i = 0; i < length; i++) {
    attributes.getName(i, aqname);

相关文章