Saxon-HE返回不同的SVRL结果.Net

时间:2018-01-28 09:36:39

标签: .net validation saxon schematron

当我使用虚拟URI进行流式传输时,我得到的SVRL结果不同,它没有返回正确的SVRL,如果我提供实际的URI,它会在Saxon 9.8.3版本中返回正确的SVRL。

Processor processor = new Processor();
// Load the source document
var documentbuilder = processor.NewDocumentBuilder();
documentbuilder.BaseUri = new Uri("http://dummy.base.uri/");
XdmNode input = documentbuilder.Build(xmlstream);

// Create a transformer for the stylesheet.
var compiler = processor.NewXsltCompiler();
compiler.ErrorList = new System.Collections.Generic.List<Exception>();
XsltTransformer transformer = compiler.Compile(xsltStream).Load();
transformer.InitialContextNode = input;

请告知我是否犯了错误。唯一的区别是正确的返回下面和错误的SVRL跳过它。

<svrl:failed-assert test=". != ''" id="EHF-COMMON-R001" flag="fatal" location="/*:CreditNote[namespace-uri()='urn:oasis:names:specification:ubl:schema:xsd:CreditNote-2'][1]/*:CreditNoteLine[namespace-uri()='urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2'][1]/*:Note[namespace-uri()='urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2'][1]">
  <svrl:text>Document MUST not contain empty elements.</svrl:text>
</svrl:failed-assert>

0 个答案:

没有答案