* 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
* 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
* 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
* Compiler.cs: Add support for key, utility function to parse
QName's from the XsltContext. Store keys in the CompiledStyle, not
in the Stylesheet.
* XslKey.cs: Real implementation
* XslStylesheet.cs: Move the keys to CompiledStyle.
* XsltCompiledContext.cs: Implement the key function
* Iterator.cs: Allow creation of an EnumeratorIterator with an
XmlNamespaceManager
svn path=/trunk/mcs/; revision=16959
* Parser.jay:
Nested predicates (uses ExprFilter instead)
more type safety
make grammar look more like w3c spec
* Expression.cs:
remove ExprStep, ExprPredicates
NodeTest is now a NodeSet
more type-safety
* Iterator.cs:
PredicateIterator now only takes a single predicate expression
more type-safety
* XPathNavigator.cs:
simplified SelectTest
* XPathException.cs:
fixed indenting
svn path=/trunk/mcs/; revision=16953
* Iterator.cs: added NullIterator to handle unspecified contexts
* XPathNavigator.cs: use NullIterator insted of SelfIterator when context is unspecified.
* XPathNodeIterator.cs: change default _count to -1 to prevent recalculations for NullIterators
svn path=/trunk/mcs/; revision=7424
* Expression.cs, Parser.jay: allow ExprSLASH to take a generic expression as its left argument.
* Iterator.cs: fix SlashIterator.Clone() when _iterRight is null.
* DefaultContext.cs: fix id() return type.
svn path=/trunk/mcs/; revision=7422
* Iterator.cs:
- rename UnionIterator to MergedIterator,
- create new UnionIterator to implment uniqueness for '|' operator
- fix position bug in ArrayListIterator.Clone()
* Expression.cs: use new UnionIterator constructor syntax
svn path=/trunk/mcs/; revision=5817