* xmlPatternMatch: * @comp: the precompiled pattern * @node: a node * * Test whether the node matches the pattern * * Returns 1 if it matches, 0 if it doesn't and -1 in case of failure */
| 2410 | * Returns 1 if it matches, 0 if it doesn't and -1 in case of failure |
| 2411 | */ |
| 2412 | int |
| 2413 | xmlPatternMatch(xmlPatternPtr comp, xmlNodePtr node) |
| 2414 | { |
| 2415 | int ret = 0; |
| 2416 | |
| 2417 | if ((comp == NULL) || (node == NULL)) |
| 2418 | return(-1); |
| 2419 | |
| 2420 | while (comp != NULL) { |
| 2421 | ret = xmlPatMatch(comp, node); |
| 2422 | if (ret != 0) |
| 2423 | return(ret); |
| 2424 | comp = comp->next; |
| 2425 | } |
| 2426 | return(ret); |
| 2427 | } |
| 2428 | |
| 2429 | /** |
| 2430 | * xmlPatternGetStreamCtxt: |