I certainly admit to not modelling a full XML schema metamodel, just the parts which were relevant for abstracting out the Xerces specific stuff. I hope I haven't made too many mistakes in doing so.
For the next big milestone of XPath2, I want to do the fuller range of semantic checks so that we can actually use XPath info to provide useful content assist for XSLT editing, and to support a bytecode-generator for XPath2. We would certainly need to extend the model at that time, and I'll make the proposal available much earlier than I did this spring.
However, the time to improve the API for Indigo is passed.
I'll raise a bugzilla for this for recording the discussion.
Actually, you are refering to the "Derived" Data Types. The most
basic form of a TypeDefinition is "anySimpleType" which is what all
Primitive Types use as their base. So technically it should
go. TypeDefinition->anySimpleType->Primitive Type
TypeDefinition->User Derived Types (simple or complex types or
extension of PrimitiveTypes).
Dave
On 05/17/2011 02:46 AM, Mukul Gandhi wrote:
Hi Jesper,
In the new PsychoPath
XPath 2.0 engine API (since ver 2.0), you've defined following
two interface
abstractions,
public interface PrimitiveType
extends TypeDefinition {
...
}
public interface TypeDefinition {
public String
getNamespace();
public String getName();
public TypeDefinition
getBaseType();
public static final
short DERIVATION_NONE = 0;
public static final
short DERIVATION_EXTENSION = 1;
public static final
short DERIVATION_RESTRICTION = 2;
public static final
short DERIVATION_SUBSTITUTION = 4;
public static final
short DERIVATION_UNION = 8;
public static final
short DERIVATION_LIST = 16;
...
}
The relationship between
PrimitiveType
and TypeDefinition in your design, looks a bit odd to me (ref,
XML Schema
spec [1]).
If you intend to define this
relationship,
shouldn't this be the other way round, perhaps as follows,
public interface TypeDefinition
extends PrimitiveType {
...
}
Thanks, Jesper for the
explanation.
That's fair enough.
While I agree that the name is not ideal, I specifically asked
for your
review in early March, but got no objections?
[mukul] I apologize for not having enough time due to other
commitments,
during the time frame when you were expecting my review
comments. If you
and Dave have agreed on package naming, it's fine with me.