db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craig L Russell <Craig.Russ...@Sun.COM>
Subject Re: jdo.dtd changes
Date Tue, 21 Feb 2006 21:49:07 GMT
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!


Mime
View raw message