Re: XML write crash

Jan Wielemaker <[email protected]>
Newsgroups gmane.comp.ai.prolog.swi
Message-ID <[email protected]>
On 02/07/2014 11:01 PM, Alan Baljeu wrote:
> ERROR: [Thread 2] Assertion failed: sgml_write:fail
>    [32] backtrace(10) at c:/program files/pl/library/prolog_stack.pl:376
>    [31] prolog_debug:assertion_failed(fail,sgml_write:fail) at c:/program files/pl/library/debug.pl:303
> etc.

The etc. is where the interesting part starts :-)  Anyway, in this case
I can manage without as there is only one assertion(fail) in this library.

> This comes up when trying to write the term [value = '36785', value =
> '36786'] as element content. Now, I didn't actually want to write
> this, but there is also no documentation that I can see which
> restricts what might be used as element content.  Can anyone advise?

It is the inverse of the sgml/html/xml reading.  library(sgml) defines
the output.  It only is a bit more flexible wrt. input types.

> Anyway, it might be nice to put in a clearer message when write
> fails, because it's a beast to try to discern which element, or
> portion thereof, is the problem.

I replaced the assertion with a type error.

	Cheers --- Jan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.