-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathxml_writer.sig
33 lines (29 loc) · 1.13 KB
/
xml_writer.sig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
(* $Id$
*
* Copyright (c) 2008 Timothy Bourke (University of NSW and NICTA)
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the "BSD License" which is distributed with the
* software in the file LICENSE.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the BSD
* License for more details.
*)
signature XML_WRITER =
sig
type outstream
(* Augment the given writer so that it can translate characters
into the five predefined character entities:
< to < > to >
& to & " to " ' to '
when the mode is set to Data. *)
val mkWriter : TextPrimIO.writer -> TextPrimIO.writer
val mkOutstream : outstream -> outstream
(* Printing these strings through the writer changes the mode. In data mode,
characters are translated. In xml mode, no translation occurs. *)
val data : string
val xml : string
end