* XPathDocument.cs :
- For .NET 2.0, added a switch to support new XPathDocument2.
If switch is off, then it uses DTM.
- Implemented remaining 2.0 bits (except for Obsolete ones).
To use them in XPathDocument, set environment MONO_XPATH_DOCUMENT_2=yes
(It is still too unstable to pass all nunit tests and standalone XSLT
tests).
svn path=/trunk/mcs/; revision=31724
* XPathDocument.cs : for .ctor() and .ctor(XmlNameTable), now it
creates Mono.Xml.XPath.XPathEditableDocument and thus supports
IXPathEditable.CreateEditor().
svn path=/trunk/mcs/; revision=31548
* XPathEditableNavigator.cs : Implemented InsertAfter() and
PrependChild(); they are virtual, not abstract.
* XPathNavigator.cs :
Implemented many 2.0 virtual properties and methods that were
abstract in 1.x.
Implemented some Select() methods that uses IXmlNamespaceResolver.
Implemented most of ValueAsXxx() using XQueryConvert.
IsNode is always true. Implemented OuterXml and WriteSubtree() (but
actually they don't work because it depends on ReadSubtree()).
svn path=/trunk/mcs/; revision=31542
* DefaultContext.cs : Add XPathNavigator input support for ToBoolean()
and ToNavigator().
* Expression.cs : In Equality comparison, evaluate XPathNavigator in
the same as well as NodeSet. This fixes bug #59134.
svn path=/trunk/mcs/; revision=28237
* Expression.cs : We should not catch all kind of exception. Just
throwing any kind of exception would be preferable.
Added support for XPathNavigator values.
svn path=/trunk/mcs/; revision=27726
* DefaultContext.cs : Removed MonoTODO. done.
* Expression.cs : handle XPathResultType.Navigator in some places and
removed MonoTODO. Mark MonoTODO with explicit comments (though they
are mostly pointing out possibilities of optimization).
Removed extra check that depended on the old bugs.
* XPathResultType.cs : Fixed .Navigator that had the same value as
.String.
svn path=/trunk/mcs/; revision=27224
* Iterator.cs : Added overriden Count properties for some iterators
(this fixes the half of #50678).
Added ListIterator class (which can reduce GetEnumerator()).
In some places we can omit clone for Current property, so added
some check logic (It has no effect as yet).
* Expression.cs, DefaultContext.cs :
use ListIterator instead of EnumeratorIterator.
svn path=/trunk/mcs/; revision=22934
* DefaultContext.cs : Avoid exception if possible.
* Iterator.cs : Fixed PrecedingSiblingIterator.MoveNext(). When the
nav was positioned at the first, it incorrectly points itself.
Don't add names to name table while it is useless and expensive.
svn path=/trunk/mcs/; revision=22544
* Iterator.cs : On its iteration, moving Current must not affect to
MoveNext(). To assure this, Current must be a clone of navigator.
Removed unused code.
svn path=/trunk/mcs/; revision=21225
* Expression.cs : XPathSorters.Compare() should compare document
position. See last sentence of XSLT 1.0 secion 10.
svn path=/trunk/mcs/; revision=20720
* DefaultContext.cs : Overrode all functions' ToString().
XPathFunctions.ToNumber() trims whitespaces at both side.
Fixed NullReferenceException in normalize-space().
* Iterator.cs : Fixed AncestorOrSelfIterator.MoveNext() didn't handle
attribute or namespace node correctly.
SlashIterator.Clone() didn't clone "next node iterator" correctly.
EnumeratorIterator.ctor() should raise an error (not at Clone())
when the target IEnumerator is not ICloneable.
svn path=/trunk/mcs/; revision=20711
* Expression.cs : namespace axis now traversed in reverse order, so it
requires sorting.
* Iterator.cs : UnionIterator.Clone() was incomplete.
NamespaceItarator() should be reverse order (special handling
because of XPathNavigator specification).
svn path=/trunk/mcs/; revision=20565
* Parser.jay, Expression.cs, Iterator.cs :
Added ExprParens and ParensIterator classes which is used to handle
precedence of parenthesized expressions.
(e.g. consider "(preceding::*)[3]" and "preceding::[3]" )
* Expression.cs, Iterator.cs :
Added RequireSorting property for each Expr and BaseIterator classes.
SlashIterator.MoveNext() now considers correct sorting. But
considering performance, it separates two logics, sorted and sortless
depending on RequireSorting of left iterator and right expression.
* Iterator.cs :
SimpleIterator.ctor() should consider when nav is null.
FollowingIterator.MoveNext() and PrecedingIterator.MoveNext() should
not return any nodes.
AncestorIterator and AncestorOrSelfIterator copy ctr() should clone
positions.
AncestorIterator.MoveNext() should skip Root if context node is
Root itself.
FollowingIterator.MoveNext() should not handle children of context
itself.
PrecedingIterator.MoveNext() should skip its ancestors.
AxisIterator.ReverseAxis should be dependent on its containing iter.
UnionIterator.MoveNext() should consider comparison of nodes in
different document. The behavior is implementation dependent.
(see XSLT spec 12.1)
svn path=/trunk/mcs/; revision=20389
* DefaultContext.cs : XPathFunctions.ToNumber() should catch overflow.
XPathFunctionId.cs : Exposed Id expression.
* Expression.cs : Added ExprLiteral.Value, and class ExprParens (it
will be used to solve evaluation precedence problem).
svn path=/trunk/mcs/; revision=20225
* Iterator.cs: (AxisIterator.ComparablePosition): Remove. Let
it inherit from the base class. This made b[2] evaluated on
<a /><b /><c /><a /><b /><c /> return the first b node because
in the ChildIterator it was the second node and seemed to satsify
the predicate.
svn path=/trunk/mcs/; revision=19706
* Iterator.cs : Added bool ReverseAxis property to identify whether
the iterator is in reverse order or not. Added ComparablePosition
for correct position comparison for PredicateIterator and reverse-
order-axes. Modified AncestorIterator, AncestorOrSelfIterator,
PrecedingIterator and PrecedingSiblingIterator to make MoveNext()
return their nodes in document order. This fixes bugzilla #39079.
svn path=/trunk/mcs/; revision=19621
* Iterator.cs : DescendantIterator and FollowingIterator also should
not MoveNext() after they reached to the end.
svn path=/trunk/mcs/; revision=19085
* DefaultContext.cs (translate): translate ("abc", "c", "") = "ab"
not "abc".
* Iterator.cs, Expression.cs: All axes are
SimpleIterators. SimpleIterators are gaurenteed to give the same
XPathNavigator in Current. Make AxisIterator take a
SimpleIterator, not any old BaseIterator. Will allow us to make
NameTable optimizations and avoid quite a few strcmp's.
svn path=/trunk/mcs/; revision=18326