OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   SAX: Prolog (question 8 of 10)

[ Lists Home | Date Index | Thread Index ]
  • From: David Megginson <ak117@freenet.carleton.ca>
  • To: xml-dev Mailing List <xml-dev@ic.ac.uk>
  • Date: Sat, 3 Jan 1998 20:17:09 -0500

[SAX is a proposal for a simple, event-based XML API, using
callbacks.  This is one in a series of ten design questions that we
need to answer to implement the API.]

Should SAX include events for the start and end of the prolog, and/or
for the DOCTYPE declaration?

  public void startProlog ();
  public void endProlog ();
  public void docType (String name, String systemID);


CON
---

- these methods would make SAX slightly larger;

- these are pretty far out of scope -- the start and end of the prolog
  can easily be inferred, and a new DOCTYPE can be constructed if
  needed.


PRO
---

- the DOM has a Doctype class;

- it would be nice to have a container of some sort around any PI's
  and entity start/ends found in the prolog, if we decide to include
  this information

- it can be useful to know what external DTD the document is using,
  possibly so that the DTD's URI can be passed off to a different
  process.


MY RECOMMENDATION
-----------------

No.

While this information would be marginally useful, it is really
designed for transformation applications, and SAX does not give enough
information for really useful transformations otherwise (James has
pointed out, for example, the lack of information about internal
entity boundaries).


OTHER CONSIDERATIONS
--------------------

If some implementations provide additional DTD-related functionality,
it would be nice to know when the prolog is finished and the DTD (if
present) is fully constructed.


All the best,


David

-- 
David Megginson                 ak117@freenet.carleton.ca
Microstar Software Ltd.         dmeggins@microstar.com
      http://home.sprynet.com/sprynet/dmeggins/

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS