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

Validness, doctype, and Schema Instance

  • To: XML Developers List <xml-dev@l...>
  • Subject: Validness, doctype, and Schema Instance
  • From: Frans Englich <frans.englich@t...>
  • Date: Thu, 18 Nov 2004 16:05:25 +0000
  • User-agent: KMail/1.7

schema instance

Hello,

I'm trying to wrap my head around validness, as per the XML specification, in 
relation to DTDs and other schema languages.

First of all, the XML specification, 
http://www.w3.org/TR/2000/REC-xml-20001006, not only dictates the XML syntax, 
but also includes the DTD language. Put it in another way; the spec is XML 
syntax plus a schema language. Is that a correct interpretation/perspective?

The spec talks about two different levels of document compliance: 
well-formedness and validness. The former is the basic syntax, while the 
latter refers to logical structure, as dictated by the DTD doctype at the 
top, internally, or via references. For example, a validating XML parser has 
nothing nothing to do with W3C XML Schema or any other schema language, but 
if it checks against the DTD.

My conclusions from this reasoning, which surely can be wrong, is that for 
example a XHTML document which looks like this:
<?xml version="1.0" encoding="UTF-8" ?>
<html xmlns="http://www.w3.org/1999/xhtml">
   ...
</html>

is _not_ valid XML, because it doesn't have a DOCTYPE thingy. Even the spec 
says it: http://www.w3.org/TR/xhtml1/#docconf.

In other words, the XML specification ties the term "validness" to a 
particular syntax, the DTD schema language. It's not an abstract term which 
means "conforms to a model of the XML format", such that any schema language 
can be used to "define" validness.

But does it matter if a document is Not valid? What if one walks out in this 
world writing/generating documents which are not valid?

The DTD specifies the logical structure, but also identifies /what/ type of 
document it is, e.g. the public identifier. But isn't XML namespaces for 
this? When the XHTML namespace is declared in the xhtml element, wouldn't 
that be enough?


Cheers,

		Frans








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.