home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / text / sgml / 1243 < prev    next >
Encoding:
Text File  |  1992-12-29  |  3.2 KB  |  73 lines

  1. Newsgroups: comp.text.sgml
  2. Path: sparky!uunet!mcsun!sunic!aun.uninett.no!nuug!ifi.uio.no!enag
  3. From: Erik Naggum <SGML@ifi.uio.no>
  4. Message-ID: <19921228.013@erik.naggum.no>
  5. Date: 28 Dec 1992 23:19:49 +0100
  6. References: <1802@igd.fhg.de>
  7. Subject: Re: Precedence of SGML Operators?
  8. Summary: Mark-It is not a conforming, validating SGML parser.
  9. Lines: 62
  10.  
  11. Hans Holger Rath <rath@igd.fhg.de> writes:
  12. |
  13. |   I've I problem with the operator precedence in SGML.
  14.  
  15. Actually, you don't.  You have a problem with some version of Mark-It
  16. from Sema Software Technology, which in a different language could have
  17. been explained by some arcane precedence rules at work; however, SGML
  18. has no notion of operators or of operator precedence rules as these
  19. terms are used in programming languages.
  20.  
  21. SGML defines a content model [126] to consist of a model group [127],
  22. which in turn consists of a parenthesized list of content tokens with a
  23. connector between them defining how the tokens must be satisfied within
  24. the element content, and an occurrence indicator for the group defining
  25. possible occurrences of a satisfied group.  A content token [128] is
  26. either a nested model group or a primitive content token [129] which is
  27. either #PCDATA or an element token [130].  Element tokens consist of the
  28. name of an element, followed by its occurrence indicator.  There is no
  29. possibility of confusion in this grammar as to which content token the
  30. occurrence indicator applies to or how members of the list are to be
  31. satisfied in element content.  An occurrence indicator for the element
  32. token is no different from an occurrence indicator for the model group.
  33.  
  34. To summarize your problem: Given the two element declarations
  35.  
  36.     <!ELEMENT x (z, ( a*  |  b* ))>                (1)
  37.  
  38.     <!ELEMENT x (z, ((a*) | (b*)))>                (2)
  39.  
  40. some version of Sema Software Technology's Mark-It "SGML parser" reads
  41. declaration (1) differently from declaration (2) such that a non-
  42. conforming SGML document parsed with respect to the former is reported
  43. as valid (which it is not), but when parsed with respect to the latter
  44. it is reported as invalid (which it is).
  45.  
  46. It follows that Mark-It is not a conforming, validating SGML parser as
  47. specified in the standard, and that any claims by the vendor that it is
  48. must be taken with several grains of salt.
  49.  
  50. |   ... Mr. Martin Bryan in "SGML an Author's Guide", ...
  51.  
  52. Discard that book, and buy Charles F. Goldfarb: The SGML Handbook, ISBN
  53. 0-19-853737-9, instead.  Or ask questions here before you work too hard
  54. figuring things out.  I know I would have been saved a lot of trouble if
  55. I hadn't read SGML: An Author's Guide (Not!).
  56.  
  57. It should be fairly straight-forward to understand how Mark-It blatantly
  58. violates the standard from reading the grammar and description of the
  59. content model and model group, and the the clause defining conformance
  60. to a content model ([412:14-24] in [Goldfarb]).  See 11.2.4 Content
  61. Model (p. 409ff in [Goldfarb]), with additional material in 11.2.4.1
  62. Connector and 11.2.4.2 Occurrence Indicator (p. 413f).
  63.  
  64. Hope this helps.
  65.  
  66. Best regards,
  67. </Erik>
  68. --
  69. Erik Naggum                 ISO  8879 SGML                    +47 295 0313
  70.                             ISO 10744 HyTime
  71. <erik@naggum.no>            ISO  9899 C                 Memento, terrigena
  72. <SGML@ifi.uio.no>           ISO 10646 UCS             Memento, vita brevis
  73.