Re: shape.dtd, diagram.dtd



On 2002-07-11 at 03:50 -0400, James K. Lowden wrote:

I'm not so sure that's true, is it? It depends on how much
knowledge the generation/conversion utility has about .dia
files, surely? If it was specific (as in the case of
sql2dia), would not DTD validation just be a 'safety net'
to ensure that sql2dia had not screwed up and accidentally
created invalid .dia files? Surely it would have to be
creating what it believed were valid .dia without reference
to the DTD, unless it is going to read the DTD, parse it,
understand it, and create files in accordance with it, in
which case isn't it doing all the work of a DTD validator
and more itself?

Oh, that's what I meant, more or less.  Suppose you want to
create a .dia file from scratch; what you have is a some data
and an idea, but no Dia.  Surely one approach would be to
read the DTD, and use it with a validator to verify your
output.  Whether or not your output library actually takes
advantage of the DTD is a separate question, at least to me.

OK, I understand what you mean now. In fact, I would go
further: I would be suprised if your output library even looked
at the DTD. But validation might be a good safety to check your
program, though you might want a compile-time switch to turn
off the validation if you were confident of your output
mechanism. It would certainly help YOU during debugging (I say
this from experience having used an XML schema for the same
purpose in some simulation software I recently wrote).

Regards,
Andrew.

-- 
Andrew Ferrier

email: andrew junk new-destiny co uk
web:   http://www.new-destiny.co.uk/andrew/





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]