# HaXml change log

### Changes for 1.13 (unreleased)

- Bugfixes to the document validator: no more infinite loops.
- Bugfixes to lexing mixed text and references between quote chars.

### Changes for 1.12

- The licence has changed. Previously covered by the Artistic Licence, we have now converted to the LGPL for all the library code, and GPL for the standalone tools.
- Now includes a minimal Build.bat script for Windows, so you can avoid any need for Cygwin utilities and get by with just GHC and Mingw.
- Fix a bug in DtdToHaskell, whereby an auxiliary datatype introduced by the translation into Haskell could (in certain circumstances) cause an extra layer of element tag nesting on the output (via the 'toElem' method).
- Fixed the parsing of entity/character references in the error-correcting HTML parser.
- Changes in the signatures of Xml2Haskell (made in version 1.09) have now been mirrored in the converse library, Haskell2Xml. Thus, there are new functions `readXml` and `showXml` converting to/from Strings, `hGetXml` and `hPutXml` use file Handles, and the old functions using filenames are renamed to `fReadXml` and `fWriteXml`.

### Changes for 1.11

- Fix a tiny but embarrassing bug in the previous fix for complex DTDs being translated by DtdToHaskell. It broke on a very simple DTD like
  `<!ELEMENT A (B|C)>`
  which became sequence
  `data A = A B C`
  instead of choice
  `data A = AB B | AC C`

### Changes for 1.10

- All being well, HaXml now works again for Hugs (versions ≥ September 2003). The library sources are installed using hugs-package, and the tools are installed as scripts for runhugs.
- Fixed the internal (and external) representations of XML character references.
- New combinators to `escape' and `unescape' reserved XML characters in text and attribute values has been contributed by George Russell. (e.g. to convert "<" into "&lt;".)
- Bugfixes to DtdToHaskell: A DTD content specification of the form
  `<!ELEMENT A (B*,(C|(D?,E*)))>`
  was incorrectly translated to the Haskell
  `data A = A [B] (OneOf3 C (Maybe D) [E])`
  but the new (correct) translation is
  `data A = A [B] (OneOf2 C (Maybe D,[E]))`

### Changes for 1.09

- ghc-6.0 (and newer) are supported.
- hmake is no longer required to build HaXml, provided you have ghc --make.
- A new combinator `path` has been added to Text.XML.HaXml.Combinators, allowing queries to be expressed in the style of XPath.
- Some of the signatures in Text.XML.HaXml.Xml2Haskell have changed, in particular, there are new functions `readXml` and `showXml` that convert to/from Strings, `hGetXml` and `hPutXml` that use file Handles, and the old functions that use filenames are renamed to `fReadXml` and `fWriteXml`.
- DtdToHaskell previously generated incorrect code for reading an XML element given the following DTD fragment:

      <!ELEMENT foo (a,b)+ >

- The parser had a fault when reading conditional sections nested inside an IGNORE section in a DTD.
- In Text.XML.HaXml.Html.Generate, all functions now generate HTML tags in lower-case rather than upper-case, to conform to the XHTML standard.
- DtdToHaskell now accepts NOTATION types for attributes. They are treated just like enumeration types.
- If you give an output filename as a command-line argument to DtdToHaskell, it now uses the filename as the basis for the generated module name.
- Fixed a configuration bug on the Cygwin platform with ghc-5.04.x.
- make install now places the executables (DtdToHaskell, Xtract, Validate, MkOneOf, Canonicalise) into the directory specified by `./configure --prefix=...`

### Changes for 1.08a

- There were some simple import naming problems in some of the demonstration files in the examples/ directory.
- Embarrassingly, the string value of Text.XML.HaXml.version, previously "1.07", is only now updated to "1.08".

### Changes for 1.08

- A new and highly useful function, Text.XML.HaXml.Validate.partialValidate, does validation except for checking whether the root element type matches that of the DTD's root element. This is just what you need in order to validate any partial document or sub-document.
- The function Text.XML.HaXml.Html.Generate.htmlprint had a little bug which caused it to loop infinitely if some text was longer than 60 characters without a space.
- The Xtract parser and combinators are now included in the HaXml library package, rather than existing solely for the Xtract command-line tool.
- Dependencies in ghc-5.04.x are fixed. You can now build HaXml for a specific compiler version, using e.g. configure --buildwith=ghc-5.0x.x.

