OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   Re: Default DTD URI

[ Lists Home | Date Index | Thread Index ]
  • From: Paul Grosso <pgrosso@arbortext.com>
  • To: "Sarveshwar Rao Duddu" <duddu@vsnl.com>, "Xmldev" <xml-dev@xml.org>
  • Date: Sun, 09 Jul 2000 10:17:19 -0500

At 21:59 2000 07 08 +0530, Sarveshwar Rao Duddu wrote:
>The problem is like this: the server (accepting commands in XML) has a
>well - published DTD.... if an XML parser has to check whether input is
>correct, it should have a DTD (internal or external)....
>So the question is: In case the user has not given a DTD file name or
>specified the DTD in internal subset, can the XML processor assume one on
>its own. May be the standard does not allow it, but does any of many XML
>parsers available have such functionality.

XML 1.0 allows for the use of PUBLIC identifiers (e.g., in the doctype
declaration to identify the external subset).  Though XML also requires
a system identifier, the spec allows an XML processor to use the PUBLIC
id at its discretion.  So a doctype declaration of something like:

  <!DOCTYPE doc PUBLIC "-//VSNL//DTD Sarv's app//EN" "sarvapp.dtd">

would be perfectly acceptable, and your processor could ignore the
"sarvapp.dtd" and use "-//VSNL//DTD Sarv's app//EN" to point to the
DTD.  (After all, most HTML validators ignore the system id and use
the public id to figure out exactly which HTML DTD to use.)

Though XML 1.0 doesn't define a standard way to resolve the public id, 
the standard way to do this in SGML (and one of the more reasonable 
ways to do this in XML) is to use some kind of catalog such as that 
defined by the OASIS (née SGML Open) Entity Management Catalog Technical 
Resolution TR9401:1997 [1].  Some XML processors have catalog support, 
and there are several pieces of code in the public domain that implement
catalogs of one sort or another.  See Norm's article [2] for both a good 
description of the issues and for a pointer to some Java classes that 
implement both the TR9401:1997 catalogs and XML Catalogs [3].


[1] http://www.oasis-open.org/html/a401.htm
[3] http://www.ccil.org/~cowan/XML/XCatalog.html

This is xml-dev, the mailing list for XML developers.
To unsubscribe, mailto:majordomo@xml.org&BODY=unsubscribe%20xml-dev
List archives are available at http://xml.org/archives/xml-dev/


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

Copyright 2001 XML.org. This site is hosted by OASIS