node-schematron
Version:
A pure-JS Schematron implementation for Node, browsers and CLI
20 lines (19 loc) • 701 B
TypeScript
import { Node } from 'slimdom';
import { Assert, AssertJson } from './Assert';
import { Result } from './Result';
import { Variable, VariableJson } from './Variable';
import { FontoxpathOptions } from './types';
export declare class Rule {
context: string;
variables: Variable[];
asserts: Assert[];
constructor(context: string, variables: Variable[], asserts: Assert[]);
validateNode(context: Node, parentVariables: {} | null, fontoxpathOptions: FontoxpathOptions): Result[];
static QUERY: string;
static fromJson(json: RuleJson): Rule;
}
export declare type RuleJson = {
context: string;
variables: VariableJson[];
asserts: AssertJson[];
};