You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-dev@db.apache.org by Thomas Mahler <th...@web.de> on 2003/06/03 11:27:56 UTC

Re: repository xml and DTDs

Hi again James,

I just checked in a change to the OJB repository.xml.
We now have a PUBLIC identifier as follows:

<!DOCTYPE descriptor-repository PUBLIC
        "-//Apache Software Foundation//DTD OJB Repository//EN"
        "repository.dtd"
[
<!ENTITY database SYSTEM "repository_database.xml">
<!ENTITY internal SYSTEM "repository_internal.xml">
<!ENTITY junit SYSTEM "repository_junit.xml">
<!ENTITY user SYSTEM "repository_user.xml">
<!ENTITY ejb SYSTEM "repository_ejb.xml">
<!ENTITY jdo SYSTEM "repository_jdo.xml">
]>

I decided to use a local System identifier ("repository.dtd") instead of 
a public one by default.
I know OJB will be operated on production environments that cannot 
connect to the internet to access the dtd from the apache site!

Nevertheless I also made the dtd publicly available under:
http://db.apache.org/ojb/dtds/1.0/repository.dtd

So by changing the SYTEM identifier to
"http://db.apache.org/ojb/dtds/1.0/repository.dtd" one can validate 
against the public DTD.

I hope this is OK for your needs!

As I mentioned earlier: I won't provide separate doctypes for the 
subdocuments of the repository for release 1.0.

Are you making progress with the OJB console?

cheers,
thomas


James Holmes wrote:
> Thomas,
> 
> Thanks for your response.
> 
> The idea for OJB Console is that it will be able to create and edit
> repository.xml files.  Certainly when creating new files it could break them
> into the smaller pieces the way the OJB website's example shows.  However,
> the problem comes in when editing a file that is broken up.  An XML parser
> can read in that file and see it as one, but it won't be intelligent enough
> to write out the changes into separate files.  Does that make sense?
> 
> So basically this means that in order to use OJB console users would have to
> have one big xml file with all config info in it.  Or we could update the
> OJB code to be able to accept multiple smaller files.  I realize you're
> close to a release and hope we can figure out some solution here.
> 
> I'm a committer on the Struts project and could help with this.  I can
> supply patches if it's something you will entertain.
> 
> Also, another thing I'd like to request (ask very nicely) is to have you (or
> another committer) publish the repository DTD at an official address on the
> OJB website and to create an official repository file DOCTYPE declaration.
> 
> For example Struts has its DTD at:
> 
> http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd
> 
> so the DOCTYPE in Struts config files looks like:
> 
> <!DOCTYPE struts-config PUBLIC
>        "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
>        "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
> 
> For OJB this could be something like:
> 
> http://db.apache.org/ojb/dtds/repository.dtd
> 
> and:
> 
> <!DOCTYPE struts-config PUBLIC
>        "-//Apache Software Foundation//DTD OJB Repository//EN"
>        "http://db.apache.org/ojb/dtds/repository.dtd">
> 
> What do you think?  This would be a huge help for me and likely other tools
> developers. This would also be similar to the way other frameworks, etc.
> post their DTDs (ie. web.xml for WAR files).
> 
> Having an official DOCTYPE declaration at the top of the config files allows
> tools like OJB console to distinguish the OJB xml file from others.  This is
> especially helpful when plugging an OJB tool into an IDE.  Most IDEs have a
> mechanism to recognize certain files and make special options available to
> the file.  For instance, OJB console will recognize OJB xml files in
> Netbeans and allow a user to right click on the file and open it inside of
> OJB console.  The way that xml files are recognized is by their DOCTYPE.
> For a good example of this you can check out Struts Console
> (http://www.jamesholmes.com/struts/).  If you just want to see how this
> works you can check out the screen shots section of my website and you'll
> see how the IDE plugins work conceptually.
> 
> Your attention and help on this very much appreciated.  I think you'll find
> that OJB console will be a huge boon to the OJB project.  I know that Struts
> Console has really added alot of value to the Struts project.
> 
> Thanks,
> 
> James
> 
> 
> ----- Original Message -----
> From: "Thomas Mahler" <th...@web.de>
> To: "OJB Developers List" <oj...@db.apache.org>
> Sent: Saturday, April 26, 2003 4:44 AM
> Subject: Re: repository xml and DTDs
> 
> 
> 
>>Hi James,
>>
>>James Holmes wrote:
>>
>>>I'm working on OJB Console, a tool similar to Struts Console, that
> 
> should be
> 
>>>ready in the next week or so.  However, I'm running into problems with
> 
> the
> 
>>>way the repository xml file is broken up.  The problem I'm having is
> 
> that
> 
>>>the file is broken into pieces and then "loaded" into the mail file with
>>>ENTITY declarations.
>>>
>>>OJB Console needs each XML file to have a DOCTYPE so that the file can
> 
> be:
> 
>>>1.) recognized (meaning distinguished from other XML files)
>>>2.) validated
>>
>>Mhh, The OJB file separation is not mandatory. splitting the file in to
>>more digestable pieces is just an idea to keep it maintainable for humans.
>>
>>So it won't be a problem if you keep things simple and generate it all
>>into one file.
>>
>>Why is it necessary to handle the files separately? In OJB we are just
>>validating repository.xml against repository.dtd and the loading of the
>>subordinate files is done transparently by the xml include mechanism.
>>
>>
>>>Any ideas for solving this problem.  I realize there has been a
> 
> precedent
> 
>>>set to break up the large monolithic file into smaller manageable
> 
> chunks.
> 
>>>Perhaps each file could specity a DOCTYPE and OJB could load mulitple
>>>smaller files and instead of loading one file that sources in the
> 
> others?
> 
>>As we want to have a stable 1.0 release out soon, I'd prefer to not
>>change the existing format.
>>
>>I propose to simply work with one monolithic file for the time being.
>>
>>cheerio,
>>Thomas
>>
>>
>>
>>>-James
>>>
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
>>>For additional commands, e-mail: ojb-dev-help@db.apache.org
>>>
>>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
>>For additional commands, e-mail: ojb-dev-help@db.apache.org
>>
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-dev-help@db.apache.org
> 
> 


