Re: SXML in Emacs
Oliver Scholz <[email protected]> Fri, 16 Jul 2004 13:26:45 +0200
| Newsgroups | gmane.lisp.scheme.ssax-sxml |
|---|---|
| Message-ID | <[email protected]> |
"Joerg F. Wittenberger" <[email protected]> writes: > Hi Oliver, > > Oliver Scholz <[email protected]> writes: > >> I am working on an XML parser framework, much inspired by SSAX, for >> GNU Emacs. An important part of this will probably be an XML->SXML >> parser. > > Oh, great! I'd love to use my good old emacs for XML. I have too > much XML in that p2p database and just mozilla to edit it. :-/ We'll see ... It's a long way to go to turn Emacs into a rendering XML editor. :) [...] > How about either define the standard in terms of predicates (like > xml-element?, xml-attribute? and xml-literal?) or implement it as > converter from SXML representation to the internal representation. > I'm personally in favor for the predicate-approach, since it would > save processing. [...] Hmm. This raises a point on which I have not spent any thoughts yet ... The one thing I find intriguing about SXML is that it maps so nicely to a Lisp data structure. In fact, when reading about SXML I tended to regard it primarily as a data structure, not so much as a document format (although I realise that some people use it that way; I won't, however). Of course I planned to provide a function sxml-text-node-p (using Emacs Lisp's convention to name predicate functions), but I have not thought about hiding the /whole/ data structure behind accessor functions. Without thinking about it I supposed that the SXML would be processed by the usual means of list processing, with car, cdr etc. So, when using SXML in Scheme, do people treat an SXML document as a list of lists? Or is this considered bad style and they hide the list structure behind accessor functions? In the latter case it could be better for me to chose my own data structure. Oliver -- Oliver Scholz 29 Messidor an 212 de la Révolution Ostendstr. 61 Liberté, Egalité, Fraternité! 60314 Frankfurt a. M. ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click