XML API spec
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@l... 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@i... the following message; unsubscribe xml-dev List coordinator, Henry Rzepa (rzepa@i...)
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format