From 4dc0e06c6a0d96e043cba8aef7c6246c00908849 Mon Sep 17 00:00:00 2001 From: David Lichteblau Date: Sun, 20 Apr 2008 20:59:50 +0200 Subject: [PATCH] Fixed Errors_err037 --- TEST | 6 +++--- format-number.lisp | 7 ++++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/TEST b/TEST index 1d535ab..dace13c 100644 --- a/TEST +++ b/TEST @@ -12604,7 +12604,7 @@ PASS Errors_err036 [Mixed]: raised an xslt-error as expected Expected output (1): MSFT_Conformance_Tests/Errors/Errors_err036.saxon Actual output: MSFT_Conformance_Tests/Errors/Errors_err036.xuriella -FAIL Errors_err037 [Mixed]: expected error not signalled: +PASS Errors_err037 [Mixed]: raised an xslt-error as expected Stylesheet: MSFT_Conformance_Tests/Errors/format-int.noindent-xsl Data: MSFT_Conformance_Tests/Errors/data.xml Expected output (1): MSFT_Conformance_Tests/Errors/Errors_err037.saxon @@ -19139,7 +19139,7 @@ PASS XSLTFunctions__extraParameter [Mixed]: raised an xslt-error as expected Expected output (1): MSFT_Conformance_Tests/XSLTFunctions/XSLTFunctions__extraParameter.saxon Actual output: MSFT_Conformance_Tests/XSLTFunctions/XSLTFunctions__extraParameter.xuriella -FAIL XSLTFunctions__InvalidPattern [Mixed]: expected error not signalled: +PASS XSLTFunctions__InvalidPattern [Mixed]: raised an xslt-error as expected Stylesheet: MSFT_Conformance_Tests/XSLTFunctions/InvalidPattern.noindent-xsl Data: MSFT_Conformance_Tests/XSLTFunctions/fmt-no.xml Expected output (1): MSFT_Conformance_Tests/XSLTFunctions/XSLTFunctions__InvalidPattern.saxon @@ -19431,4 +19431,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 2877/3080 tests (3 expected failures, 200 unexpected failures). +Passed 2879/3080 tests (3 expected failures, 198 unexpected failures). diff --git a/format-number.lisp b/format-number.lisp index ec9537a..6d7d7b7 100644 --- a/format-number.lisp +++ b/format-number.lisp @@ -152,7 +152,8 @@ (defun parse-integer-picture (picture df start end) (let ((integer-part-grouping-positions '()) - (minimum-integer-part-size 0)) + (minimum-integer-part-size 0) + (zero-digit-p nil)) (loop for i from start below end for c = (elt picture i) @@ -162,9 +163,13 @@ (df/grouping-separator (push 0 integer-part-grouping-positions)) (df/digit + (when zero-digit-p + (xslt-error + "digit not allowed after zero-digit in integer picture")) (when integer-part-grouping-positions (incf (car integer-part-grouping-positions)))) (df/zero-digit + (setf zero-digit-p t) (when integer-part-grouping-positions (incf (car integer-part-grouping-positions))) (incf minimum-integer-part-size))) -- 2.11.4.GIT