### Changes for 1.07b

- The code generated by DtdToHaskell had a minor cut-and-paste error.

### Changes for 1.07a

- The file `script/echo.c' was missing from the distribution. This only affected the configuration step on systems where `echo -n' is not recognised (e.g. Solaris).

### Changes for 1.07

- The hierarchical namespace `Text.Xml` was incorrect. It should be `Text.XML`
- The ghc package now also works in GHCi (but only for ghci-5.02.3 and later).
- If you have both ghc and nhc98 compilers available, the package is built for both. However, now the configure --buildwith= option is available to choose to build for only one of them.

### Changes for 1.06

- HaXml now uses the new hierarchical namespace for modules, specifically under the tree `Text.Xml.HaXml`.
- The HaXml libraries now install as a separate `package' in both ghc and nhc98. Use -package HaXml to access them.
- The library APIs are now documented using Haddock.
- Due to popular request, we have added a new validator for checking generic document content against a DTD. This is available both as a library function, and as a command-line tool.
- DrIFT is now distributed separately by John Meacham, with much better configuration and build support. You still only need it if you want to derive the `Haskell2Xml` class.
- Bugfix: the lexer and parser now accept NOTATION declarations in the DTD.
- Bugfix: a PublicId in a NOTATION decl is now correctly recognised by the keyword PUBLIC, not PUBLICID.
- Bugfix: the HTML parser now correctly accepts stand-alone tags like IMG.
- Bugfix: instances of XmlContent now accept an empty string where #PCDATA is expected. Likewise, comments, processing instructions, and character/entity references are now permitted to be scattered thoughout some #PCDATA text.
- Bugfix: the OneOfN types used in code generated by DtdToHaskell are now supplied by default up to size 20, and a utility for automatically generating larger sizes is included.

I didn't keep detailed changelogs for versions before 1.06, but here are the highlights.

### Changes for 1.05

- In DtdToHaskell, fix some more bugs with empty PE References at the end of an element content specification.

### Changes for 1.04

- In DtdToHaskell, fix a bug whereby an empty PE Reference at the end of an element content specification caused a parse error - the DTD is now accepted.

### Changes for 1.03

- In DtdToHaskell, added tagname prefixes to the attribute names of enumeration types, to disambiguate when attributes of the same name have different value-sets within different tags.
- DtdToHaskell also now accepts Tokenized and Notation types, mapping them to Strings.
- Added an instance of Xml2Haskell for the Maybe type.

### Changes for 1.02

- Added instances of Haskell2Xml for Float and Double.
- Fixed a fault in DtdToHaskell's treatment of default attribute values.
- Dtd parser now accepts (#PCDATA)* as a valid element content specification.

### Changes for 1.01

- Fixed DtdToHaskell's treatment of default values for attributes.

### Changes for 1.00

- Finally added support for the external subset of DTDs.

### Changes for 0.9

- Reworked the Haskell2Xml and Xml2Haskell modules.

### Changes for 0.8b

- Some minor bugfixes to DrIFT, ensuring H'98 compatibility.

### Changes for 0.8a

- No code changes - just some restructuring of the build tree.

### Changes for 0.8

- Bugfix: some PERefs didn't work.

### Changes for 0.7

- Fixed imports for GHC.

### Changes for 0.6

- Fixed preprocessor symbols to use the new standard __HASKELL98__.

### Changes for 0.5

- Added GE entity reference-handling to parser.
- Tweaked the pretty-printer.
- Ensured Haskell'98 compliance.

### Changes for 0.4

- Added separate HTML parser, some other bugfixes.

### Changes for 0.3

- Bugfix release.

### Changes for 0.2

- Added Haskell2Xml and Xml2Haskell.
- Improved XML parser and printer.

### Release 0.1

- Initial release.