Article View: comp.text.sgml
Article #365Re: More questions on ambiguity
From: MATZEN RICHARD WAL
Date: Sat, 26 Sep 1992 03:32
Date: Sat, 26 Sep 1992 03:32
66 lines
3629 bytes
3629 bytes
Erik Naggum <SGML@ifi.uio.no> writes: | I think the clue here is the definition of "exception" (and, by | reference, "inclusion" and "exclusion": | 4.130 exceptions: A parameter of an element declaration that | modifies the effect of the element's "content model" <126>, and the | content models of elements occurring within it, by permitting | inclusions and prohibiting exclusions. | 4.131 exclusions: Elements that are not allowed anywhere in the | content of an element or its subelements been though the application | content model or inclusions would permit them optionally. | 4.157 inclusions: Elements that are allowed anywhere in the content | of an element or its subelements even though the applicable model | does not permit them. | An inclusion cannot, by definition, affect the content model in which it | occurs, because it allows elements not allowed by the content model, and | in the event of a potential clash, the model group in the content model | takes precedence. I concur that the above definitions imply that inclusions cannot affect definition 11.2.4.3 directly. That is, inclusions cannot satisfy primitive content tokens. However, I believe that 11.2.5.1 confuses the issue (lines 14-21) and this should be cleared up in the definitions. Regarding exclusions and their affect on ambiguous content models: What about <!ELEMENT B (X | A | X) >. This is an ambiguous content model. But if "X" is excluded from B is it still ambiguous? By 11.2.4.3, to be ambiguous there must be an element that occurs in an instance of B, that can satisfy more than one primitive content token (X, in this example). But, by definition 4.131 (above), X is not allowed anywhere in the content of B. Doesn't this mean that X cannot occur in an instance of B, and thus, the content model is not ambiguous when X is excluded? Even if I am missing something, and the example above is not a valid argument that exclusions can affect the ambiguity of content models, I I believe that the definition of "ambiguous content models" is still misleading because: 1. inclusions are a component of content models, and... 2. a kind of ambiguity can be introduced by inclusions: between inclusions and primitive content tokens. Resolving ambiguity by disambiguating rules while parsing the document instance, is not the same as not being ambiguous. If the definition of ambiguous content models applies only to model groups then why not restate it as such? Thus, removing any possible confusion to implementors and users about what it covers (and what it does not). I appreciated Eric's response and learned from it. More comments from any and all will be appreciated. Anne Brueggemann-Klein has sent me a copy of her paper on "Unambiguity of SGML Content Models". I am also working on a paper on ambiguity. I would like to hear more on this issue. Is there a concensus in the SGML community regarding the equivalence of ambiguous content models and ambiguous model groups? Does anyone feel that the definition is misleading or causes other problems? Regards, Rick Matzen Oklahoma State University Stillwater OK 74074 <matzen@a.cs.okstate.edu>
Technical Details
Message-ID:
<1992Sep26.033214.7540@a.cs.okstate.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!drd!a.cs.okstate.edu!matzenShow Full Headers
Complete Article Headers
Newsgroups: comp.text.sgml Path: arc1-ca.pugleaf.net!sparky!uunet!drd!a.cs.okstate.edu!matzen From: matzen@a.cs.okstate.edu (MATZEN RICHARD WAL) Subject: Re: More questions on ambiguity Message-ID: <1992Sep26.033214.7540@a.cs.okstate.edu> Organization: Oklahoma State University, Computer Science, Stillwater Date: Sat, 26 Sep 92 03:32:14 GMT Lines: 66