You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jdo-dev@db.apache.org by Michael Bouschen <mb...@spree.de> on 2006/02/20 20:21:35 UTC

Re: jdo.dtd changes

Hi Craig,

I have updated jdo.dtd as you proposed and then changed jdo.xsd, orm.dtd 
and orm.xsd accordingly. I figured out that jdo.dtd and orm.dtd define 
the subelements for the element key in a different order. I fixed this 
and change orm.dtdt to match the order as defined in jdo.dtd.

Please have a look at the attached patch. It includes the changes of 
jdo.dtd, jdo.xsd, orm.dtd and orm.xsd. I would like to check them in 
first, before checking in the schema validation test for api20.

Regards Michael

> Hi Michael,
>
> On Feb 19, 2006, at 12:31 PM, Michael Bouschen wrote:
>
>> Hi Craig,
>>
>> I implemented the jdo.dtd changes, you find a patch file attached.
>>
>> However, I have three questions:
>> (1) I changed the foreign-key elements as I described below:
>>  <!ELEMENT foreign-key (extension*, column*, field*, property*,  
>> extension*)>
>
>
> I think this should allow any number of extensions before or after,  
> and your choice of one of column*, field*, or property*. I don't  
> think it makes sense for a foreign key, index, or unique to combine  
> more than one.
>
> I thought that (column* | field* | property*) said that.
>
> So, my proposal:
>
> <!ELEMENT foreign-key (extension*, (column*| field*| property*),  
> extension*)>
>
>
>> I did the same change for the elements index, unique and fetch-group.
>> This change might not what you had in mind. Please let me know.
>> (2) I changed the value order for the foreign-key attributes delete- 
>> action and update-action to match the definition of delete-action  
>> and update-action in other elements. The only difference is that  
>> foreign-key does not allow the value 'none'...
>
>
> I found some information on this:
> InnoDB rejects any INSERT or UPDATE operation that attempts to create  
> a foreign key value in a child table if there is no a matching  
> candidate key value in the parent table. The action InnoDB takes for  
> any UPDATE or DELETE operation that attempts to update or delete a  
> candidate key value in the parent table that has some matching rows  
> in the child table is dependent on the referential action specified  
> using ON UPDATE and ON DELETE subclauses of the FOREIGN KEY clause.  
> When the user attempts to delete or update a row from a parent table,  
> and there are one or more matching rows in the child table, InnoDB  
> supports five options regarding the action to be taken:
>
> CASCADE: Delete or update the row from the parent table and  
> automatically delete or update the matching rows in the child table.  
> Both ON DELETE CASCADE and ON UPDATE CASCADE are supported. Between  
> two tables, you should not define several ON UPDATE CASCADE clauses  
> that act on the same column in the parent table or in the child table.
> SET NULL: Delete or update the row from the parent table and set the  
> foreign key column or columns in the child table to NULL. This is  
> valid only if the foreign key columns do not have the NOT NULL  
> qualifier specified. Both ON DELETE SET NULL and ON UPDATE SET NULL  
> clauses are supported.
> NO ACTION: In standard SQL, NO ACTION means no action in the sense  
> that an attempt to delete or update a primary key value is not  
> allowed to proceed if there is a related foreign key value in the  
> referenced table. InnoDB rejects the delete or update operation for  
> the parent table.
> RESTRICT: Rejects the delete or update operation for the parent  
> table. NO ACTION and RESTRICT are the same as omitting the ON DELETE  
> or ON UPDATE clause. (Some database systems have deferred checks, and  
> NO ACTION is a deferred check. In MySQL, foreign key constraints are  
> checked immediately, so NO ACTION and RESTRICT are the same.)
> SET DEFAULT: This action is recognized by the parser, but InnoDB  
> rejects table definitions containing ON DELETE SET DEFAULT or ON  
> UPDATE SET DEFAULT clauses.
>
> So I think that the delete-action should allow all of the cascade,  
> null, none, restrict, and default. None might be "deferred checking"  
> but otherwise is the same as restrict.
>
>> (3) I think the attribute update-action should restrict the  
>> permitted values to the same values as key/value update-action, so  
>> 'none' should be allowed. What do you think?
>
>
> I think both delete-action and update-action should allow all of the  
> actions.
>
>>
>> As soon as we agreed on the changes I can update the jdo.xsd  
>> accordingly and change the test cases Positive99-dtd.jdo and  
>> Positive99-xsd.jdo.
>
>
> Ok.
>
> Craig
>
>>
>> Regards Michael
>>
>>> Hi Craig,
>>>
>>> sorry for not replying earier.
>>>
>>>> Javadogs,
>>>>
>>>> I've made these changes to the final spec.
>>>>
>>>> Craig
>>>>
>>>> On Feb 15, 2006, at 11:37 AM, Craig L Russell wrote:
>>>>
>>>>> 1. <!ATTLIST column allows-null CDATA #IMPLIED>
>>>>> should be
>>>>> <!ATTLIST column allows-null (true|false) #IMPLIED>
>>>>>
>>>>> 2. <!ELEMENT foreign-key (extension*, (column|field|property)*,  
>>>>> extension*)>
>>>>> should be
>>>>> <!ELEMENT foreign-key (extension*, (column*|field*|property*),  
>>>>> extension*)>
>>>>
>>>>
>>>>
>>> I read (column*|field*|property*) as: either a list of columns or  a 
>>> list of fields or a list of properties. So you cannot have  fields 
>>> and properties mixed.  Did you intend to have a list of  columns, 
>>> followed by a list of fields, followed by a list of  properties:
>>>  <!ELEMENT foreign-key (extension*, column*, field*, property*,  
>>> extension*)>
>>>
>>> The fetch-group element looks similar. Did you paln you change  this 
>>> too:
>>>  <!ELEMENT fetch-group (extension*, (fetch-group|field|property)*,  
>>> extension*)>
>>>
>>> Regards Michael
>>>
>>>>>
>>>>> 3. same as 2 for index
>>>>
>>>>
>>>>
>>>>
>>>> Same as 2 for unique as well.
>>>>
>>>>>
>>>>> 4. <!ATTLIST element update-action CDATA #IMPLIED>
>>>>> element update-action should restrict the permitted values to  the 
>>>>> same values as foreign-key update-action
>>>>>
>>>>> 5. Missing element key attribute update-action
>>>>>
>>>>> 6. Missing element value attribute update-action
>>>>>
>>>>> 7. Element order should not have the delete-action, update- 
>>>>> action, indexed, and unique attributes
>>>>> Anything else?
>>>>>
>>>>> Craig
>>>>>
>>>>> Craig Russell
>>>>> Architect, Sun Java Enterprise System http://java.sun.com/ 
>>>>> products/jdo
>>>>> 408 276-5638 mailto:Craig.Russell@sun.com
>>>>> P.S. A good JDO? O, Gasp!
>>>>>
>>>>
>>>> Craig Russell
>>>>
>>>> Architect, Sun Java Enterprise System http://java.sun.com/ 
>>>> products/jdo
>>>>
>>>> 408 276-5638 mailto:Craig.Russell@sun.com
>>>>
>>>> P.S. A good JDO? O, Gasp!
>>>>
>>>>
[...]

-- 
Michael Bouschen		Tech@Spree Engineering GmbH
mailto:mbo.tech@spree.de	http://www.tech.spree.de/
Tel.:++49/30/235 520-33		Buelowstr. 66			
Fax.:++49/30/2175 2012		D-10783 Berlin			


Re: jdo.dtd changes

Posted by Craig L Russell <Cr...@Sun.COM>.
Hi Michael,

Looks good.

Craig

On Feb 21, 2006, at 1:34 PM, Michael Bouschen wrote:

