I'm briefly looking over the API now. The first thing I'm noticing is the deviation of standard method naming. For example: XSObject#getNamespace instead of getURI and XSObjectList#getListLength/getItem instead of getLength/ item. XML (and Java) programmers are used to certain naming conventions in the standard APIs so we should try to follow suit as much as possible.
And to continue on with naming, there are issues where methods are poorly formed and don't give the accurate idea of what they do or return. Case in point: the interface XSAttributeDeclaration has a method called "getTypeDefinition" which, in fact, returns an XSSimpleTypeDefinition. But by the name, I would have thought that it would return an XSTypeDefinition. It can be argued that an attribute's type is always simple and there's no need to rename the method. But I prefer to use explicit names so that it removes any chance of mis-interpreting the behavior. Compare with the XSElementDeclaration#getType- Definition -- it returns what I would expect from the name, an XSTypeDefinition object. Also, we're not consistent in the XSConstants interface either with choice of naming. Most of the constants have a leading prefix (e.g. DERIVATION_*) which others have a suffix (e.g. *_DECLARATION) and still others have none whatsoever (WILDCARD). At the very least, we should only use prefixes. And, unless there's a reason not to, we should add meaningful prefixes to those constants that don't have any. As a side question: should XSConstants have all of the constants, or just most of them? If we're going to have commonly shared constants (which by the way adds constant entries to EVERY class that implements the interface instead of just the ONCE in the class/interface where it applies), why do we have some constants defined elsewhere? (e.g. XSIDConstraintDefinition) When I get more time, I'll look over how all of these interfaces go together. -- Andy Clark * [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
