nu.xom.Attribute.setType()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(1.5k)|赞(0)|评价(0)|浏览(121)

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

Attribute.setType介绍

[英]Sets the type of this attribute to one of the ten DTD types or Type.UNDECLARED.
[中]将此属性的类型设置为十种DTD类型之一或Type.UNDECLARED

代码示例

代码示例来源:origin: pierre/meteo

this.setType(Attribute.Type.ID);

代码示例来源:origin: pierre/meteo

/**
 * <p>
 * Sets the local name of the attribute.
 * </p>
 * 
 * @param localName the new local name
 * 
 * @throws IllegalNameException if <code>localName</code>
 *      is not a namespace well-formed, non-colonized name
 * 
 */
public void setLocalName(String localName) {
  
  if ("id".equals(localName) &&
   "http://www.w3.org/XML/1998/namespace".equals(this.URI)) {
    Verifier.checkNCName(this.value);
  }
  _setLocalName(localName);
  if (isXMLID()) {
    this.setType(Attribute.Type.ID);
  }
  
}

代码示例来源:origin: sanity/tahrir

private static Element generatePlainTextElement(final String plaintextBroadcastMessage, final IdentityStore identityStore, String languageCode) {
  Attribute language = new Attribute("lang", languageCode);
  language.setType(Attribute.Type.CDATA);
  Element plainText = new Element(TrConstants.FormatInfo.PLAIN_TEXT);
  plainText.addAttribute(language);

代码示例来源:origin: teiid/teiid

if (attr.getType() != type) attr.setType(type);
attr.setValue(value);
return attr;

代码示例来源:origin: org.teiid/saxon-xom

if (attr.getType() != type) attr.setType(type);
attr.setValue(value);
return attr;

相关文章