[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/work/kdom/xpath
From: Frans Englich <frans.englich () telia ! com>
Date: 2005-07-28 1:51:49
Message-ID: 1122515509.923893.14279.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 439394 by englich:
(This code does not compile and hence is not tested -- it's pending KDOM
recoverage.)
* Created the class SingleType, which maps directly to the SingleType EBNF
construct. Hence, it represents a type which is atomic, and have
cardinality zero or one. This simplified code in the parser and the
type expressions.
* Removed the ComplexType class. It will first be relevant if a Schema stack
is implemented since there are no complex type in XDT, and it was only
creating code complexity.
* Created Cardinality::DisplayName(), and factorized
* Renamed ExpressionImpl::iterate() to evaluateSequence(). A bit clearer, and
consistent with ExpressionImpl::evaluateSingleton
* Moved the static function KXPATH_AST_REWRITE to be a member of
ExpressionImpl named performRewrite, since that's where it's used. Made the
function signature stricter too.
* Isolated all exception casting in ErrorContext. It would be interesting
to see if the StaticContext(which is an ErrorContext) could be
modified to temporarily not throw exceptions, such that multiple
errors could be reported.
* Made the type hierarchy a bit clearer, stronger, and to better represent the
hierachy, as shown in:
http://www.w3.org/TR/xpath-functions/XPathTypeHierarchy.gif. For
example, from an AnyAtomicType class, the schema hierachy can be
walked with xsSuperType(), and the XPath Data Model with
xdtSuperType().
* Added MappingIterator/MappingFunction, a nice mechanism stolen from
Saxon(MappingIterator/MappingFunction). Saved code, and will do so
even more.
* Added InfiniteExpressionImpl, for expressions that have an infinite amount
of operands(function calls are considered so, as well as the comma
operator), and TrinityExpression for expressions that have 3. So know
there's SoleExpression, UnaryExpression, BinaryExpression,
TrinityExpression, and InfiniteExpression(name suggestions
welcome..).
* Created the janitors/ dir. This contains helper classes, and "artificial"
AST nodes that doesn't correspond to a "real" XPath expression, but
are used for internal purposes. For example, an Atomizer instance is
inserted into the expression hierarchy when an expression's argument
must be atomic values, but the operand is not(say, it's a sequence of
nodes).
* Significant typing work: add TypeChecker(performs the function conversion
rules); CardinalityVerifier(checks cardinality on an operand);
Atomizer(performs atomization); ItemChecker(ensures the type). The
parser is also extended to handle the SequenceType construct better. A good
start, but otoh it's not more than that.
* The typing work enabled creation of expressions that relied on the typing
system: 'castable as'; 'instance of'; 'treat as'(managed by the
TypeChecker, becomes a pipeline of combinations of ItemChecker,
Atomizer, and CardinalityVerifier); the functions zero-or-one,
exactly-one, one-or-more(handled by CardinalityVerifier), and
fn:data(handled by Atomizer).
* Let the factory directly create boolean values instead of keeping
false()/true() functions that const folds to it. Simpler.
* Added tests, for the advancements. Not exhaustive, as usual. Perhaps it
could be an idea to move them to trunk/tests/kxpathtests, since it's getting
big.
* Implemented the fn:error() function. It is not very cool to do pre-evaluation on that
one.
* Implemented the static-base-uri and default-collation function. As with
false()/true(), they are implemented as AST-rewrites at construction
time.
* Implemented the fn:trace() function, sort of. A rigorous tracing system is
probably needed in order for that function to be useful.
* Work on QNames. Add the value(xs:QName), and the QName function(fn:QName)
* Print the static type of expressions in XPathHelper::ASTTree
* Removed all DOM interfaces. In the cases enums were embedded in classes,
they were moved to kdomxpath.h
* Dropped dependencies on DOM interfaces(except DOMString)
* Have introduced *tons* of bugs which will take a lot of time to debug,
but those can't be fixed right now.
M +2 -8 Makefile.am
D XPathEvaluator.cc
D XPathEvaluator.h
D XPathException.cc
D XPathException.h
D XPathExpression.cc
D XPathExpression.h
D XPathNSResolver.cc
D XPathNSResolver.h
D XPathNamespace.cc
D XPathNamespace.h
D XPathResult.cc
D XPathResult.h
A impl/Conformance.txt
M +12 -2 impl/ErrorContext.cc
M +8 -1 impl/ErrorContext.h
A impl/IDEAS
M +3 -2 impl/Makefile.am
M +9 -2 impl/StandaloneContextImpl.cc
M +10 -3 impl/StandaloneContextImpl.h
M +1 -7 impl/StaticContextImpl.cc
M +12 -5 impl/StaticContextImpl.h
M +80 -16 impl/TODO
M +5 -5 impl/XPathElementNSResolverImpl.cc
M +1 -2 impl/XPathElementNSResolverImpl.h
M +7 -5 impl/XPathExpressionImpl.cc
M +16 -15 impl/XPathNamespaceImpl.cc
M +7 -8 impl/XPathNamespaceImpl.h
M +13 -15 impl/XPathResultImpl.cc
M +4 -4 impl/XPathResultImpl.h
M +10 -0 impl/data/AnyURIImpl.cc
M +20 -5 impl/data/AnyURIImpl.h
M +3 -3 impl/data/AtomicValueImpl.cc
M +5 -12 impl/data/AtomicValueImpl.h
M +4 -4 impl/data/BooleanImpl.cc
M +1 -1 impl/data/BooleanImpl.h
M +6 -0 impl/data/DecimalImpl.cc
M +5 -0 impl/data/DecimalImpl.h
M +6 -0 impl/data/DoubleImpl.cc
M +5 -0 impl/data/DoubleImpl.h
M +7 -2 impl/data/EmptySequenceImpl.cc
M +6 -1 impl/data/EmptySequenceImpl.h
M +6 -0 impl/data/FloatImpl.cc
M +5 -0 impl/data/FloatImpl.h
M +6 -0 impl/data/IntegerImpl.cc
M +5 -0 impl/data/IntegerImpl.h
M +4 -3 impl/data/ItemImpl.h
M +4 -2 impl/data/Makefile.am
A impl/data/QNameValue.cc [License: LGPL (wrong address)]
A impl/data/QNameValue.h [License: LGPL (wrong address)]
M +3 -2 impl/data/StringImpl.cc
M +3 -6 impl/data/StringImpl.h
M +8 -0 impl/data/ValidationError.cc
M +5 -0 impl/data/ValidationError.h
M +5 -6 impl/expr/AndExpressionImpl.cc
M +5 -1 impl/expr/AndExpressionImpl.h
M +24 -0 impl/expr/BinaryExpressionImpl.cc
M +5 -0 impl/expr/BinaryExpressionImpl.h
M +126 -45 impl/expr/CastExpressionImpl.cc
M +38 -16 impl/expr/CastExpressionImpl.h
A impl/expr/CastableAsExpressionImpl.cc [License: LGPL (wrong address)]
A impl/expr/CastableAsExpressionImpl.h [License: LGPL (wrong address)]
M +12 -1 impl/expr/ContextItemImpl.cc
M +4 -1 impl/expr/ContextItemImpl.h
M +57 -8 impl/expr/ExpressionImpl.cc
M +29 -15 impl/expr/ExpressionImpl.h
M +24 -13 impl/expr/ExpressionSequenceImpl.cc
M +11 -11 impl/expr/ExpressionSequenceImpl.h
M +12 -16 impl/expr/IfExpressionImpl.cc
M +4 -9 impl/expr/IfExpressionImpl.h
A impl/expr/InfiniteExpressionImpl.cc [License: LGPL (v2+) (wrong address)]
A impl/expr/InfiniteExpressionImpl.h [License: LGPL (v2+) (wrong address)]
A impl/expr/InstanceOfExpressionImpl.cc [License: LGPL (wrong address)]
A impl/expr/InstanceOfExpressionImpl.h [License: LGPL (wrong address)]
M +8 -3 impl/expr/Makefile.am
M +1 -1 impl/expr/OperatorImpl.cc
M +1 -1 impl/expr/OperatorImpl.h
M +5 -6 impl/expr/OrExpressionImpl.cc
M +4 -1 impl/expr/OrExpressionImpl.h
M +21 -0 impl/expr/SoleExpressionImpl.cc
M +8 -49 impl/expr/SoleExpressionImpl.h
A impl/expr/TrinityExpressionImpl.cc [License: LGPL (wrong address)]
A impl/expr/TrinityExpressionImpl.h [License: LGPL (wrong address)]
M +49 -30 impl/expr/TypeChecker.cc
M +7 -2 impl/expr/TypeChecker.h
M +14 -0 impl/expr/UnaryExpressionImpl.cc
M +3 -53 impl/expr/UnaryExpressionImpl.h
M +7 -0 impl/expr/ValueComparisonImpl.cc
M +4 -0 impl/expr/ValueComparisonImpl.h
M +1 -1 impl/functions/BooleanFN.cc
M +6 -2 impl/functions/ConstructorFunctionsFactoryImpl.cc
M +1 -1 impl/functions/CountFN.cc
M +1 -1 impl/functions/EmptyFN.cc
A impl/functions/ErrorFN.cc [License: LGPL (wrong address)]
A impl/functions/ErrorFN.h [License: LGPL (wrong address)]
M +1 -1 impl/functions/ExistsFN.cc
D impl/functions/FalseFN.cc
D impl/functions/FalseFN.h
M +29 -10 impl/functions/FunctionCallImpl.cc
M +9 -16 impl/functions/FunctionCallImpl.h
M +1 -0 impl/functions/FunctionFactoryImpl.cc
M +1 -1 impl/functions/FunctionFactoryImpl.h
M +10 -0 impl/functions/FunctionSignature.cc
M +5 -1 impl/functions/FunctionSignature.h
M +9 -7 impl/functions/Makefile.am
M +1 -1 impl/functions/NotFN.cc
A impl/functions/QNameFN.cc [License: LGPL (wrong address)]
A impl/functions/QNameFN.h [License: LGPL (wrong address)]
A impl/functions/ResolveURIFN.cc [License: LGPL (wrong address)]
A impl/functions/ResolveURIFN.h [License: LGPL (wrong address)]
M +101 -27 impl/functions/SystemFunctionFactoryImpl.cc
A impl/functions/TraceFN.cc [License: LGPL (wrong address)]
A impl/functions/TraceFN.h [License: LGPL (wrong address)]
D impl/functions/TrueFN.cc
D impl/functions/TrueFN.h
M +5 -0 impl/iterators/EmptySequenceIteratorImpl.cc
M +5 -0 impl/iterators/EmptySequenceIteratorImpl.h
M +20 -2 impl/iterators/ExpressionListIteratorImpl.cc
M +8 -2 impl/iterators/ExpressionListIteratorImpl.h
M +4 -2 impl/iterators/Makefile.am
A impl/iterators/MappingCallback.cc [License: LGPL (wrong address)]
A impl/iterators/MappingCallback.h [License: LGPL (wrong address)]
A impl/iterators/MappingIterator.cc [License: LGPL (wrong address)]
A impl/iterators/MappingIterator.h [License: LGPL (wrong address)]
M +12 -0 impl/iterators/SequenceIteratorImpl.h
M +10 -4 impl/iterators/SingletonSequenceIteratorImpl.cc
M +9 -0 impl/iterators/SingletonSequenceIteratorImpl.h
A impl/janitors (directory)
A impl/janitors/Atomizer.cc [License: LGPL (wrong address)]
A impl/janitors/Atomizer.h [License: LGPL (wrong address)]
A impl/janitors/CardinalityVerifier.cc [License: LGPL (wrong address)]
A impl/janitors/CardinalityVerifier.h [License: LGPL (wrong address)]
A impl/janitors/ItemVerifier.cc [License: LGPL (wrong address)]
A impl/janitors/ItemVerifier.h [License: LGPL (wrong address)]
A impl/janitors/Makefile.am
A impl/janitors/Makefile.in
M +12 -5 impl/parser/ParserCentral.cc
M +366 -321 impl/parser/XPathLexer.cc
M +0 -8 impl/parser/XPathLexer.h
M +9 -2 impl/parser/XPathLexer.l
M +497 -408 impl/parser/XPathParser.cc
M +33 -16 impl/parser/XPathParser.h
M +1410 -1280 impl/parser/XPathParser.output
M +132 -84 impl/parser/XPathParser.ypp
M +70 -6 impl/type/AnyAtomicTypeImpl.cc
M +43 -3 impl/type/AnyAtomicTypeImpl.h
A impl/type/AnyItemTypeImpl.cc [License: LGPL (v2+) (wrong address)]
A impl/type/AnyItemTypeImpl.h [License: LGPL (v2+) (wrong address)]
M +2 -2 impl/type/AnySimpleTypeImpl.cc
M +1 -1 impl/type/AnySimpleTypeImpl.h
M +1 -6 impl/type/AnyTypeImpl.cc
M +1 -6 impl/type/AnyTypeImpl.h
M +16 -2 impl/type/BuiltinAtomicTypeImpl.cc
M +4 -1 impl/type/BuiltinAtomicTypeImpl.h
M +28 -2 impl/type/BuiltinItemTypeImpl.cc
M +19 -2 impl/type/BuiltinItemTypeImpl.h
M +58 -2 impl/type/BuiltinTypes.cc
M +8 -0 impl/type/BuiltinTypes.h
M +25 -6 impl/type/Cardinality.cc
M +93 -15 impl/type/Cardinality.h
M +51 -4 impl/type/CommonSequenceTypes.h
D impl/type/ComplexTypeImpl.cc
D impl/type/ComplexTypeImpl.h
M +23 -1 impl/type/ItemTypeImpl.h
M +8 -6 impl/type/Makefile.am
M +15 -1 impl/type/NOTATIONTypeImpl.cc
M +2 -0 impl/type/NOTATIONTypeImpl.h
A impl/type/NodeTypeImpl.cc [License: LGPL (v2+) (wrong address)]
A impl/type/NodeTypeImpl.h [License: LGPL (v2+) (wrong address)]
M +9 -12 impl/type/SchemaTypeImpl.h
M +9 -21 impl/type/SequenceType.cc
M +8 -1 impl/type/SequenceType.h
A impl/type/SingleType.cc [License: LGPL (v2+) (wrong address)]
A impl/type/SingleType.h [License: LGPL (v2+) (wrong address)]
M +1 -1 impl/type/UntypedImpl.cc
M +1 -1 impl/type/UntypedImpl.h
M +1 -1 impl/utils/Makefile.am
M +1 -1 impl/utils/NamespaceResolver.h
M +21 -12 impl/utils/SharedList.h
M +12 -2 impl/utils/SharedQName.cc
M +12 -4 impl/utils/SharedQName.h
M +1 -1 impl/utils/SourceLocator.cc
M +6 -6 impl/utils/SourceLocator.h
M +29 -6 impl/utils/XPathHelper.cc
M +128 -36 kdomxpath.h
M +1 -1 tests/Makefile.am
M +27 -9 tests/data/casting.xml
A tests/data/conditionals.xml
M +3 -0 tests/data/expressions.xml
M +112 -14 tests/data/functions.xml
A tests/data/instanceof.xml
M +25 -15 tests/data/parser.xml
A tests/data/treatas.xml
M +1 -0 tests/main.cc
M +29 -33 tests/parser.cc
M +4 -4 tests/parser.h
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic