Re: RFC: Simple XML Event-Based API for Java
Tim Bray writes: > I'd be willing to commit to signing up to do this for Lark, given > the following changes: > > > public void > > startDocument (XmlProcessor processor, String pubid, URL sysid); > > Question: what if there's no <!DOCTYPE? And if there is, you might as > well throw in the root doctype. Agreed. We can take it out, since the same information is available using getPublicId() and getSystemId() in the XmlProcessor interface. > > public void > > startProlog (XmlProcessor processor); > > public void > > endProlog (XmlProcessor processor); > > Lose these; they have no place in this API. You want this kind of stuff, > use Lark or AElfred or whatever. Agreed. > > public void > > processingInstruction (XmlProcessor processor, String target, String data); I disagree -- processing instructions are an essential part of a document (especially for architectural forms). > > public void > > error (XmlProcessor processor, String message, URL url, int line); > >} > > Have to add the entity ID as an argument. No point giving the line > number if you don't know what it's in. The URL argument will show you where it is. > And one last thing: if you use URL, then you have to do a new URL() > which does (I think) at least some syntax checking... is this appropriate? > Why not just pass it as a string? -Tim For starting Ælfred, I found using a string awkward, since I needed a base URL to resolve relative URLs (like file names). Since XML mandates URIs anyway, and Java supports them pretty transparently, I thought that it made sense to use them directly instead of using a lot of Url.toString() and new URL(String) calls (it will also allow the use of '==' with system identifiers). All the best, David -- David Megginson ak117@f... Microstar Software Ltd. dmeggins@m... http://home.sprynet.com/sprynet/dmeggins/ xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i... Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ To (un)subscribe, mailto:majordomo@i... the following message; (un)subscribe xml-dev To subscribe to the digests, mailto:majordomo@i... the following message; subscribe xml-dev-digest List coordinator, Henry Rzepa (mailto: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