[Haskell-cafe] Programming style and XML processing in
Haskell
Graham Klyne
gk at ninebynine.org
Fri May 14 14:40:06 EDT 2004
At 18:21 13/05/04 +0100, Duncan Coutts wrote:
>Something which wasn't mentioned but is quite useful is type-specialised
>xml parsers. ...
HaXML has something like this.
I'd suggest that something like this wouldn't necessarily be *part* of an
XML library, but an additional XML library that uses a generic XML
framework. But maybe that's what you meant?
As it happens, it's not part of the requirements I'm looking at, because my
aim is extract information from XML to another internal format, but I
acknowledge the possible value of this. Maybe it's worth reviewing what
Wallace&Runciman say about this (section 3.4 of their paper [1]). I don't
know if any of this work has been updated to take account of XML schemas.
#g
--
[1] http://www.cs.york.ac.uk/fp/HaXml/icfp99.html
At 18:21 13/05/04 +0100, Duncan Coutts wrote:
>Something which wasn't mentioned but is quite useful is type-specialised
>xml parsers. Some tools manipulate xml generically, giving you back some
>DOM tree which is great if you are writing a general purpose xml parser.
>However most uses know exactly what DTD/Schema/Type they are dealing
>with and would like to get their own data type back from the parser (as
>well as having the parser validate it). This allows you to use the
>parser/pretty printer in a similar way to ordinary read/show. Other
>people have pointed out that this should make xslt-style transformations
>really easy (and type safe). (Automatically deriving readXML/showXML
>would be nice!)
>
>Some Haskell xml libs/tookits have tools for converting DTD<->Haskell
>types.
>
>I suggest this would be a very useful feature of a standard xml library.
>
>Duncan
------------
Graham Klyne
For email:
http://www.ninebynine.org/#Contact
More information about the Haskell-Cafe
mailing list