Once Lionel's done putting the new proposed QName/Namespace context classes
in the xpath_rwapi tree, I'd like to propose minor refactoring/renaming of
a few classes - especially the ones named '*Node'.
Although the names are appropriate at the micro scale - each of these
classes is a conceptual node - I think it's very confusing to have so many
Nodes in the hierarchy. I think I can see obvious confusions with the
org.w3c.dom.Node class; plus it's very difficult for newcomers in the open
source world to get up to speed with classnames like this.
Proposal: rename the following classes:
org.apache.xpath.rwapi.datamodel.Node --> XPathNode (or XPDMNode, for
XPath-DataModel, which is where it's really defined)
org.apache.xpath.rwapi.impl.parser.Node --> JJTNode (for JJTree node, since
this is really just providing the grammar-driven parser the interface to
build a tree)
org.apache.xpath.rwapi.impl.parser.SimpleNode --> ASTNode (for Abstract
Syntax Tree node, since this is really the root of the AST tree we hope to
build for XPath and XSLT in the future)
org.apache.xpath.rwapi.impl.parser.NodeFactory --> ASTNodeFactory (since
we'll be using a factory model, I want to make sure users don't confuse
this with any of the other factories we have in Xalan)
org.apache.xpath.rwapi.impl.parser.QName --> QNameNode or ASTQName (to
differentiate from the dataholding QName in new:org.apache.xml or
old:org.apache.xml.utils.
Another obvious change that I think [villard, curcuru, santiagopg] have
already agreed on in principle is to add some of the functionality from
org.apache.xalan.xsltc.compiler.SyntaxTreeNode into the
.impl.parser.ASTNode class, since we'll need a bunch of that stuff for
runtime implementations.
Comments? I hate to change the datamodel.Node name since it matches the
XPath spec directly, but it's really going to cause confusion with
developers later on.
- Shane
- Re: [xslt20][rwapi] Refactoring base 'Node' classes - com... Shane Curcuru
- Re: [xslt20][rwapi] Refactoring base 'Node' classes ... Joseph Kesselman
- Re: [xslt20][rwapi] Refactoring base 'Node' clas... Lionel Villard
