From jan@swi.psy.uva.nl  Tue Sep 12 13:29:04 2000
Received: from gollem.swi.psy.uva.nl (root@gollem [145.18.152.30])
	by swi.psy.uva.nl (8.9.3/8.9.3) with ESMTP id NAA22990;
	Tue, 12 Sep 2000 13:29:04 +0200 (MET DST)
Received: from localhost (localhost [[UNIX: localhost]])
	by gollem.swi.psy.uva.nl (8.9.3/8.9.3/SuSE Linux 8.9.3-0.1) id NAA03226;
	Tue, 12 Sep 2000 13:29:18 +0200
From: Jan Wielemaker <jan@swi.psy.uva.nl>
Organization: SWI, University of Amsterdam
To: Cecilia Wong <50000481@plink.cityu.edu.hk>, prolog@swi.psy.uva.nl
Subject: Re: about using assert_list in parsing RDF
Date: Tue, 12 Sep 2000 13:25:47 +0200
X-Mailer: KMail [version 1.0.28]
Content-Type: text/plain
References: <000c01c01ca0$30a21e90$4e14d690@cityu.edu.hk>
In-Reply-To: <000c01c01ca0$30a21e90$4e14d690@cityu.edu.hk>
MIME-Version: 1.0
Message-Id: <00091213291801.25569@gollem>
Content-Transfer-Encoding: 8bit

Cecilia,

[ first of all, please break long lines in messages to the list!
]

On Tue, 12 Sep 2000, Cecilia Wong wrote:

>    I am trying to use the RDF parser to parse a rdf file which is quite long.  I have managed to get rid of any error message, that I supposed to be successfully parsed my data. However, the returning triple list is truncated with something like, "rdf(..., ..., ...)|...] at the end of the list. Does anyone have an idea how can I redirect the resulting triples list into another text file?  Can the example,
>"assert_list([]).
>assert_list([H|T]) :-
> assert(H),
> assert_list(T)."
>be used in my case. Sorry, I am just getting started with it and I'm not so familiarized with Prolog. So, I am not sure if I can make use with the example to deal with my problem and where to put into those lines of the example?  Thank you very much in advance!

This is caused by the depth-limit of write_term/3 used to print answer
by the toplevel.  To print the tripples, use something like:

print_triples(Triples, File) :-
	open(File, write, Out),
	print_to_stream(Triples, Out),
	close(Out).

print_to_stream([], _).
print_to_stream([H|T], Out) :-
	format('~q.~n', [H]),
	print_to_stream(T, Out).

	Regards --- Jan

