xml-xmlbeans-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Calahan <p...@bea.com>
Subject Re: Start-with-java annotations
Date Fri, 14 Nov 2003 23:57:10 GMT
At 05:03 PM 11/14/2003 -0500, David Bau wrote:
>Hi pcal -
>
>Yup, you're right
>
>(1) Agreed that the wiki ones should be xmlbeans:property rather than
>xmlbeans:binding, since there will be other things to annotate.  I'll update
>the wiki.

Awesome, thanks.


>(2) Agreed that the annotations in the wiki are just a start and we will
>need more.  I'll check in scott's list in a "designnotes" area (do you think
>should it be in v2/ or the website?) and refer to it. I like scott's list
>because he covers a lot, but I guess I don't agree that every annotation in
>scott's list is important/desirable.  I'm a bit more comfortable working up
>from a very small list (using the longer list as a guide perhaps).
>Agree/disagree?

Sure, definitely.  I think there are a number of annotations in Scott's 
list that were questionable from the outset, esp. some related to 
inheritance.


>Here's an example - the longer list includes all the simple type facets as
>annotations you can do on specific properties - I suppose those would
>generate into a schema with nested anonymous simple type definitions.  But
>it feels to me like that's not a great kind of schema to encourage people to
>generate.  Normally folks who are doing custom simple types will give them
>actual type name, and then use the same simple types in different parts of
>their schema.  I don't know if there is any good way of doing this via
>annotations, but I'm pretty sure it's not very good to encourage people to
>define an anonymous and distinct custom "5-digit number" type every time
>they have a zipcode.  Then, in terms of the schema type definitions, every
>zipcode in their schema will be type-incompatible (not substitutable) with
>every other zipcode.

I defintely agree that this case could result in some unwieldy schemas, 
although I do think it's possible to imagine mechanisms for dealing with 
this problem.  However, even absent such a mechanism, the fact remains 
that, for better or worse, there is a large set of java programmers out 
there who

1) want to use XML for object serialization
2) might care a little bit what their XML documents looks like
3) want to express validation constraints in a way that is natural to them 
(java)
4) don't understand schema and really don't care what their schemas look like

The popularity of Castor, which does not even generate schemas from Java at 
all, is a good case in point.  I don't think we should neglect the 
opportunity to build features that will bring some of these users into the 
xbeans fold.


>I'm more comfortable building up from a small set annotations.

Sure, sounds good.

-p


Mime
View raw message