You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by David Jencks <da...@coredevelopers.net> on 2004/06/17 01:03:23 UTC

dtd-based deployment descriptors

I think I've found out how to use xmlbeans to convert old dtd based 
deployment descriptors on the fly to schema based ones compatible with 
the j2ee 1.4 schemas.  This is as short as xsl, and I think easier to 
understand, and involves no additional tools.  Changing the 
ModuleBuilders to use this method looks like it is a 2 line change.

So, I have some utility functions to do this, and am wondering where 
the class should go. choices are:

specs/schema --- only source file there, and it is arguably geronimo 
specific.  however it is a convenient central location.

modules/j2ee -- everything that uses it will be related to this module

modules/common -- where XmlBeanUtils is now.  Otherwise seems like a 
bad place.

Any opinions?

Basically what I am doing is changing all the elements to have the 
correct namespace and rearranging the message driven bean stuff to 
conform to the new activation-config format.

If anyone can use xmlspy to convert the last dtd versions to schema I'd 
appreciate it, it would make it much easier to see inconsistencies that 
need to be examined.

thanks
david jencks


Re: dtd-based deployment descriptors

Posted by Arto Pastinen <ar...@ofw.fi>.
Hi!

Little hint.

There is also great plugin to eclipse, which generates DTD's (and i think  
that schema also) from XML file.
www.xmlbuddy.com

Artsi

On Thu, 17 Jun 2004 00:18:38 -0700, David Jencks  
<da...@coredevelopers.net> wrote:

>
> On Wednesday, June 16, 2004, at 11:39 PM, Kristian Köhler wrote:
>
>> Hi David
>>
>> Noah Campbell wrote:
>>
>>> Curious how you did the dtd to schema conversion?  A quick google
>>> search led me to a perl dtd2schema command line util.
>>
>> If this tool doesn't fit your needs I would try to convert the dtd  
>> files into schema files with XMLSpy.
>
> That would be wonderful.
>>
>> Do you have an example how the schema files should look like (using  
>> complex-types, etc)? Or is your code checked in?
> Someone converted the jca 1.0 dtd for me using xmlspy.  There is some  
> setting that makes all the elements be top level schema types, which  
> results in something very similar to the j2ee 1.4 schemas.  Since my  
> goal is to manually compare different schema versions, having the output  
> as close as possible to the 1.4 schemas would be ideal.
>
> The 1.2 and 1.3 dtds for ejbs and web-apps are checked into the schema  
> directory now.  The conversion for the connector 1.0 is in  
> specs/schema/src/j2ee_1_3schema/ if you would like to compare.
>
> many thanks!!
>
> david jencks
>
>>
>> Kristian
>>
>



Re: dtd-based deployment descriptors

Posted by David Jencks <da...@coredevelopers.net>.
On Wednesday, June 16, 2004, at 11:39 PM, Kristian Köhler wrote:

> Hi David
>
> Noah Campbell wrote:
>
>> Curious how you did the dtd to schema conversion?  A quick google
>> search led me to a perl dtd2schema command line util.
>
> If this tool doesn't fit your needs I would try to convert the dtd 
> files into schema files with XMLSpy.

That would be wonderful.
>
> Do you have an example how the schema files should look like (using 
> complex-types, etc)? Or is your code checked in?
Someone converted the jca 1.0 dtd for me using xmlspy.  There is some 
setting that makes all the elements be top level schema types, which 
results in something very similar to the j2ee 1.4 schemas.  Since my 
goal is to manually compare different schema versions, having the 
output as close as possible to the 1.4 schemas would be ideal.

The 1.2 and 1.3 dtds for ejbs and web-apps are checked into the schema 
directory now.  The conversion for the connector 1.0 is in 
specs/schema/src/j2ee_1_3schema/ if you would like to compare.

many thanks!!

david jencks

>
> Kristian
>


Re: dtd-based deployment descriptors

Posted by Kristian Köhler <Kr...@gmx.de>.
Hi David

Noah Campbell wrote:

> Curious how you did the dtd to schema conversion?  A quick google
> search led me to a perl dtd2schema command line util. 

If this tool doesn't fit your needs I would try to convert the dtd files 
into schema files with XMLSpy.

Do you have an example how the schema files should look like (using 
complex-types, etc)? Or is your code checked in?

Kristian

Re: dtd-based deployment descriptors

Posted by David Jencks <da...@coredevelopers.net>.
On Wednesday, June 16, 2004, at 05:34 PM, Noah Campbell wrote:

