[cl-xmpp-devel] Trouble with escapes

Adam Thorsen adam.thorsen at gmail.com
Mon Jan 23 01:08:25 UTC 2006


This is probably a question for cxml, but I thought I'd check with you
(Erik) first.  CXML appears to have trouble parsing escaped
characters.  For example, when calling read-stanza on a stream that
contains &apos, I get the stacktrace below.  It also happens when I
send messages containing single quotes, double quotes, and ampersands.

I can see from the stacktrace that cxml is trying to process the
', but something is throwing it off.

Here is the debug output from cl-xmpp (just to show how far the parser gets):
<message from='awt at shiva.guruza.com/Psi' to='gernika at shiva.guruza.com'
type='chat' id='ac28a'>
<body>hey man what is up &apos

Any ideas?

The value NIL is not of type CXML::STREAM-NAME.
   [Condition of type TYPE-ERROR]

Restarts:
  0: [ABORT] Abort handling SLIME request.
  1: [TERMINATE-THREAD] Terminate this thread (#<THREAD "repl-thread"
{A9B56E9}>)

Backtrace:
  0: ((LAMBDA (CXML::X)) #<RUNES:XSTREAM NIL>)
  1: (SB-KERNEL:%FIND-POSITION-IF #<CLOSURE (LAMBDA (CXML::X))
{934768D}> (:STOP #<RUNES:XSTREAM NIL>) NIL 0 NIL #<FUNCTION
IDENTITY>)
  2: (CXML::ZSTREAM-PUSH #<RUNES:XSTREAM [apos :GENERAL NIL]>
#S(CXML::ZSTREAM :TOKEN-CATEGORY NIL :TOKEN-SEMANTIC NIL :INPUT-STACK
(:STOP #<RUNES:XSTREAM NIL>)))
  3: ((LAMBDA (CXML::NEW-XSTREAM)) #<RUNES:XSTREAM [apos :GENERAL NIL]>)
  4: (CXML::CALL-WITH-ENTITY-EXPANSION-AS-STREAM #S(CXML::ZSTREAM
:TOKEN-CATEGORY NIL :TOKEN-SEMANTIC NIL :INPUT-STACK (:STOP
#<RUNES:XSTREAM NIL>)) #<CLOSURE (LAMBDA (CXML::NEW-XSTREAM))
{9347605}> "apos" :GENERAL NIL)
  5: (CXML::P/CONTENT #S(CXML::ZSTREAM :TOKEN-CATEGORY NIL
:TOKEN-SEMANTIC NIL :INPUT-STACK (:STOP #<RUNES:XSTREAM NIL>)))
  6: (CXML::P/ELEMENT #S(CXML::ZSTREAM :TOKEN-CATEGORY NIL
:TOKEN-SEMANTIC NIL :INPUT-STACK (:STOP #<RUNES:XSTREAM NIL>)))
  7: (CXML::P/CONTENT #S(CXML::ZSTREAM :TOKEN-CATEGORY NIL
:TOKEN-SEMANTIC NIL :INPUT-STACK (:STOP #<RUNES:XSTREAM NIL>)))
  8: (CXML::P/ELEMENT #S(CXML::ZSTREAM :TOKEN-CATEGORY NIL
:TOKEN-SEMANTIC NIL :INPUT-STACK (:STOP #<RUNES:XSTREAM NIL>)))
  9: (CXML::P/DOCUMENT #S(CXML::ZSTREAM :TOKEN-CATEGORY NIL
:TOKEN-SEMANTIC NIL :INPUT-STACK (:STOP #<RUNES:XSTREAM NIL>))
#<CL-XMPP::STANZA-HANDLER {92D7C99}> :VALIDATE NIL :DTD NIL :ROOT NIL
:ENTITY-RESOLVER NIL :DISALLOW-INTERNAL-SUBSET NIL :RECODE T)
 10: (CXML::PARSE-XSTREAM #<RUNES:XSTREAM NIL>
#<CL-XMPP::STANZA-HANDLER {92D7C99}>)
 11: (CL-XMPP::READ-STANZA #<CL-XMPP:CONNECTION to
shiva.guruza.com:5222 (open) {91462D9}>)
 12: ((SB-PCL::FAST-METHOD CL-XMPP:RECEIVE-STANZA
(CL-XMPP:CONNECTION)) #<unavailable argument> #<unavailable argument>
#<CL-XMPP:CONNECTION to shiva.guruza.com:5222 (open) {91462D9}> NIL)
 13: (SB-INT:EVAL-IN-LEXENV (CL-XMPP:RECEIVE-STANZA (GET-CONNECTION
20)) #<NULL-LEXENV>)



More information about the cl-xmpp-devel mailing list