Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cduce
cduce
Commits
83809d58
Commit
83809d58
authored
Oct 05, 2007
by
Pietro Abate
Browse files
[r2004-07-06 14:27:21 by afrisch] Empty log message
Original author: afrisch Date: 2004-07-06 14:27:22+00:00
parent
45f76e15
Changes
4
Hide whitespace changes
Inline
Side-by-side
types/builtin.ml
View file @
83809d58
...
...
@@ -174,19 +174,19 @@ unary_op_cst "string_of"
Value
.
string_latin1
(
Buffer
.
contents
b
)
);;
unary_op_
cst
"load_xml"
string
any
unary_op_
warning
"load_xml"
string
string_latin1
any
(
fun
v
->
Load_xml
.
load_xml
(
Value
.
get_string_latin1
v
));;
unary_op_
cst
"load_html"
string
Sequence
.
any
unary_op_
warning
"load_html"
string
string_latin1
Sequence
.
any
(
fun
v
->
Load_xml
.
load_html
(
Value
.
get_string_latin1
v
));;
unary_op_
cst
"load_file_utf8"
string
string
unary_op_
warning
"load_file_utf8"
string
string
_latin1
string
(
eval_load_file
~
utf8
:
true
);;
unary_op_
cst
"load_file"
string
string_latin1
unary_op_
warning
"load_file"
string
string_latin1
string_latin1
(
eval_load_file
~
utf8
:
false
);;
...
...
web/manual/expressions.xml
View file @
83809d58
...
...
@@ -447,10 +447,18 @@ file system; the argument gives the filename:</p>
load_xml %%e%%
]]>
</sample>
<p>
The argument to
<code>
load_xml
</code>
is a Latin1 string (the type
system will issue a warning if the argument is of type
<code>
String
</code>
but not
<code>
Latin1
</code>
, and an
exception might be raised at runtime).
</p>
<p>
If the support for netclient or curl is available, it is also
possible to fetch an XML file from an URL, e.g.:
<code>
load_xml "http://..."
</code>
.
<code>
load_xml "http://..."
</code>
. A special
<code>
string://
</code>
is always supported: the string following the scheme is parsed as it.
</p>
<p>
...
...
web/memento.xml
View file @
83809d58
...
...
@@ -59,16 +59,16 @@ _" character, starting by a capitalized letter or underscore.</li>
<br/>
<code>
not
</code>
: Bool -> Bool
</li>
<li>
Prefix:
<br/><code>
load_xml
</code>
:
Str
in
g
-> Any,
<br/><code>
load_html
</code>
:
Str
in
g
-> [ Any* ],
<br/><code>
load_file
</code>
:
Str
in
g
-> Latin1,
<br/><code>
load_file_utf8
</code>
:
Str
in
g
-> String,
<br/><code>
load_xml
</code>
:
Lat
in
1
-> Any,
<br/><code>
load_html
</code>
:
Lat
in
1
-> [ Any* ],
<br/><code>
load_file
</code>
:
Lat
in
1
-> Latin1,
<br/><code>
load_file_utf8
</code>
:
Lat
in
1
-> String,
<br/><code>
argv
</code>
: [] -> [ String* ],
<br/><code>
dump_to_file
</code>
:
Str
in
g
-> String -> [],
<br/><code>
dump_to_file_utf8
</code>
:
Str
in
g
-> String -> [],
<br/><code>
dump_to_file
</code>
:
Lat
in
1
-> String -> [],
<br/><code>
dump_to_file_utf8
</code>
:
Lat
in
1
-> String -> [],
<br/><code>
print_xml
</code>
: Any -> Latin1,
<br/><code>
print_xml_utf8
</code>
: Any -> String,
<br/><code>
print
</code>
:
Str
in
g
-> [],
<br/><code>
print
</code>
:
Lat
in
1
-> [],
<br/><code>
int_of
</code>
: String -> Integer,
<br/><code>
string_of
</code>
: Any -> Latin1,
<br/><code>
atom_of
</code>
: String -> Atom
...
...
web/site.cd
View file @
83809d58
...
...
@@ -68,12 +68,12 @@ type InlineText =
(* Recursive inclusion of XML files and verbatim text files *)
let load_include (
Str
in
g
-> [Any*])
let load_include (
Lat
in
1
-> [Any*])
name ->
(* let _ = print [ 'Loading ' !name '... \n' ] in *)
xtransform [ (load_xml name) ] with
|
<include
file=
(s
&
Str
in
g
)
>
[] -> load_include s
|
<include-verbatim
file=
(s
&
Str
in
g
)
>
[] -> load_file s
|
<include
file=
(s
&
Lat
in
1
)
>
[] -> load_include s
|
<include-verbatim
file=
(s
&
Lat
in
1
)
>
[] -> load_file s
(* Highlighting text between {{...}} *)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment