当前位置: 首页>>代码示例>>Java>>正文


Java SequenceExtent类代码示例

本文整理汇总了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();
	}
}
 
开发者ID:dita-semia,项目名称:dita-semia-resolver,代码行数:18,代码来源:AncestorPathCall.java

示例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);
	}
}
 
开发者ID:dita-semia,项目名称:dita-semia-resolver,代码行数:21,代码来源:GetKeyRefDisplaySuffixCall.java

示例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);
    }
}
 
开发者ID:esacinc,项目名称:sdcct,代码行数:9,代码来源:SdcctXpathSelector.java

示例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);
    }
}
 
开发者ID:esacinc,项目名称:crigtt,代码行数:16,代码来源:AbstractCrigttExtensionFunction.java


注:本文中的net.sf.saxon.value.SequenceExtent类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。