
Hello everyone, I am writing to judge interest in a Summer of Code proposition: an XML Schema[1] implementation, described as a possbile application here[2]. As both a tool and an inspiration, I intend to use HaXML[3]. More specifically, I would be interested in the degree the Haskell community uses XML Schema, and if you were tempted to use it if we had an implementation. To further expand the question, how useful do you consider each of these components: * a validator * a pretty-printer * a translator from XML Schema to Haskell, similar to DtdToHaskell[4] For the latter item, some runtime checking will definitely be required: restrictions such as value ranges for integers or minimum and maximum occurences of an element cannot, to my knowledge, be enforced through type definitions. Finally, I kindly ask anyone with relevant experience to point out other possible pitfalls. Vlad Dogaru [1] http://www.w3schools.com/Schema/ [2] http://hackage.haskell.org/trac/summer-of-code/ticket/1120 [3] http://www.cs.york.ac.uk/fp/HaXml/ [4] http://www.cs.york.ac.uk/fp/HaXml/Xml2Haskell.html

On Mon, Mar 30, 2009 at 5:16 PM, Vlad Dogaru
* a translator from XML Schema to Haskell, similar to DtdToHaskell[4]
For the latter item, some runtime checking will definitely be required: restrictions such as value ranges for integers or minimum and maximum occurences of an element cannot, to my knowledge, be enforced through type definitions. Finally, I kindly ask anyone with relevant experience to point out other possible pitfalls.
I have a small package up on Haskell who's sole existence is to be a Haskell implementation of a particular XML schema: xcb-types: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/xcb-types xcb.xsd: http://cgit.freedesktop.org/xcb/proto/tree/src/xcb.xsd It's pretty stable now, so I'm not sure I'd switch over to something new. But at the time I think I tried to do an XSD to DTD transform so I could use the existing DTD to Haskell tools. That didn't work out so well, but I don't really remember why. Antoine

Vlad, Some time ago I wrote a generic Haskell data type to XML/XSD library[1]. It was based on an old singleton version of the multirec[2] generic programming library. I never released any of it because it is not really usable in a serious setting but you might want to look at it for some inspiration. Generic programming is *really* useful when it comes to managing XML from Haskell. -- Sebastiaan. [1] http://funct.org/code/gxml/ [2] http://hackage.haskell.org/cgi-bin/hackage-scripts/package/multirec On Mar 31, 2009, at 12:16 AM, Vlad Dogaru wrote:
Hello everyone,
I am writing to judge interest in a Summer of Code proposition: an XML Schema[1] implementation, described as a possbile application here[2]. As both a tool and an inspiration, I intend to use HaXML[3].
More specifically, I would be interested in the degree the Haskell community uses XML Schema, and if you were tempted to use it if we had an implementation. To further expand the question, how useful do you consider each of these components: * a validator * a pretty-printer * a translator from XML Schema to Haskell, similar to DtdToHaskell[4]
For the latter item, some runtime checking will definitely be required: restrictions such as value ranges for integers or minimum and maximum occurences of an element cannot, to my knowledge, be enforced through type definitions. Finally, I kindly ask anyone with relevant experience to point out other possible pitfalls.
Vlad Dogaru
[1] http://www.w3schools.com/Schema/ [2] http://hackage.haskell.org/trac/summer-of-code/ticket/1120 [3] http://www.cs.york.ac.uk/fp/HaXml/ [4] http://www.cs.york.ac.uk/fp/HaXml/Xml2Haskell.html

More specifically, I would be interested in the degree the Haskell community uses XML Schema, and if you were tempted to use it if we had an implementation. To further expand the question, how useful do you consider each of these components: * a validator * a pretty-printer * a translator from XML Schema to Haskell, similar to DtdToHaskell[4]
Haskell badly needs better middleware. At present that means WS-* stuff, which is all defined in XML Schema. So the Xmls2Haskell
On Mar 31, 2009, at 12:16 AM, Vlad Dogaru wrote: translator would be a really valuable foundation for that. Also it would be particularly valuable if the XML Schema parser generated a parse tree which was then interpreted by the Haskell generator, as that would make it much easier to build other tools (e.g. type validators, schema version translators) on top of the XML Schema parser. Paul.

(+ 1)
A year or so ago I wanted to create a Collada importer. Collada comes with
an XML Schema, so I wanted to automatically make a parser for that. But no
tool existed :(
Note that an existing tool from Microsoft failed on the Collada
schemahttp://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?Feedbac...
(something
with circular references, see link), so Collada might be a good test case
:-)
On Tue, Mar 31, 2009 at 3:23 PM, Paul Johnson
On Mar 31, 2009, at 12:16 AM, Vlad Dogaru wrote:
More specifically, I would be interested in the degree the Haskell community uses XML Schema, and if you were tempted to use it if we had an implementation. To further expand the question, how useful do you consider each of these components: * a validator * a pretty-printer * a translator from XML Schema to Haskell, similar to DtdToHaskell[4]
Haskell badly needs better middleware. At present that means WS-* stuff,
which is all defined in XML Schema. So the Xmls2Haskell translator would be a really valuable foundation for that.
Also it would be particularly valuable if the XML Schema parser generated a parse tree which was then interpreted by the Haskell generator, as that would make it much easier to build other tools (e.g. type validators, schema version translators) on top of the XML Schema parser.
Paul.
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

On Mon, Mar 30, 2009 at 5:16 PM, Vlad Dogaru
Hello everyone,
I am writing to judge interest in a Summer of Code proposition: an XML Schema[1] implementation, described as a possbile application here[2]. As both a tool and an inspiration, I intend to use HaXML[3].
More specifically, I would be interested in the degree the Haskell community uses XML Schema, and if you were tempted to use it if we had an implementation. To further expand the question, how useful do you consider each of these components: * a validator * a pretty-printer * a translator from XML Schema to Haskell, similar to DtdToHaskell[4]
A RelaxNG <-> XML Schema translator would be very useful.

On Tue, 2009-03-31 at 01:16 +0300, Vlad Dogaru wrote:
Hello everyone,
I am writing to judge interest in a Summer of Code proposition: an XML Schema[1] implementation, described as a possbile application here[2]. As both a tool and an inspiration, I intend to use HaXML[3]. [snip]
Thank you to everyone who has contributed their experience and opinions. This has hopefully helped me understand what would benefit the community most in the direction of XSD. Vlad
participants (6)
-
Antoine Latter
-
Gregg Reynolds
-
Paul Johnson
-
Peter Verswyvelen
-
Sebastiaan Visser
-
Vlad Dogaru