Article View: comp.text.sgml
Article #488Re: Precedence of SGML Operators?
From: Erik Naggum
Date: Mon, 28 Dec 1992 22:19
Date: Mon, 28 Dec 1992 22:19
62 lines
3399 bytes
3399 bytes
Hans Holger Rath <rath@igd.fhg.de> writes:
|
| I've I problem with the operator precedence in SGML.
Actually, you don't. You have a problem with some version of Mark-It
from Sema Software Technology, which in a different language could have
been explained by some arcane precedence rules at work; however, SGML
has no notion of operators or of operator precedence rules as these
terms are used in programming languages.
SGML defines a content model [126] to consist of a model group [127],
which in turn consists of a parenthesized list of content tokens with a
connector between them defining how the tokens must be satisfied within
the element content, and an occurrence indicator for the group defining
possible occurrences of a satisfied group. A content token [128] is
either a nested model group or a primitive content token [129] which is
either #PCDATA or an element token [130]. Element tokens consist of the
name of an element, followed by its occurrence indicator. There is no
possibility of confusion in this grammar as to which content token the
occurrence indicator applies to or how members of the list are to be
satisfied in element content. An occurrence indicator for the element
token is no different from an occurrence indicator for the model group.
To summarize your problem: Given the two element declarations
<!ELEMENT x (z, ( a* | b* ))> (1)
<!ELEMENT x (z, ((a*) | (b*)))> (2)
some version of Sema Software Technology's Mark-It "SGML parser" reads
declaration (1) differently from declaration (2) such that a non-
conforming SGML document parsed with respect to the former is reported
as valid (which it is not), but when parsed with respect to the latter
it is reported as invalid (which it is).
It follows that Mark-It is not a conforming, validating SGML parser as
specified in the standard, and that any claims by the vendor that it is
must be taken with several grains of salt.
| ... Mr. Martin Bryan in "SGML an Author's Guide", ...
Discard that book, and buy Charles F. Goldfarb: The SGML Handbook, ISBN
0-19-853737-9, instead. Or ask questions here before you work too hard
figuring things out. I know I would have been saved a lot of trouble if
I hadn't read SGML: An Author's Guide (Not!).
It should be fairly straight-forward to understand how Mark-It blatantly
violates the standard from reading the grammar and description of the
content model and model group, and the the clause defining conformance
to a content model ([412:14-24] in [Goldfarb]). See 11.2.4 Content
Model (p. 409ff in [Goldfarb]), with additional material in 11.2.4.1
Connector and 11.2.4.2 Occurrence Indicator (p. 413f).
Hope this helps.
Best regards,
</Erik>
--
Erik Naggum ISO 8879 SGML +47 295 0313
ISO 10744 HyTime
<erik@naggum.no> ISO 9899 C Memento, terrigena
<SGML@ifi.uio.no> ISO 10646 UCS Memento, vita brevis
Technical Details
Message-ID:
<19921228.013@erik.naggum.no>Path:
arc1-ca.pugleaf.net!sparky!uunet!mcsun!sunic!aun.uninett.no!nuug!ifi.uio.no!enagReferences:
<1802@igd.fhg.de>Show Full Headers
Complete Article Headers
Newsgroups: comp.text.sgml Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!sunic!aun.uninett.no!nuug!ifi.uio.no!enag From: Erik Naggum <SGML@ifi.uio.no> Message-ID: <19921228.013@erik.naggum.no> Date: 28 Dec 1992 23:19:49 +0100 References: <1802@igd.fhg.de> Subject: Re: Precedence of SGML Operators? Summary: Mark-It is not a conforming, validating SGML parser. Lines: 62