XML API spec

Richard Light richard at light.demon.co.uk
Fri Feb 28 15:18:16 GMT 1997


Interface (API-related) jobs the XML processor has to do
========================================================

I've just read through the XML spec (as of 14 Nov 96), and tried to
get an idea of the potential scope of the API.  These notes
summarise what I found/thought.  It may all be painfully obvious
(or wrong), but I haven't seen any other attempts at looking at the
task this way, so here goes:

Operation
---------
Presumably the XML processor is a 'slave' to the application, and
only does what it's told to.

View of the XML document
------------------------
What does the application 'see' of the XML document it has asked the
XML processor to open?  The spec implies that it should have pretty
direct access, e.g.:

  "An XML processor must inform the application of the length of
  comments if they are not passed through, to enable the application
  to keep track of the correct location of objects in the XML
  document."

This fills me with gloom.  Shouldn't there be a level of abstraction
here, so the API simply hands the application objects, and information
about objects?  In this case, shouldn't it flag the presence of a
comment and leave it at that?  If the application wants the comment,
it can ask the XML processor for it!

Startup
-------
The application needs to tell the XML processor to open
a document.  This could be by reference (system id) or the document
could be piped straight in.  The 'open document' command needs to
have arguments to set the processing mode, e.g.:

- check to 'valid' or 'well-formed' level;
- pass back a complete parsed document or just await further
  instructions

Passing characters to the application
-------------------------------------
Will the XML processor tell the application what encoding is in use?
Then simply pass stuff through 'as found' (apart from converting
character references to bit patterns as described)?

I'll stop there to see if this is on the right lines or not ...

Richard.

Richard Light
SGML and Museum Information Consultancy
richard at light.demon.co.uk
3 Midfields Walk 
Burgess Hill
West Sussex RH15 8JA
U.K.
tel. (44) 1444 232067

xml-dev: A list for W3C XML Developers
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To unsubscribe, send to majordomo at ic.ac.uk the following message;
unsubscribe xml-dev
List coordinator, Henry Rzepa (rzepa at ic.ac.uk)




More information about the Xml-dev mailing list