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!

Hi,

Also, DTDs do not support namespaces -- in the sense that they are not aware of them and treat them like any other attributes -- because DTDs are in the original XML specification, below the XML Names specification in the stack.

This makes it cumbersome to deal with XML documents that use namespaces as you need to stick both to (i) static prefixes and to (ii) the elements where xmlns attributes are used to bind them.

Kind regards,
Ghislain



On Fri, Apr 29, 2016 at 10:55 PM, Peter Flynn <peter@silmaril.ie> wrote:
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/

_______________________________________________________________________

XML-DEV is a publicly archived, unmoderated list hosted by OASIS
to support XML implementation and development. To minimize
spam in the archives, you must subscribe before posting.

[Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
Or unsubscribe: xml-dev-unsubscribe@lists.xml.org
subscribe: xml-dev-subscribe@lists.xml.org
List archive: http://lists.xml.org/archives/xml-dev/
List Guidelines: http://www.oasis-open.org/maillists/guidelines.php



[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