Yes, this is right.
Strange enough ssax gives me a warning on my valid (?!) xml-file. No other parsers complains, neither do xmllint.
Petter
Den 16. aug. 2008 kl. 14.33 skrev Mikael More:
That is both correct and not correct. It uses input-port-byte- position when generating an error response, not otherwise. It typically passes you errors in case you fed the deserializer with invalid XML. Here's an utility function to deserialize an XML string into SXML.
(define readxml (lambda (#!optional (namespace-prefix-assig "")) (lambda (port) (ssax:xml->sxml port namespace-prefix-assig))))
(define (xml-string->sxml s #!optional (namespace-prefix-assig "")) (call-with-input-string s (readxml namespace-prefix-assig)))
Though, I do admit that it would be nice if someone fixed SSAX-SXML in this respect.
M
2008/8/16 Hans Petter Egesund petter.egesund@gmail.com Hi, more on slow xml...
I can't get ssax to parse from a string, it seems the library is using input-port-byte-position which needs a device input port. So the attempt so slurp the file into memory, and then do the parsing ends here?!
I will tell if I come up with something interesting.
Petter
Gambit-list mailing list Gambit-list@iro.umontreal.ca https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
Gambit-list mailing list Gambit-list@iro.umontreal.ca https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list