From 0e994ba607d859d795b0ab99a3aea16bf758363e Mon Sep 17 00:00:00 2001 From: dlichteblau Date: Sat, 3 Dec 2005 21:54:42 +0000 Subject: [PATCH] -eduni/namespaces/1.0/043.xml [not validating:] FAILED: - well-formedness violation not detected -[ -Colon in entity name -] -eduni/namespaces/1.0/044.xml [not validating:] FAILED: - well-formedness violation not detected -[ -Colon in entity name -] -eduni/namespaces/1.0/045.xml [not validating:] input [validating:] FAILED: - validity error not detected -[ -Colon in ID attribute name -] -eduni/namespaces/1.0/046.xml [not validating:] input [validating:] FAILED: - validity error not detected -[ -Colon in ID attribute name -] --- XMLCONF | 26 +++++--------------------- xml/xml-parse.lisp | 23 ++++++++++++++++------- 2 files changed, 21 insertions(+), 28 deletions(-) diff --git a/XMLCONF b/XMLCONF index 73fc3bb..e89ec17 100644 --- a/XMLCONF +++ b/XMLCONF @@ -1827,24 +1827,8 @@ eduni/namespaces/1.0/039.xml [not validating:] input [validating:] invalid eduni/namespaces/1.0/040.xml [not validating:] input [validating:] invalid eduni/namespaces/1.0/041.xml [not validating:] input [validating:] invalid eduni/namespaces/1.0/042.xml [not validating:] not-wf [validating:] not-wf -eduni/namespaces/1.0/043.xml [not validating:] FAILED: - well-formedness violation not detected -[ -Colon in entity name -] -eduni/namespaces/1.0/044.xml [not validating:] FAILED: - well-formedness violation not detected -[ -Colon in entity name -] -eduni/namespaces/1.0/045.xml [not validating:] input [validating:] FAILED: - validity error not detected -[ -Colon in ID attribute name -] -eduni/namespaces/1.0/046.xml [not validating:] input [validating:] FAILED: - validity error not detected -[ -Colon in ID attribute name -] -4/1829 tests failed; 333 tests were skipped \ No newline at end of file +eduni/namespaces/1.0/043.xml [not validating:] not-wf [validating:] not-wf +eduni/namespaces/1.0/044.xml [not validating:] not-wf [validating:] not-wf +eduni/namespaces/1.0/045.xml [not validating:] input [validating:] invalid +eduni/namespaces/1.0/046.xml [not validating:] input [validating:] invalid +0/1829 tests failed; 333 tests were skipped \ No newline at end of file diff --git a/xml/xml-parse.lisp b/xml/xml-parse.lisp index 3484ada..eb79275 100644 --- a/xml/xml-parse.lisp +++ b/xml/xml-parse.lisp @@ -624,7 +624,6 @@ (zstream (if (zstream-p stream) stream zmain)) (xstream (if (xstream-p stream) stream nil)) (s (make-string-output-stream))) - (write-string "Parse error: " s) (write-line message s) (when xstream (write-line "Location:" s) @@ -726,12 +725,18 @@ (dolist (a attlist) ;normalize non-CDATA values (let* ((qname (sax:attribute-qname a)) (adef (find-attribute e qname))) - (when (and adef (not (eq (attdef-type adef) :CDATA))) - (let ((canon (canon-not-cdata-attval (sax:attribute-value a)))) - (when (and (standalone-check-necessary-p adef) - (not (rod= (sax:attribute-value a) canon))) - (validity-error "(02) Standalone Document Declaration: attribute value not normalized")) - (setf (sax:attribute-value a) canon))))) + (when adef + (when (and *validate* + sax:*namespace-processing* + (eq (attdef-type adef) :ID) + (find #/: (sax:attribute-value a))) + (validity-error "colon in ID attribute")) + (unless (eq (attdef-type adef) :CDATA) + (let ((canon (canon-not-cdata-attval (sax:attribute-value a)))) + (when (and (standalone-check-necessary-p adef) + (not (rod= (sax:attribute-value a) canon))) + (validity-error "(02) Standalone Document Declaration: attribute value not normalized")) + (setf (sax:attribute-value a) canon)))))) (when *validate* ;maybe validate attribute values (dolist (a attlist) (validate-attribute ctx e a)))) @@ -879,6 +884,8 @@ (defun define-entity (source-stream name kind def) (setf name (intern-name name)) + (when (and sax:*namespace-processing* (find #/: name)) + (wf-error source-stream "colon in entity name")) (let ((table (ecase kind (:general (dtd-gentities (dtd *ctx*))) @@ -2273,6 +2280,8 @@ (normalize-public-id (extid-public id)) nil) (uri-rod (extid-system id))) + (when (and sax:*namespace-processing* (find #/: name)) + (wf-error input "colon in notation name")) (when *validate* (define-notation (dtd *ctx*) name id)) (list :notation-decl name id)))