RE: repository xml and DTDs

Posted by James Holmes <ja...@jamesholmes.com>.
Hey Thomas,

Thanks for taking care of this.  I've been swamped lately and haven't
had much time to work on OJB Console.  I've got a good start though and
can hopefully get closer to an alpha next week.  I'll see if the local
reference to just "repository.dtd" works for me.  And for the record you
can use a dtd on the apache sites even for production servers without
access to the internet.  Struts and Struts Console both support this by
having a custom EntityResolver instance.  I can give you source for
this.

Thanks,

James

-----Original Message-----
From: thma32@web.de [mailto:thma32@web.de] 
Sent: Tuesday, June 03, 2003 4:28 AM
To: OJB Developers List; james@jamesholmes.com
Subject: Re: repository xml and DTDs

Hi again James,

I just checked in a change to the OJB repository.xml.
We now have a PUBLIC identifier as follows:

<!DOCTYPE descriptor-repository PUBLIC
        "-//Apache Software Foundation//DTD OJB Repository//EN"
        "repository.dtd"
[
<!ENTITY database SYSTEM "repository_database.xml">
<!ENTITY internal SYSTEM "repository_internal.xml">
<!ENTITY junit SYSTEM "repository_junit.xml">
<!ENTITY user SYSTEM "repository_user.xml">
<!ENTITY ejb SYSTEM "repository_ejb.xml">
<!ENTITY jdo SYSTEM "repository_jdo.xml">
]>

I decided to use a local System identifier ("repository.dtd") instead of

a public one by default.
I know OJB will be operated on production environments that cannot 
connect to the internet to access the dtd from the apache site!

Nevertheless I also made the dtd publicly available under:
http://db.apache.org/ojb/dtds/1.0/repository.dtd

So by changing the SYTEM identifier to
"http://db.apache.org/ojb/dtds/1.0/repository.dtd" one can validate 
against the public DTD.

I hope this is OK for your needs!

As I mentioned earlier: I won't provide separate doctypes for the 
subdocuments of the repository for release 1.0.

Are you making progress with the OJB console?

cheers,
thomas


