Anyway to generate a DocType from a DTD?

Anyone know of a way in Enterprise Server (5) to generate a DocType from a DTD? I have some DTD’s with a large number of fields in them, and want to create canonical representations in Enterprise Server, and would rather not have to type it all in if I can avoid it. Any pointers/suggestions would be great. Thanks.


We do not use Enterprise server but…

If you use the Integrator (now called Developer), you can create an XML record structure by referencing the DTD - is that what you are asking ?

I know that in Trading Networks, you can create a document type definition by referencing an external XML record.

Does this help ?

John–I believe he has a DTD and wants to create an Enterprise Server document type (formerly called event type). If 5.0 doesn’t have such a capability (I’m surprised if it still doesn’t) I think it might be fun to write a little utility to do so. Can someone confirm whether or not 5.0 has the ability to import a DTD to create a document (nee, event) type?

Also, TN can create a document type within the TN database but this is not related in any way to a DTD. The “document type” in TN is a set of internal record structures stored in a database.

Enterprise Integrator w/ XML Adapter can do this:

  1. Create a Parse XML Configured Op in the XML Adapter. Import your DTD.
  2. Create an empty document type
  3. Create an Integration Component: Call the configured op, add an output step that uses your doc type. Map the configured op output to the output step, which will add the DTD fields to your doc type.


Thanks, tried it and it gets me most of the way there (It builds structs for each field which I don’t want in final document, just the field). Am I supposed to get an error when doing the mapping? The document gets all the fields, but the mapping fails with an exception.

I’ve not tried it, but in my wment41/bin directory, there’s a file called dtd2event whihc sounds suspiciously like what you want.