Commit 22678566 authored by Kasimier T. Buchcik's avatar Kasimier T. Buchcik

Changed the XPath "." to resolve only on the first level for XML Schema

* pattern.c: Changed the XPath "." to resolve only on the first
  level for XML Schema IDCs. This should not affect pattern-like
  resolution on every level.
parent 942d6c7b
Mon May 9 17:56:58 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
* pattern.c: Changed the XPath "." to resolve only on the first
level for XML Schema IDCs. This should not affect pattern-like
resolution on every level.
Sun May 8 13:35:39 CEST 2005 Daniel Veillard <daniel@veillard.com>
* xmlmemory.c: fixed #169630 segfault in xmlMemDisplay
......
......@@ -1582,8 +1582,17 @@ xmlStreamPushInternal(xmlStreamCtxtPtr stream,
* Fast check for ".".
*/
if (comp->nbStep == 0) {
if (nodeType == XML_ELEMENT_NODE)
ret = 1;
/*
* For non-pattern like evaluation like XML Schema IDCs,
* this will match if we are at the first level only,
* otherwise on every level.
*/
if ((nodeType == XML_ELEMENT_NODE) &&
(((stream->flags & XML_PATTERN_NOTPATTERN) == 0) ||
(stream->level == 0))) {
ret = 1;
}
stream->level++;
goto stream_next;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment