[DAS2] Re: Apollo and DAS/2 priorities

Andrew Dalke dalke at dalkescientific.com
Mon Feb 6 15:09:58 UTC 2006


Dave Howorth wrote:
> Andrew Dalke wrote:
>> I think this page summarizes it nicely:
>> http://www.xml.com/lpt/a/2002/09/04/xslt.html
>>     "Valid" is a technical term referring to the presence
>>     of and conformance to a DOCTYPE declaration.
>
> I think that's a paraphrase of the first para I quoted above?

It adds the phrase "technical term", making it (in my interpretation)
different from the word "valid" in its normal sense.

> No, I believe you're wrong there; 'not valid' and 'invalid' have the 
> same meaning both colloquially and as used in the spec. It's either 
> valid or it isn't, and if it isn't then its invalid.

I now agree that in the spec sense "invalid" and "not valid" are the
same.

I still think it has a technical difference from its normal use.
See for example the thread at
   http://www.stylusstudio.com/xmldev/200411/post50310.html

part of which says

> >But does it matter if a document is Not valid?
>
> Not necessarily.  It's up to you.  Requiring a document to be valid is
> a way of putting some constraints on it.  If you don't have any such
> constraints (unlikely, unless you are writing some very generic
> software like an editor), then there's no need for validity.  More
> likely, not all your constraints can be expressed by a DTD, and you
> will need to express them some other way.
>
> And of course you can require the document to be valid according to
> some other kind of schema, such as XML schemas or RelaxNG or
> Schematron.



>> As I understand things, it's perfectly fine to pass well-formed
>> but not valid XML documents around.
>
> I don't agree. There are occasions when it is acceptable but it's 
> generally bad practice, IMHO. The discussion in sec 5 of the spec 
> gives some motivation, particularly this section:
>
> http://www.w3.org/TR/REC-xml/#safe-behavior
>
> Or look here, or thousands of other places:
> http://www.online-learning.com/demos/xml/valid_xml.html
> http://en.wikipedia.org/wiki/Xml#Correctness_in_an_XML_document
>
> In particular for interoperability of an open, distributed system with 
> many writers and readers implemented by different groups (i.e. DAS), I 
> suggest validity is essential.

Quoting the wikipedia reference to DTDs:

> The oldest schema format for XML is the Document Type Definition 
> (DTD), inherited from SGML. While DTD support is ubiquitous due to its 
> inclusion in the XML 1.0 standard, it is seen as limited for the 
> following reasons:
>   *  It has no support for newer features of XML, most importantly 
> namespaces.

DAS2 uses namespaces.  Hence it cannot use DTDs.

We are defining Relax-NG schemas for the different formats,
which can be used for better validity checking than is supported
by DTDs.

"valid DAS2 document" ::= "meets the DAS2 spec"

"meets the DAS2 spec" is a stricter definition than
   "well-formed XML" + "meets the RNG spec"
which is stricter than
   "well-formed XML" + "meets the (hypthetical namespace-aware) DTD"


> I would have expected your experience of the PDB to make you keen
> on validation :)

Indeed, I'm working on the validator for DAS2, which uses the Relax-NG
schemas.  ;)

					Andrew
					dalke at dalkescientific.com




More information about the DAS2 mailing list