<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE message PUBLIC
  "-//MLarc//DTD MLarc output files//EN"
  "../../mlarc.dtd"[
  <!ATTLIST message
    listname CDATA #REQUIRED
    title CDATA #REQUIRED
  >
]>

  <?xml-stylesheet href="../../mlarc.xsl" type="text/xsl"?>


<message 
  url="2002/07/5478ade2356480a6560d0e146e89d82a"
  from="Alessandro Baretta &lt;alex@b...&gt;"
  author="Alessandro Baretta"
  date="2002-07-04T22:37:20"
  subject="Re: [Caml-list] XML, XSL, eXcetera"
  prev="2002/07/da9c64efeb1382bf9af0bec89e67a2d5"
  next="2002/07/efbccf2948fc97802e181fc5bfd67f65"
  prev-in-thread="2002/07/da9c64efeb1382bf9af0bec89e67a2d5"
  next-in-thread="2002/07/b97a84514d31d180e34e1f35f8f36992"
  prev-thread="2002/07/a953a7886e03a4bf3b4720f57360714c"
  next-thread="2002/07/bdd946e270849705a3a7e2f39ff61625"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="Re: [Caml-list] XML, XSL, eXcetera">
<msg 
  url="2002/07/742672565244316ae0d90aeefcf7d334"
  from="forsyth@c..."
  author="forsyth@c..."
  date="2002-07-04T08:45:18"
  subject="Re: [Caml-list] XML, XSL, eXcetera">
<msg 
  url="2002/07/3de4e7a22cc0c59c1c912dc2ff2c6cc9"
  from="Alessandro Baretta &lt;alex@b...&gt;"
  author="Alessandro Baretta"
  date="2002-07-04T18:37:17"
  subject="Re: [Caml-list] XML, XSL, eXcetera">
<msg 
  url="2002/07/da9c64efeb1382bf9af0bec89e67a2d5"
  from="Gerd Stolpmann &lt;info@g...&gt;"
  author="Gerd Stolpmann"
  date="2002-07-04T21:51:49"
  subject="Re: [Caml-list] XML, XSL, eXcetera">
<msg 
  url="2002/07/5478ade2356480a6560d0e146e89d82a"
  from="Alessandro Baretta &lt;alex@b...&gt;"
  author="Alessandro Baretta"
  date="2002-07-04T22:37:20"
  subject="Re: [Caml-list] XML, XSL, eXcetera">
<msg 
  url="2002/07/b97a84514d31d180e34e1f35f8f36992"
  from="Stefano Zacchiroli &lt;zack@c...&gt;"
  author="Stefano Zacchiroli"
  date="2002-07-05T08:07:09"
  subject="Re: [Caml-list] XML, XSL, eXcetera">
<msg 
  url="2002/07/9f71f3e8bf6baa5ce38e39fb13e04284"
  from="Alessandro Baretta &lt;alex@b...&gt;"
  author="Alessandro Baretta"
  date="2002-07-06T14:09:17"
  subject="Re: [Caml-list] XML, XSL, eXcetera">
</msg>
</msg>
</msg>
<msg 
  url="2002/07/efbccf2948fc97802e181fc5bfd67f65"
  from="Henrik Motakef &lt;henrik.motakef@w...&gt;"
  author="Henrik Motakef"
  date="2002-07-04T22:38:33"
  subject="Re: [Caml-list] XML, XSL, eXcetera">
</msg>
<msg 
  url="2002/07/cbec09021d56233041ce70f8aa3b40da"
  from="Alain Frisch &lt;frisch@c...&gt;"
  author="Alain Frisch"
  date="2002-07-05T00:15:30"
  subject="Re: [Caml-list] XML, XSL, eXcetera">
<msg 
  url="2002/07/d35cfad39ad5a95044585490bdc86185"
  from="Claudio Sacerdoti Coen &lt;sacerdot@c...&gt;"
  author="Claudio Sacerdoti Coen"
  date="2002-07-05T16:36:30"
  subject="Re: [Caml-list] XML, XSL, eXcetera">
<msg 
  url="2002/07/905e2118bb1242c688e9904a4ace9afc"
  from="Alessandro Baretta &lt;alex@b...&gt;"
  author="Alessandro Baretta"
  date="2002-07-06T14:16:29"
  subject="Re: [Caml-list] XML, XSL, eXcetera">
<msg 
  url="2002/07/4d3d90399b5d02aacc1097cf0afe66fd"
  from="Claudio Sacerdoti Coen &lt;sacerdot@c...&gt;"
  author="Claudio Sacerdoti Coen"
  date="2002-07-08T12:29:13"
  subject="Re: [Caml-list] XML, XSL, eXcetera">
