home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / text / sgml / 1271 < prev    next >
Encoding:
Text File  |  1993-01-07  |  2.9 KB  |  62 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: <19930107.006@erik.naggum.no>
  5. Date: 07 Jan 1993 22:20:40 +0100
  6. References: <1993Jan6.221136.27780@twg.com> <19930106.155234.608@almaden.ibm.com>
  7. Subject: Re: SGML for data querying
  8. Summary: The element structure is the _result_ of sequential processing.
  9. Lines: 51
  10.  
  11. [Eliot Kimber]
  12. :
  13. |   <digression>
  14. |
  15. |   The examples above, and most SGML applications in existence today,
  16. |   process SGML documents sequentially from start to finish.  However,
  17. |   SGML does not require sequential processing, and it can make just as
  18. |   much sense to define applications that work with SGML documents
  19. |   wholistically as a tree, rather than sequentially, at least in the
  20. |   abstract.  In this processing model, access is via queries, rather than
  21. |   sequential access by waiting for the element you want to flow by. ...
  22.  
  23. This is a good point, but an important distinction needs to be made (and
  24. "at least in the abstract" needs to be stressed).
  25.  
  26. The SGML document consists of one or more _entities_, each a character
  27. sequence, which represents a fragmented linearization of the element
  28. structure.  This fragmented linearization needs to be parsed (and
  29. reconstructed) before we can access the element structure.  The element
  30. structure can fruitfully be regarded as the _product_ of the parser (cf.
  31. ESIS), and the parser has to parse the document "from start to finish" to
  32. be able to build this structure.
  33.  
  34. According to the standard, the only way you can possibly parse an SGML
  35. document is sequentially (cf. 6.2 SGML Entities), and any access other than
  36. sequential in a data stream is to entities in it (cf. SDIF).
  37.  
  38. This problem has been discussed before, in relation to what #CURRENT meant
  39. as an attribute default value declaration.
  40.  
  41. In order to access elements in the element structure non-sequentially, you
  42. have to build some sort of index into the entity structure, or store the
  43. data returned from the sequential parsing process.  Since element contents
  44. can span entities (one of SGML's significant strengths), the demand on
  45. software that accesses the unparsed entity structure is high, compared to
  46. storing a fully parsed SGML document in some form optimized for retrieval
  47. by the application.  This task becomes daunting in the presence of frequent
  48. short references, character entity references, and references to other
  49. internal entities.
  50.  
  51. Several interesting problems follow from the constraints that this
  52. represents.  (No, that's not the "understatement of the year" -- it's only
  53. January 7th. ;-)
  54.  
  55. Best regards,
  56. </Erik>
  57. --
  58. Erik Naggum                 ISO  8879 SGML                    +47 295 0313
  59.                             ISO 10744 HyTime
  60. <erik@naggum.no>            ISO  9899 C                 Memento, terrigena
  61. <SGML@ifi.uio.no>           ISO 10646 UCS             Memento, vita brevis
  62.