本文整理汇总了Java中net.sf.saxon.value.SequenceExtent类的典型用法代码示例。如果您正苦于以下问题:Java SequenceExtent类的具体用法?Java SequenceExtent怎么用?Java SequenceExtent使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
SequenceExtent类属于net.sf.saxon.value包,在下文中一共展示了SequenceExtent类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getPath
import net.sf.saxon.value.SequenceExtent; //导入依赖的package包/类
public static Sequence getPath(KeyDefInterface keyDef) {
if (keyDef != null) {
List<String> path = keyDef.getNamespaceList();
List<Item> list = new LinkedList<>();
if (path != null) {
for (String element : path) {
list.add(new StringValue(element));
}
}
list.add(new StringValue(keyDef.getKey()));
//logger.info("result: " + keyDef.getNamespace() + " " + keyDef.getKey());
return new SequenceExtent(list);
} else {
//logger.info("result: ()");
return EmptySequence.getInstance();
}
}
示例2: call
import net.sf.saxon.value.SequenceExtent; //导入依赖的package包/类
@Override
public Sequence call(XPathContext context, Sequence[] arguments) throws XPathException {
final SaxonNodeWrapper keyRefNode = new SaxonNodeWrapper((NodeInfo)arguments[0].head(), otResolver.getXPathCache());
final KeyRef keyRef = KeyRef.fromNode(keyRefNode);
final Item keyDefItem = arguments[1].head();
if ((keyRef == null) || (keyDefItem == null)) {
return EmptySequence.getInstance();
} else {
final KeyDefInterface keyDef = DitaSemiaOtResolver.getKeyDefFromItem(arguments[1].head());
final DisplaySuffix displaySuffix = keyRef.getDisplaySuffix(keyDef, false);
final List<Item> list = new LinkedList<>();
list.add(new StringValue(displaySuffix.keySuffix));
list.add(new StringValue(displaySuffix.nameSuffix));
return new SequenceExtent(list);
}
}
示例3: evaluate
import net.sf.saxon.value.SequenceExtent; //导入依赖的package包/类
@Override
public XdmValue evaluate() throws SaxonApiException {
try {
return XdmValue.wrap(SequenceExtent.makeSequenceExtent(this.expr.iterate(this.dynamicContext)));
} catch (XPathException e) {
throw new SaxonApiException(e);
}
}
示例4: call
import net.sf.saxon.value.SequenceExtent; //导入依赖的package包/类
@Override
public Sequence call(XPathContext context, Sequence[] args) throws XPathException {
XdmValue[] wrappedArgs = new XdmValue[args.length];
for (int a = 0; a < args.length; a++) {
wrappedArgs[a] = XdmValue.wrap(SequenceExtent.makeSequenceExtent(args[a].iterate()));
}
try {
return AbstractCrigttExtensionFunction.this.call(context, ((CrigttController) context.getController()).getContextData(), wrappedArgs)
.getUnderlyingValue();
} catch (Exception e) {
throw new SaxonApiUncheckedException(e);
}
}