Commit 42accf73 authored by david's avatar david

Revision: cxml--devel--1.0--patch-4

Archive: david@knowledgetools.de--cxml
Creator: David Lichteblau <david@knowledgetools.de>
Date: Thu Jan  8 22:54:29 CET 2004
Standard-date: 2004-01-08 21:54:29 GMT
New-files: xml/.arch-ids/string-dom.lisp.id
    xml/string-dom.lisp
Modified-files: cxml.asd xml/dom-builder.lisp
    xml/dom-impl.lisp xml/package.lisp
New-patches: david@knowledgetools.de--cxml/cxml--devel--1.0--patch-4
Summary: renamed dom to cdom, added string-dom
Keywords: 

  - renamed package dom to cdom
  - use cl-package-aliases to access the package under the name "dom" anyway
  - added string-dom, which wraps around cdom and converts rods to strings
  - fixed import-node in dom-impl
parent 5a0e7057
(defpackage :string-dom
(:use))
(eval-when (:compile-toplevel :load-toplevel :execute)
(do-external-symbols (var :cdom)
(let* ((home-package
(if (member var '(cdom:data cdom:name cdom:value cdom:tag-name
cdom:node-name cdom:node-value
cdom:substring-data cdom:get-attribute))
:string-dom
:cdom))
(symbol (intern (symbol-name var) home-package)))
(import symbol :string-dom)
(export (list symbol) :string-dom))))
(defpackage :string-dom-impl (:use :cl))
(in-package :string-dom-impl)
(defun rod-to-string (frob)
(if (null frob)
nil
(map 'string #'code-char frob)))
(defun string-dom:data (node) (rod-to-string (cdom:data node)))
(defun string-dom:name (node) (rod-to-string (cdom:name node)))
(defun string-dom:value (node) (rod-to-string (cdom:value node)))
(defun string-dom:tag-name (node) (rod-to-string (cdom:tag-name node)))
(defun string-dom:node-name (node) (rod-to-string (cdom:node-name node)))
(defun string-dom:node-value (node) (rod-to-string (cdom:node-value node)))
(defun string-dom:substring-data (node offset count)
(rod-to-string (cdom:substring-data node offset count)))
(defun string-dom:get-attribute (elt name)
(rod-to-string (cdom:get-attribute elt name)))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment