TechWhirl (TECHWR-L) is a resource for technical writing and technical communications professionals of all experience levels and in all industries to share their experiences and acquire information.
For two decades, technical communicators have turned to TechWhirl to ask and answer questions about the always-changing world of technical communications, such as tools, skills, career paths, methodologies, and emerging industries. The TechWhirl Archives and magazine, created for, by and about technical writers, offer a wealth of knowledge to everyone with an interest in any aspect of technical communications.
Re: Question: XML as data-tranfer tool - metadata in DTD
Subject:Re: Question: XML as data-tranfer tool - metadata in DTD From:"Mark Baker" <mbaker -at- omnimark -dot- com> To:"TECHWR-L" <techwr-l -at- lists -dot- raycomm -dot- com> Date:Fri, 31 Mar 2000 16:12:23 -0500
Guy K. Haas wrote
> I want to lay out the DTD to show the programmer what to expect
> in the XML string that comes back as the result of a call.
>
> Probably, I can just use "read DTD" to tell them what SOLID things are
> coming AND "meta DTD" to show them where MUTABLE things will appear.
It isn't of the slightest use to a programmer to be told part of the
semantics of a data stream. Since you cannot possibly write useful code for
data whose semantics you don't know, this API call isn't going to do anybody
any good.
From what I gather from your description, the procedure for using this API
is:
1. Call the function with a stub program that just dumps the result to a
disk file.
2. Study the disk file in the hope that you can deduce a reasonable semantic
from the random tags appearing in the markup. (The fact that some of them
are consistent from one call to the next is no real help at all.)
3. Write an application to process the data according to the semantics you
guessed at.
4. Run the file through the application you have written.
5. Repeat steps 1 to 4 for the next piece of data.
Alternative procedure:
1. Demand that vendor work out and publish a complete semantic before using
their product.
To put this another way: To be usable, any function must return data of a
defined type. An XML DTD is, in fact, a type definition for a document. (DTD
= Document Type Definition). A function that returns a different document
type every time is like a function that returns a string one time and an
integer the next without warning. Useless.