forked from GNOME/libxml2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added first test for the patterns a few fixes Daniel
* Makefile.am configure.in result/pattern/simple test/pattern/simple.*: added first test for the patterns * pattern.c xmllint.c: a few fixes Daniel
- Loading branch information
Daniel Veillard
committed
Jan 30, 2005
1 parent
8f2efae
commit f9d1691
Showing
8 changed files
with
82 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
Sun Jan 30 23:35:19 CET 2005 Daniel Veillard <[email protected]> | ||
|
||
* Makefile.am configure.in result/pattern/simple | ||
test/pattern/simple.*: added first test for the patterns | ||
* pattern.c xmllint.c: a few fixes | ||
|
||
Sun Jan 30 19:27:23 CET 2005 Daniel Veillard <[email protected]> | ||
|
||
* pattern.c include/libxml/pattern.h xmllint.c: added a | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,20 @@ | |
* [email protected] | ||
*/ | ||
|
||
/* | ||
* TODO: | ||
* - compilation flags to check for specific syntaxes | ||
* using flags of xmlPatterncompile() | ||
* - making clear how pattern starting with / or . need to be handled, | ||
* currently push(NULL, NULL) means a reset of the streaming context | ||
* and indicating we are on / (the document node), probably need | ||
* something similar for . | ||
* - xmlPatterncompile support of namespaces arguments, I'm not sure | ||
* it's implemented and definitely not tested | ||
* - handling of disjunction "pattern1 | pattern2" mean needed to build | ||
* and check a list internally | ||
*/ | ||
|
||
#define IN_LIBXML | ||
#include "libxml.h" | ||
|
||
|
@@ -1348,7 +1362,6 @@ xmlStreamPush(xmlStreamCtxtPtr stream, | |
} | ||
} else if (!(comp->steps[step].flags & XML_STREAM_STEP_DESC)) { | ||
/* didn't match, discard */ | ||
printf("discard %d\n", i); | ||
stream->states[2 * i] = -1; | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
Node /a matches pattern a | ||
Node /a/b matches pattern b | ||
Node /a/b matches pattern b | ||
Node /a matches pattern /a | ||
Node /a/b matches pattern a/b | ||
Node /a/b/c matches pattern a/b/c | ||
Node /a matches pattern //a | ||
Node /a/b matches pattern //b | ||
Node /a/b/c matches pattern //c | ||
Node /a/b matches pattern a//b | ||
Node /a/b/c matches pattern a//c | ||
Node /a/b/c matches pattern b//c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
a | ||
b | ||
b | ||
/a | ||
/b | ||
/c | ||
a/b | ||
a/b/c | ||
//a | ||
//b | ||
//c | ||
a//b | ||
a//c | ||
b//c | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<a> | ||
<b> | ||
<c d="attr">text</c> | ||
</b> | ||
</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters