本文整理了Java中com.sun.org.apache.xpath.internal.objects.XObject.create()
方法的一些代码示例,展示了XObject.create()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XObject.create()
方法的具体详情如下:
包路径:com.sun.org.apache.xpath.internal.objects.XObject
类名称:XObject
方法名:create
[英]Create the right XObject based on the type of the object passed. This function can not make an XObject that exposes DOM Nodes, NodeLists, and NodeIterators to the XSLT stylesheet as node-sets.
[中]根据传递的对象类型创建右XObject。此函数不能生成将DOM节点、节点列表和节点编辑器作为节点集公开给XSLT样式表的XObject。
代码示例来源:origin: com.sun.xml.parsers/jaxp-ri
public XObject getVariableOrParam(XPathContext xctxt, QName qname)
throws TransformerException,IllegalArgumentException {
if ( qname == null ) {
//JAXP 1.3 spec says that if variable name is null then
// we need to through IllegalArgumentException
String fmsg = XSLMessages.createXPATHMessage(
XPATHErrorResources.ER_ARG_CANNOT_BE_NULL,
new Object[] {"Variable qname"} );
throw new IllegalArgumentException( fmsg );
}
javax.xml.namespace.QName name =
new javax.xml.namespace.QName(
qname.getNamespace(),
qname.getLocalPart());
Object varValue = resolver.resolveVariable( name );
if ( varValue == null ) {
String fmsg = XSLMessages.createXPATHMessage(
XPATHErrorResources.ER_RESOLVE_VARIABLE_RETURNS_NULL,
new Object[] { name.toString()} );
throw new TransformerException( fmsg );
}
return XObject.create( varValue, xctxt );
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jaxp-ri
public XObject getVariableOrParam(XPathContext xctxt, QName qname)
throws TransformerException,IllegalArgumentException {
if ( qname == null ) {
//JAXP 1.3 spec says that if variable name is null then
// we need to through IllegalArgumentException
String fmsg = XSLMessages.createXPATHMessage(
XPATHErrorResources.ER_ARG_CANNOT_BE_NULL,
new Object[] {"Variable qname"} );
throw new IllegalArgumentException( fmsg );
}
javax.xml.namespace.QName name =
new javax.xml.namespace.QName(
qname.getNamespace(),
qname.getLocalPart());
Object varValue = resolver.resolveVariable( name );
if ( varValue == null ) {
String fmsg = XSLMessages.createXPATHMessage(
XPATHErrorResources.ER_RESOLVE_VARIABLE_RETURNS_NULL,
new Object[] { name.toString()} );
throw new TransformerException( fmsg );
}
return XObject.create( varValue, xctxt );
}
代码示例来源:origin: com.sun.xml.parsers/jaxp-ri
result = XObject.create(val, xctxt);
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jaxp-ri
result = XObject.create(val, xctxt);
内容来源于网络,如有侵权,请联系作者删除!