o The prefix to resolve should not include following ':*' characters
o NextToken changes CurTokenString, so NextToken must be after reading CurTokenString.
o Added a test for that
* XPath test suite, fixed comparison of numeric result (it is quite tricky in presence of NaNs).
git-svn-id: trunk@15639 -
* Progress with namespace support. Resolve namespace prefixed while parsing, compare namespaceURI/localNames while evaluating. Existing tests for namespace-uri(), local-name() and name() now all pass, but resolving interface isn't ready for general use yet.
* Fixed name() to default to context node if argument is omitted.
xpathts.pp:
+ support for prefix resolving while testing.
git-svn-id: trunk@13846 -
- Removed (made abstract) default implementations of TXPathVariable.AsText(), AsNumber() and
AsBoolean(). These methods are overriden by all TXPathVariable descendants, therefore in
TXPathVariable itself they are dead and only increase executable size.
- Removed debug statement committed by accident in r13256.
tests/xpathts.pp:
* Annotated some tests, added a few tests for name(), namespace-uri() and local-name().
git-svn-id: trunk@13322 -
src/xpath.pp:
+ Implemented sum() and normalize-space() core functions.
* Rewrote comparison code, nodesets are now handled correctly (to the
extent of the tests which I could find).
* starts-with() and contains() return True when second argument is an
empty string - that differs from Pos() behavior.
* NaNs are propagated through mod operator, floor() and ceiling().
* Fixed memory leak caused by not releasing arguments after function
calls.
* string-value of a nodeset is the value of its first node, not all
nodes glued together.
tests/xpathts.pp:
+ Added 120 tests, most coming from OASIS Prototype XSLT/XPath 1.0
conformance test suite.
+ Tests can now take an input xml data as a string.
git-svn-id: trunk@13046 -
+ added TXPathBinaryNode as a common ancestor for binary operations;
+ TXPathBooleanOpNode now handles only 'and' and 'or' operators,
the purpose is to not evaluate the second argument if the result can
be determined by the first argument;
* Comparison operations moved to TXPathCompareNode and fixed
to support INFs and NANs correctly;
* Fixed TranslateWideString() that was not deleting characters;
* Fixed 'substring-after' function so its result is empty when argument
string does not contain the pattern;
* Fixed 'round' funcion so it complies to the specs;
* Completed implementation of 'substring' function (but surrogate pairs
are not handled yet);
* Mask exInvalidOp and exZeroDivide FPU exceptions while evaluating
expressions, this ensures correct calculations with respect to INFs
and NANs.
+ Added testsuite for xpath
git-svn-id: trunk@12961 -