[Openmcl-devel] CXML
Steve Núñez
steve.nunez at illation.com.sg
Fri May 22 01:12:05 PDT 2009
Thanks. That worked (explicitly loading closure-common first), however I'm
experiencing trouble in running the first example of the QuickStart guide:
(cxml:with-xml-output (cxml:make-octet-stream-sink test-sequence-file
:indentation 2 :canonical nil)
(cxml:with-element "foo"
(cxml:attribute "xyz" "abc")
(cxml:with-element "bar"
(cxml:attribute "blub" "bla"))
(cxml:text "Hi there.")))
Produces an error: "value 60 is not of the expected type CHARACTER."
I suspect this might be related to character encoding, as the backtrace
(below) mentions two encodings, UTF-8 and ISO-8859-1.
0: ((:INTERNAL CCL::%XERR-DISP))
1: (CCL::FUNCALL-WITH-ERROR-REENTRY-DETECTION #<COMPILED-LEXICAL-CLOSURE
(:INTERNAL CCL::%XERR-DISP) #x2915F5F>)
2: (CCL::%XERR-DISP 371959430)
3: (CCL::%PASCAL-FUNCTIONS% 2 371959430)
4: (CCL::%PRIVATE-IOBLOCK-WRITE-CHAR #S(CCL::FILE-IOBLOCK :STREAM
#<BASIC-FILE-CHARACTER-OUTPUT-STREAM ("banking.xml"/9 ISO-8859-1)
#x30004187268D> :UNTYI-CHAR NIL :INBUF ...) 60)
5: (WRITE-CHAR 1 #<BASIC-FILE-CHARACTER-OUTPUT-STREAM ("banking.xml"/9
ISO-8859-1) #x30004187268D>)
6: (#<CCL::STANDARD-KERNEL-METHOD STREAM-WRITE-VECTOR
(CCL::CHARACTER-OUTPUT-STREAM T T T)> #<BASIC-FILE-CHARACTER-OUTPUT-STREAM
("banking.xml"/9 ISO-8859-1) #x30004187268D> #(60 ..)
7: (CCL::%CALL-NEXT-METHOD (NIL #<CCL::STANDARD-KERNEL-METHOD
STREAM-WRITE-VECTOR (CCL::CHARACTER-OUTPUT-STREAM T T T)> . 5245624))
8: (CCL::%%STANDARD-COMBINED-METHOD-DCODE (#<CCL::STANDARD-KERNEL-METHOD
STREAM-WRITE-VECTOR (CCL::BASIC-CHARACTER-OUTPUT-STREAM T T T)> ..)))
9: (WRITE-SEQUENCE #(60 63 120 109 108 32 ...)
#<BASIC-FILE-CHARACTER-OUTPUT-STREAM ("banking.xml"/9 ISO-8859-1)
#x30004187268D> :START 0 :END 93)
10: (#<STANDARD-METHOD RUNES::FLUSH-YSTREAM (RUNES::ENCODING-YSTREAM)>
#S(RUNES::OCTET-STREAM-YSTREAM :ENCODING :UTF-8 :COLUMN 6 :IN-PTR ...))
11: (CCL::%%BEFORE-AND-AFTER-COMBINED-METHOD-DCODE (NIL #<STANDARD-METHOD
RUNES:CLOSE-YSTREAM :BEFORE (RUNES:YSTREAM)> . 5245673))
12: (CCL::%%STANDARD-COMBINED-METHOD-DCODE ((#<STANDARD-METHOD
RUNES:CLOSE-YSTREAM :BEFORE (RUNES:YSTREAM)>) NIL #<STANDARD-METHOD
RUNES:CLOSE-YSTREAM (RUNES::%STREAM-YSTREAM)>) 5245673)
13: (CXML::INVOKE-WITH-XML-OUTPUT #<Compiled-function (:INTERNAL
GENERATE-TEST-SEQUENCE) (Non-Global) #x3000417AA5DF> #<CXML::SINK
#x30004186FA0D>)
14: (GENERATE-TEST-SEQUENCE "banking.xml")
15: (CCL::CALL-CHECK-REGS GENERATE-TEST-SEQUENCE "banking.xml")
The entire function is:
(defun generate-test-sequence (file-name)
(with-open-file (test-sequence-file file-name
:direction :output
:if-exists :supersede)
(cxml:with-xml-output (cxml:make-octet-stream-sink test-sequence-file
:indentation 2 :canonical nil)
(cxml:with-element "foo"
(cxml:attribute "xyz" "abc")
(cxml:with-element "bar"
(cxml:attribute "blub" "bla"))
(cxml:text "Hi there.")))))
Cheers,
- SteveN
On 22/05/09 4:59 PM, "David Lichteblau" <david at lichteblau.com> wrote:
> Quoting Steve N??ez (steve.nunez at illation.com.sg):
>> /Users/nunez/.asdf-install-dir/site/cxml-2008-11-30/cxml.asd into #<Package
>> "ASDF0">
>>> Error: :VERSION is an invalid initarg to INITIALIZE-INSTANCE for
>> #<STANDARD-CLASS MISSING-DEPENDENCY>.
>>> Valid initargs: (:REQUIRES :PARENT :REQUIRED-BY).
>>> While executing: CCL::CHECK-INITARGS, in process listener(1).
>>> Type :POP to abort, :R for a list of available restarts.
>>> Type :? for other options.
>
> This is a compatibility issue between CCL's version of ASDF, and a hack
> in cxml.asd that tries to make it work with asdf-install.
>
> The solution is to install cxml's dependency closure-common explicitly
> before installing cxml.
>
> Alternatively, don't use asdf-install in the first place (use clbuild or
> download cxml's dependencies manually).
>
> It would probably also work to grab a recent copy of ASDF from SBCL CVS
> or CCLAN CVS and drop it into tools/, but I haven't tested that.
>
>
> The answer to your original question is that CXML and its add-ons
> CXML-STP, closure-common, and Closure HTML should work on CCL 1.3.
>
> Its add-ons CXML-RNG, Plexippus XPath, and Xuriella XSLT don't work on
> CCL at this point.
>
>
> d.
--
Level 31
6 Battery Road
Singapore 049909
Phone: +65 6321 9115
Mobile: +65 9679 8360
http://illation.com.sg
More information about the Openmcl-devel
mailing list