diff -Nru xmlm-1.1.1/CHANGES xmlm-1.2.0/CHANGES --- xmlm-1.1.1/CHANGES 2012-08-05 14:02:20.000000000 +0000 +++ xmlm-1.2.0/CHANGES 1970-01-01 00:00:00.000000000 +0000 @@ -1,56 +0,0 @@ -v1.1.1 2012-08-05 Lausanne --------------------------- - -- OASIS 0.3.0 support. - - -v1.1.0 2012-03-16 La Forclaz (VS) ---------------------------------- - -- OASIS support. -- Fixes a bug in the UTF-16 decoder. -- Fixes a bug in `Xmlm.make_output` with a custom function. Thanks to - Konstantinas Myalo for the report and the patch. -- New optional argument `decl` to `Xmlm.make_output` to control whether the - XML declaration should be output. -- New function `Xmlm.output_depth`, returns the current element nesting level. - - -v1.0.2 2009-11-11 大足县 ------------------------ - -- Replaced a (non tail-recursive) use of `List.map`. - - -v1.0.1 2008-08-01 Lausanne ----------------------------- - -- POSIX compliant build shell script (thanks to Michael D Ekstrand). -- Support for Debian packaging. - - -v1.0.0 2008-03-17 Lausanne ----------------------------- - -## New features: -- Streaming IO api with support to IO arborescent data structures. -- Proper XML namespace support, all names are expanded names. -- Whitespace stripping respects the xml:space attributes. -- Xmlm.Make functor to use other types for strings and internal buffers. -- UTF-8 encoded documents can start with an UTF-8 encoded BOM. - -## Incompatible changes: -- `Xmlm.encoding` becomes a polymorphic variant. -- `Xmlm.error` becomes a polymorphic variant and the "E_" prefix is dropped. -- Removed the callback api. -- Removed the tree and cursor api. - -## Other: -- `test/xhtml.ml` has a mapping from XHTML entities to their UTF-8 sequence. -- Build system switched from make to ocamlbuild - - -v0.9.0 2007-02-26 Lausanne --------------------------- - -- First release. diff -Nru xmlm-1.1.1/CHANGES.md xmlm-1.2.0/CHANGES.md --- xmlm-1.1.1/CHANGES.md 1970-01-01 00:00:00.000000000 +0000 +++ xmlm-1.2.0/CHANGES.md 2013-09-06 16:29:13.000000000 +0000 @@ -0,0 +1,68 @@ +v1.2.0 2013-09-06 Cambridge (UK) +-------------------------------- + +- `Xmlm.output`, illegal XML Unicode characters in [`Data] signals or + attribute values are output as U+FFFD (thanks to David Sheets for + insisting that something should be done about that). +- Deprecate the ability to IO multiple documents from the same + IO abstraction. +- Deprecate the functorial interface. +- OPAM friendly workflow and drop OASIS support. + + +v1.1.1 2012-08-05 Lausanne +-------------------------- + +- OASIS 0.3.0 support. + + +v1.1.0 2012-03-16 La Forclaz (VS) +--------------------------------- + +- OASIS support. +- Fixes a bug in the UTF-16 decoder. +- Fixes a bug in `Xmlm.make_output` with a custom function. Thanks to + Konstantinas Myalo for the report and the patch. +- New optional argument `decl` to `Xmlm.make_output` to control whether the + XML declaration should be output. +- New function `Xmlm.output_depth`, returns the current element nesting level. + + +v1.0.2 2009-11-11 大足县 +----------------------- + +- Replaced a (non tail-recursive) use of `List.map`. + + +v1.0.1 2008-08-01 Lausanne +---------------------------- + +- POSIX compliant build shell script (thanks to Michael D Ekstrand). +- Support for Debian packaging. + + +v1.0.0 2008-03-17 Lausanne +---------------------------- + +## New features: +- Streaming IO api with support to IO arborescent data structures. +- Proper XML namespace support, all names are expanded names. +- Whitespace stripping respects the xml:space attributes. +- Xmlm.Make functor to use other types for strings and internal buffers. +- UTF-8 encoded documents can start with an UTF-8 encoded BOM. + +## Incompatible changes: +- `Xmlm.encoding` becomes a polymorphic variant. +- `Xmlm.error` becomes a polymorphic variant and the "E_" prefix is dropped. +- Removed the callback api. +- Removed the tree and cursor api. + +## Other: +- `test/xhtml.ml` has a mapping from XHTML entities to their UTF-8 sequence. +- Build system switched from make to ocamlbuild + + +v0.9.0 2007-02-26 Lausanne +-------------------------- + +- First release. diff -Nru xmlm-1.1.1/debian/changelog xmlm-1.2.0/debian/changelog --- xmlm-1.1.1/debian/changelog 2013-12-03 07:42:59.000000000 +0000 +++ xmlm-1.2.0/debian/changelog 2014-03-27 19:48:41.000000000 +0000 @@ -1,3 +1,16 @@ +xmlm (1.2.0-1) unstable; urgency=medium + + [ Johannes Schauer ] + * Team upload. + * Imported Upstream version 1.2.0 + * Change debian/rules to accommodate for build system change + * build man page for xmltrip with help2man + * README -> README.md + * bump standards version to 3.9.5 + * install upstream CHANGES.md + + -- Mehdi Dogguy Thu, 27 Mar 2014 20:48:41 +0100 + xmlm (1.1.1-3) unstable; urgency=low * Team upload diff -Nru xmlm-1.1.1/debian/clean xmlm-1.2.0/debian/clean --- xmlm-1.1.1/debian/clean 1970-01-01 00:00:00.000000000 +0000 +++ xmlm-1.2.0/debian/clean 2014-03-27 19:48:41.000000000 +0000 @@ -0,0 +1 @@ +xmltrip.1 diff -Nru xmlm-1.1.1/debian/control xmlm-1.2.0/debian/control --- xmlm-1.1.1/debian/control 2013-07-26 07:42:18.000000000 +0000 +++ xmlm-1.2.0/debian/control 2014-03-27 19:48:41.000000000 +0000 @@ -10,8 +10,9 @@ debhelper (>= 8), ocaml-nox (>= 4), ocaml-findlib (>= 1.4), - dh-ocaml (>= 0.9) -Standards-Version: 3.9.3 + dh-ocaml (>= 0.9), + help2man +Standards-Version: 3.9.5 Homepage: http://erratique.ch/software/xmlm Vcs-Git: git://anonscm.debian.org/pkg-ocaml-maint/packages/xmlm.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-ocaml-maint/packages/xmlm.git diff -Nru xmlm-1.1.1/debian/libxmlm-ocaml-dev.docs xmlm-1.2.0/debian/libxmlm-ocaml-dev.docs --- xmlm-1.1.1/debian/libxmlm-ocaml-dev.docs 2013-07-26 07:41:58.000000000 +0000 +++ xmlm-1.2.0/debian/libxmlm-ocaml-dev.docs 2014-03-27 19:48:41.000000000 +0000 @@ -1,2 +1,2 @@ -README +README.md doc diff -Nru xmlm-1.1.1/debian/libxmlm-ocaml-dev.manpages xmlm-1.2.0/debian/libxmlm-ocaml-dev.manpages --- xmlm-1.1.1/debian/libxmlm-ocaml-dev.manpages 1970-01-01 00:00:00.000000000 +0000 +++ xmlm-1.2.0/debian/libxmlm-ocaml-dev.manpages 2014-03-27 19:48:41.000000000 +0000 @@ -0,0 +1 @@ +xmltrip.1 diff -Nru xmlm-1.1.1/debian/rules xmlm-1.2.0/debian/rules --- xmlm-1.1.1/debian/rules 2013-07-26 07:41:58.000000000 +0000 +++ xmlm-1.2.0/debian/rules 2014-03-27 19:48:41.000000000 +0000 @@ -4,32 +4,43 @@ DESTDIR=$(CURDIR)/debian/tmp include /usr/share/ocaml/ocamlvars.mk OCAMLFIND_DESTDIR=$(DESTDIR)/$(OCAML_STDLIB_DIR) -export OCAMLFIND_DESTDIR + +libtarget = xmlm.cma xmlm.cmi +ifeq ($(OCAML_HAVE_OCAMLOPT),yes) + xmltrip = ./xmltrip.native + libtarget += xmlm.a xmlm.cmxa xmlm.cmx xmlm.cmxs +else + xmltrip = ./xmltrip.byte +endif +libloc = $(addprefix ./_build/src/,$(libtarget)) %: dh $@ --with ocaml -.PHONY: override_dh_auto_configure -override_dh_auto_configure: - ocaml setup.ml -configure --prefix /usr --destdir '$(DESTDIR)' --enable-tests - .PHONY: override_dh_auto_build override_dh_auto_build: - ocaml setup.ml -build + ocamlbuild -classic-display $(libtarget) $(xmltrip) + help2man --no-info --version-string=1.2.0 \ + --name "XML round trip: parses XML files and prints them" \ + $(xmltrip) > xmltrip.1 -.PHONY: override_dh_auto_test -override_dh_auto_test: - ocaml setup.ml -test +.PHONY: override_dh_auto_clean +override_dh_auto_clean: + ocamlbuild -classic-display -clean .PHONY: override_dh_auto_install override_dh_auto_install: - mkdir -p '$(OCAMLFIND_DESTDIR)' - ocaml setup.ml -install + mkdir -p '$(OCAMLFIND_DESTDIR)/xmlm' + cp $(libloc) '$(OCAMLFIND_DESTDIR)/xmlm' + cp src/xmlm.mli '$(OCAMLFIND_DESTDIR)/xmlm' + cp pkg/META '$(OCAMLFIND_DESTDIR)/xmlm' + mkdir -p '$(DESTDIR)/usr/bin' + cp $(xmltrip) '$(DESTDIR)/usr/bin/xmltrip' + +.PHONY: override_dh_installchangelogs +override_dh_installchangelogs: + dh_installchangelogs CHANGES.md .PHONY: override_dh_install override_dh_install: dh_install --fail-missing - -.PHONY: override_dh_auto_clean -override_dh_auto_clean: - ocaml setup.ml -distclean diff -Nru xmlm-1.1.1/doc/index.html xmlm-1.2.0/doc/index.html --- xmlm-1.1.1/doc/index.html 2012-08-05 14:02:29.000000000 +0000 +++ xmlm-1.2.0/doc/index.html 2013-09-06 16:29:14.000000000 +0000 @@ -23,7 +23,7 @@

