- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试执行验证以验证 xbrl 文件。但出现以下错误。
Error on line 351 of *module with no systemId*:
XPST0017: Cannot find a matching 1-argument function named
{http://www.xbrl.org/2010/function/formula}has-fallback-value()
XML 文件:
<?xml version="1.0" encoding="utf-8"?>
<?taxonomy-version 1.0.4.0 ?> <?taxonomy-set-overall-version 2.8.0.0 ?>
<!--(C) EBA-->
<link:linkbase xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xbrli="http://www.xbrl.org/2003/instance"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:link="http://www.xbrl.org/2003/linkbase"
xmlns:gen="http://xbrl.org/2008/generic"
xmlns:label="http://xbrl.org/2008/label"
xmlns:xff="http://www.xbrl.org/2010/function/formula"
xmlns:va="http://xbrl.org/2008/assertion/value"
xmlns:eba_dim="http://www.eba.europa.eu/xbrl/crr/dict/dim"
xmlns:eba_BA="http://www.eba.europa.eu/xbrl/crr/dict/dom/BA"
xmlns:df="http://xbrl.org/2008/filter/dimension"
xmlns:variable="http://xbrl.org/2008/variable"
xmlns:eba_AP="http://www.eba.europa.eu/xbrl/crr/dict/dom/AP"
xmlns:eba_TR="http://www.eba.europa.eu/xbrl/crr/dict/dom/TR"
xmlns:eba_PU="http://www.eba.europa.eu/xbrl/crr/dict/dom/PU"
xmlns:eba_RF="http://www.eba.europa.eu/xbrl/crr/dict/dom/RF"
xmlns:eba_IM="http://www.eba.europa.eu/xbrl/crr/dict/dom/IM"
xmlns:eba_CG="http://www.eba.europa.eu/xbrl/crr/dict/dom/CG"
xmlns:eba_MC="http://www.eba.europa.eu/xbrl/crr/dict/dom/MC"
xmlns:eba_BT="http://www.eba.europa.eu/xbrl/crr/dict/dom/BT"
xmlns:eba_CS="http://www.eba.europa.eu/xbrl/crr/dict/dom/CS"
xmlns:eba_CA="http://www.eba.europa.eu/xbrl/crr/dict/dom/CA"
xmlns:eba_met="http://www.eba.europa.eu/xbrl/crr/dict/met"
xmlns:xff="http://www.xbrl.org/2010/function/formula"
xmlns:cf="http://xbrl.org/2008/filter/concept"
xsi:schemaLocation="http://www.xbrl.org/2003/linkbase
http://www.xbrl.org/2003/xbrl-linkbase-2003-12-31.xsd
http://xbrl.org/2008/generic http://www.xbrl.org/2008/generic-link.xsd
http://xbrl.org/2008/label http://www.xbrl.org/2008/generic-label.xsd
http://xbrl.org/2008/assertion/value http://www.xbrl.org/2008/value-
assertion.xsd http://xbrl.org/2008/filter/dimension
http://www.xbrl.org/2008/dimension-filter.xsd http://xbrl.org/2008/variable
http://www.xbrl.org/2008/variable.xsd http://xbrl.org/2008/filter/concept
http://www.xbrl.org/2008/concept-filter.xsd">
<link:arcroleRef arcroleURI="http://xbrl.org/arcrole/2008/variable-filter" xlink:type="simple" xlink:href="http://www.xbrl.org/2008/variable.xsd#variable-filter" />
<link:arcroleRef arcroleURI="http://xbrl.org/arcrole/2008/variable-set" xlink:type="simple" xlink:href="http://www.xbrl.org/2008/variable.xsd#variable-set" />
<link:arcroleRef arcroleURI="http://xbrl.org/arcrole/2008/variable-set-filter" xlink:type="simple" xlink:href="http://www.xbrl.org/2008/variable.xsd#variable-set-filter" />
<gen:link xlink:type="extended" xlink:role="http://www.xbrl.org/2003/role/link">
<va:valueAssertion xlink:type="resource" xlink:label="eba_v6209_m" test="if (not(empty($a) or xff:has-fallback-value(QName('','a')))) then ($b <= 12.5 * $c) else (true())" aspectModel="dimensional" implicitFiltering="true" id="eba_v6209_m" />
<df:explicitDimension xlink:type="resource" xlink:label="eba_v6209_m.f1" id="eba_v6209_m.f1">
<df:dimension>
<df:qname>eba_dim:BAS</df:qname>
</df:dimension>
<df:member>
<df:qname>eba_BA:x9</df:qname>
</df:member>
</df:explicitDimension>
<variable:variableSetFilterArc xlink:type="arc" xlink:arcrole="http://xbrl.org/arcrole/2008/variable-set-filter" xlink:from="eba_v6209_m" xlink:to="eba_v6209_m.f1" complement="false" order="1" />
<df:explicitDimension xlink:type="resource" xlink:label="eba_v6209_m.f2" id="eba_v6209_m.f2">
<df:dimension>
<df:qname>eba_dim:APR</df:qname>
</df:dimension>
<df:member>
<df:qname>eba_AP:x27</df:qname>
</df:member>
</df:explicitDimension>
<variable:variableSetFilterArc xlink:type="arc" xlink:arcrole="http://xbrl.org/arcrole/2008/variable-set-filter" xlink:from="eba_v6209_m" xlink:to="eba_v6209_m.f2" complement="false" order="2" />
<df:explicitDimension xlink:type="resource" xlink:label="eba_v6209_m.f3" id="eba_v6209_m.f3">
<df:dimension>
<df:qname>eba_dim:TRI</df:qname>
</df:dimension>
<df:member>
<df:qname>eba_TR:x4</df:qname>
</df:member>
</df:explicitDimension>
<variable:variableSetFilterArc xlink:type="arc" xlink:arcrole="http://xbrl.org/arcrole/2008/variable-set-filter" xlink:from="eba_v6209_m" xlink:to="eba_v6209_m.f3" complement="false" order="3" />
<df:explicitDimension xlink:type="resource" xlink:label="eba_v6209_m.f5" id="eba_v6209_m.f5">
<df:dimension>
<df:qname>eba_dim:PUR</df:qname>
</df:dimension>
<df:member>
<df:qname>eba_PU:x0</df:qname>
</df:member>
</df:explicitDimension>
<variable:variableSetFilterArc xlink:type="arc" xlink:arcrole="http://xbrl.org/arcrole/2008/variable-set-filter" xlink:from="eba_v6209_m" xlink:to="eba_v6209_m.f5" complement="false" order="4" />
<df:explicitDimension xlink:type="resource" xlink:label="eba_v6209_m.f6" id="eba_v6209_m.f6">
<df:dimension>
<df:qname>eba_dim:REF</df:qname>
</df:dimension>
<df:member>
<df:qname>eba_RF:x0</df:qname>
</df:member>
</df:explicitDimension>
<variable:variableSetFilterArc xlink:type="arc" xlink:arcrole="http://xbrl.org/arcrole/2008/variable-set-filter" xlink:from="eba_v6209_m" xlink:to="eba_v6209_m.f6" complement="false" order="5" />
<df:typedDimension xlink:type="resource" xlink:label="eba_v6209_m.f7" id="eba_v6209_m.f7">
<df:dimension>
<df:qname>eba_dim:IMI</df:qname>
</df:dimension>
</df:typedDimension>
<variable:variableSetFilterArc xlink:type="arc" xlink:arcrole="http://xbrl.org/arcrole/2008/variable-set-filter" xlink:from="eba_v6209_m" xlink:to="eba_v6209_m.f7" complement="false" order="6" />
<df:explicitDimension xlink:type="resource" xlink:label="eba_v6209_m.f22" id="eba_v6209_m.f22">
<df:dimension>
<df:qname>eba_dim:IMS</df:qname>
</df:dimension>
<df:member>
<df:qname>eba_IM:x0</df:qname>
</df:member>
</df:explicitDimension>
<variable:variableSetFilterArc xlink:type="arc" xlink:arcrole="http://xbrl.org/arcrole/2008/variable-set-filter" xlink:from="eba_v6209_m" xlink:to="eba_v6209_m.f22" complement="false" order="7" />
<df:explicitDimension xlink:type="resource" xlink:label="eba_v6209_m.f23" id="eba_v6209_m.f23">
<df:dimension>
<df:qname>eba_dim:CLS</df:qname>
</df:dimension>
<df:member>
<df:qname>eba_CG:x0</df:qname>
</df:member>
</df:explicitDimension>
<variable:variableSetFilterArc xlink:type="arc" xlink:arcrole="http://xbrl.org/arcrole/2008/variable-set-filter" xlink:from="eba_v6209_m" xlink:to="eba_v6209_m.f23" complement="false" order="8" />
<df:explicitDimension xlink:type="resource" xlink:label="eba_v6209_m.f24" id="eba_v6209_m.f24">
<df:dimension>
<df:qname>eba_dim:SCC</df:qname>
</df:dimension>
<df:member>
<df:qname>eba_MC:x0</df:qname>
</df:member>
</df:explicitDimension>
<variable:variableSetFilterArc xlink:type="arc" xlink:arcrole="http://xbrl.org/arcrole/2008/variable-set-filter" xlink:from="eba_v6209_m" xlink:to="eba_v6209_m.f24" complement="false" order="9" />
<df:explicitDimension xlink:type="resource" xlink:label="eba_v6209_m.f25" id="eba_v6209_m.f25">
<df:dimension>
<df:qname>eba_dim:SUB</df:qname>
</df:dimension>
<df:member>
<df:qname>eba_MC:x0</df:qname>
</df:member>
</df:explicitDimension>
<variable:variableSetFilterArc xlink:type="arc" xlink:arcrole="http://xbrl.org/arcrole/2008/variable-set-filter" xlink:from="eba_v6209_m" xlink:to="eba_v6209_m.f25" complement="false" order="10" />
<df:explicitDimension xlink:type="resource" xlink:label="eba_v6209_m.f26" id="eba_v6209_m.f26">
<df:dimension>
<df:qname>eba_dim:HYV</df:qname>
</df:dimension>
<df:member>
<df:qname>eba_BT:x0</df:qname>
</df:member>
</df:explicitDimension>
<variable:variableSetFilterArc xlink:type="arc" xlink:arcrole="http://xbrl.org/arcrole/2008/variable-set-filter" xlink:from="eba_v6209_m" xlink:to="eba_v6209_m.f26" complement="false" order="11" />
<df:explicitDimension xlink:type="resource" xlink:label="eba_v6209_m.f27" id="eba_v6209_m.f27">
<df:dimension>
<df:qname>eba_dim:MCY</df:qname>
</df:dimension>
<df:member>
<df:qname>eba_MC:x0</df:qname>
</df:member>
</df:explicitDimension>
<variable:variableSetFilterArc xlink:type="arc" xlink:arcrole="http://xbrl.org/arcrole/2008/variable-set-filter" xlink:from="eba_v6209_m" xlink:to="eba_v6209_m.f27" complement="false" order="12" />
<df:explicitDimension xlink:type="resource" xlink:label="eba_v6209_m.f28" id="eba_v6209_m.f28">
<df:dimension>
<df:qname>eba_dim:CSC</df:qname>
</df:dimension>
<df:member>
<df:qname>eba_CS:x0</df:qname>
</df:member>
</df:explicitDimension>
<variable:variableSetFilterArc xlink:type="arc" xlink:arcrole="http://xbrl.org/arcrole/2008/variable-set-filter" xlink:from="eba_v6209_m" xlink:to="eba_v6209_m.f28" complement="false" order="13" />
<df:explicitDimension xlink:type="resource" xlink:label="eba_v6209_m.f29" id="eba_v6209_m.f29">
<df:dimension>
<df:qname>eba_dim:CCA</df:qname>
</df:dimension>
<df:member>
<df:qname>eba_CA:x0</df:qname>
</df:member>
</df:explicitDimension>
<variable:variableSetFilterArc xlink:type="arc" xlink:arcrole="http://xbrl.org/arcrole/2008/variable-set-filter" xlink:from="eba_v6209_m" xlink:to="eba_v6209_m.f29" complement="false" order="14" />
<df:explicitDimension xlink:type="resource" xlink:label="eba_v6209_m.f30" id="eba_v6209_m.f30">
<df:dimension>
<df:qname>eba_dim:MRW</df:qname>
</df:dimension>
<df:member>
<df:qname>eba_AP:x0</df:qname>
</df:member>
</df:explicitDimension>
<variable:variableSetFilterArc xlink:type="arc" xlink:arcrole="http://xbrl.org/arcrole/2008/variable-set-filter" xlink:from="eba_v6209_m" xlink:to="eba_v6209_m.f30" complement="false" order="15" />
<df:typedDimension xlink:type="resource" xlink:label="eba_v6209_m.f31" id="eba_v6209_m.f31">
<df:dimension>
<df:qname>eba_dim:INC</df:qname>
</df:dimension>
</df:typedDimension>
<variable:variableSetFilterArc xlink:type="arc" xlink:arcrole="http://xbrl.org/arcrole/2008/variable-set-filter" xlink:from="eba_v6209_m" xlink:to="eba_v6209_m.f31" complement="true" order="16" />
<df:typedDimension xlink:type="resource" xlink:label="eba_v6209_m.f32" id="eba_v6209_m.f32">
<df:dimension>
<df:qname>eba_dim:PBE</df:qname>
</df:dimension>
</df:typedDimension>
<variable:variableSetFilterArc xlink:type="arc" xlink:arcrole="http://xbrl.org/arcrole/2008/variable-set-filter" xlink:from="eba_v6209_m" xlink:to="eba_v6209_m.f32" complement="true" order="17" />
<df:typedDimension xlink:type="resource" xlink:label="eba_v6209_m.f33" id="eba_v6209_m.f33">
<df:dimension>
<df:qname>eba_dim:IRN</df:qname>
</df:dimension>
</df:typedDimension>
<variable:variableSetFilterArc xlink:type="arc" xlink:arcrole="http://xbrl.org/arcrole/2008/variable-set-filter" xlink:from="eba_v6209_m" xlink:to="eba_v6209_m.f33" complement="true" order="18" />
<df:typedDimension xlink:type="resource" xlink:label="eba_v6209_m.f34" id="eba_v6209_m.f34">
<df:dimension>
<df:qname>eba_dim:NED</df:qname>
</df:dimension>
</df:typedDimension>
<variable:variableSetFilterArc xlink:type="arc" xlink:arcrole="http://xbrl.org/arcrole/2008/variable-set-filter" xlink:from="eba_v6209_m" xlink:to="eba_v6209_m.f34" complement="true" order="19" />
<variable:factVariable xlink:type="resource" xlink:label="eba_v6209_m.a" bindAsSequence="false" fallbackValue="0" id="eba_v6209_m.a" />
<cf:conceptName xlink:type="resource" xlink:label="eba_v6209_m.a.f4" id="eba_v6209_m.a.f4">
<cf:concept>
<cf:qname>eba_met:mi119</cf:qname>
</cf:concept>
</cf:conceptName>
<variable:variableFilterArc xlink:type="arc" xlink:arcrole="http://xbrl.org/arcrole/2008/variable-filter" xlink:from="eba_v6209_m.a" xlink:to="eba_v6209_m.a.f4" cover="true" complement="false" order="1" />
<variable:variableArc xlink:type="arc" xlink:arcrole="http://xbrl.org/arcrole/2008/variable-set" xlink:from="eba_v6209_m" xlink:to="eba_v6209_m.a" name="a" order="1" />
<variable:factVariable xlink:type="resource" xlink:label="eba_v6209_m.b" bindAsSequence="false" fallbackValue="0" id="eba_v6209_m.b" />
<cf:conceptName xlink:type="resource" xlink:label="eba_v6209_m.b.f11" id="eba_v6209_m.b.f11">
<cf:concept>
<cf:qname>eba_met:mi310</cf:qname>
</cf:concept>
</cf:conceptName>
<variable:variableFilterArc xlink:type="arc" xlink:arcrole="http://xbrl.org/arcrole/2008/variable-filter" xlink:from="eba_v6209_m.b" xlink:to="eba_v6209_m.b.f11" cover="true" complement="false" order="1" />
<variable:variableArc xlink:type="arc" xlink:arcrole="http://xbrl.org/arcrole/2008/variable-set" xlink:from="eba_v6209_m" xlink:to="eba_v6209_m.b" name="b" order="2" />
<variable:factVariable xlink:type="resource" xlink:label="eba_v6209_m.c" bindAsSequence="false" fallbackValue="0" id="eba_v6209_m.c" />
<cf:conceptName xlink:type="resource" xlink:label="eba_v6209_m.c.f18" id="eba_v6209_m.c.f18">
<cf:concept>
<cf:qname>eba_met:mi119</cf:qname>
</cf:concept>
</cf:conceptName>
<variable:variableFilterArc xlink:type="arc" xlink:arcrole="http://xbrl.org/arcrole/2008/variable-filter" xlink:from="eba_v6209_m.c" xlink:to="eba_v6209_m.c.f18" cover="true" complement="false" order="1" />
<variable:variableArc xlink:type="arc" xlink:arcrole="http://xbrl.org/arcrole/2008/variable-set" xlink:from="eba_v6209_m" xlink:to="eba_v6209_m.c" name="c" order="3" />
</gen:link>
</link:linkbase>
抛出的异常是:
net.sf.saxon.s9api.SaxonApiException: Cannot find a matching 1-argument function named {http://www.xbrl.org/2010/function/formula}has-fallback-value()
编辑:
撒克逊版本是9.3
XbrlExpressionProcessor
类:构造函数有以下代码:
net.sf.saxon.s9api.Processor saxonProcessor = new Processor(false);
net.sf.saxon.s9api.XQueryCompiler xqueryCompiler = saxonProcessor.newXQueryCompiler();
registerNamespaces(xqueryCompiler);
在registerNamespaces()
方法中,xqueryCompiler.declareNamespace()
用于声明命名空间。这里我提到了命名空间xff
与网址 http://www.xbrl.org/2010/function/formula 。
在 evaluateExpression()
方法
XQueryExecutable queryExecutable = xqueryCompiler.compile(toCompile.toString()); //This is the line which throws the error mentioned in the problem
XQueryEvaluator xqueryEvaluator = queryExecutable.load();
/*All the variable values are set in the xQueryEvaluator using
xqueryEvaluator.setExternalVariable(new QName(memberName), value)*/
XdmValue xqueryResult = xqueryEvaluator.evaluate();
StringBuilder对象toCompile
提供Saxon处理器的所有函数定义。
它包含以下数据:
declare function iaf:sum($params as item()*) as item()+ { let $facts := if (empty($params)) then (0) else one-or-more($params) let $values := for $i in $facts return (iaf:splitValueThreshold($i)[1]) let $thresholds := for$iin $facts return (iaf:splitValueThreshold($i)[2]) let $sumValues := sum($values) let $sumThresholds := sum($thresholds) let $output := iaf:joinValueThreshold($sumValues, $sumThresholds) return ($output) };
declare function iaf:numeric-equal($paramA as item(), $paramB as item()) as xs:boolean { let $itemA := iaf:splitValueThreshold($paramA) let $itemB := iaf:splitValueThreshold($paramB) let $output := abs($itemA[1] - $itemB[1]) le ($itemA[2] + $itemB[2]) return ($output)};
declare function iaf:numeric-less-than($paramA as item(), $paramB as item()) as xs:boolean { let $itemA := iaf:splitValueThreshold($paramA) let $itemB := iaf:splitValueThreshold($paramB) let $output := ($itemA[1] - $itemB[1]) lt ($itemA[2] + $itemB[2]) return ($output) };
declare function iaf:numeric-less-equal-than($paramA as item(), $paramB as item()) as xs:boolean { let $itemA := iaf:splitValueThreshold($paramA) let $itemB := iaf:splitValueThreshold($paramB) let $output := ($itemA[1] - $itemB[1]) le ($itemA[2] + $itemB[2]) return ($output) };
declare function iaf:numeric-greater-than($paramA as item(), $paramB as item()) as xs:boolean { let $itemA := iaf:splitValueThreshold($paramA) let $itemB := iaf:splitValueThreshold($paramB) let $output := $itemA[1] gt ($itemB[1] - ($itemA[2] + $itemB[2])) return ($output) };
declare function iaf:numeric-greater-equal-than($paramA as item(), $paramB as item()) as xs:boolean { let $itemA := iaf:splitValueThreshold($paramA) let $itemB := iaf:splitValueThreshold($paramB) let $output := $itemA[1] ge ($itemB[1] - ($itemA[2] + $itemB[2])) return ($output) };
declare function iaf:numeric-add($paramA as item(), $paramB as item()) as item() { let $itemA := iaf:splitValueThreshold($paramA) let $itemB := iaf:splitValueThreshold($paramB) let $value := $itemA[1]+$itemB[1] let $threshold := $itemA[2]+$itemB[2] let $output := iaf:joinValueThreshold($value,$threshold) return ($output) };
declare function iaf:numeric-subtract($paramA as item(), $paramB as item()) as item() { let $itemA := iaf:splitValueThreshold($paramA) let $itemB := iaf:splitValueThreshold($paramB) let $value := $itemA[1]-$itemB[1] let $threshold := $itemA[2]+$itemB[2] let $output := iaf:joinValueThreshold($value,$threshold) return ($output) };
declare function iaf:numeric-divide($paramA as item(), $paramB as item()) as item() { let $itemA := iaf:splitValueThreshold($paramA) let $itemB := iaf:splitValueThreshold($paramB) let $A := $itemA[1] let $B := $itemB[1] let $deltaA := $itemA[2] let $deltaB := $itemB[2] let $AdivB := $A div $B let $J0 := ($A + $deltaA) div ($B + $deltaB) let $J1 := ($A + $deltaA) div ($B - $deltaB) let $J2 := ($A - $deltaA) div ($B + $deltaB) let $J3 := ($A - $deltaA) div ($B - $deltaB) let $threshold := max((abs($AdivB - $J0), abs($AdivB - $J1), abs($AdivB - $J2), abs($AdivB - $J3))) let $output := iaf:joinValueThreshold($AdivB, $threshold) return ($output) };
declare function iaf:numeric-multiply($paramA as item(), $paramB as item()) as item() { iaf:multiply-two-elements($paramA, $paramB)};
declare function iaf:numeric-multiply($params as item()+) as item() { let $output := iaf:multiply-recursive($params, 1, 0) return ($output) };
declare function iaf:abs($input as item() as item() { let $item := if (empty($input)) then 0 else $input let $output := if ($item instance of element() and empty($item[2])) then iaf:joinValueThreshold(abs($item), iaf-int:fact-threshold($item)) else (if (not($item instance of element()) and empty($item[2]) and not(contains(string($item), ";"))) then iaf:joinValueThreshold(abs($item), 0) else iaf:joinValueThreshold(abs(xs:decimal(substring-before($item, ";"))), xs:decimal(substring-after($item, ";")))) return ($output) };
declare function iaf:numeric-unary-minus($item as item()) as item() { let $output := if ($item instance of element() and empty($item[2])) then iaf:joinValueThreshold(-($item), iaf-int:fact-threshold($item)) else (if (not($item instance of element()) and empty($item[2]) and not(contains(string($item), ";"))) then iaf:joinValueThreshold(-($item), 0) else iaf:joinValueThreshold(-(xs:decimal(substring-before($item, ";"))), xs:decimal(substring-after($item, ";")))) return ($output) };
declare function iaf:min($params as item()*) as item() { let $facts := if (empty($params)) then (0) else one-or-more($params) let $values := for $i in $facts return (iaf:splitValueThreshold($i)[1]) let $thresholds := for $i in $facts return (iaf:splitValueThreshold($i)[2]) let $minValue := min($values) let $indexMin := index-of($values, $minValue)[1] let $minThreshold := $thresholds[$indexMin] let $output := iaf:joinValueThreshold($minValue,$minThreshold) return ($output) };
declare function iaf:max($params as item()*) as item() { let $facts := if (empty($params)) then (0) else one-or-more($params) let $values := for $i in $facts return (iaf:splitValueThreshold($i)[1]) let $thresholds := for $i in $facts return (iaf:splitValueThreshold($i)[2]) let $maxValue := max($values) let $indexMax := index-of($values, $maxValue)[1] let $maxThreshold := $thresholds[$indexMax] let $output := iaf:joinValueThreshold($maxValue,$maxThreshold) return ($output) };
declare function iaf:splitValueThreshold($item as item()) as item()+ { let $valorUmbral := if ($item instance of element() and empty($item[2])) then ($item, iaf-int:fact-threshold($item)) else (if (not($item instance of element()) and empty($item[2]) and not(contains(string($item), ";"))) then ($item, 0) else (xs:decimal(substring-before($item, ";")), xs:decimal(substring-after($item, ";")))) return ($valorUmbral) };
declare function iaf:joinValueThreshold($value as item(), $threshold as item()) as xs:string { let $output := concat(string($value),";",string($threshold)) return ($output) };
declare function iaf:precision($item as item()+) as xs:decimal { let $ouput := xfi:decimals($item) return ($ouput) };
declare function iaf:multiply-recursive($sequence as item()+, $count as item(), $subtotalParam as item()) as item() { let $facts := if (empty($sequence)) then (0) else one-or-more($sequence) let $numberOfParams := count($facts) let $subtotal := if ($count eq 1) then $facts[1] else $subtotalParam let $multiply := if($count lt $numberOfParams) then iaf:multiply-two-elements($subtotal, $facts[$count + 1]) else $subtotal let $output := if($count lt $numberOfParams) then iaf:multiply-recursive($sequence, ($count +1), $multiply) else $multiply return ($output) };
declare function iaf:multiply-two-elements($paramA as item(), $paramB as item()) as item() { let $itemA := iaf:splitValueThreshold($paramA) let $itemB := iaf:splitValueThreshold($paramB) let $A := $itemA[1] let $B := $itemB[1] let $deltaA := $itemA[2] let $deltaB := $itemB[2] let $AxB := $A * $B let $threshold := sum((abs($A * $deltaB), abs($B * $deltaA), $deltaA * $deltaB)) return (iaf:joinValueThreshold($AxB, $threshold)) };
declare function iaf:numeric-equal-threshold($paramA as item(), $paramB as item()) as item() { let $itemA := iaf:splitValueThreshold($paramA) let $itemB := iaf:splitValueThreshold($paramB) let $output := ($itemA[2] + $itemB[2]) return ($output) };
declare function iaf:numeric-less-than-threshold($paramA as item(), $paramB as item()) as item() { let $itemA := iaf:splitValueThreshold($paramA) let $itemB := iaf:splitValueThreshold($paramB) let $output := ($itemA[2] + $itemB[2]) return ($output) };
declare function iaf:numeric-less-equal-than-threshold($paramA as item(), $paramB as item() as item() { let $itemA := iaf:splitValueThreshold($paramA) let $itemB := iaf:splitValueThreshold($paramB) let $output := ($itemA[2] + $itemB[2]) return ($output) };
declare function iaf:numeric-greater-than-threshold($paramA as item(), $paramB as item()) as item() { let $itemA := iaf:splitValueThreshold($paramA) let $itemB := iaf:splitValueThreshold($paramB) let $output := ($itemA[2] + $itemB[2]) return ($output) };
declare function iaf:numeric-greater-equal-than-threshold($paramA as item(), $paramB as item()) as item() { let $itemA := iaf:splitValueThreshold($paramA) let $itemB := iaf:splitValueThreshold($paramB) let $output := ($itemA[2] + $itemB[2]) return ($output) };
declare function iaf:abs-sequence($params as item()*) as item()+ { let $facts := if (empty($params)) then (0) else one-or-more($params) let $values := for $i in $facts return (iaf:abs($i)) return (($values)) };
declare function iaf:numeric-equal-test($paramA as item(), $paramB as item()) as item()+ { let $valueA := iaf:splitValueThreshold($paramA)[1] let $valueB := iaf:splitValueThreshold($paramB)[1] let $thA := iaf:splitValueThreshold($paramA)[2] let $thB := iaf:splitValueThreshold($paramB)[2] let $absol := abs($valueA - $valueB) let $sumTh := $thA + $thB return (($valueA, $valueB, $thA, $thB, $absol, $sumTh)) };
declare function iaf-int:exp10($power as xs:integer) as xs:decimal { if ($power eq 0) then 1 else if ($power gt 0) then 10 * iaf-int:exp10($power - 1) else 1 div iaf-int:exp10(-$power)};
declare function iaf-int:fact-threshold($fact as item()) as xs:decimal { let $decimals := xfi:decimals($fact) return (if (string($decimals) = 'INF') then 0 else iaf-int:exp10(-xs:integer($decimals)) div 2)};
declare function xfi:decimals($fact as item() ) as item()+ { let $deci := $fact/@decimals return ($deci)};
declare function xfi:fact-typed-dimension-value($fact as item() , $typedDim as xs:QName?) as xs:string {let $dimName := substring-before(substring-after($fact,concat("s2c_dim:",$typedDim,"__TDVALUE__")),";") return ($dimName)};
declare variable $a external;
declare variable $b external;
declare variable $c external;
if (not(empty($a) or xff:has-fallback-value(QName('','a')))) then ($b <= 12.5 * $c) else (true())
在上面的定义中,最后 4 行,我们定义了测试中使用的变量,最后一行是表达式本身。
如果需要更多信息或这有帮助,请告诉我。
最佳答案
我无法告诉您出了什么问题(因为这不是您向我们展示的 XML 文档...),但我可以建议一些诊断操作。
您说您正在执行“验证”,但不清楚您的意思。这是 XSLT、XPath、XSD 吗?我们需要知道您正在执行什么。
这段代码过去有用过吗?如果是这样,那就有明确的证据表明问题与您运行它的方式有关:最有可能的罪魁祸首是不正确的类路径。
函数的名称{http://www.xbrl.org/2010/function/formula}has-fallback-value()
使用的是“抽象”URI,而不是而不是直接标识 Java 类(类似于 {java:net.sf.xbrl.Formula}has-fallback-value()
)。这意味着撒克逊人只有被告知去哪里寻找才能找到它。您正在运行的程序必须以某种方式向 Saxon 注册此扩展。找到此代码(或其文档)并查看它可能会失败的原因。
有一个 Saxon 配置选项,用于获取有关扩展函数加载的诊断信息。在 XSLT 命令行上,它是 -TJ,如果您使用 Java API,那么它是配置属性 FeatureKeys.TRACE_EXTERNAL_FUNCTIONS。这向您显示了 Saxon 为查找匹配的外部函数而采取的步骤,这反过来又向您显示了搜索失败之前的情况:例如,它是否找到了匹配的类,但找不到匹配的方法。鉴于这不是直接标识 Java 类的 URI,我并不乐观这会透露太多信息,但值得一试。
检查您正在使用的 saxon 版本,并查看其是否与您正在运行的应用程序的文档一致。
关于java - 从 xml 文件执行验证时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51532775/
SQLite、Content provider 和 Shared Preference 之间的所有已知区别。 但我想知道什么时候需要根据情况使用 SQLite 或 Content Provider 或
警告:我正在使用一个我无法完全控制的后端,所以我正在努力解决 Backbone 中的一些注意事项,这些注意事项可能在其他地方更好地解决......不幸的是,我别无选择,只能在这里处理它们! 所以,我的
我一整天都在挣扎。我的预输入搜索表达式与远程 json 数据完美配合。但是当我尝试使用相同的 json 数据作为预取数据时,建议为空。点击第一个标志后,我收到预定义消息“无法找到任何内容...”,结果
我正在制作一个模拟 NHL 选秀彩票的程序,其中屏幕右侧应该有一个 JTextField,并且在左侧绘制弹跳的选秀球。我创建了一个名为 Ball 的类,它实现了 Runnable,并在我的主 Draf
这个问题已经有答案了: How can I calculate a time span in Java and format the output? (18 个回答) 已关闭 9 年前。 这是我的代码
我有一个 ASP.NET Web API 应用程序在我的本地 IIS 实例上运行。 Web 应用程序配置有 CORS。我调用的 Web API 方法类似于: [POST("/API/{foo}/{ba
我将用户输入的时间和日期作为: DatePicker dp = (DatePicker) findViewById(R.id.datePicker); TimePicker tp = (TimePic
放宽“邻居”的标准是否足够,或者是否有其他标准行动可以采取? 最佳答案 如果所有相邻解决方案都是 Tabu,则听起来您的 Tabu 列表的大小太长或您的释放策略太严格。一个好的 Tabu 列表长度是
我正在阅读来自 cppreference 的代码示例: #include #include #include #include template void print_queue(T& q)
我快疯了,我试图理解工具提示的行为,但没有成功。 1. 第一个问题是当我尝试通过插件(按钮 1)在点击事件中使用它时 -> 如果您转到 Fiddle,您会在“内容”内看到该函数' 每次点击都会调用该属
我在功能组件中有以下代码: const [ folder, setFolder ] = useState([]); const folderData = useContext(FolderContex
我在使用预签名网址和 AFNetworking 3.0 从 S3 获取图像时遇到问题。我可以使用 NSMutableURLRequest 和 NSURLSession 获取图像,但是当我使用 AFHT
我正在使用 Oracle ojdbc 12 和 Java 8 处理 Oracle UCP 管理器的问题。当 UCP 池启动失败时,我希望关闭它创建的连接。 当池初始化期间遇到 ORA-02391:超过
关闭。此题需要details or clarity 。目前不接受答案。 想要改进这个问题吗?通过 editing this post 添加详细信息并澄清问题. 已关闭 9 年前。 Improve
引用这个plunker: https://plnkr.co/edit/GWsbdDWVvBYNMqyxzlLY?p=preview 我在 styles.css 文件和 src/app.ts 文件中指定
为什么我的条形这么细?我尝试将宽度设置为 1,它们变得非常厚。我不知道还能尝试什么。默认厚度为 0.8,这是应该的样子吗? import matplotlib.pyplot as plt import
当我编写时,查询按预期执行: SELECT id, day2.count - day1.count AS diff FROM day1 NATURAL JOIN day2; 但我真正想要的是右连接。当
我有以下时间数据: 0 08/01/16 13:07:46,335437 1 18/02/16 08:40:40,565575 2 14/01/16 22:2
一些背景知识 -我的 NodeJS 服务器在端口 3001 上运行,我的 React 应用程序在端口 3000 上运行。我在 React 应用程序 package.json 中设置了一个代理来代理对端
我面临着一个愚蠢的问题。我试图在我的 Angular 应用程序中延迟加载我的图像,我已经尝试过这个2: 但是他们都设置了 src attr 而不是 data-src,我在这里遗漏了什么吗?保留 d
我是一名优秀的程序员,十分优秀!