Lines Matching defs:pattern

12  *        - multiple rules applying in a single pattern/node
34 #include <libxml/pattern.h>
103 xmlSchematronRulePtr patnext;/* the next rule in the pattern list */
107 xmlPatternPtr pattern; /* the compiled pattern associated */
114 * A Schematrons pattern
119 xmlSchematronPatternPtr next;/* the next pattern in the list */
121 xmlChar *name; /* the name of the pattern */
396 xmlPatternPtr pattern;
403 * Try first to compile the pattern
405 pattern = xmlPatterncompile(context, ctxt->dict, XML_PATTERN_XPATH,
407 if (pattern == NULL) {
422 ret->pattern = pattern;
463 if (rules->pattern)
464 xmlFreePattern(rules->pattern);
476 * @node: the node hosting the pattern
477 * @id: the id or name of the pattern
479 * Add a pattern to a schematron
494 xmlSchematronPErrMemory(ctxt, "allocating schema pattern", node);
850 xmlSchematronPatternPtr pattern,
878 ruleptr = xmlSchematronAddRule(ctxt, ctxt->schema, pattern,
954 * @pat: the pattern node
956 * parse a pattern element
962 xmlSchematronPatternPtr pattern;
972 pattern = xmlSchematronAddPattern(ctxt, ctxt->schema, pat, id);
973 if (pattern == NULL) {
982 xmlSchematronParseRule(ctxt, pattern, cur);
1194 if (IS_SCHEMATRON(cur, "pattern")) {
1200 "Expecting a pattern element instead of %s", cur->name, NULL);
1208 "The schematron document '%s' has no pattern",
1371 xmlSchematronTestPtr test, xmlNodePtr cur, xmlSchematronPatternPtr pattern, int success) {
1427 (pattern == NULL)?NULL:((const char *) pattern->name),
1445 * @pattern: the current pattern
1447 * called from the validation engine when starting to check a pattern
1451 xmlSchematronPatternPtr pattern) {
1452 if ((ctxt == NULL) || (pattern == NULL))
1454 if ((ctxt->flags & XML_SCHEMATRON_OUT_QUIET) || (ctxt->flags & XML_SCHEMATRON_OUT_ERROR)) /* Error gives pattern name as part of error */
1461 if (pattern->name == NULL)
1463 snprintf(msg, 999, "Pattern: %s\n", (const char *) pattern->name);
1603 xmlSchematronTestPtr test, xmlDocPtr instance, xmlNodePtr cur, xmlSchematronPatternPtr pattern)
1650 xmlSchematronReportSuccess(ctxt, test, cur, pattern, !failed);
1669 xmlSchematronPatternPtr pattern;
1693 if (xmlPatternMatch(rule->pattern, cur) == 1) {
1696 xmlSchematronRunTest(ctxt, test, instance, cur, (xmlSchematronPatternPtr)rule->pattern);
1709 pattern = ctxt->schema->patterns;
1711 while (pattern != NULL) {
1712 xmlSchematronReportPattern(ctxt, pattern);
1715 * TODO convert the pattern rule to a direct XPath and
1716 * compute directly instead of using the pattern matching
1722 rule = pattern->rules;
1724 if (xmlPatternMatch(rule->pattern, cur) == 1) {
1727 xmlSchematronRunTest(ctxt, test, instance, cur, pattern);
1736 pattern = pattern->next;