Xmlm
-Streaming XML IO. +Streaming XML codec.
diff -Nru xmlm-1.1.1/doc/index_modules.html xmlm-1.2.0/doc/index_modules.html --- xmlm-1.1.1/doc/index_modules.html 2012-08-05 14:02:29.000000000 +0000 +++ xmlm-1.2.0/doc/index_modules.html 2013-09-06 16:29:14.000000000 +0000 @@ -24,7 +24,7 @@
X Xmlm
-Streaming XML IO. +Streaming XML codec.
diff -Nru xmlm-1.1.1/doc/index_values.html xmlm-1.2.0/doc/index_values.html --- xmlm-1.1.1/doc/index_values.html 2012-08-05 14:02:29.000000000 +0000 +++ xmlm-1.2.0/doc/index_values.html 2013-09-06 16:29:14.000000000 +0000 @@ -81,7 +81,7 @@ input_doc_tree [Xmlm]
-Same as Xmlm.input_tree but reads a complete well-formed +Same as Xmlm.input_tree but reads a complete well-formed sequence of signals.
@@ -181,7 +181,7 @@ output_doc_tree [Xmlm]
-Same as Xmlm.output_tree but outputs a complete well-formed +Same as Xmlm.output_tree but outputs a complete well-formed sequence of signals.
diff -Nru xmlm-1.1.1/doc/style.css xmlm-1.2.0/doc/style.css --- xmlm-1.1.1/doc/style.css 2012-08-05 14:02:20.000000000 +0000 +++ xmlm-1.2.0/doc/style.css 2013-09-06 16:29:13.000000000 +0000 @@ -12,10 +12,10 @@ table { border-collapse: collapse; border-spacing: 0; } -/* Basic page layout using the user's preferred font sizes */ +/* Basic page layout */ -body { font: normal 1em/1.375em helvetica, arial, sans-serif; text-align:left; - margin: 1.375em 10%; min-width: 40ex; max-width: 70ex; +body { font: normal 10pt/1.375em helvetica, arial, sans-serif; text-align:left; + margin: 1.375em 10%; min-width: 40ex; max-width: 72ex; color: black; background: transparent /* url(line-height-22.gif) */; } b { font-weight: bold } @@ -24,6 +24,7 @@ tt, code, pre { font-family: WorkAroundWebKitAndMozilla, monospace; font-size: 1em; } pre code { font-size : inherit; } +.codepre { margin-bottom:1.375em /* after code example we introduce space. */ } .superscript,.subscript { font-size : 0.813em; line-height:0; margin-left:0.4ex;} @@ -32,16 +33,15 @@ /* ocamldoc markup workaround hacks */ + + hr, hr + br, div + br, center + br, span + br, ul + br, ol + br, pre + br { display: none } /* annoying */ -code br { display: inline } /* because of the above span + br rule */ -pre + code { white-space:nowrap; /* in code examples we don't wrap. */ - line-height:1.375em; } /* and the line height is too large. */ -code + pre { margin-bottom:1.375em} /* after code example we introduce space. */ -center { text-align: left } -center + br + pre { margin-bottom:1.375em} /* Toplevel module description */ -div.info + br + code { display:block; margin-top: 1.375em} /* Records */ +div.info + br { display:block} + +.codepre br + br { display: none } +h1 + pre { margin-bottom:1.375em} /* Toplevel module description */ /* Sections and document divisions */ @@ -92,6 +92,9 @@ .paramstable code { margin-left: 1ex; margin-right: 1ex } .sig_block {margin-left: 1em} +/* Images */ + +img { margin-top: 1.375em } diff -Nru xmlm-1.1.1/doc/Xmlm.Buffer.html xmlm-1.2.0/doc/Xmlm.Buffer.html --- xmlm-1.1.1/doc/Xmlm.Buffer.html 2012-08-05 14:02:29.000000000 +0000 +++ xmlm-1.2.0/doc/Xmlm.Buffer.html 2013-09-06 16:29:14.000000000 +0000 @@ -20,7 +20,9 @@  Next

Module type Xmlm.Buffer

-
module type Buffer = sig .. end
Input signature for internal buffers.
+
module type Buffer = sig .. end
+Input signature for internal buffers.
+

type string 
diff -Nru xmlm-1.1.1/doc/Xmlm.html xmlm-1.2.0/doc/Xmlm.html --- xmlm-1.1.1/doc/Xmlm.html 2012-08-05 14:02:29.000000000 +0000 +++ xmlm-1.2.0/doc/Xmlm.html 2013-09-06 16:29:14.000000000 +0000 @@ -13,7 +13,7 @@ - + @@ -28,10 +28,11 @@

Module Xmlm

-
module Xmlm: sig .. end
Streaming XML IO. +
module Xmlm: sig .. end
+Streaming XML codec.

- A well-formed sequence of signals represents an + A well-formed sequence of signals represents an XML document tree traversal in depth first order (this has nothing to do with XML well-formedness). Input pulls a well-formed sequence of signals @@ -40,14 +41,14 @@ transform sequences of signals to/from arborescent data structures.

- Consult the features and limitations and examples + Consult the features and limitations and examples of use.

- Release 1.1.1 - Daniel Bünzli <daniel.buenzli at erratique.ch> + Release 1.2.0 — Daniel Bünzli <daniel.buenzl i@erratique.ch>

-

References

+

References


+


-

Basic types and values


+

Basic types and values


type encoding = [ `ISO_8859_1 | `US_ASCII | `UTF_16 | `UTF_16BE | `UTF_16LE | `UTF_8 ] 
The type for character encodings. For `UTF_16, endianness is @@ -96,9 +98,9 @@
The type for signals. A well-formed sequence of signals belongs to the language of the doc grammar : - doc ::= `Dtd tree
+
doc ::= `Dtd tree
tree ::= `El_start child `El_end
-child ::= `Data | tree | epsilon 
+child ::= `Data | tree | epsilon 
Input and output deal only with well-formed sequences or exceptions are raised.
@@ -112,7 +114,7 @@ reserved "xmlns" prefix.

-

Input


+

Input


type pos = int * int 
The type for input positions. Line and column number, both start @@ -147,24 +149,27 @@
val make_input : ?enc:encoding option ->
?strip:bool ->
?ns:(string -> string option) ->
?entity:(string -> string option) -> source -> input
Returns a new input abstraction reading from the given source.
    -
  • enc, character encoding of the document, details. +
  • enc, character encoding of the document, details. Defaults to None.
  • -
  • strip, strips whitespace in character data, details. +
  • strip, strips whitespace in character data, details. Defaults to false.
  • ns is called to bind undeclared namespace prefixes, - details. Default returns always None.
  • + details. Default returns always None.
  • entity is called to resolve non predefined entity references, - details. Default returns always None.
  • + details. Default returns always None.

val input : input -> signal
Inputs a signal. Repeated invocation of the function with the same - input abstraction will generate a well-formed sequence + input abstraction will generate a well-formed sequence of signals or an Xmlm.Error is raised. Furthermore there will be no two consecutive `Data signals in the sequence and their string - is always non empty. After a well-formed sequence was input another may - be input, see Xmlm.eoi and details. + is always non empty. +

+ + Deprecated After a well-formed sequence was input another may + be input, see Xmlm.eoi and details.

Raises Xmlm.Error on input errors.
@@ -193,7 +198,7 @@ if the next signal is not `El_start or `Data.

val input_doc_tree : el:(tag -> 'a list -> 'a) ->
data:(string -> 'a) -> input -> dtd * 'a
-Same as Xmlm.input_tree but reads a complete well-formed +Same as Xmlm.input_tree but reads a complete well-formed sequence of signals.

@@ -207,7 +212,7 @@ Raises Xmlm.Error on input errors.

val eoi : input -> bool
-Returns true if the end of input is reached. See details. +Returns true if the end of input is reached. See details.

Raises Xmlm.Error on input errors.
@@ -216,7 +221,7 @@ Current position in the input abstraction.


-

Output


+

Output


type 'a frag = [ `Data of string | `El of tag * 'a list ] 
The type for deconstructing data structures of type 'a.
@@ -241,20 +246,23 @@
  • nl, if true a newline is output when the root's element `El_end signal is output. Defaults to false.
  • -
  • indent, identation behaviour, see details. Defaults to +
  • indent, identation behaviour, see details. Defaults to None.
  • ns_prefix, undeclared namespace prefix bindings, - see details. Default returns always None.
  • + see details. Default returns always None.
    val output : output -> signal -> unit
    -Outputs a signal. After a well-formed sequence of signals was - output a new well-formed sequence can be output. +Outputs a signal. +

    + + Deprecated. After a well-formed sequence of signals was output + a new well-formed sequence can be output.

    Raises Invalid_argument if the resulting signal sequence on - the output abstraction is not well-formed or if a + the output abstraction is not well-formed or if a namespace name could not be bound to a prefix.

    val output_depth : output -> int
    @@ -269,14 +277,18 @@ Raises see Xmlm.output.
    val output_doc_tree : ('a -> 'a frag) -> output -> dtd * 'a -> unit
    -Same as Xmlm.output_tree but outputs a complete well-formed +Same as Xmlm.output_tree but outputs a complete well-formed sequence of signals.

    Raises see Xmlm.output.


    -

    Functorial interface

    +

    Functorial interface (deprecated)

    +

    + + WARNING. The functioral interface is deprecated and will be + removed.

    Xmlm.Make allows client to specify types for strings and internal @@ -297,18 +309,18 @@ Output signature of Xmlm.Make.

    module Make: 
    functor (String : String) ->
    functor (Buffer : Buffer with type string = String.t) -> S -with type string = String.t
    + with type string = String.t
    Functor building streaming XML IO with the given strings and buffers.

    -

    Features and limitations

    +

    Features and limitations

    The module assumes strings are immutable, thus strings the client gives or receives during the input and output process must not be modified. -

    Input

    -

    Encoding

    +

    Input

    +

    Encoding

    The parser supports ASCII, US-ASCII, @@ -318,7 +330,7 @@ UTF-16BE and ISO-8559-1 (Latin-1) encoded documents. But strings returned by - the library are always UTF-8 encoded (unless you use the functor). + the library are always UTF-8 encoded.

    The encoding can be specified explicitly using the optional @@ -327,7 +339,7 @@ beginning of the document. If there is no BOM it uses the encoding specified in the XML declaration. Finally, if there is no XML declaration UTF-8 is assumed. -

    White space handling

    +

    White space handling

    The parser performs @@ -346,10 +358,10 @@ false all white space data is preserved as present in the document (however all kinds of line ends are - translated to the newline character (U+000A).

    Namespaces

    + translated to the newline character (U+000A).

    Namespaces

    - Xmlm's names are + Xmlm's names are expanded names. The parser automatically handles the document's namespace declarations. Undeclared namespace prefixes can be bound via the @@ -369,19 +381,26 @@ prefixes by documents, the parser does not report errors on violations of the must constraints listed in this paragraph. -

    Character and entity references

    +

    + +

    Character and entity references

    Character references and predefined entities are automatically resolved. Other entity references can be resolved by the callback entity, which must return an UTF-8 - (unless you use the functor) string corresponding to the + string corresponding to the replacement character data. The replacement data is not analysed for further references, it is added to the data as such modulo white space stripping. If entity returns None the error `Unknown_entity_ref is returned. -

    Sequences of documents

    +

    + +

    Sequences of documents (deprecated)

    +

    + + WARNING. This feature is deprecated and will be removed.

    When a well-formed sequence of signals is input, no data is consumed beyond @@ -407,7 +426,7 @@ encoding as for the previous document is used.

    -

    Miscellaneous

    +

    Miscellaneous