w3-4.0.49/ 0000755 0001752 0001753 00000000000 12206614635 010577 5 ustar elpa elpa w3-4.0.49/BUGS 0000644 0001752 0001753 00000004021 12206344015 011247 0 ustar elpa elpa If any bugs are discovered in Emacs/W3, please report them to the mailing list w3-beta@indiana.edu --- this is where the brave souls who beta test the latest versions of Emacs/W3 reside, and are generally very responsive to bug reports. Please make sure to use the bug submission feature of Emacs/W3, so that all relevant information will be sent along with your bug report. By default this is bound to the `w' key when in an Emacs/W3 buffer, or you can use 'M-x w3-submit-bug' from anywhere within Emacs. For problems that are causing emacs to signal and error, please send a backtrace. You can get a backtrace by 'M-x set-variable RET debug-on-error RET t RET', and then reproduce the error. If the problem is visual, please capture a copy of the output and mail it along with the bug report (preferably as a MIME attachment, but anything will do). You can use the @code{xwd} program under X-windows for this, or @key{Alt-PrintScreen} under Windows 95/NT. Sorry, but I don't remember what the magic incarnation is for doing a screen dump under NeXTstep or OS/2. If the problem is actually causing Emacs to crash, then you will need to also mail the maintainers of the various Emacs distributions with the bug. Please use the 'gnu.emacs.bug' newgroup for reporting bugs with GNU Emacs, and 'comp.emacs.xemacs' for reporting bugs with XEmacs. I am actively involved with the beta testing of the latest versions of both branches of Emacs, and if I can reproduce the problem, I will do my best to see it gets fixed in the next release. It is also important to always maintain as much context as possible in your responses. I get so much email from my various Emacs-activities and work, that I cannot remember everything. If you send a bug report, and I send you a reply, and you reply with 'no that didn't work', then odds are I will have no clue what didn't work, much less what that was trying to fix in the first place. It will be much quicker and less painful if I don't have to waste a round-trip email exchange saying 'what are you talking about'. w3-4.0.49/tests/ 0000755 0001752 0001753 00000000000 12206344015 011731 5 ustar elpa elpa w3-4.0.49/tests/borderless-tables.html 0000644 0001752 0001753 00000010604 12206344015 016234 0 ustar elpa elpa
text in col1 | text in col2 |
text in col1 | text in col2 |
Content-Base: http://a/b/c/d;p?qthe relative URLs should be resolved as shown below.
I will need your help testing the examples on multiple browsers. What you need to do is point to the example anchor and compare it to the resolved URL in your browser (most browsers have a feature by which you can see the resolved URL at the bottom of the window/screen when the anchor is active).
RESULTS from g:h = g:h [R,X,2,3,4,5] http://a/b/c/g:h [1] g = http://a/b/c/g [R,X,1,2,3,4,5] ./g = http://a/b/c/g [R,X,1,2,3,4,5] g/ = http://a/b/c/g/ [R,X,1,2,3,4,5] /g = http://a/g [R,X,1,2,3,4,5] //g = http://g [R,X,1,2,3,4,5] ?y = http://a/b/c/?y [R,1,2,3,4] http://a/b/c/d;p?y [X,5] g?y = http://a/b/c/g?y [R,X,1,2,3,4,5] #s = (current document)#s [R,2,4] http://a/b/c/d;p?q#s [X,1,3,5] g#s = http://a/b/c/g#s [R,X,1,2,3,4,5] g?y#s = http://a/b/c/g?y#s [R,X,1,2,3,4,5] ;x = http://a/b/c/;x [R,1,2,3,4] http://a/b/c/d;x [X,5] g;x = http://a/b/c/g;x [R,X,1,2,3,4,5] g;x?y#s = http://a/b/c/g;x?y#s [R,X,1,2,3,4,5] . = http://a/b/c/ [R,X,2,5] http://a/b/c/. [1] http://a/b/c [3,4] ./ = http://a/b/c/ [R,X,1,2,3,4,5] .. = http://a/b/ [R,X,2,5] http://a/b [1,3,4] ../ = http://a/b/ [R,X,1,2,3,4,5] ../g = http://a/b/g [R,X,1,2,3,4,5] ../.. = http://a/ [R,X,2,5] http://a [1,3,4] ../../ = http://a/ [R,X,1,2,3,4,5] ../../g = http://a/g [R,X,1,2,3,4,5]
An empty reference refers to the start of the current document.
<> = (current document) [R,2,4] http://a/b/c/d;p?q [X,3,5] http://a/b/c/ [1]Parsers must be careful in handling the case where there are more relative path ".." segments than there are hierarchical levels in the base URL's path. Note that the ".." syntax cannot be used to change the site component of a URL.
../../../g = http://a/../g [R,X,2,4,5] http://a/g [R,1,3] ../../../../g = http://a/../../g [R,X,2,4,5] http://a/g [R,1,3]In practice, some implementations strip leading relative symbolic elements (".", "..") after applying a relative URL calculation, based on the theory that compensating for obvious author errors is better than allowing the request to fail. Thus, the above two references will be interpreted as "http://a/g" by some implementations.
Similarly, parsers must avoid treating "." and ".." as special when they are not complete components of a relative path.
/./g = http://a/./g [R,X,2,3,4,5] http://a/g [1] /../g = http://a/../g [R,X,2,3,4,5] http://a/g [1] g. = http://a/b/c/g. [R,X,1,2,3,4,5] .g = http://a/b/c/.g [R,X,1,2,3,4,5] g.. = http://a/b/c/g.. [R,X,1,2,3,4,5] ..g = http://a/b/c/..g [R,X,1,2,3,4,5]Less likely are cases where the relative URL uses unnecessary or nonsensical forms of the "." and ".." complete path segments.
./../g = http://a/b/g [R,X,1,2,5] http://a/b/c/../g [3,4] ./g/. = http://a/b/c/g/ [R,X,2,5] http://a/b/c/g/. [1] http://a/b/c/g [3,4] g/./h = http://a/b/c/g/h [R,X,1,2,3,4,5] g/../h = http://a/b/c/h [R,X,1,2,3,4,5] g;x=1/./y = http://a/b/c/g;x=1/y [R,1,2,3,4] http://a/b/c/g;x=1/./y [X,5] g;x=1/../y = http://a/b/c/y [R,1,2,3,4] http://a/b/c/g;x=1/../y [X,5]All client applications remove the query component from the base URL before resolving relative URLs. However, some applications fail to separate the reference's query and/or fragment components from a relative path before merging it with the base path. This error is rarely noticed, since typical usage of a fragment never includes the hierarchy ("/") character, and the query component is not normally used within relative references.
g?y/./x = http://a/b/c/g?y/./x [R,X,5] http://a/b/c/g?y/x [1,2,3,4] g?y/../x = http://a/b/c/g?y/../x [R,X,5] http://a/b/c/x [1,2,3,4] g#s/./x = http://a/b/c/g#s/./x [R,X,2,3,4,5] http://a/b/c/g#s/x [1] g#s/../x = http://a/b/c/g#s/../x [R,X,2,3,4,5] http://a/b/c/x [1]Some parsers allow the scheme name to be present in a relative URI if it is the same as the base URI scheme. This is considered to be a loophole in prior specifications of partial URI [RFC1630]. Its use should be avoided.
http:g = http:g [R,X,5] | http://a/b/c/g [1,2,3,4] (ok for compat.) http: = http: [R,X,5] http://a/b/c/ [1] http://a/b/c/d;p?q [2,3,4]w3-4.0.49/.gitignore 0000644 0001752 0001753 00000000041 12206344015 012552 0 ustar elpa elpa *-autoloads.el *-pkg.el *~ *.elc w3-4.0.49/w3-props.el 0000644 0001752 0001753 00000010355 12206344015 012607 0 ustar elpa elpa ;;; w3-props.el --- Additional text property stuff ;; Copyright (c) 1996, 1997, 2013 Free Software Foundation, Inc. ;; Author: $Author: fx $ ;; Created: $Date: 2001/09/09 15:33:14 $ ;; Keywords: faces ;; This file is part of GNU Emacs. ;; ;; GNU Emacs is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 3, or (at your option) ;; any later version. ;; ;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs; see the file COPYING. If not, write to the ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, ;; Boston, MA 02111-1307, USA. ;;; Commentary: ;; Additional text property functions. ;; The following three text property functions are not generally available (and ;; it's not certain that they should be) so they are inlined for speed. ;; The case for `fillin-text-property' is simple; it may or not be generally ;; useful. (Since it is used here, it is useful in at least one place.;-) ;; However, the case for `append-text-property' and `prepend-text-property' is ;; more complicated. Should they remove duplicate property values or not? If ;; so, should the first or last duplicate item remain? Or the one that was ;; added? In our implementation, the first duplicate remains. ;;; Code: (defsubst w3-fillin-text-property (start end setprop markprop value &optional object) "Fill in one property of the text from START to END. Arguments PROP and VALUE specify the property and value to put where none are already in place. Therefore existing property values are not overwritten. Optional argument OBJECT is the string or buffer containing the text." (let ((start (text-property-any start end markprop nil object)) next) (while start (setq next (next-single-property-change start markprop object end)) (put-text-property start next setprop value object) (put-text-property start next markprop value object) (setq start (text-property-any next end markprop nil object))))) (defsubst w3-props-unique (list) "Uniquify LIST, deleting elements using `delq'. Return the list with subsequent duplicate items removed by side effects." (let ((list list)) (while list (setq list (setcdr list (delq (car list) (cdr list)))))) list) ;; A generalisation of `facemenu-add-face' for any property, but without the ;; removal of inactive faces via `facemenu-discard-redundant-faces' and special ;; treatment of `default'. Uses `unique' to remove duplicate property values. (defsubst prepend-text-property (start end prop value &optional object) "Prepend to one property of the text from START to END. Arguments PROP and VALUE specify the property and value to prepend to the value already in place. The resulting property values are always lists, and unique. Optional argument OBJECT is the string or buffer containing the text." (let ((val (if (listp value) value (list value))) next prev) (while (/= start end) (setq next (next-single-property-change start prop object end) prev (get-text-property start prop object)) (put-text-property start next prop (w3-props-unique (append val (if (listp prev) prev (list prev)))) object) (setq start next)))) (defsubst append-text-property (start end prop value &optional object) "Append to one property of the text from START to END. Arguments PROP and VALUE specify the property and value to append to the value already in place. The resulting property values are always lists, and unique. Optional argument OBJECT is the string or buffer containing the text." (let ((val (if (listp value) value (list value))) next prev) (while (/= start end) (setq next (next-single-property-change start prop object end) prev (get-text-property start prop object)) (put-text-property start next prop (w3-props-unique (append (if (listp prev) prev (list prev)) val)) object) (setq start next)))) (provide 'w3-props) w3-4.0.49/w3-hot.el 0000644 0001752 0001753 00000021122 12206344015 012230 0 ustar elpa elpa ;;; w3-hot.el --- Main functions for emacs-w3 on all platforms/versions ;; Copyright (c) 1996 - 1999, 2013 Free Software Foundation, Inc. ;; This file is part of GNU Emacs. ;; ;; GNU Emacs is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 3, or (at your option) ;; any later version. ;; ;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs; see the file COPYING. If not, write to the ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, ;; Boston, MA 02111-1307, USA. ;;; Code: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Structure for hotlists ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ( ;; ("name of item1" . "http://foo.bar.com/") ;; A single item in hotlist ;; ("name of item2" . ( ;; A sublist ;; ("name of item3" . "http://www.ack.com/") ;; )) ;; ) ; end of hotlist ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (require 'w3-vars) (require 'w3-parse) (require 'url-parse) (eval-when-compile (require 'cl)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Hotlist Handling Code ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defvar w3-html-bookmarks nil) ;;;###autoload (defun w3-read-html-bookmarks (fname) "Import an HTML file into the Emacs-w3 format." (interactive "fBookmark file: ") (if (not (file-readable-p fname)) (error "Can not read %s..." fname)) (with-current-buffer (get-buffer-create " *bookmark-work*") (erase-buffer) (insert-file-contents fname) (let* ((w3-debug-html nil) (bkmarks nil) (parse (w3-parse-buffer (current-buffer)))) (setq parse w3-last-parse-tree bkmarks (nreverse (w3-grok-html-bookmarks parse)) w3-hotlist bkmarks)))) (defvar w3--cur-stack) (defsubst w3-hot-push-new-menu () (setq w3--cur-stack (cons (list "") w3--cur-stack))) ;; This stores it in menu format '(defsubst w3-hot-push-new-item (title href) (setcar w3--cur-stack (cons (vector title (list 'w3-fetch href) t) (car w3--cur-stack)))) ;; This stores it in alist format (defsubst w3-hot-push-new-item (title href) (setcar w3--cur-stack (cons (cons title href) (car w3--cur-stack)))) (defvar w3--cur-title) (defsubst w3-hot-finish-submenu () (let ((x (nreverse (car w3--cur-stack))) (y (pop w3--cur-title))) (while (string= y "") (setq y (pop w3--cur-title))) (and x (setcar x y)) (setq w3--cur-stack (cdr w3--cur-stack)) (if w3--cur-stack (setcar w3--cur-stack (cons x (car w3--cur-stack))) (setq w3--cur-stack (list x))))) (defun w3-grok-html-bookmarks-internal (tree) (let (node tag content args) (while tree (setq node (car tree) tree (cdr tree) tag (and (listp node) (nth 0 node)) args (and (listp node) (nth 1 node)) content (and (listp node) (nth 2 node))) (cond ((eq tag 'hr) (setq w3--cur-title '("------"))) ((eq tag 'title) (setq w3--cur-title (list (w3-normalize-spaces (car content)))) (w3-grok-html-bookmarks-internal content)) ((memq tag '(dl ol ul)) (w3-hot-push-new-menu) (w3-grok-html-bookmarks-internal content) (w3-hot-finish-submenu)) ((and (memq tag '(dt li p)) (stringp (car content))) (setq w3--cur-title (cons (w3-normalize-spaces (car content)) w3--cur-title))) ((and (eq tag 'a) (stringp (car-safe content)) (cdr-safe (assq 'href args))) (w3-hot-push-new-item (w3-normalize-spaces (car-safe content)) (cdr-safe (assq 'href args)))) (content (w3-grok-html-bookmarks-internal content)))))) (defun w3-grok-html-bookmarks (chunk) (let ( w3--cur-title w3--cur-stack ) (w3-grok-html-bookmarks-internal chunk) (reverse (car w3--cur-stack)))) (defvar w3--alist) (defun w3-hot-convert-to-alist-internal (l &optional prefix) (dolist (node l) (cond ((stringp node) ;; Top-level node... ignore. ) ((stringp (cdr node)) ;; A real hyperlink, push it onto the alist. (push (cons (if prefix (concat prefix " / " (car node)) (car node)) (cdr node)) w3--alist)) (t ;; A submenu, add to prefix and recurse. (w3-hot-convert-to-alist-internal (cdr node) (if prefix (concat prefix " / " (car node)) (car node))))))) (defun w3-hot-convert-to-alist (l) (let ((w3--alist nil)) (w3-hot-convert-to-alist-internal l) w3--alist)) (defun w3-delete-from-alist (x alist) ;; Remove X from ALIST, return new alist (if (eq (assoc x alist) (car alist)) (cdr alist) (delq (assoc x alist) alist))) (defun w3-hotlist-parse-old-mosaic-format () (let (cur-link cur-alias) (while (re-search-forward "^\n" nil t) (replace-match "")) (goto-char (point-min)) (forward-line 2) (while (not (eobp)) (re-search-forward "^[^ ]*" nil t) (setq cur-link (buffer-substring (match-beginning 0) (match-end 0))) (setq cur-alias (buffer-substring (progn (forward-line 1) (beginning-of-line) (point)) (progn (end-of-line) (point)))) (if (not (equal cur-alias "")) (setq w3-hotlist (cons (list cur-alias cur-link) w3-hotlist)))))) ;;;###autoload (defun w3-parse-hotlist (&optional fname) "Read in the hotlist specified by FNAME" (if (not fname) (setq fname w3-hotlist-file)) (setq w3-hotlist nil) (if (not (file-exists-p fname)) (message "%s does not exist!" fname) (let* ((buffer (get-buffer-create " *HOTW3*")) (case-fold-search t)) (with-current-buffer buffer (erase-buffer) (insert-file-contents fname) (goto-char (point-min)) (cond ((looking-at "ncsa-xmosaic-hotlist-format-1") ;; Old-style NCSA Mosaic (w3-hotlist-parse-old-mosaic-format)) ((or (looking-at "