本文整理汇总了Java中com.sun.org.apache.xalan.internal.xsltc.dom.SingletonIterator类的典型用法代码示例。如果您正苦于以下问题:Java SingletonIterator类的具体用法?Java SingletonIterator怎么用?Java SingletonIterator使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SingletonIterator类属于com.sun.org.apache.xalan.internal.xsltc.dom包,在下文中一共展示了SingletonIterator类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: nodesetF
import com.sun.org.apache.xalan.internal.xsltc.dom.SingletonIterator; //导入依赖的package包/类
/**
* Implements the nodeset() extension function.
*/
public static DTMAxisIterator nodesetF(Object obj) {
if (obj instanceof DOM) {
//final DOMAdapter adapter = (DOMAdapter) obj;
final DOM dom = (DOM)obj;
return new SingletonIterator(dom.getDocument(), true);
}
else if (obj instanceof DTMAxisIterator) {
return (DTMAxisIterator) obj;
}
else {
final String className = obj.getClass().getName();
runTimeError(DATA_CONVERSION_ERR, "node-set", className);
return null;
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:19,代码来源:BasisLibrary.java
示例2: referenceToNodeSet
import com.sun.org.apache.xalan.internal.xsltc.dom.SingletonIterator; //导入依赖的package包/类
/**
* Utility function: used to convert references to node-sets. If the
* obj is an instanceof Node then create a singleton iterator.
*/
public static DTMAxisIterator referenceToNodeSet(Object obj) {
// Convert var/param -> node
if (obj instanceof Node) {
return(new SingletonIterator(((Node)obj).node));
}
// Convert var/param -> node-set
else if (obj instanceof DTMAxisIterator) {
return(((DTMAxisIterator)obj).cloneIterator().reset());
}
else {
final String className = obj.getClass().getName();
runTimeError(DATA_CONVERSION_ERR, className, "node-set");
return null;
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:20,代码来源:BasisLibrary.java
示例3: getSingleNode
import com.sun.org.apache.xalan.internal.xsltc.dom.SingletonIterator; //导入依赖的package包/类
/**
* Utility function: used with nth position filters to convert a sequence
* of nodes to just one single node (the one at position n).
*/
public static DTMAxisIterator getSingleNode(DTMAxisIterator iterator) {
int node = iterator.next();
return(new SingletonIterator(node));
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:9,代码来源:BasisLibrary.java
注:本文中的com.sun.org.apache.xalan.internal.xsltc.dom.SingletonIterator类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论