home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / text / sgml / 1348 < prev    next >
Encoding:
Text File  |  1993-01-24  |  3.7 KB  |  68 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: <19930123.009@erik.naggum.no>
  5. Date: 23 Jan 1993 22:01:36 +0100
  6. References: <9301141548.AA19133@mingus.techno.com> <1993Jan15.192630.4767@informix.com> <93018.171821U35395@uicvm.uic.edu> <1993Jan19.023707.18716@informix.com> <93021.152053U35395@uicvm.uic.edu>
  7. Subject: Re: sgml support and diff return code of 0
  8. Lines: 58
  9.  
  10. [C. M. Sperberg-McQueen]
  11. :
  12. |   It's as though one insisted that a C compiler had to produce object code
  13. |   from which the source code could be regenerated, and the regenerated
  14. |   source code had to have all the comments, the white space, the macro
  15. |   definitions, and the newlines of the original source, as well as having
  16. |   trigrams in exactly the places where the original source had trigrams.
  17. |   Otherwise we are going to tell all our friends and colleagues that the
  18. |   C compiler is not fully conformant.
  19. |
  20. |   Since the C standard specifies that a parser cannot require a user to
  21. |   use two spaces where one would suffice, or interpret two spaces
  22. |   differently from one (outside of literal strings), some might argue
  23. |   that a *conforming* C compiler *cannot possibly* preserve the information
  24. |   that one, or two, or seven, spaces were used here, or here, or here.
  25. |   Even if it's legal for a compiler to retain that information somehow,
  26. |   it would surely be rather strange to say that *only* a compiler which
  27. |   did that should count as fully conformant, which is what your
  28. |   original proposal boils down to for SGML parsers.
  29.  
  30. This is a very good analogy, and as long as we're talking about a parser
  31. doing its job, it's perfectly valid.
  32.  
  33. However, this discussion evolved from a desire to import and export SGML
  34. documents into and out of some non-SGML environment, such as a database
  35. system or an editor with its own internal format, and at if we hold onto
  36. this context, and to the analogy with C, the "indent" program is probably
  37. closer to a real comparison of functionality.
  38.  
  39. The "indent" program accepts a valid C program and produces another valid C
  40. program adhering to a set of stylistic parameters, i.e., it reformats the
  41. code so it looks "nicer".  There were a very long-winded and occasionally
  42. informative thread on this in comp.lang.c some time ago, and the central
  43. question was how to prove that the C program was the "same" before and
  44. after running indent, and what "same" meant.  indent also restructures the
  45. comments, and some people had major gripes about that, since their comments
  46. were structured information in itself, used to extract documentation or to
  47. describe the interface to the function in a semi-formal way.  A program
  48. that could do a semantic diff on C code was also sought, for which spaces
  49. and comments and abbreviated identifers and such syntactic noise were
  50. deemed insignificant, and only "relevant" differences were reported.  I
  51. didn't see this "search request" fulfilled.
  52.  
  53. I see a great need for software that accepts an SGML document and produces
  54. another SGML document according to a set of parameters, such as support for
  55. features, character sets, and concrete syntaxes.  Conversion between DTDs
  56. would also be a natural function of such software.  (This would at least
  57. fulfill Michael's desire for a "rename" functionality.)  Such a tool could
  58. probably be built using a database or an editor with powerful export
  59. functionality.
  60.  
  61. Best regards,
  62. </Erik>
  63. --
  64. Erik Naggum                 ISO  8879 SGML                    +47 295 0313
  65. Oslo, Norway                ISO 10744 HyTime          Watch this ^ space
  66. <erik@naggum.no>            ISO  9899 C                 Memento, terrigena
  67. <SGML@ifi.uio.no>           ISO 10646 UCS             Memento, vita brevis
  68.