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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: SAX: Document Start and End (question 1 of 10)

[ Lists Home | Date Index | Thread Index ]
  • From: James Clark <jjc@jclark.com>
  • To: xml-dev@ic.ac.uk
  • Date: Mon, 05 Jan 1998 09:16:05 +0700

Tim Bray wrote:
> 
> At 01:37 PM 04/01/98 -0500, David Megginson wrote:
> > > Agreed.  Could we change the first method to
> > > startDocument(String root, String DTDSysID, String DTDPubID)
> > > these obviously each being null in the event the document doesn't
> > > provide them? -Tim
> >
> >This is a great idea, but it will require an implementation to queue
> >events.  For example, if I have
> >
> >  <?foo bar?>
> >  <!DOCTYPE doc SYSTEM "doc.dtd">
> >
> >I have to queue the PI event(s) until I have found the DOCTYPE
> 
> Why?  The PI is 'before' the doc in any meaningful sense... so they
> get some PI events before they get the startDocument event.  Is this
> a problem? -Tim

I think this is inconsistent with the XML spec:

document ::=  prolog element Misc* 
prolog ::=  XMLDecl? Misc* (doctypedecl Misc*)?

PIs before the doctypedecl are part of the document.

I also feel that it's wrong to give special treatment to the external
identifier in the doctypedecl.

<!DOCTYPE doc SYSTEM "doc.dtd">

is just a convenient shorthand for

<!DOCTYPE doc [
<!ENTITY % whatever SYSTEM "doc.dtd">
%doc;
]>

James


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