From: Bjorn Reese Date: Sun, 4 Mar 2001 12:43:14 +0000 (+0000) Subject: NodeType test has wrongly placed X-Git-Tag: v1.1.28~1427 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b97535b4aacdbb411a80037039c21623bc48a2d5;p=platform%2Fupstream%2Flibxslt.git NodeType test has wrongly placed --- diff --git a/libxslt/pattern.c b/libxslt/pattern.c index 1b4eae7..38ace5b 100644 --- a/libxslt/pattern.c +++ b/libxslt/pattern.c @@ -1270,24 +1270,22 @@ xsltCompileLocationPathPattern(xsltParserContextPtr ctxt) { ctxt->error = 1; return; } - if (!xmlXPathIsNodeType(name)) { - SKIP_BLANKS; - if (CUR == '(') { - xsltCompileIdKeyPattern(ctxt, name, 1); - if ((CUR == '/') && (NXT(1) == '/')) { - PUSH(XSLT_OP_ANCESTOR, NULL, NULL); - NEXT; - NEXT; - SKIP_BLANKS; - xsltCompileRelativePathPattern(ctxt, NULL); - } else if (CUR == '/') { - PUSH(XSLT_OP_PARENT, NULL, NULL); - NEXT; - SKIP_BLANKS; - xsltCompileRelativePathPattern(ctxt, NULL); - } - return; + SKIP_BLANKS; + if ((CUR == '(') && !xmlXPathIsNodeType(name)) { + xsltCompileIdKeyPattern(ctxt, name, 1); + if ((CUR == '/') && (NXT(1) == '/')) { + PUSH(XSLT_OP_ANCESTOR, NULL, NULL); + NEXT; + NEXT; + SKIP_BLANKS; + xsltCompileRelativePathPattern(ctxt, NULL); + } else if (CUR == '/') { + PUSH(XSLT_OP_PARENT, NULL, NULL); + NEXT; + SKIP_BLANKS; + xsltCompileRelativePathPattern(ctxt, NULL); } + return; } xsltCompileRelativePathPattern(ctxt, name); }