From 4d207b00c1e10f8b58bac5ffea633de0a8497042 Mon Sep 17 00:00:00 2001 From: David Lichteblau Date: Sun, 30 Mar 2008 15:58:55 +0200 Subject: [PATCH] Check for non-elements in attribute sets --- TEST | 12 +++--------- test.lisp | 3 +++ xslt.lisp | 15 ++++++++------- 3 files changed, 14 insertions(+), 16 deletions(-) diff --git a/TEST b/TEST index 34ba208..25a7d87 100644 --- a/TEST +++ b/TEST @@ -10575,12 +10575,6 @@ PASS AttributeSets__91037 [XSLT-Result-Tree] Expected output (1): MSFT_Conformance_Tests/AttributeSets/AttributeSets__91037.saxon Actual output: MSFT_Conformance_Tests/AttributeSets/AttributeSets__91037.xuriella -FAIL AttributeSets__91038 [XSLT-Result-Tree]: saxon error not signalled and official output not a match - Stylesheet: MSFT_Conformance_Tests/AttributeSets/91038.noindent-xsl - Data: MSFT_Conformance_Tests/AttributeSets/books.xml - Expected output (1): MSFT_Conformance_Tests/AttributeSets/AttributeSets__91038.saxon - Actual output: MSFT_Conformance_Tests/AttributeSets/AttributeSets__91038.xuriella - WARNING: There is no such encoding: "UTF-16". WARNING: There is no such encoding: "UTF-16". WARNING: There is no such encoding: "UTF-16". @@ -10678,7 +10672,7 @@ PASS AttributeSets__91091 [XSLT-Result-Tree]: raised an xslt-error as expected Expected output (1): MSFT_Conformance_Tests/AttributeSets/AttributeSets__91091.saxon Actual output: MSFT_Conformance_Tests/AttributeSets/AttributeSets__91091.xuriella -FAIL AttributeSets__91093 [XSLT-Result-Tree]: expected error not signalled: +PASS AttributeSets__91093 [XSLT-Result-Tree]: raised an xslt-error as expected Stylesheet: MSFT_Conformance_Tests/AttributeSets/91093.noindent-xsl Data: MSFT_Conformance_Tests/AttributeSets/books.xml Expected output (1): MSFT_Conformance_Tests/AttributeSets/AttributeSets__91093.saxon @@ -13955,7 +13949,7 @@ The value NIL is not of type (SIMPLE-ARRAY CHARACTER). Expected output (1): MSFT_Conformance_Tests/Errors/Errors_err008.saxon Actual output: MSFT_Conformance_Tests/Errors/Errors_err008.xuriella -FAIL Errors_err009 [Mixed]: expected error not signalled: +PASS Errors_err009 [Mixed]: raised an xslt-error as expected Stylesheet: MSFT_Conformance_Tests/Errors/attrset-pcdata.noindent-xsl Data: MSFT_Conformance_Tests/Errors/data.xml Expected output (1): MSFT_Conformance_Tests/Errors/Errors_err009.saxon @@ -22509,4 +22503,4 @@ PASS XSLTFunctions_DocumentFuncWithEmptyArg [Mixed] Expected output (1): MSFT_Conformance_Tests/XSLTFunctions/XSLTFunctions_DocumentFuncWithEmptyArg.saxon Actual output: MSFT_Conformance_Tests/XSLTFunctions/XSLTFunctions_DocumentFuncWithEmptyArg.xuriella -Passed 2791/3075 tests. +Passed 2793/3074 tests. diff --git a/test.lisp b/test.lisp index 3d2705c..7f4559b 100644 --- a/test.lisp +++ b/test.lisp @@ -303,6 +303,9 @@ ;; case. "output_output75" + ;; we pass this test, but saxon doesn't + "AttributeSets__91038" + ;; we'd pass these tests, but the test authors forgot to declare the ;; entity they're writing, so we can't parse it for comparison. "output_output06" diff --git a/xslt.lisp b/xslt.lisp index c0876db..c8384dd 100644 --- a/xslt.lisp +++ b/xslt.lisp @@ -580,13 +580,14 @@ (stp:map-children 'list (lambda (child) - (unless (or (not (typep child 'stp:element)) - (and (equal (stp:namespace-uri child) *xsl*) - (equal (stp:local-name child) - "attribute")) - (find (stp:namespace-uri child) - *extension-namespaces* - :test 'equal)) + (unless + (and (typep child 'stp:element) + (or (and (equal (stp:namespace-uri child) *xsl*) + (equal (stp:local-name child) + "attribute")) + (find (stp:namespace-uri child) + *extension-namespaces* + :test 'equal))) (xslt-error "non-attribute found in attribute set")) (parse-instruction child)) elt)) -- 2.11.4.GIT