So, I've been messing around with vcards a bit and decided that I would try to make sense of the new XML format for VCARD data, described here:
http://tools.ietf.org/html/draft-perreault-vcarddav-vcardxml-02#appendix-A
So far so good. I cut and paste the RNG spec from the document (attached), and attempt to read in the compact form and write out the longhand XML RNG schema. So, I do:
(defparameter *compact* (cxml-rng:parse-compact #p"vcard-4_0.rng")) ;; so far so good
(cxml-rng:make-validator *compact*) ;; again, that works
(with-open-file (out "foo.xml" :direction :output :element-type '(unsigned-byte 8)) (cxml-rng:serialize-schema *compact* (cxml:make-octet-stream-sink out))) ;; BOOM!
I get the following error:
There is no applicable method for the generic function #<STANDARD-GENERIC-FUNCTION CXML:UNPARSE-ATTRIBUTE (3)> when called with arguments (#:ANONYMOUS2507). [Condition of type SIMPLE-ERROR]
Restarts: 0: [RETRY] Retry calling the generic function. 1: [*ABORT] Return to SLIME's top level. 2: [TERMINATE-THREAD] Terminate this thread (#<THREAD "worker" RUNNING {1002D97001}>)
Backtrace: 0: ((SB-PCL::FAST-METHOD NO-APPLICABLE-METHOD (T)) #<unused argument> #<unused argument> #<STANDARD-GENERIC-FUNCTION CXML:UNPARSE-ATTRIBUTE (3)> #:ANONYMOUS2507) 1: (SB-PCL::CALL-NO-APPLICABLE-METHOD #<STANDARD-GENERIC-FUNCTION CXML:UNPARSE-ATTRIBUTE (3)> (#:ANONYMOUS2507)) 2: (CXML:ATTRIBUTE* #<unavailable argument> #<unavailable argument> #<unavailable argument> "name") Locals: CXML::LNAME = :<NOT-AVAILABLE> CXML::PREFIX = :<NOT-AVAILABLE> CXML::QNAME = "name" CXML::VALUE = :<NOT-AVAILABLE> 3: ((LAMBDA ())) 4: (CXML::INVOKE-WITH-ELEMENT* #<CLOSURE (LAMBDA #) {1002E13BA9}> #<unavailable argument> #<unavailable argument> "ref") Locals: CXML::FN = #<CLOSURE (LAMBDA ()) {1002E13BA9}> CXML::LNAME = :<NOT-AVAILABLE> CXML::PREFIX = :<NOT-AVAILABLE> CXML::QNAME = "ref" 5: (CXML-RNG::SERIALIZE-PATTERN #<CXML-RNG:REF {1006DB5171}>) 6: ((LAMBDA ())) 7: (CXML::INVOKE-WITH-ELEMENT* #<CLOSURE (LAMBDA #) {1002E13AF9}> #<unavailable argument> #<unavailable argument> "start") Locals: CXML::FN = #<CLOSURE (LAMBDA ()) {1002E13AF9}> CXML::LNAME = :<NOT-AVAILABLE> CXML::PREFIX = :<NOT-AVAILABLE> CXML::QNAME = "start" 8: ((LAMBDA ())) 9: (CXML::INVOKE-WITH-ELEMENT* #<CLOSURE (LAMBDA #) {1002E13A89}> #<unavailable argument> #<unavailable argument> "grammar")
Now, normally, I'd just assume that this is something I messed up. But the fact that the schema parses and validates OK makes me wonder. Any suggestions on how to go about debugging this?
thanks,
Cyrus