db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michelle Caisse <Michelle.Cai...@Sun.COM>
Subject Re: referencing jdo 2 dtd
Date Thu, 10 Mar 2005 16:14:01 GMT
Michael Bouschen wrote:

> Hi Michelle,
>
>> Michael et al.,
>>
>> I created an orm directory parallel to the new applicationidentity 
>> and datastoreidentity directories.  
>
>
> I propose to have the orm directory parallel to jdo:
>     tck11/test/conf
>               /java
>               /jdo
>               /orm
>
> Then the directory jdo includes JDO metadata stored in .jdo files, where
> the directory orm is for mapping metadata. What do you think?


Yes, that's better.

>
>> To run tests with mapping, I will have
>> to edit all of the metadata files to reference a 2.0 dtd.  
>> Unfortunately, this is a hack until we can actually put the content 
>> in the repository and create a tck 2.0 directory in which we can make 
>> this a permanent feature of the metadata files.
>
>
> Yes this is an issue.
>
> Attached you find a small script changeDoctype.sh that allows you to
> change the metadata files (rather than doing this manually). It takes
> a list of file names as command line arguments. In each file it replaces
> a line starting with <!DOCTYPE by a string specified in variable
> NEWDOCTYPE. Please change the value of NEWDOCTYPE acording to your
> needs. Please note the new value needs to be enclosed in single quotes:
> NEWDOCTYPE='<new doctype>'
> I used the 1.0 doctype as an example. The script save the original file
> with the suffix .orig. It prints out the name of the file it is
> currently processing. You might need to change the permissions of the
> file, before you can execute it: chmod 777 changeDoctype.sh.
> The following line finds the .jdo file under the current directory and
> runs the script: find . -name '*.jdo' | xargs changeDoctype.sh
>
> This is a hack too, but less work compared to the manual change.

Awesome!! Thanks!

-- Michelle

>
> Regards Michael
>
>>
>> -- Michelle
>
>
>------------------------------------------------------------------------
>
>NEWDOCTYPE='<!DOCTYPE jdo PUBLIC "-//Sun Microsystems, Inc.//DTD Java Data Objects
Metadata 1.0//EN" "http://java.sun.com/dtd/jdo_1_0.dtd">'
>
>for i in $*
>do
>   echo $i
>   cp $i $i.orig
>   sed "/^<!DOCTYPE.*$/c \
>${NEWDOCTYPE}" $i.orig > $i
>done
>
>
>  
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message