Using CLOCC xml.lisp to print XML in XML format 
Author Message
 Using CLOCC xml.lisp to print XML in XML format

I'm having an interesting problem using xml.lisp from CLOCC.

I just installed a very recent CLOCC/CLLIB snapshot, using the
precompiled CLISP 2.29 for Windows:
GNU CLISP 2.29 (released 2002-07-25) (built 3236982455) (memory
3237901292)
Features:
(CLOS LOOP COMPILER CLISP ANSI-CL COMMON-LISP LISP=CL INTERPRETER
SOCKETS GENERIC-STREAMS LOGICAL-PATHNAMES SCREEN FFI UNICODE
BASE-CHAR=CHARACTER SYSCALLS DIR-KEY WIN32)

I'm running it in -ansi mode. The OS is Windows 98.

I used the "lisp only" compile instructions for CLOCC, no problems.

Here we go. Assume a really simple XML document (i called it
"test2.xml"):

<?xml version="1.0" encoding="UTF-8"?>
<!--Simple XML document for practicing on-->
<a><b>test</b></a>

And also assume a real simple lisp program:

(load "clocc.lisp")
(eval-when (compile load eval)
  (require :cllib-xml  #p"clocc:src;cllib;xml"))
(defvar xml (cllib:xml-read-from-file "test2.xml"))
(let ((cllib:*xml-print-xml* :sgml)) (print xml))

The (print xml) gives me a SIGSEGV. Here's the full output:

[CLLIB:WITH-XML-FILE]
 * [C:\clisp\clocc\src\cllib\entities.xml 20,741 bytes]...done
[entities(%/&): 0/251] [bytes: 20,741] [run: 0.550 sec] [real: 0.550
sec]
[CLLIB:WITH-XML-FILE]
 * [test2.xml 106 bytes]...done [entities(%/&): 0/251] [bytes: 106]
[run: 0.600 sec] [real: 0.600 sec]
 * new XML name: "a"
 * new XML name: "b"

*** - handle_fault error2 ! address = 0xF8090067 not in
[0x5E35C2E0,0x5E380000)
!
SIGSEGV cannot be cured. Fault address = 0xF8090067.

If i set *xml-print-xml* to :readably instead of :sgml, i get this
error:

*** - Program stack overflow. RESET
[1]>

If, instead of
(let ((cllib::*xml-print-xml* :sgml)) (print xml))
i do
(let ((cllib::*xml-print-xml* :sgml)) (dolist (elem xml) (print
elem)))

(that is, printing one element at a time instead of trying to print
the whole document), then i do get an xml printout, as expected (but
this doesn't cure the stack overflow problem with :readably).

I'd appreciate any ideas or pointers.

Thank you very much.

glauber



Sat, 29 Jan 2005 21:49:34 GMT  
 Using CLOCC xml.lisp to print XML in XML format
For the record, this turned out to be a CLISP problem. The newest
sources from CVS (after the 2.29 release) fix it.

g

Quote:

> I'm having an interesting problem using xml.lisp from CLOCC.
[...]

> *** - handle_fault error2 ! address = 0xF8090067 not in
> [0x5E35C2E0,0x5E380000)
> !
> SIGSEGV cannot be cured. Fault address = 0xF8090067.

[...]


Mon, 31 Jan 2005 20:06:14 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Validating XML-parser using XML Schema?

2. Anyone using CL-XML(a xml parser)?

3. VW:XML - XML w/o DTD, how to add a DTDDocument

4. Validation with XML Schemas with Clarion 5.5 and Microsoft XML Parser 4.0

5. XML SIG meeting Tuesday 24 August 1999: Elliotte Rusty Harold speaks on XML

6. New Python/XML column on xml.com

7. XML SIG meeting Tuesday 24 August 1999: Elliotte Rusty Harold speaks on XML

8. XML Schema and XML Script

9. XML, Python, XML-SIG, documentation, PyXml, 4

10. how to save xml (create with fuctions in xml.dom.minidom

11. may any one post an example for xml which use method appendchild(xml)

12. XML to SQL or XML into Tables SomeHow

 

 
Powered by phpBB® Forum Software