Permalink
Browse files

Remove the dependencies to netstring and pcre. Replacing by Str

  • Loading branch information...
1 parent 9cff48b commit 69e6cc9c3d01e7a4437bb5b34ab81b488bab9b39 @jpdeplaix jpdeplaix committed Jul 30, 2013
Showing with 5 additions and 6 deletions.
  1. +0 −1 README
  2. +1 −1 files/META.in
  3. +1 −1 lib/Makefile
  4. +3 −3 lib/xml.ml
View
1 README
@@ -26,7 +26,6 @@ allows a HTML compatible mode.
* ocaml and camlp4
* findlib
- * ocamlnet (for netstring-pcre)
[optionnal]
* ocamlduce
View
@@ -2,7 +2,7 @@ _LIBDIR_
description = "XHTML and HTML5 pages typed with polymorphic variants"
version = "dev"
-requires = "netstring pcre"
+requires = "str"
archive(byte) = "_LIBNAME_.cma"
archive(native) = "_LIBNAME_.cmxa"
View
@@ -13,7 +13,7 @@ DUCE_INTF := xml_sigs_duce.mli xhtml_types_duce.mli xml_print_duce.mli xhtml_du
DUCE_FILES := xml_print_duce.ml xhtml_duce.ml
-LIBS := -package netstring -package pcre
+LIBS :=
# SYNTAX := -ppopt ../syntax/pa_include.cmo -package camlp4 -syntax camlp4o
View
@@ -83,7 +83,7 @@ module M = struct
(as this string is to be considered as the end of the cdata)
*)
let s' = "\n<![CDATA[\n"^
- (Pcre.replace ~rex:(Pcre.regexp(Pcre.quote "]]>")) s)
+ (Str.global_replace (Str.regexp (Str.quote "]]>")) "" s)
^"\n]]>\n" in
encodedpcdata s'
@@ -92,7 +92,7 @@ module M = struct
(as this string is to be considered as the end of the cdata)
*)
let s' = "\n//<![CDATA[\n"^
- (Pcre.replace ~rex:(Pcre.regexp(Pcre.quote "]]>")) s)
+ (Str.global_replace (Str.regexp (Str.quote "]]>")) "" s)
^"\n//]]>\n" in
encodedpcdata s'
@@ -101,7 +101,7 @@ module M = struct
(as this string is to be considered as the end of the cdata)
*)
let s' = "\n/* <![CDATA[ */\n"^
- (Pcre.replace ~rex:(Pcre.regexp (Pcre.quote "]]>")) s)
+ (Str.global_replace (Str.regexp (Str.quote "]]>")) "" s)
^"\n/* ]]> */\n" in
encodedpcdata s'

0 comments on commit 69e6cc9

Please sign in to comment.