From 37e1b8cb3d7f4be6bdf2b27930e27945d3e296d5 Mon Sep 17 00:00:00 2001 From: David Lichteblau Date: Sat, 26 Apr 2008 22:56:38 +0200 Subject: [PATCH] Check xsl:output/@method properly --- TEST | 4 ++-- xslt.lisp | 19 +++++++++++-------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/TEST b/TEST index b89ac1e..45117af 100644 --- a/TEST +++ b/TEST @@ -15681,7 +15681,7 @@ PASS Output__77959 [XSLT-Output] Expected output (1): MSFT_Conformance_Tests/Output/Output__77959.saxon Actual output: MSFT_Conformance_Tests/Output/Output__77959.xuriella -FAIL Output__77966 [XSLT-Output]: expected error not signalled: +PASS Output__77966 [XSLT-Output]: raised an xslt-error as expected Stylesheet: MSFT_Conformance_Tests/Output/xslt29503.noindent-xsl Data: MSFT_Conformance_Tests/Output/books.xml Expected output (1): MSFT_Conformance_Tests/Output/Output__77966.saxon @@ -19289,4 +19289,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 2963/3070 tests (4 expected failures, 103 unexpected failures). +Passed 2964/3070 tests (4 expected failures, 102 unexpected failures). diff --git a/xslt.lisp b/xslt.lisp index bd068e4..0f808ab 100644 --- a/xslt.lisp +++ b/xslt.lisp @@ -987,14 +987,17 @@ ;; FIXME: media-type)) (when method - (setf (output-method spec) - (cond - ((equal method "") - (xslt-error "method missing in xsl:output")) - ((equalp method "HTML") :html) - ((equalp method "TEXT") :text) - ((equalp method "XML") :xml) - (t nil)))) + (multiple-value-bind (local-name uri) + (decode-qname method env t) + (setf (output-method spec) + (if (plusp (length uri)) + nil + (cond + ((equalp method "HTML") :html) + ((equalp method "TEXT") :text) + ((equalp method "XML") :xml) + (t + (xslt-error "invalid output method: ~A" method))))))) (when indent (setf (output-indent spec) indent)) (when encoding -- 2.11.4.GIT