OLD | NEW |
1 /* | 1 /* |
2 * pattern.c: Implemetation of the template match compilation and lookup | 2 * pattern.c: Implemetation of the template match compilation and lookup |
3 * | 3 * |
4 * Reference: | 4 * Reference: |
5 * http://www.w3.org/TR/1999/REC-xslt-19991116 | 5 * http://www.w3.org/TR/1999/REC-xslt-19991116 |
6 * | 6 * |
7 * See Copyright for the status of this software. | 7 * See Copyright for the status of this software. |
8 * | 8 * |
9 * daniel@veillard.com | 9 * daniel@veillard.com |
10 */ | 10 */ |
(...skipping 1769 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1780 name = xsltScanNCName(ctxt); | 1780 name = xsltScanNCName(ctxt); |
1781 if (name == NULL) { | 1781 if (name == NULL) { |
1782 xsltTransformError(NULL, NULL, NULL, | 1782 xsltTransformError(NULL, NULL, NULL, |
1783 "xsltCompileLocationPathPattern : Name expected\n"); | 1783 "xsltCompileLocationPathPattern : Name expected\n"); |
1784 ctxt->error = 1; | 1784 ctxt->error = 1; |
1785 return; | 1785 return; |
1786 } | 1786 } |
1787 SKIP_BLANKS; | 1787 SKIP_BLANKS; |
1788 if ((CUR == '(') && !xmlXPathIsNodeType(name)) { | 1788 if ((CUR == '(') && !xmlXPathIsNodeType(name)) { |
1789 xsltCompileIdKeyPattern(ctxt, name, 1, novar, 0); | 1789 xsltCompileIdKeyPattern(ctxt, name, 1, novar, 0); |
| 1790 if (ctxt->error) |
| 1791 return; |
1790 if ((CUR == '/') && (NXT(1) == '/')) { | 1792 if ((CUR == '/') && (NXT(1) == '/')) { |
1791 PUSH(XSLT_OP_ANCESTOR, NULL, NULL, novar); | 1793 PUSH(XSLT_OP_ANCESTOR, NULL, NULL, novar); |
1792 NEXT; | 1794 NEXT; |
1793 NEXT; | 1795 NEXT; |
1794 SKIP_BLANKS; | 1796 SKIP_BLANKS; |
1795 xsltCompileRelativePathPattern(ctxt, NULL, novar); | 1797 xsltCompileRelativePathPattern(ctxt, NULL, novar); |
1796 } else if (CUR == '/') { | 1798 } else if (CUR == '/') { |
1797 PUSH(XSLT_OP_PARENT, NULL, NULL, novar); | 1799 PUSH(XSLT_OP_PARENT, NULL, NULL, novar); |
1798 NEXT; | 1800 NEXT; |
1799 SKIP_BLANKS; | 1801 SKIP_BLANKS; |
(...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2502 if (style->parentMatch != NULL) | 2504 if (style->parentMatch != NULL) |
2503 xsltFreeCompMatchList(style->parentMatch); | 2505 xsltFreeCompMatchList(style->parentMatch); |
2504 if (style->textMatch != NULL) | 2506 if (style->textMatch != NULL) |
2505 xsltFreeCompMatchList(style->textMatch); | 2507 xsltFreeCompMatchList(style->textMatch); |
2506 if (style->piMatch != NULL) | 2508 if (style->piMatch != NULL) |
2507 xsltFreeCompMatchList(style->piMatch); | 2509 xsltFreeCompMatchList(style->piMatch); |
2508 if (style->commentMatch != NULL) | 2510 if (style->commentMatch != NULL) |
2509 xsltFreeCompMatchList(style->commentMatch); | 2511 xsltFreeCompMatchList(style->commentMatch); |
2510 } | 2512 } |
2511 | 2513 |
OLD | NEW |