Lines Matching defs:rule

97  * A Schematrons rule
102 xmlSchematronRulePtr next; /* the next rule in the list */
103 xmlSchematronRulePtr patnext;/* the next rule in the pattern list */
105 xmlChar *context; /* the context evaluation rule */
290 * @rule: the parent rule
302 xmlSchematronRulePtr rule,
308 if ((ctxt == NULL) || (rule == NULL) || (node == NULL) ||
336 if (rule->tests == NULL) {
337 rule->tests = ret;
339 xmlSchematronTestPtr prev = rule->tests;
375 * @node: the node hosting the rule
379 * Add a rule to a schematron
409 xmlSchematronPErrMemory(ctxt, "allocating schema rule", node);
835 * @rule: the rule node
837 * parse a rule element
842 xmlNodePtr rule)
852 if ((ctxt == NULL) || (rule == NULL)) return;
854 context = xmlGetNoNsProp(rule, BAD_CAST "context");
856 xmlSchematronPErr(ctxt, rule,
858 "rule has no context attribute",
862 xmlSchematronPErr(ctxt, rule,
864 "rule has an empty context attribute",
870 rule, context, NULL);
877 cur = rule->children;
936 xmlSchematronPErr(ctxt, rule,
938 "rule has no assert nor report element", NULL, NULL);
972 if (IS_SCHEMATRON(cur, "rule")) {
978 "Expecting a rule element instead of %s", cur->name, NULL);
986 "Pattern has no rule element", NULL, NULL);
1540 * Validate a rule against a tree instance at a given position
1613 xmlSchematronRulePtr rule;
1634 rule = ctxt->schema->rules;
1635 while (rule != NULL) {
1636 if (xmlPatternMatch(rule->pattern, cur) == 1) {
1637 test = rule->tests;
1643 rule = rule->next;
1658 * TODO convert the pattern rule to a direct XPath and
1665 rule = pattern->rules;
1666 while (rule != NULL) {
1667 if (xmlPatternMatch(rule->pattern, cur) == 1) {
1668 test = rule->tests;
1674 rule = rule->patnext;