From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/21957 Path: main.gmane.org!not-for-mail From: wmperry@aventail.com (William M. Perry) Newsgroups: gmane.emacs.gnus.general Subject: Re: I wanna write an RFC Date: 17 Mar 1999 13:29:46 -0500 Sender: owner-ding@hpc.uh.edu Message-ID: <86hfrkj7fp.fsf@kramer.bp.aventail.com> References: <1471-Tue16Mar1999172535-0800-ndw@nwalsh.com> <87r9qo3wrh.fsf@pc-hrvoje.srce.hr> <86ww0gjav3.fsf@kramer.bp.aventail.com> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: main.gmane.org 1035159966 25643 80.91.224.250 (21 Oct 2002 00:26:06 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 00:26:06 +0000 (UTC) Cc: ding@gnus.org Return-Path: Original-Received: from fisher.math.uh.edu (fisher.math.uh.edu [129.7.128.35]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id NAA09727 for ; Wed, 17 Mar 1999 13:30:18 -0500 (EST) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by fisher.math.uh.edu (8.9.1/8.9.1) with ESMTP id MAB00988; Wed, 17 Mar 1999 12:28:47 -0600 (CST) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Wed, 17 Mar 1999 12:29:15 -0600 (CST) Original-Received: from sclp3.sclp.com (root@sclp3.sclp.com [204.252.123.139]) by sina.hpc.uh.edu (8.7.3/8.7.3) with ESMTP id MAA13830 for ; Wed, 17 Mar 1999 12:29:01 -0600 (CST) Original-Received: from slow.bp.aventail.com (usrpri2-20.kiva.net [206.97.75.85]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id NAA09671 for ; Wed, 17 Mar 1999 13:28:50 -0500 (EST) Original-Received: from kramer.bp.aventail.com (kramer.bp.aventail.com [192.168.2.2]) by slow.bp.aventail.com (8.8.5/8.8.5) with ESMTP id NAA29704; Wed, 17 Mar 1999 13:27:36 -0800 Original-Received: (from wmperry@localhost) by kramer.bp.aventail.com (8.8.5/8.8.5) id NAA05075; Wed, 17 Mar 1999 13:29:46 -0500 Original-To: Per Abrahamsen X-Face: O~Rn;(l][/-o1sALg4A@xpE:9-"'IR[%;,,!m7 writes: > wmperry@aventail.com (William M. Perry) writes: > > > Emacs/W3 is probably going to die very soon, due to lack of time and > > interest on my part. > > Arrgghh! It has just gotten useful. The way w3 displays text/html > (after turning off all features) in Gnus means that it almost doesn't > bother me anymore. I also use it for following links in Gnus articles. I agree that the integration with Gnus kicks ass, but there is no way that I am going to bother implementing some of the stupid shit coming out of the W3C (CSS2 + CSS3). I think a few things need to happen: 1) URL loading gets completely separated. This is mostly done. It could do with more of a rewrite to be even more asynch though. 2) XML parser as a c-level plugin or using the current external program + xml.el that I have attached. 3) A semi-minimal CSS2 implementation that would be enough to render simple XML documents and tables correctly. 4) Perhaps use DSSSL in light of the stupid microsoft patent claiming to cover CSS. 5) More people than me and Thierry doing substantial work. The current HTML parser and display engine could then suffer from bitrot and not many people would care. Between work, family, and trying to have more of a life, I just don't have the time to devote to Emacs/W3 any more. I'm going to talk to hrvoje, steve, et al about some of this breakout and work while I am in japan. I'll likely draft something that goes out to w3-beta and w3-dev as a plea for help on the plan outlined above on the plane ride over. If only I could convince Aventail to pay me to write elisp instead of (shudder) C/C++.[1] > Netscape is still used as the "stand-alone" browser, for reading > /. and comics. More sites tend more and more to be unusable without javascript and other stupid shit. Truly depressing. I avoid the web like the plague it has become. :) -Bill P. [1] I did at one point have a pretty kick-ass Emacs interface to our server config file that we actually sent to some customers that wanted a TTY version of the config tool. :) --=-=-= Content-Type: text/plain; name=xmlelisp.c Content-Disposition: attachment; filename=xmlelisp.c Content-Description: sample expat-based xml->elisp parser /* The contents of this file are subject to the Mozilla Public License Version 1.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/ Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. The Original Code is expat. The Initial Developer of the Original Code is James Clark. Portions created by James Clark are Copyright (C) 1998 James Clark. All Rights Reserved. Contributor(s): */ #include "xmlparse.h" #include #include #include #include #include #ifdef _MSC_VER #include #endif #ifndef O_BINARY #ifdef _O_BINARY #define O_BINARY _O_BINARY #else #define O_BINARY 0 #endif #endif #ifdef _MSC_VER #include #endif #ifdef _DEBUG #define READ_SIZE 16 #else #define READ_SIZE (1024*8) #endif static void characterData(void *userData, const char *s, int len) { FILE *fp = userData; putc('"',fp); for (; len > 0; --len, ++s) { putc(*s,fp); } putc('"',fp); } /* Lexicographically comparing UTF-8 encoded attribute values, is equivalent to lexicographically comparing based on the character number. */ static int attcmp(const void *att1, const void *att2) { return strcmp(*(const char **)att1, *(const char **)att2); } static void startElement(void *userData, const char *name, const char **atts) { int nAtts; const char **p; FILE *fp = userData; putc('\n',fp); putc('(', fp); fputs(name, fp); putc('\n',fp); p = atts; while (*p) ++p; nAtts = (p - atts) >> 1; if (nAtts > 1) qsort((void *)atts, nAtts, sizeof(char *) * 2, attcmp); putc('(',fp); putc('\n',fp); while (*atts) { putc('(', fp); fputs(*atts++, fp); /* attribute */ fputs(" . ",fp); characterData(userData, *atts, strlen(*atts)); fputs(")\n",fp); atts++; } putc(')',fp); } static void endElement(void *userData, const char *name) { FILE *fp = userData; fputs("\n); close tag ",fp); fputs(name, fp); putc('\n', fp); } static void processingInstruction(void *userData, const char *target, const char *data) { FILE *fp = userData; fprintf(fp, "", target, data); } static void reportError(XML_Parser parser, const char *filename) { int code = XML_GetErrorCode(parser); const char *message = XML_ErrorString(code); if (message) fprintf(stdout, "%s:%d:%ld: %s\n", filename, XML_GetErrorLineNumber(parser), XML_GetErrorColumnNumber(parser), message); else fprintf(stderr, "%s: (unknown message %d)\n", filename, code); } static int processStream(const char *filename, XML_Parser parser) { int fd; if (!strcmp(filename,"-")) fd = fileno(stdin); else fd = open(filename, O_BINARY|O_RDONLY); if (fd < 0) { perror(filename); return 0; } for (;;) { int nread; char *buf = XML_GetBuffer(parser, READ_SIZE); if (!buf) { close(fd); fprintf(stderr, "%s: out of memory\n", filename); return 0; } nread = read(fd, buf, READ_SIZE); if (nread < 0) { perror(filename); close(fd); return 0; } if (!XML_ParseBuffer(parser, nread, nread == 0)) { reportError(parser, filename); close(fd); return 0; } if (nread == 0) { close(fd); break;; } } return 1; } static void usage(const char *prog) { fprintf(stderr, "usage: %s [-e encoding] file ...\n", prog); exit(1); } int main(int argc, char **argv) { int i; const char *encoding = NULL; #ifdef _MSC_VER _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF|_CRTDBG_LEAK_CHECK_DF); #endif if (argc < 2) usage(argv[0]); for (i = 1; i < argc; i++) { if ((argv[i][0] == '-') && argv[i][1]) { switch (argv[i][1]) { case 'e': encoding = argv[++i]; break; default: usage(argv[0]); break; } } else { FILE *fp = NULL; char *outName = 0; int result; XML_Parser parser = XML_ParserCreate(encoding); fp = stdout; XML_SetUserData(parser, fp); XML_SetElementHandler(parser, startElement, endElement); XML_SetCharacterDataHandler(parser, characterData); XML_SetProcessingInstructionHandler(parser, processingInstruction); result = processStream(argv[i], parser); XML_ParserFree(parser); } } return 0; } --=-=-=--