diff --git a/XMLCONF b/XMLCONF index 30bb890..9864bdf 100644 --- a/XMLCONF +++ b/XMLCONF @@ -1112,30 +1112,10 @@ ibm/not-wf/P45/ibm45n06.xml [not-wf?] not-wf ibm/not-wf/P45/ibm45n07.xml [not-wf?] not-wf ibm/not-wf/P45/ibm45n08.xml [not-wf?] not-wf ibm/not-wf/P45/ibm45n09.xml [not-wf?] not-wf -ibm/not-wf/P46/ibm46n01.xml [not-wf?] FAILED: - well-formedness violation not detected -[ - Tests contentspec with wrong key word. the string "empty" is used as - the key word in the contentspec of the second elementdecl in the DTD. - ] -ibm/not-wf/P46/ibm46n02.xml [not-wf?] FAILED: - well-formedness violation not detected -[ - Tests contentspec with wrong key word. the string "Empty" is used as - the key word in the contentspec of the second elementdecl in the DTD. - ] -ibm/not-wf/P46/ibm46n03.xml [not-wf?] FAILED: - well-formedness violation not detected -[ - Tests contentspec with wrong key word. the string "Any" is used as - the key word in the contentspec of the second elementdecl in the DTD. - ] -ibm/not-wf/P46/ibm46n04.xml [not-wf?] FAILED: - well-formedness violation not detected -[ - Tests contentspec with wrong key word. the string "any" is used as - the key word in the contentspec of the second elementdecl in the DTD. - ] +ibm/not-wf/P46/ibm46n01.xml [not-wf?] not-wf +ibm/not-wf/P46/ibm46n02.xml [not-wf?] not-wf +ibm/not-wf/P46/ibm46n03.xml [not-wf?] not-wf +ibm/not-wf/P46/ibm46n04.xml [not-wf?] not-wf ibm/not-wf/P46/ibm46n05.xml [not-wf?] not-wf ibm/not-wf/P47/ibm47n01.xml [not-wf?] not-wf ibm/not-wf/P47/ibm47n02.xml [not-wf?] not-wf @@ -1813,4 +1793,4 @@ ibm/valid/P86/ibm86v01.xml [not validating:] input [validating:] input ibm/valid/P87/ibm87v01.xml [not validating:] input [validating:] input ibm/valid/P88/ibm88v01.xml [not validating:] input [validating:] input ibm/valid/P89/ibm89v01.xml [not validating:] input [validating:] input -5/1786 tests failed; 376 tests were skipped \ No newline at end of file +1/1786 tests failed; 376 tests were skipped \ No newline at end of file diff --git a/xml/xml-parse.lisp b/xml/xml-parse.lisp index 3b7e256..415863e 100644 --- a/xml/xml-parse.lisp +++ b/xml/xml-parse.lisp @@ -2169,9 +2169,9 @@ ;; | Name ;; | cs ;; cs ::= '(' S? cspec ( S? '|' S? cspec)* S? ')' ('?' | '*' | '+')? -;; und eine post mortem analyse +;; und eine post factum analyse -(defun p/cspec (input) +(defun p/cspec (input &optional recursivep) (let ((term (let ((names nil) op-cat op res stream) (multiple-value-bind (cat sem) (peek-token input) @@ -2181,8 +2181,10 @@ :EMPTY) ((rod= sem '#.(string-rod "ANY")) :ANY) - (t - sem))) + ((not recursivep) + (wf-error "invalid content spec")) + (t + sem))) ((eq cat :\#PCDATA) (consume-token input) :PCDATA) @@ -2190,7 +2192,7 @@ (setf stream (car (zstream-input-stack input))) (consume-token input) (p/S? input) - (setq names (list (p/cspec input))) + (setq names (list (p/cspec input t))) (p/S? input) (cond ((member (peek-token input) '(:\| :\,)) (setf op-cat (peek-token input)) @@ -2198,7 +2200,7 @@ (while (eq (peek-token input) op-cat) (consume-token input) (p/S? input) - (push (p/cspec input) names) + (push (p/cspec input t) names) (p/S? input)) (setf res (cons op (reverse names)))) (t @@ -2645,7 +2647,7 @@ (unless (and (eq cat2 :etag) (eq (car sem2) name)) (perror input "Bad nesting. ~S / ~S" (mu name) (mu (cons cat2 sem2)))) - (when sem2 + (when (cdr sem2) (wf-error "no attributes allowed in end tag"))) (sax:end-element (handler *ctx*) ns-uri local-name name))