Why JaxMe?
After working with JAXP, JAXB, JAXM and all the other stuff for quite
some time I began to automatically associate "JAXsomethingE" with
anything related to Java and XML. So this is "Me" JAX or JaxMe.
The name is ridiculous. I know. Sometimes we'll probably find something
better. (And, who knows, perhaps we even find someone changing the sources
then ... :-)
JaxMe License
JaxMe comes to you under the terms of the BSD License. In short this
means you can do almost anything with it: Use it, modify it, extend it,
sell it (hej, sometimes I really wish I'd have some instincts of sales
people in me ...), use it in commercial products or projects, whatever
you want. It's an open source license.
The license requires, that you drop a note on the origin of JaxMe
and the author, but IMO this is good for nothing, so you may safely
forget it. However, I reserve the right to change the license of any
future version to another open source license.
(org.apache.jaxme
, we all have dreams ... :-)
What is the supported subset of XML Schema?
This subset is documented as an XML Schema in the file
jaxme.xsd from the
JaxMe distribution. It is quite limited, but usable, if you
have control over the schema. It is probably unusable, if
you haven't.
In short the following is supported:
- Atomic elements without attributes
- Complex elements that contain a sequence
- Complex elements that contain a choice
But the following is not supported:
- Atomic elements with attributes
- Mixed content
- Mixed use of sequence and/or choice
- Recursion
How do I generate a primary key?
JaxMe doesn't contain a primary key generator: Most probably
your database contains a sequence generator, an autoincrement
column or something similar that can be used to let the database
generate primary keys. If this is the case, may be the
special JaxMe type
jdm:autoSql does its job for
you? For example, you create a sequence and specify the
primary key column as
<xs:element name="ID" type="jdm:autoSql">
<xs:annotation>
<xs:appinfo>
<-- The column will be filled from a sequence. -->
<jdm:autoSql base="xs:integer"
insert="myIdSequence.nextval">
</xs:appinfo>
</xs:annotation>
</xs:element>