|Re: psychopath API changes (was Re: [Fwd: Re: [Wtp-wst-dev] Dates Times..and Duration fixes])|
http://wiki.eclipse.org/XSL_Tools/API_Tooling Now for the rest of the comments. Mukul Gandhi wrote:
Mukul, please open a bug for this as node_position() should be added back and it's implementation needs to call the new way of doing things. As ResultSequenceFactory is API. Anything that you are currently using that is not in an internal package, we should add back if it has been removed.Hi all, I have full support for the WTP API policy shared by David Williams. However, I would summarize below the current issues between PsychoPath and Xerces, my analysis of the situation, and possible actions. Xerces currently makes calls like following, to PsychoPath library (which works fine with Eclipse WTP 3.2M1 release, as well) : ResultSequence nodeEvalRS = ResultSequenceFactory.create_new(); nodeEvalRS.add(new ElementType(contextNode, fDynamicContext.node_position(contextNode))); The current PsychoPath code base on Eclipse CVS server, has made following changes for above API calls: node_position method is now not available, and is I think renamed to, context_position().
One thing to keep in mind is that ElementType is in an internal package, which means that it really isn't ment to be API yet, because it was bound to change due to work on the W3C Test Suite. In addition to the link that David Williams sent we also have:The ElementType constructor, which is used by above Xerces code , is removed from current code base. We now only have following constructors on ElementType.java: ElementType() ElementType(Element v) I foresee following options, about how Xerces can recover from these API changes in current PsychoPath code base (with some side remarks as well): 1. Xerces needs to change it's code to use the new PsychoPath APIs. But that would force Xerces users (who would use PsychoPath based XML Schema 1.1 features), to work on JDK 1.5. So this is probably not a desirable solution for Xerces.
http://wiki.eclipse.org/Provisional_API_Guidelines http://wiki.eclipse.org/Naming_Conventions http://wiki.eclipse.org/WTP_API_PolicyThis is why before the wst.xsl items we moved much of the PsychoPath processor classes into Internal Packages. Yes, I realize that adopters currently need to access the schema type classes, but it was the best compromise we could come up with at the time.
So with this said, what we will need after we stabilize the internal Data Types, is to have an API request made so that we can correctly expose those items as Interfaces or Classes as appropriate.
I can see doing this for the non-internal package changes that were made, so that we maintain that contract, however, internal packages adopters will have to make the necessary changes. Now with this said, going forward we can try to leave a migration path (especially for the Schema Types).2. An easy solution could be, which involves less work both for Xerces and PsychoPath could be: PsychoPath provides the earlier APIs in deprecated mode, and delegate the older APIs to the new APIs. The new PsychoPath APIs would exist, it's just that two of the missing APIs in PsychoPath (as mention above, ) are added again. From PsychoPath/XPath 2.0 design point of view, this may not be a nice solution, but it will solve Xerces's problem at the moment, with lesser disruption.
My goal is to hopefully have the processor passing the test suite. Hopefully, Jesper can get his current refactoring work implemented during 3.2M3, and we can work on providing some true API layers for adopters to use for some parts that aren't currently exposed at the level they need to be.I am also willing to do this change for PsychoPath as well :)
Back to the top