[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Default DTD URI

  • From: Paul Grosso <pgrosso@a...>
  • To: "Sarveshwar Rao Duddu" <duddu@v...>, "Xmldev" <xml-dev@x...>
  • Date: Sun, 09 Jul 2000 10:17:19 -0500

default dtd
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].

paul

[1] http://www.oasis-open.org/html/a401.htm
[2]
http://www.arbortext.com/Think_Tank/Norm_s_Column/Issue_Three/issue_three.html
[3] http://www.ccil.org/~cowan/XML/XCatalog.html


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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.