Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: psychopath API changes (was Re: [Fwd: Re: [Wtp-wst-dev] Dates Times..and Duration fixes])

Comments inline below. One thing of note as well, I encourage all committters that are working on wst.xsl components to make sure they have their PDE API Tooling reference platforms setup. This should be an WTP 3.1 installation with the XSL Tools features installed.

Now for the rest of the comments.

Mukul Gandhi wrote:
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) [1]:

ResultSequence nodeEvalRS = ResultSequenceFactory.create_new();
nodeEvalRS.add(new ElementType(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,
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.

The ElementType constructor, which is used by above Xerces code [1], is
removed from current code base. We now only have following constructors on

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.
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:

This 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.
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, [1]) 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.
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).

I am also willing to do this change for PsychoPath as well :)

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.

Back to the top