xml-xmlbeans-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Bau" <david....@bea.com>
Subject Re: Current start-with-java annotations
Date Sat, 22 Nov 2003 10:36:00 GMT
OK, everybody's favorite topic, organizing annoation names.  Now with JSR
175, lots of folks are going to be getting into the business...  Here we go.

Comments on
http://nagoya.apache.org/wiki/apachewiki.cgi?XmlBeansStartWithJavaAnnotations

Some questions:

I've inferred the javadoc syntax from your table in the examples I put at
the bottom of the wiki page do I have it right?  Do the examples otherwise
look like what you intended?

On attribute naming... Would we ever be allowed to specify both
@xsdgen:element and @xsdgen:attribute at the same time?  Probably not,
right?  To eliminate a degree of freedom which would only be an error, it
seems like these two could be merged into the same annotation (in which case
is-attribute would be a boolean setting).  There are no "best practices" for
175 yet, but reducing illusory degrees of freedom seems like a kind of
principle.  Agree/disagree?

On the opposite side, complexType.rootElement feels like a weird name, since
schema elements are not types (and this is a source of common source of
confusion we should work to reduce), and a generated element definition is
independent of its complex type definition.  Should we consider splitting
complexType and globalElement into separate annotations?  [Also, would we
ever have an annotation called simpleType, and if so, would it ever be
allowed at the same time as complexType?  If not perhaps it should just be
@xsdgen:type?]

Also, you have the ability to specify the rootElement localname, but not the
targetNamespace, which is 1/2 of the degrees of freedom available for the
global element definition name.  Would element targetNamespace be added as a
knob in the future?

For my edification, how should targetNamespace be chosen by default?  Is it
based on the package name, or is it a global setting on the command-line of
the java->schema compiler?

Finally, a couple details - you have element.exclude as a "present/absent"
kind of switch.  I think 175 is going to give us defaults, but when a
property is present, you'll have to specify a value, so seems like it should
be a boolean with a default of "false"?  Similarly, you've listed nillable
as an NCName rather than a boolean - seems like a typo?


David


- ---------------------------------------------------------------------
To unsubscribe, e-mail:   xmlbeans-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xmlbeans-dev-help@xml.apache.org
Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/


Mime
View raw message