all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-pretest-bug@gnu.org, emacs-devel@gnu.org
Subject: Re: Refactoring xml.el namespace handling
Date: 04 Mar 2004 12:50:18 -0500	[thread overview]
Message-ID: <jwv7jy0ldbw.fsf-monnier+emacs/devel@asado.iro.umontreal.ca> (raw)
In-Reply-To: <878yiimo8x.fsf@weblog.localhost>

> Now that I've gotten a good HEAD, here is a fresh diff.

Thank you.  Here is a counter patch.  The main difference is that it uses
'http://foo/bar rather than :http://foo/bar so as to avoid an unnecessary
(concat ":" foo) and also so that (symbol-name foo) immediately returns
a usable URL.
It also cleans up a few elisp things (like replace mapcar->mapc->dolist,
and (append (list x) y) -> (cons x y), ...).
Things left:
- it seems that the new code returns either a TAG (a symbol) or (NS . TAG)
  where TAG is a string rather than a symbol.  Do I understand this right?
  Is that done on purpose?  It looks like a bad idea.
- in xml-parse-tag, you do

   (let (.. (children (list A B)) ...)
     ... (car children) ... (setcdr children ...) ...

  it would be better to do something slightly different so you don't need
  to extract the car of what you just built and you don't need to setcdr.
  Maybe something like

    (let (... (a A) (b B) ...)
      ... a ... (let ((children (list a (.. b ..)))) ...))

> 2004-03-03  Mark A. Hershberger  <mah@everybody.org>
>
> 	* xml.el (xml-maybe-do-ns): new function to handle namespace
> 	parsing of both attribute and element names.
> 	(xml-ns-parse-ns-attrs, xml-ns-expand-el, xml-ns-expand-attr,
> 	xml-intern-attrlist): Removed in favor of xml-maybe-do-ns to avoid
> 	un-necessary intern-ing.
> 	(xml-parse-tag): Updated assumed namespaces.  Cleaned up namespace
> 	parsing.
> 	(xml-parse-attlist): Now does its own namespace parsing work.
> 	(xml-parse-dtd): Updated <!ELEMENT parsing to accept elements with
> 	hyphens.  Now skips ENTITY, ATTLIST, and NOTATION instead of
> 	barfing.

ChangeLog text should use the present tense: it makes it easier to
write/read.


        Stefan

  reply	other threads:[~2004-03-04 17:50 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-01 15:59 Refactoring xml.el namespace handling Mark A. Hershberger
2004-03-02 21:52 ` Stefan Monnier
2004-03-03  6:35   ` Mark A. Hershberger
2004-03-04 17:50     ` Stefan Monnier [this message]
2004-03-04 17:52       ` Stefan Monnier
2004-03-08  1:33       ` Kim F. Storm
2004-03-08  4:06         ` Mark A. Hershberger
2004-03-12  9:57         ` Richard Stallman
  -- strict thread matches above, loose matches on Subject: below --
2004-03-05 19:03 Mark A. Hershberger
2004-03-05 19:29 ` Stefan Monnier
2004-04-14 18:36 ` Stefan Monnier
2004-04-16  3:14   ` Katsumi Yamaoka
2004-04-16 20:05     ` Mark A. Hershberger
2004-04-16 22:27       ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwv7jy0ldbw.fsf-monnier+emacs/devel@asado.iro.umontreal.ca \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=emacs-pretest-bug@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.