James Holmes wrote:
> Thomas,
> 
> Thanks for your response.
> 
> The idea for OJB Console is that it will be able to create and edit
> repository.xml files.  Certainly when creating new files it could
break them
> into the smaller pieces the way the OJB website's example shows.
However,
> the problem comes in when editing a file that is broken up.  An XML
parser
> can read in that file and see it as one, but it won't be intelligent
enough
> to write out the changes into separate files.  Does that make sense?
> 
> So basically this means that in order to use OJB console users would
have to
> have one big xml file with all config info in it.  Or we could update
the
> OJB code to be able to accept multiple smaller files.  I realize
you're
> close to a release and hope we can figure out some solution here.
> 
> I'm a committer on the Struts project and could help with this.  I can
> supply patches if it's something you will entertain.
> 
> Also, another thing I'd like to request (ask very nicely) is to have
you (or
> another committer) publish the repository DTD at an official address
on the
> OJB website and to create an official repository file DOCTYPE
declaration.
> 
> For example Struts has its DTD at:
> 
> http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd
> 
> so the DOCTYPE in Struts config files looks like:
> 
> <!DOCTYPE struts-config PUBLIC
>        "-//Apache Software Foundation//DTD Struts Configuration
1.1//EN"
>        "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
> 
> For OJB this could be something like:
> 
> http://db.apache.org/ojb/dtds/repository.dtd
> 
> and:
> 
> <!DOCTYPE struts-config PUBLIC
>        "-//Apache Software Foundation//DTD OJB Repository//EN"
>        "http://db.apache.org/ojb/dtds/repository.dtd">
> 
> What do you think?  This would be a huge help for me and likely other
tools
> developers. This would also be similar to the way other frameworks,
etc.
> post their DTDs (ie. web.xml for WAR files).
> 
> Having an official DOCTYPE declaration at the top of the config files
allows
> tools like OJB console to distinguish the OJB xml file from others.
This is
> especially helpful when plugging an OJB tool into an IDE.  Most IDEs
have a
> mechanism to recognize certain files and make special options
available to
> the file.  For instance, OJB console will recognize OJB xml files in
> Netbeans and allow a user to right click on the file and open it
inside of
> OJB console.  The way that xml files are recognized is by their
DOCTYPE.
> For a good example of this you can check out Struts Console
> (http://www.jamesholmes.com/struts/).  If you just want to see how
this
> works you can check out the screen shots section of my website and
you'll
> see how the IDE plugins work conceptually.
> 
> Your attention and help on this very much appreciated.  I think you'll
find
> that OJB console will be a huge boon to the OJB project.  I know that
Struts
> Console has really added alot of value to the Struts project.
> 
> Thanks,
> 
> James
> 
> 
> ----- Original Message -----
> From: "Thomas Mahler" <th...@web.de>
> To: "OJB Developers List" <oj...@db.apache.org>
> Sent: Saturday, April 26, 2003 4:44 AM
> Subject: Re: repository xml and DTDs
> 
> 
> 
>>Hi James,
>>
>>James Holmes wrote:
>>
>>>I'm working on OJB Console, a tool similar to Struts Console, that
> 
> should be
> 
>>>ready in the next week or so.  However, I'm running into problems
with
> 
> the
> 
>>>way the repository xml file is broken up.  The problem I'm having is
> 
> that
> 
>>>the file is broken into pieces and then "loaded" into the mail file
with
>>>ENTITY declarations.
>>>
>>>OJB Console needs each XML file to have a DOCTYPE so that the file
can
> 
> be:
> 
>>>1.) recognized (meaning distinguished from other XML files)
>>>2.) validated
>>
>>Mhh, The OJB file separation is not mandatory. splitting the file in
to
>>more digestable pieces is just an idea to keep it maintainable for
humans.
>>
>>So it won't be a problem if you keep things simple and generate it all
>>into one file.
>>
>>Why is it necessary to handle the files separately? In OJB we are just
>>validating repository.xml against repository.dtd and the loading of
the
>>subordinate files is done transparently by the xml include mechanism.
>>
>>
>>>Any ideas for solving this problem.  I realize there has been a
> 
> precedent
> 
>>>set to break up the large monolithic file into smaller manageable
> 
> chunks.
> 
>>>Perhaps each file could specity a DOCTYPE and OJB could load mulitple
>>>smaller files and instead of loading one file that sources in the
> 
> others?
> 
>>As we want to have a stable 1.0 release out soon, I'd prefer to not
>>change the existing format.
>>
>>I propose to simply work with one monolithic file for the time being.
>>
>>cheerio,
>>Thomas
>>
>>
>>
>>>-James
>>>
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
>>>For additional commands, e-mail: ojb-dev-help@db.apache.org
>>>
>>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
>>For additional commands, e-mail: ojb-dev-help@db.apache.org
>>
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-dev-help@db.apache.org
> 
> 


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