latest version of ocaml and its framework. Discussed on packages@ and
OK'd by jperkin.
Changes include:
1.2.8: Build against ocamlnet-4.1. Support -safe-string
1.2.7: tweaking support for oasis.
1.2.6: Adding _oasis file.
1.2.5: Build against ocamlnet-4.
1.2.4: Fixed bug in namespace-aware parsing (thanks to ygrek and Thomas
Leonard)
Problems found locating distfiles:
Package cabocha: missing distfile cabocha-0.68.tar.bz2
Package convertlit: missing distfile clit18src.zip
Package php-enchant: missing distfile php-enchant/enchant-1.1.0.tgz
Otherwise, existing SHA1 digests verified and found to be the same on
the machine holding the existing distfiles (morden). All existing
SHA1 digests retained for now as an audit trail.
adding license, making native code support conditional on the architecture as
in other OCaml packages and adding PLIST_VARS support.
Changelog (excluding bugfixes and changes to deal with new versions of other
packages):
- 1.2.1: Revised documentation
Addition: Pxp_event.unwrap_document
Addition: Pxp_dtd.Entity.lookup
Addition: node method entity_id
Addition: Pxp_event.close_entities
Removed: Pxp_core_types_type, Pxp_type_anchor. Pxp_core_types has now three
submodules A, S, I taking over the roles
Removed: E_pinstr_member. Instead, E_pinstr events are emitted
Renaming, and addition: `Entry_content has been renamed to
`Entry_element_content. A new `Entry_content with different semantics has
been added, now conforming to a standard production.
Improvement: The parser also accepts a BOM as UTF-8 sequence. Also, the
autodetection of the encoding for UTF-16 has been enhanced
- 1.2.0test*: New ~minimization option for the [write] and [display] methods
(user wish).
Improvement: better control what is printed as DTD for document#write and
#display
- 1.1.95: Addition of ulex lexing.
Revised namespace handling: There are now namespace_scope objects keeping
the scoping structure of the namespaces. The namespace_info stuff has been
removed. The "display" methods can print XML while respecting the scoping
structure.
New exceptions Namespace_not_managed, Namespace_prefix_not_managed,
Namespace_not_in_scope (all replacing Not_found). Methods of
namespace_manager may raise these exceptions.
The event-based representation of XML is now symmetrical to the tree-based
representation, such that it is possible to convert one representation into
the other without loss. The type of events had to be changed to achieve
this effect.
The new module Pxp_event contains functions for the event-based
representation.
Addition of pxp-pp, the PXP preprocessor.
- 1.1.94: The Pxp_reader module has been completely rewritten. This fixes some
problems with relative URLs. - Pxp_yacc has been split up into four modules:
Pxp_tree_parser contains now the parser API returning object trees,
Pxp_dtd_parser is the parser API returning DTDs, Pxp_ev_parser is the
event-based API, and Pxp_core_parser is the core of the parser. Pxp_yacc is
still available as compatibility API. As part of the module redesign,
Pxp_types includes now parts of its interface from Pxp_core_types_type. I
hope this style of programming is comprehensible. - The event-based parser
can now preprocess namespaces.
Furthermore, there are normalization filters.
- 1.1.92: The whole lexing stuff has been restructured. There is a new tool,
lexpp, that generates the lexers from only five files. Furthermore, much
more 8 bit character sets are now supported as internal encodings. In
previous versions of PXP, the internal representation of the XML trees was
restricted to either UTF-8 or ISO-8859-1. Now, a number of additional
encodings are supported, including the whole ISO-8859 series.
- 1.1.91: The curly braces can now even be used inside attributes, and escape
from normal XML parsing.
There is a new entry point Entry_expr for event-based parsing that expects
either a single element, a single processing instruction, or a single
comment, or whitespace. This allows more fine-grained control of what is
parsed.
There is now a "pull parser". In contrast to the "push parser" introduced in
1.1.90, the calling order of parser and parser user have been inverted, i.e.
the user calls the parser to get ("pull") the next event instead of letting
the parser call back a user function ("push"). An interesting application is
that O'Caml's lazy streams can be used to analyze events. An example can be
found in examles/pullparser.
- 1.1.90: This version introduces a new event-based interface in Pxp_yacc. For
start tags, end tags, data strings, and several other things that are found
in the XML source so-called events are generated, and a user function is
called for every event. See the directory examples/eventparser for examples.
Another innovation is support for curly braces as escape characters. Inside
elements, the left curly brace escapes from XML parsing and starts a foreign
parser until the matching right curly brace is found:
<element> ... { foreign syntax } ... </element>
The curly braces are borrowed from the XQuery draft standard. They cannot
yet be used inside attribute values. Curly braces are mostly useful in
conjunction with event-based parsing, because it is not yet possible to
include the "value" of the curly brace expression into XML trees.
It is even possible to call the XML parser from the foreign parser as
subparser. However, there not yet enough entry points for the event-based
parser (e.g. you cannot parse just the following processing instruction,
only misc* element misc* or whole documents are possible).
PXP is a validating XML parser for O'Caml. It strictly complies to
the XML-1.0 standard.
The parser is simple to call, usually only one statement (function
call) is sufficient to parse an XML document and to represent it
as object tree.
Once the document is parsed, it can be accessed using a class
interface. The interface allows arbitrary access including
transformations. One of the features of the document representation
is its polymorphic nature; it is simple to add custom methods to
the document classes. Furthermore, the parser can be configured
such that different XML elements are represented by objects created
from different classes. This is a very powerful feature, because
it simplifies the structure of programs processing XML documents.
Note that the class interface does not comply to the DOM standard.
It was not a development goal to realize a standard API (industrial
developers can this much better than I); however, the API is powerful
enough to be considered as equivalent with DOM. More important,
the interface is compatible with the XML information model required
by many XML-related standards.