Migration from Java?

Richard A. O'Keefe ok@REDACTED
Tue Sep 21 05:25:47 CEST 2004


Tim Lavoie <tim@REDACTED> wrote:
	... XSL templates are used to generate
	the pages dynamically, ...

You have my heart-felt pity.  I've come across worse languages for generating
XML than XSL.  (To be precise:  assembly code and Intercal.)  But for making
a basically fairly simple tree-walking task difficult, XSL must take some
kind of prize.  (I assume that you're using XSLT rather than FO here.)

	First, XSL. I understand now why it was chosen, back in the mists of
	time.

It would be interesting to hear the reason.

I've got a 20-page library I wrote for Scheme, which makes XML walking
and generation pretty easy (except that it doesn't handle namespaces,
but it wouldn't be enormously hard to add that).

My understanding is that the Erlang documentation is generated from
SGML (essentially the same data structure as XML, but it doesn't have
namespaces, thankfully) using an Erlang library, which probably isn't
very big.

SWI Prolog comes with an SGML and XML parser and is used to process
gigabytes of RDF.  It's also used for processing at least some of the
SWI Prolog documentation.  I have again my own little library package
for Prolog, and it's dead simple to walk and generate XML.  SWI's stuff
does handle namespaces.

There's a famous XML walking/generating library for Haskell called HaXML.

In short, processing XML in _real_ declarative languages using their native
data structures is so simple it's almost a pleasure.

If it comes to that, I have a rather larger library written in C;
about 84 pages, 3100 SLOC.  Even _that_ is easier to use than XSL.
How could Erlang *not* be easier?

	I don't know that Erlang is able to help directly here,

It can, it can.

	 - Is there some equivalent of Java's JDBC? Relational databases are
	 pretty much a given, and persistent connection pools are pretty much
	 required. I have seen mention of ODBC for Erlang; if this does the
	 trick, particularly from Linux, that's a good start. Targets are the
	 main RDBMS vendors, on several platforms.
	
Don't forget that Erlang comes standard with Mnesia, a distributed replicated
data base system.  (Which has been used to store XML documents...)




More information about the erlang-questions mailing list