tags:

views:

53

answers:

1

When creating a custom external DTD you have the choice of making it private or public. When should a DTD be made public?
In this case I'm creating a DTD for an xml file which will describe product. The XML will be created by our client, filled with data from their old system.
we will import this data into the new system we are building for them.

Does this exchange between different companies require a public DTD? What are the benifits or drawbacks?

A: 

I think that you have a number of misunderstandings here.

Are you using the word 'public' to refer to a PUBLIC identifier in the DOCTYPE, or are you using it informally to mean, 'available'?

Putting a PUBLIC ID into a DOCTYPE means that no program or person will be able to find the actual DTD contents without a catalog. Putting a SYSTEM ID into a DOCTYPE, if that ID is a URL, means that people and programs can find it.

If it is important for you that validating parsers find and use the DTD, then you either have to combine PUBLIC with catalog usage or stick with SYSTEM and a URL.

These days, W3C XML Schema is more commonly used for this purpose than DTD.

bmargulies
The DTD is published online, so it is "public" in one sence... but it is not intended to be used by the "general public", because they can't do nothing with it... So I should not make it PUBLIC as I understand?
Nicky De Maeyer