</msg>
</msg>
</msg>
</msg>
</msg>
</msg>
</msg>
</thread>

<contents>
Gerd Stolpmann wrote:
&gt; 
&gt;From my point of view the "hard" approach looks more promising
&gt; than the "soft" approach, because there are a number of ways
&gt; to simplify the handling of XML within O'Caml. For example,
&gt; there is already an XPath implementation (showing how simple
&gt; this is), and if it were better integrated with the rest,
&gt; including CamlP4 macros, we could as easily match XML trees with
&gt; XPath expressions as any other structured value (i.e.
&gt; we would have an "xmlmatch ... with ..." construct).
&gt; 
&gt; Another possibility would be a Camlp4 macro that creates 
&gt; XML trees from an XML-like notation. 
&gt; 
&gt; If we had such techniques, O'Caml+PXP+XPath+Camlp4 would be
&gt; the ultimate language to process XML, because it would be
&gt; the most integrated one. And integration matters. Today many
&gt; commercial programs are still written in COBOL because of the
&gt; excellent integration of SQL. (This does not mean that I
&gt; compare O'Caml with COBOL, but from a mainstream view they
&gt; are both exotic.)

I see your point. But this is not really the "hard" way I 
had in mind. This is more like defining a brand new DO'M: 
the Document O'caml Model, and tightly integrating it into 
the language with CamlP4. Not a bad idea actually, if we 
work to implement it. Daniel, what do you think about this?

&gt; I don't see that you need to compile and link an executable
&gt; for every filter, because you can call O'Caml as scripting
&gt; language. That should be fast enough for most "ad-hoc" usages.

How would you do that? With a sort of "toplevel server" 
waiting for connections and dynamically compiling and 
linking into its environment the code sent to it? Is 
anything like this already around?

&gt;&gt;A "soft" approach, which I would prefer, would be to
&gt;&gt;implement an XSLT processor in O'Caml, with the ability to
&gt;&gt;define "extension functions" on the run, directly in the
&gt;&gt;XSLT stylesheet, compile them into the processor dynamically
&gt;&gt;(as is done in the toplevels), and call them upon activation
&gt;&gt;of the template within which they appear.
&gt; 
&gt; Programming an XSLT processor would not be very hard, as XSLT
&gt; is a quite simple language.

It would take a little effort to keep up with the quite 
numerous standards. And, besides, we would still have to 
define a mechanism for accessing the full power of the 
programming language through XSLT stylesheets.

&gt;&gt;Until something like this appears, I might chose to give up
&gt;&gt;working with XSLT altogether and stick with the "hard"
&gt;&gt;O'Caml way, but I think the O'Caml community should move in
&gt;&gt;the "soft" direction. As far as I can see there have been
&gt;&gt;several partial attempts at XML management in O'Caml, the
&gt;&gt;most relevant probably being PXP, but there has been no
&gt;&gt;unifying view or project guiding these efforts. Do you not
&gt;&gt;think XML has gained enough momentum for us to start an
&gt;&gt;official "XML/O'Caml" project to define and implement the
&gt;&gt;*official* O'Caml API for XML and XML-related technologies
&gt;&gt;such as XPath and XSLT?
&gt;&gt;
&gt;&gt;I would be happy to volunteer for such a project, if anyone
&gt;&gt;else is interested in it, and if the some consensus is
&gt;&gt;reached among the community on the APIs that the
&gt;&gt;to-be-formed team should work on.
&gt; 
&gt; 
&gt; Defining an API is a very complicated piece of work, and I have
&gt; doubts that a "virtual" team can do it. Nevertheless, I would 
&gt; appreciate if the community came to a consensus. I can imagine
&gt; that a simple function-oriented interface would be the best
&gt; choice for a rather large group of programmers, and it would be
&gt; simple to add such an interface to the existing XML parsers.
&gt; 
&gt; A number of people would also be (more) happy if there were a
&gt; common SAX-like interface. (Although there is no parser that
&gt; supports this now.)
&gt; 
&gt; Gerd

An event based parser is of paramount importance to 
implement with O'Caml data communication protocols based on 
XML. I think such a parser should be included in the 
O'Caml/XML project I proposed.

As I stated in my previous post, all the XML-centric work in 
O'Caml should converge on a common project. I hope some 
volunteers will show up eventually.

Alex


-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners

</contents>

</message>

