caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Seeking feedback on Xmlm
@ 2008-01-18 22:54 Bünzli Daniel
  0 siblings, 0 replies; only message in thread
From: Bünzli Daniel @ 2008-01-18 22:54 UTC (permalink / raw)
  To: caml-list caml-list

Hello,

I plan to make some changes to Xmlm. While it has been downloaded  
approximatively a hundred time I never got any feedback on it (bots  
only ?). If anybody found any issues I'd be happy to know about them  
now.

I would also gladly take comments on the following points.

1.
I plan to remove the persistent cursor and the tree representation ('a  
Xmlm.tree and 'a Xmlm.cursor). From my experience 'a Xmlm.tree is  
awkward to pattern match on and more than once I found it much cleaner  
to input documents with the sequential interface into a custom data  
structure corresponding to the document's semantics. Besides while I  
really see the point of the zipper in the context in which it was  
invented (ui for a structured text editor) I wasn't \x13convinced by the  
use of the cursor to make "batch" tree processing hence I don't think  
it has its place at Xmlm's level. Finally using the sequential  
interface to input/output a custom tree representation is only a few  
lines of code and provided in the documentation's sample code [1]. By  
removing these types I hope Xmlm's users won't waste their time to  
reach to the same conclusions.

2.
Instead of throwing an exception the input function will return a  
value of type [ `Value of 'a | `Error of (int * int) * error ]. Since  
this will break backward compatibility, I'll take the opportunity to  
also change the 'error' type from a variant to a polymorphic one, for  
syntactic convenience.

3.
I will implement better xml namespace support. Currently Xmlm parses  
qualified names however the client has to maintain its own structure  
during parsing to know in which namespace he is. The idea is to add  
the boolean label ?expand_names to the input function. When set to  
true, you get expanded names instead of qualified names (an expanded  
name is a couple (uri, name) where uri is the namespace uri).  The  
output_of_* functions will have a label ~expanded_names to indicate  
that we will pass expanded names and xmlm will automatically take care  
of the rest (though to have pretty prefixes you'll have to process  
your names manually).

4.
As an external add-on I commited the file test/xhtml.ml containing a  
mapping from xhtml 1.1 entities to their corresponding utf-8 character  
sequence. This can be used to construct a function to resolve xhtml  
entities and hence get xhtml parsing at your fingertips.

This will be all for this new version. I hope this is the last time I  
break backward compatibility.

Best,

Daniel

[1] http://erratique.ch/software/xmlm/doc/Xmlm#ex




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-01-18 22:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-18 22:54 Seeking feedback on Xmlm Bünzli Daniel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).