XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] Use DTDs!

On 04/29/2016 06:40 PM, Costello, Roger L. wrote:
> Heavy-duty validation is not always needed. Sometimes all that is needed
> is to verify that XML instances are using the right set of tags.

It's a bit more than that. The "tags" need to be in the right places as
well as having the right names.

> Let me state it stronger: I have observed that “/verifying that XML
> instances are using the right set of tags/” is how _most_ developers
> view XML validation. 

Possibly, but I wouldn't hire one who believed that.

> Their XML Schemas are merely thinly veiled versions of DTDs.
> Developers opt to perform the heavy duty data checking in Java code
> and/or in a database.

That's because Java and databases are what they have been brought up on.
If you give a database person the problem of adding 2+2, they'll create
a schema, create a database, create a table, populate two fields with
the value 2 each, and then write a stored procedure to perform the
calculation :-)

> For many (most?) situations use DTDs, not XML Schemas. Here’s why:

I'm afraid not all these arguments hold water, for reasons which have
been well rehearsed here and elsewhere for two decades, and which I
don't intend to repeat.

DTDs have their uses, largely in "document"-class XML used in publishing
traditional text documents, where the features of W3C Schemas are mostly
irrelevant. RNG would be better, IMNSHO, but the traditional (read,
"older") workflow toolsets don't support it [yet?].

W3C Schemas are for people who transport data: often, but by no means
always, rectangular data (think CSV or database table).

It's not a case of one being better than the other: they are tools for
different applications.

If you believe the syntax of DTDs to be simpler than that of W3C
Schemas, try writing a parser for Declaration Syntax. *That*'s what
programmers dislike about DTDs: two different parsers for the same
document.

///Peter
-- 
XML FAQ: http://xml.silmaril.ie/


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS