From 80fb48d3e3c9182626dd8e225e6659e9ac6cc5de Mon Sep 17 00:00:00 2001 From: David Lichteblau Date: Sun, 2 Mar 2008 20:59:58 +0100 Subject: [PATCH] Implemented xpath-protocol:unparsed-entity-uri --- xpath.lisp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/xpath.lisp b/xpath.lisp index d3608e5..27dbe69 100644 --- a/xpath.lisp +++ b/xpath.lisp @@ -218,6 +218,18 @@ (return node)))))))))) (find-recursively-if #'test document)))))) +(define-default-method xpath-protocol:unparsed-entity-uri + ((node stp:node) name) + (let ((doctype (stp:document-type (stp:document node)))) + (when doctype + (let ((dtd (stp:dtd doctype))) + (when dtd + (let ((entdef (cdr (gethash name (cxml::dtd-gentities dtd))))) + (when (typep entdef 'cxml::external-entdef) + (let ((uri (cxml::extid-system (cxml::entdef-extid entdef)))) + (when uri + (puri:render-uri uri nil)))))))))) + (define-default-method xpath-protocol:local-name ((node stp:text)) "") (define-default-method xpath-protocol:namespace-prefix ((node stp:text)) "") -- 2.11.4.GIT