> Hi Craig,
>
> I rearranged the elements in orm.dtd to use the same order as in  
> jdo.dtd and found a couple of inconsistencies between orm.dtd and  
> jdo.dtd. The attached patch changes the orm.dtd to match the  
> elements as defined in jdo.dtd:
> - Added subelement 'property' to element 'class'.
> - Changed attribute 'strategy' in the element 'version' from  
> REQUIRED to IMPLIED.
> - Fixed 'implement' subelements.
> - Fixed order of subelements in elements 'inheritance'.
> - Restricted the values of attribute 'primary-key' in element 'field'.
>
> Please have a look at the patch. If there are no objections I would  
> check in the patch and change orm.xsd accordingly.
>
> Regards Michael
>
>> Hi Michael,
>>
>> On Feb 21, 2006, at 9:37 AM, Michael Bouschen wrote:
>>
>>> Hi Craig,
>>>
>>> [...]
>>>
>>>>>> Just one comment. There is no meaning to the order of    
>>>>>> attributes,  just order of elements. But there's no issue  
>>>>>> with  fixing  the  order of the attributes either.
>>>>>
>>>>>
>>>>>
>>>>> I know the order of attributes is not important, but it helps   
>>>>> when  comparing the jdo.dtd and the orm.dtd to make sure the  
>>>>> orm  dtd  accepts a subset of the jdo metatdata :-). Try 'diff   
>>>>> jdo.dtd  orm.dtd', I was surprised to see how many differences   
>>>>> there are.
>>>>
>>>> Good grief. Some of these are line ending differences. :-(
>>>
>>>
>>> I could not find any ^M problems in the files. I think the diffs   
>>> are because the orm.dtd lists the elements in a different order,   
>>> e.g. jdo.dtd lists the element property between interface and   
>>> class, where orm.dtd lists it between column and field. This  
>>> does  not affect the accepted XML, it just makes a comparison  
>>> between the  two dtds harder.
>>
>>
>> Not ^M differences, but spaces (I think). I just looked at it  
>> again  and I can't account for some of the diffs at all.
>>
>> But the main point is: good. Thanks for changing the files so  
>> they  are as similar as possible. It will make it easier for us.
>>
>>>
>>>>>
>>>>> Other question: do we want to rename api20/src/dtd to api20/ 
>>>>> src/  schema?
>>>>
>>>> +1 We need to make sure that the corresponding changes are made   
>>>> to  the maven definitions, but I think it's time.
>>>
>>>
>>> OK, I can work on this, but I would like to check in a first   
>>> version of the schema validation test before doing this rename.  
>>> I  attached a new patch to JDO-202.
>>
>>
>> Cool. I just looked at your 0220 patch and I think it's time to  
>> check  these files in.
>>
>> Craig
>>
>>>
>>> Regards Michael
>>>
>>> [...]
>>> -- 
>>> Michael Bouschen        Tech@Spree Engineering GmbH
>>> mailto:mbo.tech@spree.de    http://www.tech.spree.de/
>>> Tel.:++49/30/235 520-33        Buelowstr. 66           Fax.:+ 
>>> +49/30/2175 2012        D-10783 Berlin
>>
>>
>> Craig Russell
>> Architect, Sun Java Enterprise System http://java.sun.com/products/ 
>> jdo
>> 408 276-5638 mailto:Craig.Russell@sun.com
>> P.S. A good JDO? O, Gasp!
>>
>
>
> -- 
> Michael Bouschen		Tech@Spree Engineering GmbH
> mailto:mbo.tech@spree.de	http://www.tech.spree.de/
> Tel.:++49/30/235 520-33		Buelowstr. 66			
> Fax.:++49/30/2175 2012		D-10783 Berlin			
>
> Index: src/dtd/javax/jdo/orm.dtd
> ===================================================================
> --- src/dtd/javax/jdo/orm.dtd	(Revision 379573)
> +++ src/dtd/javax/jdo/orm.dtd	(Arbeitskopie)
> @@ -19,7 +19,19 @@
>  <!ATTLIST interface catalog CDATA #IMPLIED>
>  <!ATTLIST interface schema CDATA #IMPLIED>
>
> -<!ELEMENT class (extension*, datastore-identity?, primary-key?,  
> inheritance?, version?, join*, foreign-key*, index*, unique*,  
> column*, field*, query*, extension*)>
> +<!ELEMENT property (extension*, join?, embedded?, element?, key?,  
> value?, order?, column*, foreign-key?, index?, unique?, extension*)>
> +<!ATTLIST property name CDATA #REQUIRED>
> +<!ATTLIST property value-strategy CDATA #IMPLIED>
> +<!ATTLIST property sequence CDATA #IMPLIED>
> +<!ATTLIST property serialized (true|false) #IMPLIED>
> +<!ATTLIST property table CDATA #IMPLIED>
> +<!ATTLIST property column CDATA #IMPLIED>
> +<!ATTLIST property delete-action (restrict|cascade|null|default| 
> none) #IMPLIED>
> +<!ATTLIST property indexed (true|false|unique) #IMPLIED>
> +<!ATTLIST property unique (true|false) #IMPLIED>
> +<!ATTLIST property mapped-by CDATA #IMPLIED>
> +
> +<!ELEMENT class (extension*, datastore-identity?, primary-key?,  
> inheritance?, version?, join*, foreign-key*, index*, unique*,  
> column*, field*, property*, query*, extension*)>
>  <!ATTLIST class name CDATA #REQUIRED>
>  <!ATTLIST class table CDATA #IMPLIED>
>  <!ATTLIST class catalog CDATA #IMPLIED>
> @@ -37,20 +49,20 @@
>  <!ATTLIST join indexed (true|false|unique) #IMPLIED>
>  <!ATTLIST join unique (true|false) #IMPLIED>
>
> +<!ELEMENT version (extension*, column*, index?, extension*)>
> +<!ATTLIST version strategy CDATA #IMPLIED>
> +<!ATTLIST version column CDATA #IMPLIED>
> +<!ATTLIST version indexed (true|false|unique) #IMPLIED>
> +
>  <!ELEMENT datastore-identity (extension*, column*, extension*)>
>  <!ATTLIST datastore-identity column CDATA #IMPLIED>
>  <!ATTLIST datastore-identity strategy CDATA 'native'>
>  <!ATTLIST datastore-identity sequence CDATA #IMPLIED>
>
> -<!ELEMENT version (extension*, column*, index?, extension*)>
> -<!ATTLIST version strategy CDATA #REQUIRED>
> -<!ATTLIST version column CDATA #IMPLIED>
> -<!ATTLIST version indexed (true|false|unique) #IMPLIED>
> -
> -<!ELEMENT implements ((property-field)+, (extension)*)>
> +<!ELEMENT implements (extension*, property*, extension*)>
>  <!ATTLIST implements name CDATA #REQUIRED>
>
> -<!ELEMENT inheritance (extension*, discriminator?, join?,  
> extension*)>
> +<!ELEMENT inheritance (extension*, join?, discriminator?,  
> extension*)>
>  <!ATTLIST inheritance strategy CDATA #IMPLIED>
>
>  <!ELEMENT discriminator (extension*, column*, index?, extension*)>
> @@ -71,23 +83,11 @@
>  <!ATTLIST column default-value CDATA #IMPLIED>
>  <!ATTLIST column insert-value CDATA #IMPLIED>
>
> -<!ELEMENT property (extension*, join?, embedded?, element?, key?,  
> value?, order?, column*, foreign-key?, index?, unique?, extension*)>
> -<!ATTLIST property name CDATA #REQUIRED>
> -<!ATTLIST property value-strategy CDATA #IMPLIED>
> -<!ATTLIST property sequence CDATA #IMPLIED>
> -<!ATTLIST property serialized (true|false) #IMPLIED>
> -<!ATTLIST property table CDATA #IMPLIED>
> -<!ATTLIST property column CDATA #IMPLIED>
> -<!ATTLIST property delete-action (restrict|cascade|null|default| 
> none) #IMPLIED>
> -<!ATTLIST property indexed (true|false|unique) #IMPLIED>
> -<!ATTLIST property unique (true|false) #IMPLIED>
> -<!ATTLIST property mapped-by CDATA #IMPLIED>
> -
>  <!ELEMENT field (extension*, join?, embedded?, element?, key?,  
> value?, order?, column*, foreign-key?, index?, unique?, extension*)>
>  <!ATTLIST field name CDATA #REQUIRED>
>  <!ATTLIST field table CDATA #IMPLIED>
>  <!ATTLIST field column CDATA #IMPLIED>
> -<!ATTLIST field primary-key CDATA #IMPLIED>
> +<!ATTLIST field primary-key (true|false) 'false'>
>  <!ATTLIST field value-strategy CDATA #IMPLIED>
>  <!ATTLIST field delete-action (restrict|cascade|null|default|none)  
> #IMPLIED>
>  <!ATTLIST field indexed (true|false|unique) #IMPLIED>
> @@ -149,11 +149,6 @@
>  <!ATTLIST index table CDATA #IMPLIED>
>  <!ATTLIST index unique (true|false) 'false'>
>
> -<!ELEMENT unique (extension*, (column* | field* | property*),  
> extension*)>
> -<!ATTLIST unique name CDATA #IMPLIED>
> -<!ATTLIST unique table CDATA #IMPLIED>
> -<!ATTLIST unique deferred (true|false) 'false'>
> -
>  <!ELEMENT query (#PCDATA|extension)*>
>  <!ATTLIST query name CDATA #IMPLIED>
>  <!ATTLIST query language CDATA #IMPLIED>
> @@ -161,7 +156,13 @@
>  <!ATTLIST query unique (true|false) 'false'>
>  <!ATTLIST query result-class CDATA #IMPLIED>
>
> +<!ELEMENT unique (extension*, (column* | field* | property*),  
> extension*)>
> +<!ATTLIST unique name CDATA #IMPLIED>
> +<!ATTLIST unique table CDATA #IMPLIED>
> +<!ATTLIST unique deferred (true|false) 'false'>
> +
>  <!ELEMENT extension ANY>
>  <!ATTLIST extension vendor-name CDATA #REQUIRED>
>  <!ATTLIST extension key CDATA #IMPLIED>
>  <!ATTLIST extension value CDATA #IMPLIED>
> +

Craig Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
408 276-5638 mailto:Craig.Russell@sun.com
P.S. A good JDO? O, Gasp!


Re: jdo.dtd changes

Posted by Michael Bouschen <mb...@spree.de>.
Hi Craig,

I rearranged the elements in orm.dtd to use the same order as in jdo.dtd 
and found a couple of inconsistencies between orm.dtd and jdo.dtd. The 
attached patch changes the orm.dtd to match the elements as defined in 
jdo.dtd:
- Added subelement 'property' to element 'class'.
- Changed attribute 'strategy' in the element 'version' from REQUIRED to 
IMPLIED.
- Fixed 'implement' subelements.
- Fixed order of subelements in elements 'inheritance'.
- Restricted the values of attribute 'primary-key' in element 'field'.

Please have a look at the patch. If there are no objections I would 
check in the patch and change orm.xsd accordingly.

Regards Michael

> Hi Michael,
>
> On Feb 21, 2006, at 9:37 AM, Michael Bouschen wrote:
>
>> Hi Craig,
>>
>> [...]
>>
>>>>> Just one comment. There is no meaning to the order of   
>>>>> attributes,  just order of elements. But there's no issue with  
>>>>> fixing  the  order of the attributes either.
>>>>
>>>>
>>>>
>>>> I know the order of attributes is not important, but it helps  
>>>> when  comparing the jdo.dtd and the orm.dtd to make sure the orm  
>>>> dtd  accepts a subset of the jdo metatdata :-). Try 'diff  jdo.dtd  
>>>> orm.dtd', I was surprised to see how many differences  there are.
>>>
>>> Good grief. Some of these are line ending differences. :-(
>>
>>
>> I could not find any ^M problems in the files. I think the diffs  are 
>> because the orm.dtd lists the elements in a different order,  e.g. 
>> jdo.dtd lists the element property between interface and  class, 
>> where orm.dtd lists it between column and field. This does  not 
>> affect the accepted XML, it just makes a comparison between the  two 
>> dtds harder.
>
>
> Not ^M differences, but spaces (I think). I just looked at it again  
> and I can't account for some of the diffs at all.
>
> But the main point is: good. Thanks for changing the files so they  
> are as similar as possible. It will make it easier for us.
>
>>
>>>>
>>>> Other question: do we want to rename api20/src/dtd to api20/src/  
>>>> schema?
>>>
>>> +1 We need to make sure that the corresponding changes are made  to  
>>> the maven definitions, but I think it's time.
>>
>>
>> OK, I can work on this, but I would like to check in a first  version 
>> of the schema validation test before doing this rename. I  attached a 
>> new patch to JDO-202.
>
>
> Cool. I just looked at your 0220 patch and I think it's time to check  
> these files in.
>
> Craig
>
>>
>> Regards Michael
>>
>> [...]
>> -- 
>> Michael Bouschen        Tech@Spree Engineering GmbH
>> mailto:mbo.tech@spree.de    http://www.tech.spree.de/
>> Tel.:++49/30/235 520-33        Buelowstr. 66           
>> Fax.:++49/30/2175 2012        D-10783 Berlin           
>
>
> Craig Russell
> Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
> 408 276-5638 mailto:Craig.Russell@sun.com
> P.S. A good JDO? O, Gasp!
>


-- 
Michael Bouschen		Tech@Spree Engineering GmbH
mailto:mbo.tech@spree.de	http://www.tech.spree.de/
Tel.:++49/30/235 520-33		Buelowstr. 66			
Fax.:++49/30/2175 2012		D-10783 Berlin			


Re: jdo.dtd changes

Posted by Craig L Russell <Cr...@Sun.COM>.
Hi Michael,

On Feb 21, 2006, at 9:37 AM, Michael Bouschen wrote:

> Hi Craig,
>
> [...]
>
>>>> Just one comment. There is no meaning to the order of   
>>>> attributes,  just order of elements. But there's no issue with  
>>>> fixing  the  order of the attributes either.
>>>
>>>
>>> I know the order of attributes is not important, but it helps  
>>> when  comparing the jdo.dtd and the orm.dtd to make sure the orm  
>>> dtd  accepts a subset of the jdo metatdata :-). Try 'diff  
>>> jdo.dtd  orm.dtd', I was surprised to see how many differences  
>>> there are.
>> Good grief. Some of these are line ending differences. :-(
>
> I could not find any ^M problems in the files. I think the diffs  
> are because the orm.dtd lists the elements in a different order,  
> e.g. jdo.dtd lists the element property between interface and  
> class, where orm.dtd lists it between column and field. This does  
> not affect the accepted XML, it just makes a comparison between the  
> two dtds harder.

Not ^M differences, but spaces (I think). I just looked at it again  
and I can't account for some of the diffs at all.

But the main point is: good. Thanks for changing the files so they  
are as similar as possible. It will make it easier for us.

>
>>>
>>> Other question: do we want to rename api20/src/dtd to api20/src/  
>>> schema?
>> +1 We need to make sure that the corresponding changes are made  
>> to  the maven definitions, but I think it's time.
>
> OK, I can work on this, but I would like to check in a first  
> version of the schema validation test before doing this rename. I  
> attached a new patch to JDO-202.

Cool. I just looked at your 0220 patch and I think it's time to check  
these files in.

Craig
>
> Regards Michael
>
> [...]
> -- 
> Michael Bouschen		Tech@Spree Engineering GmbH
> mailto:mbo.tech@spree.de	http://www.tech.spree.de/
> Tel.:++49/30/235 520-33		Buelowstr. 66			
> Fax.:++49/30/2175 2012		D-10783 Berlin			

Craig Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
408 276-5638 mailto:Craig.Russell@sun.com
P.S. A good JDO? O, Gasp!


Re: jdo.dtd changes

Posted by Michael Bouschen <mb...@spree.de>.
Hi Craig,

[...]

>>> Just one comment. There is no meaning to the order of  attributes,  
>>> just order of elements. But there's no issue with fixing  the  order 
>>> of the attributes either.
>>
>>
>> I know the order of attributes is not important, but it helps when  
>> comparing the jdo.dtd and the orm.dtd to make sure the orm dtd  
>> accepts a subset of the jdo metatdata :-). Try 'diff jdo.dtd  
>> orm.dtd', I was surprised to see how many differences there are.
> 
> 
> Good grief. Some of these are line ending differences. :-(

I could not find any ^M problems in the files. I think the diffs are 
because the orm.dtd lists the elements in a different order, e.g. 
jdo.dtd lists the element property between interface and class, where 
orm.dtd lists it between column and field. This does not affect the 
accepted XML, it just makes a comparison between the two dtds harder.

> 
>>
>> Other question: do we want to rename api20/src/dtd to api20/src/ schema?
> 
> 
> +1 We need to make sure that the corresponding changes are made to  the 
> maven definitions, but I think it's time.

OK, I can work on this, but I would like to check in a first version of 
the schema validation test before doing this rename. I attached a new 
patch to JDO-202.

Regards Michael

[...]
-- 
Michael Bouschen		Tech@Spree Engineering GmbH
mailto:mbo.tech@spree.de	http://www.tech.spree.de/
Tel.:++49/30/235 520-33		Buelowstr. 66			
Fax.:++49/30/2175 2012		D-10783 Berlin			

Re: jdo.dtd changes

Posted by Craig L Russell <Cr...@Sun.COM>.
Hi Michael,

On Feb 21, 2006, at 2:02 AM, Michael Bouschen wrote:

> Hi Craig,
>
>> Hi Michael,
>> Looks good.
>
> Thanks, I checked in the patch (revision 379246).
>
>> Just one comment. There is no meaning to the order of  attributes,  
>> just order of elements. But there's no issue with fixing  the  
>> order of the attributes either.
>
> I know the order of attributes is not important, but it helps when  
> comparing the jdo.dtd and the orm.dtd to make sure the orm dtd  
> accepts a subset of the jdo metatdata :-). Try 'diff jdo.dtd  
> orm.dtd', I was surprised to see how many differences there are.

Good grief. Some of these are line ending differences. :-(
>
> Other question: do we want to rename api20/src/dtd to api20/src/ 
> schema?

+1 We need to make sure that the corresponding changes are made to  
the maven definitions, but I think it's time.

Craig

> Regards Michael
>
>> Craig
>> On Feb 20, 2006, at 11:21 AM, Michael Bouschen wrote:
>>> Hi Craig,
>>>
>>> I have updated jdo.dtd as you proposed and then changed jdo.xsd,   
>>> orm.dtd and orm.xsd accordingly. I figured out that jdo.dtd and   
>>> orm.dtd define the subelements for the element key in a  
>>> different  order. I fixed this and change orm.dtdt to match the  
>>> order as  defined in jdo.dtd.
>>>
>>> Please have a look at the attached patch. It includes the  
>>> changes  of jdo.dtd, jdo.xsd, orm.dtd and orm.xsd. I would like  
>>> to check  them in first, before checking in the schema validation  
>>> test for  api20.
>>>
>>> Regards Michael
>>>
>
> [...]
>
> -- 
> Michael Bouschen		Tech@Spree Engineering GmbH
> mailto:mbo.tech@spree.de	http://www.tech.spree.de/
> Tel.:++49/30/235 520-33		Buelowstr. 66			
> Fax.:++49/30/2175 2012		D-10783 Berlin			

Craig Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
408 276-5638 mailto:Craig.Russell@sun.com
P.S. A good JDO? O, Gasp!


Re: jdo.dtd changes

Posted by Michael Bouschen <mb...@spree.de>.
Hi Craig,

> Hi Michael,
> 
> Looks good. 

Thanks, I checked in the patch (revision 379246).

> Just one comment. There is no meaning to the order of  
> attributes, just order of elements. But there's no issue with fixing  
> the order of the attributes either.

I know the order of attributes is not important, but it helps when 
comparing the jdo.dtd and the orm.dtd to make sure the orm dtd accepts a 
subset of the jdo metatdata :-). Try 'diff jdo.dtd orm.dtd', I was 
surprised to see how many differences there are.

Other question: do we want to rename api20/src/dtd to api20/src/schema?

Regards Michael

> 
> Craig
> 
> On Feb 20, 2006, at 11:21 AM, Michael Bouschen wrote:
> 
>> Hi Craig,
>>
>> I have updated jdo.dtd as you proposed and then changed jdo.xsd,  
>> orm.dtd and orm.xsd accordingly. I figured out that jdo.dtd and  
>> orm.dtd define the subelements for the element key in a different  
>> order. I fixed this and change orm.dtdt to match the order as  defined 
>> in jdo.dtd.
>>
>> Please have a look at the attached patch. It includes the changes  of 
>> jdo.dtd, jdo.xsd, orm.dtd and orm.xsd. I would like to check  them in 
>> first, before checking in the schema validation test for  api20.
>>
>> Regards Michael
>>

[...]

-- 
Michael Bouschen		Tech@Spree Engineering GmbH
mailto:mbo.tech@spree.de	http://www.tech.spree.de/
Tel.:++49/30/235 520-33		Buelowstr. 66			
Fax.:++49/30/2175 2012		D-10783 Berlin			

Re: jdo.dtd changes

Posted by Craig L Russell <Cr...@Sun.COM>.
Hi Michael,

Looks good. Just one comment. There is no meaning to the order of  
attributes, just order of elements. But there's no issue with fixing  
the order of the attributes either.

Craig

On Feb 20, 2006, at 11:21 AM, Michael Bouschen wrote:

> Hi Craig,
>
> I have updated jdo.dtd as you proposed and then changed jdo.xsd,  
> orm.dtd and orm.xsd accordingly. I figured out that jdo.dtd and  
> orm.dtd define the subelements for the element key in a different  
> order. I fixed this and change orm.dtdt to match the order as  
> defined in jdo.dtd.
>
> Please have a look at the attached patch. It includes the changes  
> of jdo.dtd, jdo.xsd, orm.dtd and orm.xsd. I would like to check  
> them in first, before checking in the schema validation test for  
> api20.
>
> Regards Michael
>
>> Hi Michael,
>>
>> On Feb 19, 2006, at 12:31 PM, Michael Bouschen wrote:
>>
>>> Hi Craig,
>>>
>>> I implemented the jdo.dtd changes, you find a patch file attached.
>>>
>>> However, I have three questions:
>>> (1) I changed the foreign-key elements as I described below:
>>>  <!ELEMENT foreign-key (extension*, column*, field*, property*,   
>>> extension*)>
>>
>>
>> I think this should allow any number of extensions before or  
>> after,  and your choice of one of column*, field*, or property*. I  
>> don't  think it makes sense for a foreign key, index, or unique to  
>> combine  more than one.
>>
>> I thought that (column* | field* | property*) said that.
>>
>> So, my proposal:
>>
>> <!ELEMENT foreign-key (extension*, (column*| field*| property*),   
>> extension*)>
>>
>>
>>> I did the same change for the elements index, unique and fetch- 
>>> group.
>>> This change might not what you had in mind. Please let me know.
>>> (2) I changed the value order for the foreign-key attributes  
>>> delete- action and update-action to match the definition of  
>>> delete-action  and update-action in other elements. The only  
>>> difference is that  foreign-key does not allow the value 'none'...
>>
>>
>> I found some information on this:
>> InnoDB rejects any INSERT or UPDATE operation that attempts to  
>> create  a foreign key value in a child table if there is no a  
>> matching  candidate key value in the parent table. The action  
>> InnoDB takes for  any UPDATE or DELETE operation that attempts to  
>> update or delete a  candidate key value in the parent table that  
>> has some matching rows  in the child table is dependent on the  
>> referential action specified  using ON UPDATE and ON DELETE  
>> subclauses of the FOREIGN KEY clause.  When the user attempts to  
>> delete or update a row from a parent table,  and there are one or  
>> more matching rows in the child table, InnoDB  supports five  
>> options regarding the action to be taken:
>>
>> CASCADE: Delete or update the row from the parent table and   
>> automatically delete or update the matching rows in the child  
>> table.  Both ON DELETE CASCADE and ON UPDATE CASCADE are  
>> supported. Between  two tables, you should not define several ON  
>> UPDATE CASCADE clauses  that act on the same column in the parent  
>> table or in the child table.
>> SET NULL: Delete or update the row from the parent table and set  
>> the  foreign key column or columns in the child table to NULL.  
>> This is  valid only if the foreign key columns do not have the NOT  
>> NULL  qualifier specified. Both ON DELETE SET NULL and ON UPDATE  
>> SET NULL  clauses are supported.
>> NO ACTION: In standard SQL, NO ACTION means no action in the  
>> sense  that an attempt to delete or update a primary key value is  
>> not  allowed to proceed if there is a related foreign key value in  
>> the  referenced table. InnoDB rejects the delete or update  
>> operation for  the parent table.
>> RESTRICT: Rejects the delete or update operation for the parent   
>> table. NO ACTION and RESTRICT are the same as omitting the ON  
>> DELETE  or ON UPDATE clause. (Some database systems have deferred  
>> checks, and  NO ACTION is a deferred check. In MySQL, foreign key  
>> constraints are  checked immediately, so NO ACTION and RESTRICT  
>> are the same.)
>> SET DEFAULT: This action is recognized by the parser, but InnoDB   
>> rejects table definitions containing ON DELETE SET DEFAULT or ON   
>> UPDATE SET DEFAULT clauses.
>>
>> So I think that the delete-action should allow all of the  
>> cascade,  null, none, restrict, and default. None might be  
>> "deferred checking"  but otherwise is the same as restrict.
>>
>>> (3) I think the attribute update-action should restrict the   
>>> permitted values to the same values as key/value update-action,  
>>> so  'none' should be allowed. What do you think?
>>
>>
>> I think both delete-action and update-action should allow all of  
>> the  actions.
>>
>>>
>>> As soon as we agreed on the changes I can update the jdo.xsd   
>>> accordingly and change the test cases Positive99-dtd.jdo and   
>>> Positive99-xsd.jdo.
>>
>>
>> Ok.
>>
>> Craig
>>
>>>
>>> Regards Michael
>>>
>>>> Hi Craig,
>>>>
>>>> sorry for not replying earier.
>>>>
>>>>> Javadogs,
>>>>>
>>>>> I've made these changes to the final spec.
>>>>>
>>>>> Craig
>>>>>
>>>>> On Feb 15, 2006, at 11:37 AM, Craig L Russell wrote:
>>>>>
>>>>>> 1. <!ATTLIST column allows-null CDATA #IMPLIED>
>>>>>> should be
>>>>>> <!ATTLIST column allows-null (true|false) #IMPLIED>
>>>>>>
>>>>>> 2. <!ELEMENT foreign-key (extension*, (column|field|property) 
>>>>>> *,  extension*)>
>>>>>> should be
>>>>>> <!ELEMENT foreign-key (extension*, (column*|field*| 
>>>>>> property*),  extension*)>
>>>>>
>>>>>
>>>>>
>>>> I read (column*|field*|property*) as: either a list of columns  
>>>> or  a list of fields or a list of properties. So you cannot  
>>>> have  fields and properties mixed.  Did you intend to have a  
>>>> list of  columns, followed by a list of fields, followed by a  
>>>> list of  properties:
>>>>  <!ELEMENT foreign-key (extension*, column*, field*, property*,   
>>>> extension*)>
>>>>
>>>> The fetch-group element looks similar. Did you paln you change   
>>>> this too:
>>>>  <!ELEMENT fetch-group (extension*, (fetch-group|field|property) 
>>>> *,  extension*)>
>>>>
>>>> Regards Michael
>>>>
>>>>>>
>>>>>> 3. same as 2 for index
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Same as 2 for unique as well.
>>>>>
>>>>>>
>>>>>> 4. <!ATTLIST element update-action CDATA #IMPLIED>
>>>>>> element update-action should restrict the permitted values to   
>>>>>> the same values as foreign-key update-action
>>>>>>
>>>>>> 5. Missing element key attribute update-action
>>>>>>
>>>>>> 6. Missing element value attribute update-action
>>>>>>
>>>>>> 7. Element order should not have the delete-action, update-  
>>>>>> action, indexed, and unique attributes
>>>>>> Anything else?
>>>>>>
>>>>>> Craig
>>>>>>
>>>>>> Craig Russell
>>>>>> Architect, Sun Java Enterprise System http://java.sun.com/  
>>>>>> products/jdo
>>>>>> 408 276-5638 mailto:Craig.Russell@sun.com
>>>>>> P.S. A good JDO? O, Gasp!
>>>>>>
>>>>>
>>>>> Craig Russell
>>>>>
>>>>> Architect, Sun Java Enterprise System http://java.sun.com/  
>>>>> products/jdo
>>>>>
>>>>> 408 276-5638 mailto:Craig.Russell@sun.com
>>>>>
>>>>> P.S. A good JDO? O, Gasp!
>>>>>
>>>>>
> [...]
>
> -- 
> Michael Bouschen		Tech@Spree Engineering GmbH
> mailto:mbo.tech@spree.de	http://www.tech.spree.de/
> Tel.:++49/30/235 520-33		Buelowstr. 66			
> Fax.:++49/30/2175 2012		D-10783 Berlin			
>
> Index: src/dtd/javax/jdo/jdo.dtd
> ===================================================================
> --- src/dtd/javax/jdo/jdo.dtd	(Revision 378929)
> +++ src/dtd/javax/jdo/jdo.dtd	(Arbeitskopie)
> @@ -7,10 +7,12 @@
>  <!ELEMENT jdo (extension*, (package|query)+, extension*)>
>  <!ATTLIST jdo catalog CDATA #IMPLIED>
>  <!ATTLIST jdo schema CDATA #IMPLIED>
> +
>  <!ELEMENT package (extension*, (interface|class|sequence)+,  
> extension*)>
>  <!ATTLIST package name CDATA ''>
>  <!ATTLIST package catalog CDATA #IMPLIED>
>  <!ATTLIST package schema CDATA #IMPLIED>
> +
>  <!ELEMENT interface (extension*, datastore-identity?, primary- 
> key?, inheritance?, version?, join*, foreign-key*, index*, unique*,  
> property*, query*, fetch-group*, extension*)>
>  <!ATTLIST interface name CDATA #REQUIRED>
>  <!ATTLIST interface table CDATA #IMPLIED>
> @@ -99,7 +101,7 @@
>  <!ATTLIST column sql-type CDATA #IMPLIED>
>  <!ATTLIST column length CDATA #IMPLIED>
>  <!ATTLIST column scale CDATA #IMPLIED>
> -<!ATTLIST column allows-null CDATA #IMPLIED>
> +<!ATTLIST column allows-null (true|false) #IMPLIED>
>  <!ATTLIST column default-value CDATA #IMPLIED>
>  <!ATTLIST column insert-value CDATA #IMPLIED>
>
> @@ -123,11 +125,11 @@
>  <!ATTLIST field recursion-depth CDATA #IMPLIED>
>  <!ATTLIST field mapped-by CDATA #IMPLIED>
>
> -<!ELEMENT foreign-key (extension*, (column|field|property)*,  
> extension*)>
> +<!ELEMENT foreign-key (extension*, (column* | field* | property*),  
> extension*)>
>  <!ATTLIST foreign-key table CDATA #IMPLIED>
>  <!ATTLIST foreign-key deferred (true|false) #IMPLIED>
> -<!ATTLIST foreign-key delete-action (cascade|restrict|null| 
> default) 'restrict'>
> -<!ATTLIST foreign-key update-action (cascade|restrict|null| 
> default) 'restrict'>
> +<!ATTLIST foreign-key delete-action (restrict|cascade|null|default| 
> none) 'restrict'>
> +<!ATTLIST foreign-key update-action (restrict|cascade|null|default| 
> none) 'restrict'>
>  <!ATTLIST foreign-key unique (true|false) #IMPLIED>
>  <!ATTLIST foreign-key name CDATA #IMPLIED>
>
> @@ -151,14 +153,16 @@
>  <!ATTLIST key column CDATA #IMPLIED>
>  <!ATTLIST key table CDATA #IMPLIED>
>  <!ATTLIST key delete-action (restrict|cascade|null|default|none)  
> #IMPLIED>
> +<!ATTLIST key update-action (restrict|cascade|null|default|none)  
> #IMPLIED>
>  <!ATTLIST key indexed (true|false|unique) #IMPLIED>
>  <!ATTLIST key unique (true|false) #IMPLIED>
>  <!ATTLIST key mapped-by CDATA #IMPLIED>
>
>  <!ELEMENT value (extension*, embedded?, column*, foreign-key?,  
> index?, unique?, extension*)>
> +<!ATTLIST value column CDATA #IMPLIED>
>  <!ATTLIST value table CDATA #IMPLIED>
> -<!ATTLIST value column CDATA #IMPLIED>
>  <!ATTLIST value delete-action (restrict|cascade|null|default|none)  
> #IMPLIED>
> +<!ATTLIST value update-action (restrict|cascade|null|default|none)  
> #IMPLIED>
>  <!ATTLIST value indexed (true|false|unique) #IMPLIED>
>  <!ATTLIST value unique (true|false) #IMPLIED>
>  <!ATTLIST value mapped-by CDATA #IMPLIED>
> @@ -173,13 +177,12 @@
>  <!ATTLIST element column CDATA #IMPLIED>
>  <!ATTLIST element table CDATA #IMPLIED>
>  <!ATTLIST element delete-action (restrict|cascade|null|default| 
> none) #IMPLIED>
> -<!ATTLIST element update-action CDATA #IMPLIED>
> +<!ATTLIST element update-action (restrict|cascade|null|default| 
> none) #IMPLIED>
>  <!ATTLIST element indexed (true|false|unique) #IMPLIED>
>  <!ATTLIST element unique (true|false) #IMPLIED>
>
>  <!ELEMENT order (extension*, column*, index?, extension*)>
>  <!ATTLIST order column CDATA #IMPLIED>
> -<!ATTLIST order indexed (true|false|unique) #IMPLIED>
>  <!ATTLIST order mapped-by CDATA #IMPLIED>
>
>  <!ELEMENT fetch-group (extension*, (fetch-group|field|property)*,  
> extension*)>
> @@ -197,7 +200,7 @@
>  <!ATTLIST sequence factory-class CDATA #IMPLIED>
>  <!ATTLIST sequence strategy (nontransactional|contiguous| 
> noncontiguous) #REQUIRED>
>
> -<!ELEMENT index (extension*, (column|field|property)*, extension*)>
> +<!ELEMENT index (extension*, (column* | field* | property*),  
> extension*)>
>  <!ATTLIST index name CDATA #IMPLIED>
>  <!ATTLIST index table CDATA #IMPLIED>
>  <!ATTLIST index unique (true|false) 'false'>
> @@ -209,7 +212,7 @@
>  <!ATTLIST query unique (true|false) 'false'>
>  <!ATTLIST query result-class CDATA #IMPLIED>
>
> -<!ELEMENT unique (extension*, (column|field|property)*, extension*)>
> +<!ELEMENT unique (extension*, (column* | field* | property*),  
> extension*)>
>  <!ATTLIST unique name CDATA #IMPLIED>
>  <!ATTLIST unique table CDATA #IMPLIED>
>  <!ATTLIST unique deferred (true|false) 'false'>
> Index: src/dtd/javax/jdo/orm.dtd
> ===================================================================
> --- src/dtd/javax/jdo/orm.dtd	(Revision 378929)
> +++ src/dtd/javax/jdo/orm.dtd	(Arbeitskopie)
> @@ -7,6 +7,7 @@
>  <!ELEMENT orm (extension*, (package|query)+, extension*)>
>  <!ATTLIST orm catalog CDATA #IMPLIED>
>  <!ATTLIST orm schema CDATA #IMPLIED>
> +
>  <!ELEMENT package (extension*, (interface|class|sequence)+,  
> extension*)>
>  <!ATTLIST package name CDATA ''>
>  <!ATTLIST package catalog CDATA #IMPLIED>
> @@ -66,7 +67,7 @@
>  <!ATTLIST column sql-type CDATA #IMPLIED>
>  <!ATTLIST column length CDATA #IMPLIED>
>  <!ATTLIST column scale CDATA #IMPLIED>
> -<!ATTLIST column allows-null CDATA #IMPLIED>
> +<!ATTLIST column allows-null (true|false) #IMPLIED>
>  <!ATTLIST column default-value CDATA #IMPLIED>
>  <!ATTLIST column insert-value CDATA #IMPLIED>
>
> @@ -84,28 +85,29 @@
>
>  <!ELEMENT field (extension*, join?, embedded?, element?, key?,  
> value?, order?, column*, foreign-key?, index?, unique?, extension*)>
>  <!ATTLIST field name CDATA #REQUIRED>
> +<!ATTLIST field table CDATA #IMPLIED>
>  <!ATTLIST field column CDATA #IMPLIED>
>  <!ATTLIST field primary-key CDATA #IMPLIED>
> -<!ATTLIST field table CDATA #IMPLIED>
> +<!ATTLIST field value-strategy CDATA #IMPLIED>
>  <!ATTLIST field delete-action (restrict|cascade|null|default|none)  
> #IMPLIED>
>  <!ATTLIST field indexed (true|false|unique) #IMPLIED>
>  <!ATTLIST field unique (true|false) #IMPLIED>
> +<!ATTLIST field sequence CDATA #IMPLIED>
>  <!ATTLIST field mapped-by CDATA #IMPLIED>
> -<!ATTLIST field value-strategy CDATA #IMPLIED>
> -<!ATTLIST field sequence CDATA #IMPLIED>
>
> -<!ELEMENT foreign-key (extension*, (column|field|property)*,  
> extension*)>
> +<!ELEMENT foreign-key (extension*, (column* | field* | property*),  
> extension*)>
>  <!ATTLIST foreign-key table CDATA #IMPLIED>
>  <!ATTLIST foreign-key deferred (true|false) #IMPLIED>
> -<!ATTLIST foreign-key delete-action (restrict|cascade|null| 
> default) 'restrict'>
> -<!ATTLIST foreign-key update-action (restrict|cascade|null| 
> default) 'restrict'>
> +<!ATTLIST foreign-key delete-action (restrict|cascade|null|default| 
> none) 'restrict'>
> +<!ATTLIST foreign-key update-action (restrict|cascade|null|default| 
> none) 'restrict'>
>  <!ATTLIST foreign-key unique (true|false) #IMPLIED>
>  <!ATTLIST foreign-key name CDATA #IMPLIED>
>
> -<!ELEMENT key (column*, index?, embedded?, foreign-key?, extension*)>
> +<!ELEMENT key (extension*, embedded?, column*, foreign-key?,  
> index?, unique?, extension*)>
>  <!ATTLIST key column CDATA #IMPLIED>
>  <!ATTLIST key table CDATA #IMPLIED>
>  <!ATTLIST key delete-action (restrict|cascade|null|default|none)  
> #IMPLIED>
> +<!ATTLIST key update-action (restrict|cascade|null|default|none)  
> #IMPLIED>
>  <!ATTLIST key indexed (true|false|unique) #IMPLIED>
>  <!ATTLIST key unique (true|false) #IMPLIED>
>  <!ATTLIST key mapped-by CDATA #IMPLIED>
> @@ -114,6 +116,7 @@
>  <!ATTLIST value column CDATA #IMPLIED>
>  <!ATTLIST value table CDATA #IMPLIED>
>  <!ATTLIST value delete-action (restrict|cascade|null|default|none)  
> #IMPLIED>
> +<!ATTLIST value update-action (restrict|cascade|null|default|none)  
> #IMPLIED>
>  <!ATTLIST value indexed (true|false|unique) #IMPLIED>
>  <!ATTLIST value unique (true|false) #IMPLIED>
>  <!ATTLIST value mapped-by CDATA #IMPLIED>
> @@ -122,18 +125,18 @@
>  <!ATTLIST element column CDATA #IMPLIED>
>  <!ATTLIST element table CDATA #IMPLIED>
>  <!ATTLIST element delete-action (restrict|cascade|null|default| 
> none) #IMPLIED>
> +<!ATTLIST element update-action (restrict|cascade|null|default| 
> none) #IMPLIED>
>  <!ATTLIST element indexed (true|false|unique) #IMPLIED>
>  <!ATTLIST element unique (true|false) #IMPLIED>
>
>  <!ELEMENT order (extension*, column*, index?, extension*)>
>  <!ATTLIST order column CDATA #IMPLIED>
> -<!ATTLIST order indexed (true|false|unique) #IMPLIED>
>  <!ATTLIST order mapped-by CDATA #IMPLIED>
>
>  <!ELEMENT embedded (extension*, (field|property)*, extension*)>
> +<!ATTLIST embedded owner-field CDATA #IMPLIED>
>  <!ATTLIST embedded null-indicator-column CDATA #IMPLIED>
>  <!ATTLIST embedded null-indicator-value CDATA #IMPLIED>
> -<!ATTLIST embedded owner-field CDATA #IMPLIED>
>
>  <!ELEMENT sequence (extension*)>
>  <!ATTLIST sequence name CDATA #REQUIRED>
> @@ -141,12 +144,12 @@
>  <!ATTLIST sequence factory-class CDATA #IMPLIED>
>  <!ATTLIST sequence strategy (nontransactional|contiguous| 
> noncontiguous) #REQUIRED>
>
> -<!ELEMENT index (extension*, (column|field|property)*, extension*)>
> +<!ELEMENT index (extension*, (column* | field* | property*),  
> extension*)>
>  <!ATTLIST index name CDATA #IMPLIED>
>  <!ATTLIST index table CDATA #IMPLIED>
>  <!ATTLIST index unique (true|false) 'false'>
>
> -<!ELEMENT unique (extension*, (column|field|property)*, extension*)>
> +<!ELEMENT unique (extension*, (column* | field* | property*),  
> extension*)>
>  <!ATTLIST unique name CDATA #IMPLIED>
>  <!ATTLIST unique table CDATA #IMPLIED>
>  <!ATTLIST unique deferred (true|false) 'false'>
> Index: src/dtd/javax/jdo/jdo.xsd
> ===================================================================
> --- src/dtd/javax/jdo/jdo.xsd	(Revision 378929)
> +++ src/dtd/javax/jdo/jdo.xsd	(Arbeitskopie)
> @@ -466,7 +466,14 @@
>          <xs:attribute name="sql-type"/>
>          <xs:attribute name="length"/>
>          <xs:attribute name="scale"/>
> -        <xs:attribute name="allows-null"/>
> +        <xs:attribute name="allows-null">
> +            <xs:simpleType>
> +                <xs:restriction base="xs:token">
> +                    <xs:enumeration value="true"/>
> +                    <xs:enumeration value="false"/>
> +                </xs:restriction>
> +            </xs:simpleType>
> +        </xs:attribute>
>          <xs:attribute name="default-value"/>
>          <xs:attribute name="insert-value"/>
>      </xs:attributeGroup>
> @@ -593,10 +600,10 @@
>          <xs:complexType>
>              <xs:sequence>
>                  <xs:element minOccurs="0" maxOccurs="unbounded"  
> ref="extension"/>
> -                <xs:choice minOccurs="0" maxOccurs="unbounded">
> -                    <xs:element ref="column"/>
> -                    <xs:element ref="field"/>
> -                    <xs:element ref="property"/>
> +                <xs:choice>
> +                    <xs:element minOccurs="0"  
> maxOccurs="unbounded" ref="column"/>
> +                    <xs:element minOccurs="0"  
> maxOccurs="unbounded" ref="field"/>
> +                    <xs:element minOccurs="0"  
> maxOccurs="unbounded" ref="property"/>
>                  </xs:choice>
>                  <xs:element minOccurs="0" maxOccurs="unbounded"  
> ref="extension"/>
>              </xs:sequence>
> @@ -616,20 +623,22 @@
>          <xs:attribute name="delete-action" default="restrict">
>              <xs:simpleType>
>                  <xs:restriction base="xs:token">
> +                    <xs:enumeration value="restrict"/>
>                      <xs:enumeration value="cascade"/>
> -                    <xs:enumeration value="restrict"/>
>                      <xs:enumeration value="null"/>
>                      <xs:enumeration value="default"/>
> +                    <xs:enumeration value="none"/>
>                  </xs:restriction>
>              </xs:simpleType>
>          </xs:attribute>
>          <xs:attribute name="update-action" default="restrict">
>              <xs:simpleType>
>                  <xs:restriction base="xs:token">
> +                    <xs:enumeration value="restrict"/>
>                      <xs:enumeration value="cascade"/>
> -                    <xs:enumeration value="restrict"/>
>                      <xs:enumeration value="null"/>
>                      <xs:enumeration value="default"/>
> +                    <xs:enumeration value="none"/>
>                  </xs:restriction>
>              </xs:simpleType>
>          </xs:attribute>
> @@ -766,6 +775,17 @@
>                  </xs:restriction>
>              </xs:simpleType>
>          </xs:attribute>
> +        <xs:attribute name="update-action">
> +            <xs:simpleType>
> +                <xs:restriction base="xs:token">
> +                    <xs:enumeration value="restrict"/>
> +                    <xs:enumeration value="cascade"/>
> +                    <xs:enumeration value="null"/>
> +                    <xs:enumeration value="default"/>
> +                    <xs:enumeration value="none"/>
> +                </xs:restriction>
> +            </xs:simpleType>
> +        </xs:attribute>
>          <xs:attribute name="indexed">
>              <xs:simpleType>
>                  <xs:restriction base="xs:token">
> @@ -800,8 +820,8 @@
>          </xs:complexType>
>      </xs:element>
>      <xs:attributeGroup name="attlist.value">
> +        <xs:attribute name="column"/>
>          <xs:attribute name="table"/>
> -        <xs:attribute name="column"/>
>          <xs:attribute name="delete-action">
>              <xs:simpleType>
>                  <xs:restriction base="xs:token">
> @@ -813,6 +833,17 @@
>                  </xs:restriction>
>              </xs:simpleType>
>          </xs:attribute>
> +        <xs:attribute name="update-action">
> +            <xs:simpleType>
> +                <xs:restriction base="xs:token">
> +                    <xs:enumeration value="restrict"/>
> +                    <xs:enumeration value="cascade"/>
> +                    <xs:enumeration value="null"/>
> +                    <xs:enumeration value="default"/>
> +                    <xs:enumeration value="none"/>
> +                </xs:restriction>
> +            </xs:simpleType>
> +        </xs:attribute>
>          <xs:attribute name="indexed">
>              <xs:simpleType>
>                  <xs:restriction base="xs:token">
> @@ -895,7 +926,17 @@
>                  </xs:restriction>
>              </xs:simpleType>
>          </xs:attribute>
> -        <xs:attribute name="update-action"/>
> +        <xs:attribute name="update-action">
> +            <xs:simpleType>
> +                <xs:restriction base="xs:token">
> +                    <xs:enumeration value="restrict"/>
> +                    <xs:enumeration value="cascade"/>
> +                    <xs:enumeration value="null"/>
> +                    <xs:enumeration value="default"/>
> +                    <xs:enumeration value="none"/>
> +                </xs:restriction>
> +            </xs:simpleType>
> +        </xs:attribute>
>          <xs:attribute name="indexed">
>              <xs:simpleType>
>                  <xs:restriction base="xs:token">
> @@ -928,15 +969,6 @@
>      </xs:element>
>      <xs:attributeGroup name="attlist.order">
>          <xs:attribute name="column"/>
> -        <xs:attribute name="indexed">
> -            <xs:simpleType>
> -                <xs:restriction base="xs:token">
> -                    <xs:enumeration value="true"/>
> -                    <xs:enumeration value="false"/>
> -                    <xs:enumeration value="unique"/>
> -                </xs:restriction>
> -            </xs:simpleType>
> -        </xs:attribute>
>          <xs:attribute name="mapped-by"/>
>      </xs:attributeGroup>
>      <xs:element name="fetch-group">
> @@ -1008,10 +1040,10 @@
>          <xs:complexType>
>              <xs:sequence>
>                  <xs:element minOccurs="0" maxOccurs="unbounded"  
> ref="extension"/>
> -                <xs:choice minOccurs="0" maxOccurs="unbounded">
> -                    <xs:element ref="column"/>
> -                    <xs:element ref="field"/>
> -                    <xs:element ref="property"/>
> +                <xs:choice>
> +                    <xs:element minOccurs="0"  
> maxOccurs="unbounded" ref="column"/>
> +                    <xs:element minOccurs="0"  
> maxOccurs="unbounded" ref="field"/>
> +                    <xs:element minOccurs="0"  
> maxOccurs="unbounded" ref="property"/>
>                  </xs:choice>
>                  <xs:element minOccurs="0" maxOccurs="unbounded"  
> ref="extension"/>
>              </xs:sequence>
> @@ -1063,10 +1095,10 @@
>          <xs:complexType>
>              <xs:sequence>
>                  <xs:element minOccurs="0" maxOccurs="unbounded"  
> ref="extension"/>
> -                <xs:choice minOccurs="0" maxOccurs="unbounded">
> -                    <xs:element ref="column"/>
> -                    <xs:element ref="field"/>
> -                    <xs:element ref="property"/>
> +                <xs:choice>
> +                    <xs:element minOccurs="0"  
> maxOccurs="unbounded" ref="column"/>
> +                    <xs:element minOccurs="0"  
> maxOccurs="unbounded" ref="field"/>
> +                    <xs:element minOccurs="0"  
> maxOccurs="unbounded" ref="property"/>
>                  </xs:choice>
>                  <xs:element minOccurs="0" maxOccurs="unbounded"  
> ref="extension"/>
>              </xs:sequence>
> Index: src/dtd/javax/jdo/orm.xsd
> ===================================================================
> --- src/dtd/javax/jdo/orm.xsd	(Revision 378929)
> +++ src/dtd/javax/jdo/orm.xsd	(Arbeitskopie)
> @@ -122,6 +122,7 @@
>                  </xs:restriction>
>              </xs:simpleType>
>          </xs:attribute>
> +        <xs:attribute name="mapped-by"/>
>      </xs:attributeGroup>
>      <xs:element name="class">
>          <xs:complexType>
> @@ -324,7 +325,14 @@
>          <xs:attribute name="sql-type"/>
>          <xs:attribute name="length"/>
>          <xs:attribute name="scale"/>
> -        <xs:attribute name="allows-null"/>
> +        <xs:attribute name="allows-null">
> +            <xs:simpleType>
> +                <xs:restriction base="xs:token">
> +                    <xs:enumeration value="true"/>
> +                    <xs:enumeration value="false"/>
> +                </xs:restriction>
> +            </xs:simpleType>
> +        </xs:attribute>
>          <xs:attribute name="default-value"/>
>          <xs:attribute name="insert-value"/>
>      </xs:attributeGroup>
> @@ -349,8 +357,10 @@
>      </xs:element>
>      <xs:attributeGroup name="attlist.field">
>          <xs:attribute name="name" use="required"/>
> +        <xs:attribute name="table"/>
>          <xs:attribute name="column"/>
> -        <xs:attribute name="table"/>
> +        <xs:attribute name="primary-key"/>
> +        <xs:attribute name="value-strategy"/>
>          <xs:attribute name="delete-action">
>              <xs:simpleType>
>                  <xs:restriction base="xs:token">
> @@ -379,17 +389,17 @@
>                  </xs:restriction>
>              </xs:simpleType>
>          </xs:attribute>
> -        <xs:attribute name="value-strategy"/>
>          <xs:attribute name="sequence"/>
> +        <xs:attribute name="mapped-by"/>
>      </xs:attributeGroup>
>      <xs:element name="foreign-key">
>          <xs:complexType>
>              <xs:sequence>
>                  <xs:element minOccurs="0" maxOccurs="unbounded"  
> ref="extension"/>
> -                <xs:choice minOccurs="0" maxOccurs="unbounded">
> -                    <xs:element ref="column"/>
> -                    <xs:element ref="field"/>
> -                    <xs:element ref="property"/>
> +                <xs:choice>
> +                    <xs:element minOccurs="0"  
> maxOccurs="unbounded" ref="column"/>
> +                    <xs:element minOccurs="0"  
> maxOccurs="unbounded" ref="field"/>
> +                    <xs:element minOccurs="0"  
> maxOccurs="unbounded" ref="property"/>
>                  </xs:choice>
>                  <xs:element minOccurs="0" maxOccurs="unbounded"  
> ref="extension"/>
>              </xs:sequence>
> @@ -413,6 +423,7 @@
>                      <xs:enumeration value="cascade"/>
>                      <xs:enumeration value="null"/>
>                      <xs:enumeration value="default"/>
> +                    <xs:enumeration value="none"/>
>                  </xs:restriction>
>              </xs:simpleType>
>          </xs:attribute>
> @@ -423,6 +434,7 @@
>                      <xs:enumeration value="cascade"/>
>                      <xs:enumeration value="null"/>
>                      <xs:enumeration value="default"/>
> +                    <xs:enumeration value="none"/>
>                  </xs:restriction>
>              </xs:simpleType>
>          </xs:attribute>
> @@ -440,10 +452,11 @@
>          <xs:complexType>
>              <xs:sequence>
>                  <xs:element minOccurs="0" maxOccurs="unbounded"  
> ref="extension"/>
> +                <xs:element minOccurs="0" maxOccurs="1"  
> ref="embedded"/>
>                  <xs:element minOccurs="0" maxOccurs="unbounded"  
> ref="column"/>
> +                <xs:element minOccurs="0" maxOccurs="1"  
> ref="foreign-key"/>
>                  <xs:element minOccurs="0" maxOccurs="1" ref="index"/>
> -                <xs:element minOccurs="0" maxOccurs="1"  
> ref="embedded"/>
> -                <xs:element minOccurs="0" maxOccurs="1"  
> ref="foreign-key"/>
> +                <xs:element minOccurs="0" maxOccurs="1"  
> ref="unique"/>
>                  <xs:element minOccurs="0" maxOccurs="unbounded"  
> ref="extension"/>
>              </xs:sequence>
>              <xs:attributeGroup ref="attlist.key"/>
> @@ -463,6 +476,17 @@
>                  </xs:restriction>
>              </xs:simpleType>
>          </xs:attribute>
> +        <xs:attribute name="update-action">
> +            <xs:simpleType>
> +                <xs:restriction base="xs:token">
> +                    <xs:enumeration value="restrict"/>
> +                    <xs:enumeration value="cascade"/>
> +                    <xs:enumeration value="null"/>
> +                    <xs:enumeration value="default"/>
> +                    <xs:enumeration value="none"/>
> +                </xs:restriction>
> +            </xs:simpleType>
> +        </xs:attribute>
>          <xs:attribute name="indexed">
>              <xs:simpleType>
>                  <xs:restriction base="xs:token">
> @@ -480,6 +504,7 @@
>                  </xs:restriction>
>              </xs:simpleType>
>          </xs:attribute>
> +        <xs:attribute name="mapped-by"/>
>      </xs:attributeGroup>
>      <xs:element name="value">
>          <xs:complexType>
> @@ -509,6 +534,17 @@
>                  </xs:restriction>
>              </xs:simpleType>
>          </xs:attribute>
> +        <xs:attribute name="update-action">
> +            <xs:simpleType>
> +                <xs:restriction base="xs:token">
> +                    <xs:enumeration value="restrict"/>
> +                    <xs:enumeration value="cascade"/>
> +                    <xs:enumeration value="null"/>
> +                    <xs:enumeration value="default"/>
> +                    <xs:enumeration value="none"/>
> +                </xs:restriction>
> +            </xs:simpleType>
> +        </xs:attribute>
>          <xs:attribute name="indexed">
>              <xs:simpleType>
>                  <xs:restriction base="xs:token">
> @@ -526,6 +562,7 @@
>                  </xs:restriction>
>              </xs:simpleType>
>          </xs:attribute>
> +        <xs:attribute name="mapped-by"/>
>      </xs:attributeGroup>
>      <xs:element name="element">
>          <xs:complexType>
> @@ -555,7 +592,17 @@
>                  </xs:restriction>
>              </xs:simpleType>
>          </xs:attribute>
> -        <xs:attribute name="update-action"/>
> +        <xs:attribute name="update-action">
> +            <xs:simpleType>
> +                <xs:restriction base="xs:token">
> +                    <xs:enumeration value="restrict"/>
> +                    <xs:enumeration value="cascade"/>
> +                    <xs:enumeration value="null"/>
> +                    <xs:enumeration value="default"/>
> +                    <xs:enumeration value="none"/>
> +                </xs:restriction>
> +            </xs:simpleType>
> +        </xs:attribute>
>          <xs:attribute name="indexed">
>              <xs:simpleType>
>                  <xs:restriction base="xs:token">
> @@ -587,15 +634,7 @@
>      </xs:element>
>      <xs:attributeGroup name="attlist.order">
>          <xs:attribute name="column"/>
> -        <xs:attribute name="indexed">
> -            <xs:simpleType>
> -                <xs:restriction base="xs:token">
> -                    <xs:enumeration value="true"/>
> -                    <xs:enumeration value="false"/>
> -                    <xs:enumeration value="unique"/>
> -                </xs:restriction>
> -            </xs:simpleType>
> -        </xs:attribute>
> +        <xs:attribute name="mapped-by"/>
>      </xs:attributeGroup>
>      <xs:element name="embedded">
>          <xs:complexType>
> @@ -611,9 +650,9 @@
>          </xs:complexType>
>      </xs:element>
>      <xs:attributeGroup name="attlist.embedded">
> +        <xs:attribute name="owner-field"/>
>          <xs:attribute name="null-indicator-column"/>
>          <xs:attribute name="null-indicator-value"/>
> -        <xs:attribute name="owner-field"/>
>      </xs:attributeGroup>
>      <xs:element name="sequence">
>          <xs:complexType>
> @@ -641,10 +680,10 @@
>          <xs:complexType>
>              <xs:sequence>
>                  <xs:element minOccurs="0" maxOccurs="unbounded"  
> ref="extension"/>
> -                <xs:choice minOccurs="0" maxOccurs="unbounded">
> -                    <xs:element ref="column"/>
> -                    <xs:element ref="field"/>
> -                    <xs:element ref="property"/>
> +                <xs:choice>
> +                    <xs:element minOccurs="0"  
> maxOccurs="unbounded" ref="column"/>
> +                    <xs:element minOccurs="0"  
> maxOccurs="unbounded" ref="field"/>
> +                    <xs:element minOccurs="0"  
> maxOccurs="unbounded" ref="property"/>
>                  </xs:choice>
>                  <xs:element minOccurs="0" maxOccurs="unbounded"  
> ref="extension"/>
>              </xs:sequence>
> @@ -667,10 +706,10 @@
>          <xs:complexType>
>              <xs:sequence>
>                  <xs:element minOccurs="0" maxOccurs="unbounded"  
> ref="extension"/>
> -                <xs:choice minOccurs="0" maxOccurs="unbounded">
> -                    <xs:element ref="column"/>
> -                    <xs:element ref="field"/>
> -                    <xs:element ref="property"/>
> +                <xs:choice>
> +                    <xs:element minOccurs="0"  
> maxOccurs="unbounded" ref="column"/>
> +                    <xs:element minOccurs="0"  
> maxOccurs="unbounded" ref="field"/>
> +                    <xs:element minOccurs="0"  
> maxOccurs="unbounded" ref="property"/>
>                  </xs:choice>
>                  <xs:element minOccurs="0" maxOccurs="unbounded"  
> ref="extension"/>
>              </xs:sequence>

Craig Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
408 276-5638 mailto:Craig.Russell@sun.com
P.S. A good JDO? O, Gasp!