本文整理汇总了Java中net.sf.saxon.dom.NodeOverNodeInfo类的典型用法代码示例。如果您正苦于以下问题:Java NodeOverNodeInfo类的具体用法?Java NodeOverNodeInfo怎么用?Java NodeOverNodeInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
NodeOverNodeInfo类属于net.sf.saxon.dom包,在下文中一共展示了NodeOverNodeInfo类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: buildContent
import net.sf.saxon.dom.NodeOverNodeInfo; //导入依赖的package包/类
protected String buildContent(XdmDocument contentDoc, boolean canonical) throws Exception {
DocumentImpl contentDocInfo = contentDoc.getUnderlyingNode();
Source contentSrc;
XmlEncodeOptions contentEncodeOpts = this.xmlCodec.getDefaultEncodeOptions().clone();
if (canonical) {
for (SdcctXpathExecutable canonicalRemoveXpathExec : this.resourceMetadata.getCanonicalRemoveXpathExecutables()) {
for (XdmNode canonicalRemoveNode : canonicalRemoveXpathExec.load(new DynamicXpathOptionsImpl().setContextItem(contentDocInfo))
.evaluateNodes()) {
((MutableNodeInfo) canonicalRemoveNode.getUnderlyingNode()).delete();
}
}
contentEncodeOpts.getParseOptions().setStripSpace(Whitespace.ALL);
contentSrc = new ByteArraySource(Canonicalizer.getInstance(Canonicalizer.ALGO_ID_C14N11_OMIT_COMMENTS)
.canonicalizeSubtree(NodeOverNodeInfo.wrap(contentDoc.getUnderlyingNode())), contentDoc.getPublicId(), contentDoc.getSystemId());
} else {
contentSrc = contentDoc.getUnderlyingNode();
}
return new String(this.xmlCodec.encode(contentSrc, contentEncodeOpts), StandardCharsets.UTF_8);
}
开发者ID:esacinc,项目名称:sdcct,代码行数:24,代码来源:AbstractSdcctResourceRegistry.java
示例2: toDOMDocument
import net.sf.saxon.dom.NodeOverNodeInfo; //导入依赖的package包/类
@Converter
public static Document toDOMDocument(NodeInfo node) throws XPathException {
switch (node.getNodeKind()) {
case Type.DOCUMENT:
// DOCUMENT type nodes can be wrapped directly
return (Document) NodeOverNodeInfo.wrap(node);
case Type.ELEMENT:
// ELEMENT nodes need to build a new DocumentInfo before wrapping
Configuration config = node.getConfiguration();
DocumentInfo documentInfo = config.buildDocument(node);
return (Document) NodeOverNodeInfo.wrap(documentInfo);
default:
return null;
}
}
开发者ID:HydAu,项目名称:Camel,代码行数:16,代码来源:SaxonConverter.java
示例3: toDOMNodeList
import net.sf.saxon.dom.NodeOverNodeInfo; //导入依赖的package包/类
@Converter
public static NodeList toDOMNodeList(List<? extends NodeInfo> nodeList) {
List<Node> domNodeList = new LinkedList<Node>();
if (nodeList != null) {
for (NodeInfo ni : nodeList) {
domNodeList.add(NodeOverNodeInfo.wrap(ni));
}
}
return new DOMNodeList(domNodeList);
}
开发者ID:HydAu,项目名称:Camel,代码行数:11,代码来源:SaxonConverter.java
示例4: makeJAXPSource
import net.sf.saxon.dom.NodeOverNodeInfo; //导入依赖的package包/类
private Source makeJAXPSource(Source source) throws Exception {
if (source instanceof DOMResult || source instanceof StreamResult || source instanceof DOMResult) {
return source;
} else if (source instanceof NodeInfo) {
return new DOMSource(NodeOverNodeInfo.wrap((NodeInfo) source));
} else {
throw new XSLWebException("Could not create JAXP Source for Source of class " + source.getClass());
}
}
开发者ID:Armatiek,项目名称:xslweb,代码行数:10,代码来源:XSLWebServlet.java
示例5: XdmDocument
import net.sf.saxon.dom.NodeOverNodeInfo; //导入依赖的package包/类
public XdmDocument(Source src, @Nullable String publicId, @Nullable String sysId, @Nullable SdcctDocumentUri docUri, DocumentImpl docInfo) {
super(docInfo);
this.src = src;
this.doc = ((DocumentOverNodeInfo) NodeOverNodeInfo.wrap(docInfo));
Location docLoc = docInfo.getRoot().saveLocation();
this.publicId = ((publicId != null) ? publicId : docLoc.getPublicId());
this.sysId = ((sysId != null) ? sysId : docLoc.getSystemId());
this.docUri = ((docUri != null) ? docUri : ((this.sysId != null) ? new SdcctDocumentUri(this.sysId) : null));
}
开发者ID:esacinc,项目名称:sdcct,代码行数:13,代码来源:XdmDocument.java
示例6: compile
import net.sf.saxon.dom.NodeOverNodeInfo; //导入依赖的package包/类
/**
* @see net.sf.saxon.style.StyleElement#compile(net.sf.saxon.instruct.Executable)
*/
public Expression compile(Executable exec) throws XPathException {
NodeOverNodeInfo node = NodeOverNodeInfo.wrap(this);
final Configuration cfg = ConfigurationUtil.buildConfiguration(node);
BarcodeExpression inst = new BarcodeExpression(message, orientation, cfg);
return inst;
}
开发者ID:thanakrit,项目名称:barcode4j,代码行数:10,代码来源:BarcodeStyleElement.java
示例7: toDOMNode
import net.sf.saxon.dom.NodeOverNodeInfo; //导入依赖的package包/类
@Converter
public static Node toDOMNode(NodeInfo node) {
return NodeOverNodeInfo.wrap(node);
}
开发者ID:HydAu,项目名称:Camel,代码行数:5,代码来源:SaxonConverter.java
示例8: afterPropertiesSet
import net.sf.saxon.dom.NodeOverNodeInfo; //导入依赖的package包/类
@Override
public void afterPropertiesSet() throws Exception {
this.testExprPattern = Pattern.compile(String.format(TEST_EXPR_PATTERN_FORMAT, this.doc.getUri().toString()));
IndependentContext xpathContext = new IndependentContext(this.xpathCompiler.getUnderlyingStaticContext());
Stream.of(((ElementOverNodeInfo) this.doc.getDocument().getDocumentElement()).getUnderlyingNodeInfo().getDeclaredNamespaces(null)).forEach(
ns -> xpathContext.declareNamespace(ns.getPrefix(), ns.getURI()));
xpathContext.declareNamespace(StringUtils.EMPTY, CrigttXmlNs.VALIDATE_VOCAB_STATIC_DOC_URI);
this.valueSets = new LinkedHashMap<>();
this.codes = MultiValueMap.multiValueMap(new LinkedHashMap<>());
this.namedCodes = MultiValueMap.multiValueMap(new LinkedHashMap<>());
this.codeSystemCodes = MultiValueMap.multiValueMap(new LinkedHashMap<>());
this.namedCodeSystemCodes = MultiValueMap.multiValueMap(new LinkedHashMap<>());
this.valueSetCodes = MultiValueMap.multiValueMap(new LinkedHashMap<>());
this.namedValueSetCodes = MultiValueMap.multiValueMap(new LinkedHashMap<>());
ElementOverNodeInfo systemElem;
String valueSetId, codeSystemId, codeId, codeName;
Code code;
for (XdmNode systemNode : this.xpathCompiler.evaluateNodes(SYS_NODE_XPATH_EXPR, xpathContext, this.doc)) {
this.valueSets.put(
(valueSetId =
(systemElem = ((ElementOverNodeInfo) NodeOverNodeInfo.wrap(systemNode.getUnderlyingNode())))
.getAttribute(VocabXmlNames.VALUE_SET_OID_ATTR_NAME)),
new ValueSetImpl(valueSetId, systemElem.getAttribute(VocabXmlNames.VALUE_SET_NAME_ATTR_NAME), systemElem
.getAttribute(VocabXmlNames.VALUE_SET_VERSION_ATTR_NAME)));
for (ElementOverNodeInfo codeElem : Stream.of(this.xpathCompiler.evaluateNodes(VocabXmlNames.CODE_NODE_NAME, xpathContext, systemNode))
.map(codeNode -> ((ElementOverNodeInfo) NodeOverNodeInfo.wrap(codeNode.getUnderlyingNode()))).toArray(ElementOverNodeInfo[]::new)) {
codeSystemId = codeElem.getAttribute(VocabXmlNames.CODE_SYSTEM_ATTR_NAME);
this.codes.put(new MultiKey<>(valueSetId, codeSystemId, (codeId = codeElem.getAttribute(VocabXmlNames.VALUE_ATTR_NAME))), (code =
new CodeImpl(codeId, (codeName = codeElem.getAttribute(VocabXmlNames.DISPLAY_NAME_ATTR_NAME)))));
this.namedCodes.put(new MultiKey<>(valueSetId, codeSystemId, codeName), code);
this.codeSystemCodes.put(new MultiKey<>(codeSystemId, codeId), code);
this.namedCodeSystemCodes.put(new MultiKey<>(codeSystemId, codeName), code);
this.valueSetCodes.put(new MultiKey<>(valueSetId, codeId), code);
this.namedValueSetCodes.put(new MultiKey<>(valueSetId, codeName), code);
}
}
super.afterPropertiesSet();
}
开发者ID:esacinc,项目名称:crigtt,代码行数:50,代码来源:StaticVocabServiceImpl.java
示例9: XdmDocument
import net.sf.saxon.dom.NodeOverNodeInfo; //导入依赖的package包/类
public XdmDocument(DocumentInfo docInfo, @Nullable String sysId) {
super(docInfo);
this.src = new DOMSource((this.doc = ((DocumentOverNodeInfo) NodeOverNodeInfo.wrap(docInfo))), sysId);
}
开发者ID:esacinc,项目名称:crigtt,代码行数:6,代码来源:XdmDocument.java
注:本文中的net.sf.saxon.dom.NodeOverNodeInfo类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论