[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xmlbeans-dev
Subject:    RE: Creating a Jakarta Commons SQL datamodel using XmlBeans and Velocity
From:       Philip Mark Donaghy <philipmarkdonaghy () yahoo ! com>
Date:       2004-12-20 0:09:05
Message-ID: 20041220000905.51194.qmail () web52803 ! mail ! yahoo ! com
[Download RAW message or body]

Hi Jim, Kevin, and everyone,

I just noticed this. 

> I'm about to check in the sample.  However, when 
> running the sample I'm
> getting a SAXParseException when running the 
> create-db-sql target.

As you may have already discovered the replace method
is only supported by Velocity when using jdk1-5.

I am glad to see that this sample is of interest to
someone. The Velocity templates from this sample can
be used to generate source code from any xml schema
much like Andromda generates source code from uml
models. They both use Velocity. The commons-sql
datamodel is just one of many potential applications.
This sample provides a good XmlBeans Velocity
reference that can be used by anyone for creating
model driven architectures from an xml schema. A
binding between XmlBeans and the database would be
another example.

XmlBeans <-> BeanUtils <-> OjbBeans <-> Castor <-> DB

This schema diagram shows the processing of xml
documents imported and exported to and from a database
derived from an xml schema. Any other object database
binding technology could replace Castor; the options
are numerous. Hibernate, Ojb, Torque, Prevayler, the
list goes on. I like Castor because it handles nicely
hierarchical objects.

WRT the xmlbeans/samples/db/vxsdb sample users should
be aware that there is an issue that I would like to
resolve that is not in the current source code. The
issue is; separate tables are created for schema types
that are not simple yet are restrictions based on
simple types. I think that we can determine this using
XmlBeans of course. The trick will be to use the
SchemaType object to determine if a datamodel type
will be sufficient to satisfy say a schema type
restricting xsd:string to 3 characters or an
enumeration of values who exceed no more that 5
characters. Is there a way of getting the maximum
length of a type which restricts xsd:string or the
order of magnitude for a restriction on xsd:integer.
If so the schema type can be implemented as a table
column instead of a table. This can also be flagged as
an optional feature. This uncovers a related issue. In
order to avoid creating a table from some schema type
derived from another schema type which applies a
restriction on a simple schema type the solution is to
apply this fix recursively.

There is also an issue regarding the xml schema
AnyType I am inclined to just create a CLOB data type
for any schema which implements the AnyType thing.
What else could I do, every software has its limits :)

I'll be in touch with a patch. In the mean time if
anyone has a particular xml schema they wish to be
tested pleas send it.

Salut,
Phil

--- JimM <me_at_dogleg@yahoo.com> wrote:

> Not a problem... but this is (from Axis web site) 
>
http://xmlbeans.apache.org/sourceAndBinaries/index.html#XMLBeans+Source
> excerpt...
> # or, just get the samples for XMLBeans
> cvs -d
> :pserver:anoncvs@cvs.apache.org:/home/cvspublic
> checkout
> xml-xmlbeans/samples
> 
> 
> So I tried 
> 
> cvs -d
> :pserver:anoncvs@cvs.apache.org:/home/cvspublic
> checkout
> xmlbeans/trunk/samples/db/vxsdb
> 
> and that isn't working or I have the wrong location.
> Any help appreciated.
> 
> The above is Apache (xml-xmlbeans) vs Apache-SVN
> (HOW DO I GET TO Apache-SVN)
> 
> 
> BTW - When I browse CVS I don't see any of these
> directories under
> xml-xmlbeans/samples nor do I see xmlbeans (UNLESS I
> swith to Apache-SVN).
> 
> --- Kevin Krouse <kkrouse@bea.com> wrote:
> 
> > Sorry for the delay.  It's checked in under
> > xmlbeans/trunk/samples/db/vxsdb 
> > 
> > -----Original Message-----
> > From: JimM [mailto:me_at_dogleg@yahoo.com] 
> > Sent: Thursday, December 09, 2004 4:53 PM
> > To: dev@xmlbeans.apache.org
> > Subject: RE: Creating a Jakarta Commons SQL
> datamodel using XmlBeans
> > and
> > Velocity
> > 
> > Kevin-
> > 
> > If you haven't checked this in could you zip up
> the files and attach
> > in
> > a reply.
> > 
> > I'm not overly concerned about the Commons SQL
> datamodel and don't
> > want
> > to clean up the diff output. 
> > 
> > thx, Jim
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> dev-unsubscribe@xmlbeans.apache.org
> > For additional commands, e-mail:
> dev-help@xmlbeans.apache.org
> > 
> > 
> 
> 
> 
> 	
> 		
> __________________________________ 
> Do you Yahoo!? 
> Yahoo! Mail - You care about security. So do we. 
> http://promotions.yahoo.com/new_mail
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> dev-unsubscribe@xmlbeans.apache.org
> For additional commands, e-mail:
> dev-help@xmlbeans.apache.org
> 
> 



		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - Find what you need with new enhanced search.
http://info.mail.yahoo.com/mail_250

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic