本文整理了Java中nu.xom.Attribute.getType()
方法的一些代码示例,展示了Attribute.getType()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Attribute.getType()
方法的具体详情如下:
包路径:nu.xom.Attribute
类名称:Attribute
方法名:getType
[英]Returns the DTD type of this attribute. If this attribute does not have a type, then Type.UNDECLARED
is returned.
[中]返回此属性的DTD类型。如果此属性没有类型,则返回Type.UNDECLARED
。
代码示例来源:origin: org.teiid/saxon-xom
/**
* Determine whether this node has the is-idref property
*
* @return true if the node is an IDREF or IDREFS element or attribute
*/
public boolean isIdref() {
return getNodeKind() == Type.ATTRIBUTE && (
((Attribute) node).getType() == Attribute.Type.IDREF ||
((Attribute) node).getType() == Attribute.Type.IDREFS);
}
代码示例来源:origin: org.jboss.teiid/teiid-engine
/**
* Determine whether this node has the is-idref property
*
* @return true if the node is an IDREF or IDREFS element or attribute
*/
public boolean isIdref() {
return getNodeKind() == Type.ATTRIBUTE && (
((Attribute) node).getType() == Attribute.Type.IDREF ||
((Attribute) node).getType() == Attribute.Type.IDREFS);
}
代码示例来源:origin: teiid/teiid
/**
* Determine whether this node has the is-idref property
*
* @return true if the node is an IDREF or IDREFS element or attribute
*/
public boolean isIdref() {
return getNodeKind() == Type.ATTRIBUTE && (
((Attribute) node).getType() == Attribute.Type.IDREF ||
((Attribute) node).getType() == Attribute.Type.IDREFS);
}
代码示例来源:origin: teiid/teiid
/**
* Determine whether this node has the is-id property
*
* @return true if the node is an ID
*/
public boolean isId() {
return getNodeKind() == Type.ATTRIBUTE && ((Attribute) node).getType() == Attribute.Type.ID;
}
代码示例来源:origin: org.jboss.teiid/teiid-engine
/**
* Determine whether this node has the is-id property
*
* @return true if the node is an ID
*/
public boolean isId() {
return getNodeKind() == Type.ATTRIBUTE && ((Attribute) node).getType() == Attribute.Type.ID;
}
代码示例来源:origin: org.teiid/saxon-xom
/**
* Determine whether this node has the is-id property
*
* @return true if the node is an ID
*/
public boolean isId() {
return getNodeKind() == Type.ATTRIBUTE && ((Attribute) node).getType() == Attribute.Type.ID;
}
代码示例来源:origin: teiid/teiid
/** Reuses XOM's way of representing attribute types */
public static byte getAttributeTypeCode(Attribute attr) {
return (byte) attr.getType().hashCode();
}
代码示例来源:origin: org.teiid/saxon-xom
/** Reuses XOM's way of representing attribute types */
public static byte getAttributeTypeCode(Attribute attr) {
return (byte) attr.getType().hashCode();
}
代码示例来源:origin: teiid/teiid
private void buildIDIndex(Element elem) {
// walk the tree in reverse document order, to satisfy the XPath 1.0 rule
// that says if an ID appears twice, the first one wins
for (int i = elem.getChildCount(); --i >= 0; ) {
Node child = elem.getChild(i);
if (child instanceof Element) {
buildIDIndex((Element) child);
}
}
for (int i = elem.getAttributeCount(); --i >= 0; ) {
Attribute att = elem.getAttribute(i);
if (att.getType() == Attribute.Type.ID) {
idIndex.put(att.getValue(), wrap(elem));
}
}
}
代码示例来源:origin: org.teiid/saxon-xom
private void buildIDIndex(Element elem) {
// walk the tree in reverse document order, to satisfy the XPath 1.0 rule
// that says if an ID appears twice, the first one wins
for (int i = elem.getChildCount(); --i >= 0; ) {
Node child = elem.getChild(i);
if (child instanceof Element) {
buildIDIndex((Element) child);
}
}
for (int i = elem.getAttributeCount(); --i >= 0; ) {
Attribute att = elem.getAttribute(i);
if (att.getType() == Attribute.Type.ID) {
idIndex.put(att.getValue(), wrap(elem));
}
}
}
代码示例来源:origin: org.jboss.teiid/teiid-engine
private void buildIDIndex(Element elem) {
// walk the tree in reverse document order, to satisfy the XPath 1.0 rule
// that says if an ID appears twice, the first one wins
for (int i=elem.getChildCount(); --i >= 0 ; ) {
Node child = elem.getChild(i);
if (child instanceof Element) {
buildIDIndex((Element)child);
}
}
for (int i=elem.getAttributeCount(); --i >= 0 ; ) {
Attribute att = elem.getAttribute(i);
if (att.getType() == Attribute.Type.ID) {
idIndex.put(att.getValue(), wrap(elem));
}
}
}
代码示例来源: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;
内容来源于网络,如有侵权,请联系作者删除!