Skip to content
GitLab
Menu
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
abaa1335
Commit
abaa1335
authored
Oct 05, 2007
by
Pietro Abate
Browse files
[r2003-12-04 21:20:39 by afrisch] Add support for netclient
Original author: afrisch Date: 2003-12-04 21:20:39+00:00
parent
b8230ce6
Changes
5
Show whitespace changes
Inline
Side-by-side
INSTALL
View file @
abaa1335
...
...
@@ -28,11 +28,19 @@ pxp => 1.9.94.2
Furthermore if you want to load xml, html, and schema files remotely on the
web (http, https, ftp, ...: e.g. load_html "http://www.cduce.org") you will
also need:
also need
either
:
ocurl => 0.15
http://sourceforge.net/projects/ocurl/
or
netclient => 0.90.1
http://www.ocaml-programming.de/programming/netclient.html
netclient support only the http protocol. curl supports in addition https,
ftp, and other protocols.
Important notes:
...
...
@@ -146,8 +154,12 @@ PXP_WLEX=false: use ocamllex for parsing UTF-8 XML files
EXPAT=true: build expat support (see below)
default: false
OCURL=true: build ocurl support
CURL=true: build ocurl support
default: false
NETCLIENT=true: build netclient support
default: false
(note: if the support for both CURL and NETCLIENT are included, curl is used)
PREFIX=/usr/local by default: where to install CDuce files (see
Makefile.conf)
...
...
Makefile.conf
View file @
abaa1335
...
...
@@ -14,7 +14,9 @@ PXP_WLEX = false
EXPAT
=
false
# use curl library for load remote xml files and schemas
CURL
=
true
CURL
=
false
NETCLIENT
=
true
# Installation directory
# cduce and dtd2cduce => $(PREFIX)/bin
...
...
Makefile.distrib
View file @
abaa1335
...
...
@@ -43,6 +43,11 @@ ifeq ($(CURL), true)
SYNTAX
+=
-symbol
CURL
=
endif
ifeq
($(NETCLIENT), true)
PACKAGES
+=
netclient
SYNTAX
+=
-symbol
NETCLIENT
=
endif
SYNTAX_PARSER
=
-syntax
camlp4o
$
(
SYNTAX:%
=
-ppopt
%
)
CAMLC_P
=
ocamlc
-g
...
...
depend
View file @
abaa1335
...
...
@@ -108,8 +108,8 @@ schema/schema_parser.cmx: misc/q_symbol.cmo misc/encodings.cmx types/intervals.c
runtime/value.cmx schema/schema_parser.cmi
parser/location.cmo: misc/q_symbol.cmo parser/location.cmi
parser/location.cmx: misc/q_symbol.cmo parser/location.cmi
parser/url.cmo: misc/q_symbol.cmo
parser/location.cmi
parser/url.cmi
parser/url.cmx: misc/q_symbol.cmo
parser/location.cmx
parser/url.cmi
parser/url.cmo: misc/q_symbol.cmo parser/url.cmi
parser/url.cmx: misc/q_symbol.cmo parser/url.cmi
parser/ulexer.cmo: misc/q_symbol.cmo parser/ulexer.cmi
parser/ulexer.cmx: misc/q_symbol.cmo parser/ulexer.cmi
parser/ast.cmo: misc/q_symbol.cmo types/builtin_defs.cmi types/chars.cmi types/ident.cmo \
...
...
parser/url.ml
View file @
abaa1335
...
...
@@ -14,9 +14,20 @@ ifdef CURL then
Curl
.
perform
conn
;
Buffer
.
contents
buff
else
ifdef
NETCLIENT
then
let
load_url
s
=
match
Neturl
.
extract_url_scheme
s
with
|
"http"
->
Http_client
.
Convenience
.
http_get
s
|
sc
->
let
msg
=
Printf
.
sprintf
"Error
\"
%s
\"
:
\n
for URLs you need to compile CDuce with CURL support"
s
Printf
.
sprintf
"Error: netclient does not handle the %s protocol"
sc
in
raise
(
Location
.
Generic
msg
)
else
let
load_url
s
=
let
msg
=
Printf
.
sprintf
"Error
\"
%s
\"
:
\n
To fetch external URLs, you need to compile CDuce with curl and/or netclient"
s
in
raise
(
Location
.
Generic
msg
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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