77 |
@param msg The message to be displayed |
@param msg The message to be displayed |
78 |
*) |
*) |
79 |
method warn msg = |
method warn msg = |
80 |
(Env.getEnv())#err "xml import/export" msg 1 |
(Env.getEnv())#err "xml import" ("XML parser: " ^ msg) 1 |
81 |
|
|
82 |
end |
end |
83 |
|
|
89 |
*) |
*) |
90 |
class virtual ['a] xmlVisitor = |
class virtual ['a] xmlVisitor = |
91 |
object (this) |
object (this) |
92 |
inherit ['a] defaultVisitor |
inherit ['a] defaultVisitor as super |
|
|
|
|
(** |
|
|
Writes a message on the standard output. |
|
|
@param msg The message to be displayed. |
|
|
*) |
|
|
method private out msg = |
|
|
(Env.getEnv())#out "xml import/export" msg |
|
|
|
|
|
(** |
|
|
Writes a message on the error output. |
|
|
@param msg The message to be displayed. |
|
|
*) |
|
|
method private err msg = |
|
|
(Env.getEnv())#err "xml import/export" msg |
|
93 |
|
|
94 |
(** |
(** |
95 |
The XML file's header. Contains the DTD. |
The XML file's header. Contains the DTD. |
214 |
*) |
*) |
215 |
method setOverwriteFile newval = |
method setOverwriteFile newval = |
216 |
_overwriteFile <- newval; |
_overwriteFile <- newval; |
217 |
this#out "file overwriting enabled" 4 |
this#out "file overwriting enabled." 4 |
218 |
|
|
219 |
(** |
(** |
220 |
The out_channel used to dump the neural network. stdout is actually |
The out_channel used to dump the neural network. stdout is actually |
369 |
this#write ("<err_channel>" ^ (env#string_of_channel env#getOutChannel) ^ "</err_channel>"); |
this#write ("<err_channel>" ^ (env#string_of_channel env#getOutChannel) ^ "</err_channel>"); |
370 |
this#closeTag "env"; |
this#closeTag "env"; |
371 |
in |
in |
372 |
this#out ("Dumping neural network to XML as `" ^ _fileName ^ "\'.") 3; |
this#out ("Dumping neural network to XML as `" ^ _fileName ^ "\' ...") 3; |
373 |
this#out ("Checking whether writing `" ^ _fileName ^ "\' is possible/enabled ...") 5; |
this#out ("Checking whether writing `" ^ _fileName ^ "\' is possible/enabled ...") 5; |
374 |
if (Sys.file_exists _fileName & not _overwriteFile) then |
if (Sys.file_exists _fileName & not _overwriteFile) then |
375 |
raise FileExists; |
raise FileExists; |