THPDFSchematronSummary Record
摘要一次 Schematron 執行的結果,包含規則數、違規總數與引擎可用性
宣告
THPDFSchematronSummary= record
Profile: AnsiString;
TotalRules: Integer; // number of <assert>/<report> entries scanned
Evaluated: Integer; // rules whose contexts and tests were processed
Skipped: Integer; // legacy/stub engines only; zero for XE2+
EvaluationErrors: Integer;// rule expressions that could not be executed
Violations: Integer; // asserts that failed + reports that fired
EngineAvailable: Boolean; // False on Delphi 7 stub
EngineNote: AnsiString; // human-readable availability / error reason
end;
單元
HPDFEInvoiceValidator
欄位
| 欄位 | 用途 |
|---|---|
Profile | 已載入 Schematron 的 profile 識別碼,對應發票一致性層級 |
TotalRules | 掃描到的 <assert> 與 <report> 項目數 |
Evaluated | context 與 test 實際被處理過的規則數 |
Skipped | 被舊式或 stub 引擎略過的規則數;XE2 之後為零 |
EvaluationErrors | 無法執行的規則運算式數量 |
Violations | 失敗的 assert 加上觸發的 report 總數 |
EngineAvailable | 只有 Delphi 7 stub 引擎時為 False |
EngineNote | 人眼可讀的可用性或錯誤原因 |
使用說明
- 從
IHPDFESchematronEngine.LastSummary或THPDFEInvoiceValidationReport.BusinessSummary讀取摘要 - 計數已預先算好,呼叫端不必掃描規則陣列就能渲染單行結果
EngineAvailable為 False 表示商務規則未執行,混合式發票必須採 fail-closed 策略