7

I am already using HXT for transforming XML. Now I want to validate the input and output against a XSD-file.

HXT only seem to include RELAXNG and DTD validators.

I don't really care to use something else for just validating.

maxschlepzig
  • 35,645
  • 14
  • 145
  • 182
  • possible duplicate of [Is there a tool to generate XML picklers in Haskell from an XSD?](http://stackoverflow.com/questions/11022758/is-there-a-tool-to-generate-xml-picklers-in-haskell-from-an-xsd) – Paul Sweatte Oct 03 '14 at 06:57
  • @PaulSweatte, how exactly should this be a duplicate? The question you are referencing is about generating algebraic data types and serializers/deserializers from XSDs. Doing so may also involve validation - but it is a completely different topic. – maxschlepzig Oct 03 '14 at 21:51

1 Answers1

0

The closest I can think is HaXml and some elbow grease: https://hackage.haskell.org/package/HaXml-1.25.3

In particular, you have tools to parse XSD and to validate DTD. However I don't there's an "out of the box" way to validate XSD -- it could be possible to smash the info you want into their DTD format, or you could replicate their validation logic against the parsed XSD.

At least that's a start...

sclv
  • 38,665
  • 7
  • 99
  • 204