v0.3.1 with Saxon fully working
This commit is contained in:
18
src/validation/validationTypes.ts
Normal file
18
src/validation/validationTypes.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
export type DiagnosticSeverity = 'info' | 'warning' | 'error';
|
||||
|
||||
export interface DiagnosticMessage {
|
||||
severity: DiagnosticSeverity;
|
||||
message: string;
|
||||
source: string;
|
||||
from?: number;
|
||||
to?: number;
|
||||
}
|
||||
|
||||
export interface ParsedXmlDocument {
|
||||
document: Document;
|
||||
diagnostics: DiagnosticMessage[];
|
||||
}
|
||||
|
||||
export function hasErrors(diagnostics: DiagnosticMessage[]): boolean {
|
||||
return diagnostics.some((diagnostic) => diagnostic.severity === 'error');
|
||||
}
|
||||
Reference in New Issue
Block a user