> Hi David,
>
> Curious how you did the dtd to schema conversion?  A quick google
> search led me to a perl dtd2schema command line util.  I'd be
> interested in a java dtd2schema utility if you know of one.

I don't know of a free/open tool that works to convert dtds to schemas. 
( I tried several that didn't work for me, including Trang).  XmlSpy 
seems to do an excellent job if you have windows and $$.

What I did was to write code using xmlbeans that reads a document 
conforming (hopefully) to a dtd and modifies it to conform to a schema. 
  This means at least adding namespace declarations to every element: 
for ejb 2.0 to 2.1 some of the MDB descriptors have to be rewritten as 
the 2.1 format is only vaguely related to the 2.0 format.

I'd like an XmlSpy owner to convert all the dtds for me so I can check 
if there are other inconsistencies I didn't see by comparing the dtd 
with the schema, which seems like an error-prone process.

thanks
david jencks
>
> Thanks,
> Noah
>
> On Wed, 16 Jun 2004 16:03:23 -0700, David Jencks
> <da...@coredevelopers.net> wrote:
>>
>> I think I've found out how to use xmlbeans to convert old dtd based
>> deployment descriptors on the fly to schema based ones compatible with
>> the j2ee 1.4 schemas.  This is as short as xsl, and I think easier to
>> understand, and involves no additional tools.  Changing the
>> ModuleBuilders to use this method looks like it is a 2 line change.
>>
>> So, I have some utility functions to do this, and am wondering where
>> the class should go. choices are:
>>
>> specs/schema --- only source file there, and it is arguably geronimo
>> specific.  however it is a convenient central location.
>>
>> modules/j2ee -- everything that uses it will be related to this module
>>
>> modules/common -- where XmlBeanUtils is now.  Otherwise seems like a
>> bad place.
>>
>> Any opinions?
>>
>> Basically what I am doing is changing all the elements to have the
>> correct namespace and rearranging the message driven bean stuff to
>> conform to the new activation-config format.
>>
>> If anyone can use xmlspy to convert the last dtd versions to schema 
>> I'd
>> appreciate it, it would make it much easier to see inconsistencies 
>> that
>> need to be examined.
>>
>> thanks
>> david jencks
>>
>>
>


Re: dtd-based deployment descriptors

Posted by Noah Campbell <no...@gmail.com>.
Hi David,

Curious how you did the dtd to schema conversion?  A quick google
search led me to a perl dtd2schema command line util.  I'd be
interested in a java dtd2schema utility if you know of one.

Thanks,
Noah

On Wed, 16 Jun 2004 16:03:23 -0700, David Jencks
<da...@coredevelopers.net> wrote:
> 
> I think I've found out how to use xmlbeans to convert old dtd based
> deployment descriptors on the fly to schema based ones compatible with
> the j2ee 1.4 schemas.  This is as short as xsl, and I think easier to
> understand, and involves no additional tools.  Changing the
> ModuleBuilders to use this method looks like it is a 2 line change.
> 
> So, I have some utility functions to do this, and am wondering where
> the class should go. choices are:
> 
> specs/schema --- only source file there, and it is arguably geronimo
> specific.  however it is a convenient central location.
> 
> modules/j2ee -- everything that uses it will be related to this module
> 
> modules/common -- where XmlBeanUtils is now.  Otherwise seems like a
> bad place.
> 
> Any opinions?
> 
> Basically what I am doing is changing all the elements to have the
> correct namespace and rearranging the message driven bean stuff to
> conform to the new activation-config format.
> 
> If anyone can use xmlspy to convert the last dtd versions to schema I'd
> appreciate it, it would make it much easier to see inconsistencies that
> need to be examined.
> 
> thanks
> david jencks
> 
>

Re: dtd-based deployment descriptors

Posted by Dain Sundstrom <da...@coredevelopers.net>.
On Jun 16, 2004, at 4:03 PM, David Jencks wrote:

> I think I've found out how to use xmlbeans to convert old dtd based 
> deployment descriptors on the fly to schema based ones compatible with 
> the j2ee 1.4 schemas.  This is as short as xsl, and I think easier to 
> understand, and involves no additional tools.  Changing the 
> ModuleBuilders to use this method looks like it is a 2 line change.
>
> So, I have some utility functions to do this, and am wondering where 
> the class should go. choices are:
>
> specs/schema --- only source file there, and it is arguably geronimo 
> specific.  however it is a convenient central location.

I actually want to move this module to modules as it is entirely 
geronimo specific and changes frequently, whereas the rest of the spec 
modules are generic and should almost never change.

Anyway, I say put it here.

-dain