[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Validness, doctype, and 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! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|