logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

Re: Re: association of RELAX NG with a document: msg#00037

Subject: Re: Re: association of RELAX NG with a document
On Sun, 2003-10-26 at 02:49, Peter Ring wrote:

> I'm in favor of something similar to SGML's DOCTYPE. I'm aware of the 
> bagage of DOCTYPE, but please, if just for a moment, consider that all 
> the funny and peculiar features of SGML are there for a reason -- 
> because someone actually needed them -- and that those needs don't go 
> away just because we restrict the choice of encodings and markup delimiters.
> 
> So maybe a DOCTYPE is overloaded with default attribute values etc. It 
> also serves a more abstract purpose that won't ever go away -- it's a 
> way to establish a contract between the producer and the consumers of a 
> document. That a DOCTYPE declaration can refer to the external subset of 
> a SGML or XML DTD happens to be a way to fulfil that purpose.

A DOCTYPE declaration does nothing more than identify the external
subset.  Eliot Kimber is eloquent on this one.  See for example the
thread at

http://lists.w3.org/Archives/Public/www-html/2000Jan/thread.html#66

> Documents have very long 
> and complex lifecycles, and change is inevitable and must be planned for.

Which is exactly why your documents should not contain anything specific
to a particular schema language.  Who knows what schema language we'll
all be using in 20 years?

> But couldn't we at least have one (1) standard way of 
> asserting that a XML document belongs to a (version of) a specific class 
> of documents

The assertion shouldn't be specific to a particular schema language. The
assertion should be an assertion that the document belongs to a
particular abstract type; an abstract document type involves more than
just the (usually infinite) set of documents belonging to the type;
there's also semantics, whether formal or informal.

There is no standardized way to make such an assertion. It's not the job
of RELAX NG (or indeed of any particular schema language) to standardize
such a mechanism.  If you want there to be a standard way, I suggest you
take it up with the W3C or some other standards body. 

I agree that it's often desirable to have a document include information
about the abstract type to which it belongs.  But it's up to you to
decide how your documents should represent this information, just like
it's up to you to decide how they should represent any other
information. If namespaces aren't enough, then use a PI or use an
attribute on the document element. The choice is yours. A schema
association mechanism should be able to make use of whatever reasonable
way you've chosen rather than mandate a particular way.

James


<Prev in Thread] Current Thread [Next in Thread>