XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] SGML default attributes.

By "standoff grammars" I mean grammar definitions that are physically
separate from the documents they govern. DTDs are syntactically part of
the documents they govern (that is, even though you may have an external
DTD subset, it is still syntactically part of the document that references
it). 

Consider JATS as an example of a document type. JATS defines many variants
of JATS: authoring, publication, archiving. All are part of the JATS
abstract document type but each has different specific rules. In addition,
the JATS specification explicitly allows anyone to modify the base JATS
grammars to modify what is allowed, either by adding constraints or
allowing new element types.

Thus there are an *infinite number* of grammar instances that can govern
JATS documents. There cannot be a single grammar definition instance that
encompasses the full set of possible conforming JATS documents (because in
fact that set is unbounded).

Or consider DITA, which has a more controlled extension mechanism then
JATS but is no less unbounded: there is an infinity of possible document
instances that are all provably conforming DITA documents. A DITA
document's "document type" is defined not by the grammar that is (or
isn't) used to validate the document but by the set of vocabulary and
constraint modules the document declares it (may) use. In DITA the
document type is well defined (in the sense that it is a finite set of
invariant modules) but there could be any number of equivalent and
equally-conforming grammar files that validate the (abstract) DITA
document type.

We tend to think of a given grammar as being exactly equal to an abstract
document type, but this not true. A given grammar file is simply an
implementation expression of a more abstract concept. Because of the
limitations of declarative grammars it is never possible for an XSD or
RELAX NG or DTD alone to validate all the rules of non-trivial document
types. 

And of course a given document could conform to many different document
types--there's no rule that a given document instance can be interpreted
in only one way (consider an RELAX NG document with embedded Schematron
rules, for example, or the many applications of literate programming).

Cheers,

Eliot

----
Eliot Kimber, Owner
Contrext, LLC
http://contrext.com




On 5/4/16, 10:52 AM, "Costello, Roger L." <costello@mitre.org> wrote:

>Eliot Kimber wrote:
>
>> Standoff grammars like XSD and RELAX NG
>
>What is a "standoff grammar"?
>
>> XSD and RELAX NG at least avoid the problem of
>> internal DTD subsets but they still fail to serve as
>> reliable definitions of document types in abstract
>> because they are still only defining the grammar
>> rules for a subset of all possible conforming
>> documents in a document document type.
>
>This sounds interesting (and very important). I am uncertain what it
>means. Would you mind explaining this further, in terms that people (such
>as myself) without a background in SGML can understand? For example, what
>does it mean that an XSD only defines the grammar rules for a subset of
>all possible conforming documents? That doesn't jive with my experience
>with or understanding of XSDs.
>
>/Roger
>
>_______________________________________________________________________
>
>XML-DEV is a publicly archived, unmoderated list hosted by OASIS
>to support XML implementation and development. To minimize
>spam in the archives, you must subscribe before posting.
>
>[Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
>Or unsubscribe: xml-dev-unsubscribe@lists.xml.org
>subscribe: xml-dev-subscribe@lists.xml.org
>List archive: http://lists.xml.org/archives/xml-dev/
>List Guidelines: http://www.oasis-open.org/maillists/guidelines.php
>




[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS