Feb 16, 2006

  * ENHANCED: various improvements of the sgml_write.pl library by Richard
    O'Keefe.

Feb 12, 2006

  * ENHANCED: xml_write/3: if encoding is `text', write the data as UTF-8

Feb 9, 2006

  * FIXED: valgrind detected memory error.  Not sure whether or not it was
    a real error.

Feb 1, 2006

  * PORT: Detect inline behaviour of compiler in configure

Jan 19, 2006

  * FIXED: Allow for different deparators in in/excluded namegroup.
    Anjo Anjewierden.

Jul 7, 2005

  * ADDED: entiry(+Name, +Value) to (re-)define CDATA entity values.

Mar 31, 2005

  * ADDED: make exceptions in call-backs from sgml_parse/3 return the
    parser immediately with the given exception.

Mar 29, 2005

  * ADDED: layout(Bool) option to the xml_write/3 and friends predciates.

Mar 21, 2005

  * ADDED: specify dialect for loading DTDs.  After mail from Sebastien Cabot.

  * FIXED: Avoid error on thread_at_exit when using in single-threaded
    Prolog.  Anjo Anjewierden.

Mar 6, 2005

  * ADDED: improved namespace and indentation support for xml_write/3.

Mar 5, 2005

  * ADDED: xml_is_dom/1.  Option header(Bool) to xml_write to suppress
    writing the header.

Mar 4, 2005

  * ADDED: xmlns support to xml_write/3.

  * ENHANCED: library(sgml_write): Indent attributes if there are too many.

Mar 01, 2005

  * ADDED: encoding argument to xml_quote_* and xml_name/2 predicates.

Feb 24, 2005

  * ADDED: handle encoding="US-ASCII" for XML documents.

Feb 22, 2005

  * MODIFIED: Use Sgetcode() rather than Sgetc() to get data from a Prolog
    stream.  Extended parser to accept characters outside 0..255 range.

Feb 7, 2005

  * ADDED: when converting attributes to integers on 32-bit machines,
    exploit 64-bit Prolog integers.

Jan 6, 2005

  * FIXED: Documentation

Dec 21, 2004

  * ADDED: library(sgml_write), providing conversion of parsed data to
    a file.

Dec 20, 2004

  * Working wide-character version.  Consequences:
	- CDATA attributes and content never contain entities anymore
	  as all text can now be represented.
	- Limit on quoted CDATA attribute values (was 2048 characters)
	  has been removed.

Dec 19, 2004

  * Start working on wide-character support: introducing wide-character
    output buffers.

Dec 15, 2004

  * FIXED: Bug#212: Disallow &#0; character entities.

Nov 25, 2004

  * FIXED: utf-8 tests, avoid conflict with UTF-8 support in Prolog

Sep 13, 2004

  * ENHANCED: load_html_file/2: add shorttag(false) to the load_structure/3
    options for better parsing of common errornous HTML pages.

Aug 26, 2004

  * FIXED: Bug#177: catalog files from $SGML_CATALOG_FILES were not
    honoured.  Simon Ambler.  Also made catalog management thread-safe.

Jul 22, 2004

  * MODIFIED: Updated XML-Schema (XSD) namespace in xsdp_types.pl

Apr 28, 2004

  * ADDED: iso_639.pl: ISO-639 language identifiers.

Apr 27, 2004

  * ADDED: first version of xsdp_types.pl, a module to do type checking
    and type conversion for XSD (XML Schema DataTypes).

Apr 26, 2004

  * FIXED: Bug#149: Buffer overflow reading too long NAME, NMTOKEN, etc.
    Fabien Todescato.

Jan 17, 2004

  * FIXED: handling <?xml ...?> switching from SGML to XML mode.
    Fabien Todescato.

Jan 9, 2004

  * FIXED: avoid sharing DTD objects between threads.  Fabien Todescato.

Nov 20, 2003

  * ADDED: xml_name/1 to test an atom to refer to a valid XML name.

Nov 3, 2003

  * FIXED: Error parsing SHORTREF declaration that has whitespace at the
    end.  Richard O'Keefe.

Sep 12, 2003

  * FIXED: Memory leak in load_structure/3 (not freeing the parser data).
    Petter Egesund.

Jul 8, 2003

  * ADDED: handle UTF-8 sequences producing characters that cannot be
    represented as character entities.  Suggested by C. M. Sperberg-McQueen.

  * FIXED: handling &#X, where 128<=X<256 with UTF-8 decoding enabled.
    C. M. Sperberg-McQueen.

Jun 9, 2003

  * FIXED: SGML SHORTREF declaration performed case-insensitive entity
    lookup.  Richard O'Keefe.

Jun 4, 2003

  * ENHANCED: type the conflicting CDATA in #PCDATA that violates the DTD

May 23, 2003

  * FIXED: More catalog trouble.  Richard O'Keefe.

May 22, 2003

  * FIXED: Lookup of system identifiers through the catalogue (avoid early
    tagging with file:)  Richard O'Keefe.

May 21, 2003

  * FIXED: Handle -- in element-names (Bijan Parsia).

May 8, 2003

  * Fix registering catalog files

May 5, 2003

  * Incorporated better CATALOG parsing by Richard O'Keefe.  May be incomplete
    or incorrect.

* FIXED: call(end, Goal) passing the element-name incorrectly (breaks
  process_rdf/3).

* FIXED: delay unification of value in load_structure/3.

* FIXED: Properly expand UTF-8 values in CDATA attributes

* FIXED: Properly handle unquoted attributes at the end of an empty element
  in XML mode <foo bar=10/>

* FIXED: #CONREF attribute handling in elements with declared content
  (CDATA/RCDATA).  Richard O'Keefe.

SWI-Prolog VERSION 5.0.10
=========================

* FIXED: properly handle elements that have only an <!ATTLIST declaration
  but no <!ELEMENT declaration.  (C. M. Sperberg-McQueen).

* FIXED: handle CDATA inside elements with content-type ANY
  (C. M. Sperberg-McQueen).

* MODIFIED: silently ignore attempts to redefine entity declarations.
  Richard O'Keefe.

* FIXED: skip [] for detection of nesting inside literal values and fix
  handling of [] in the <!DOCTYPE xxx [...]> declaration.  Richard O'Keefe.

* MODIFIED/ADDED: qualify_attributes option for xmlns mode.  Default is
  now *not* to qualify attributes.

* FIXED: Handle elements inside shorttag values.  Thanks Richard O'Keefe
  for providing a clear description how to handle this.

SWI-Prolog VERSION 5.0.9
========================

* FIXED: correct handling of content_length(Len) option (was reading one
  character too many).  Oops, normal reading was broken.  Fixed.

* FIXED: Correctly handle marked sections ending in ]]]> rather than ]]>
  Spotted by Adrian Boyko.

* ADDED: xml_quote_attribute/2 and xml_quote_cdata/2, providing simple
  quote-support.

* FIXED: parse(content) option to the parser (multiple bugs) required for
  process_rdf/3 (Girish Padmalayam).

* FIXED: dtd2pl: printing of NAMEOF and NMTOKEN attributes
  (Joseph Wayne Norton).

* FIXED: load_structure/3 to pass doctype(_) to the correct place.

* ADDED: space(sgml) option.  Was documented but omitted.


SWI-Prolog VERSION 4.0.11
=========================

* MODIFIED: When processing non-validated data in space-preserve mode, emit
  ALL blank data (Richard O'Keefe).

* FIXED: close file after reading DTD from a file.  (Anjo Anjewierden)

* FIXED: handling of (a) +(b) element declaraction (Richard O'Keefe)

* ADDED: Warning when redefining (parameter) entities.

* ENHANCED/FIXED: Process entities refering to files directly.  This
  reduces memory needs and fixes path-problems in recursive includes.
  This applies for both normal and parameter entities.

* ADDED: Test for legal value in attributes with type NAMEOF (a|b)

* FIXED: Handle (a,b), (a&b) and (a|b) as equivalent in ATTLIST type
  declaration.

* FIXED: option shorttag was spelled shortag.

* FIXED: Ensure the output is properly closed, even if the parser encounters
  an unexpected end-of-file.


SWI-Prolog VERSION 4.0.6
========================

* FIXED: Data overwriting in <DOCTYPE ... [local stuff]> if local stuff
  is too long (Andrew Dadakov).

* FIXED: Report elements not in the DTD allowed by the ANY model
  as error (Andrew Dadakov).

* FIXED: Call sgml_nomem() after strdup in case of out-of-memory
  (Richard O'Keefe).

* PORT: Removed alloca() usage (Richard O'Keefe).

* LIMIT: Make maximum string length 2048 to allow parsing HTML4 DTD.
  Maybe we should remove comments while fetching parameter-entity
  values?

* FIXED: Include #FIXED and defaulted arguments for omitted tags
  (reported by Richard O'Keefe).

* ADDED: handle plain <!DOCTYPE doc> silently if the catalog contains
  a DOCTYPE doc file.dtd entry.

* FIXED: Various issues in attribute handling with new routines supplied
  by Richard O'Keefe.  Added shorttag(Bool) to options you can set.

* ADDED: `make check' to run the test-suite.

* FIXED: Handling of &<tag> (Richard O'Keefe).

* FIXED: dtd2pl to use model(Model) to avoid amibiguity between CDATA and
  (CDATA) model.  Richard O'Keefe.

* FIXED: Various output aspects of the sgml driver program, notably case and
  character escaping problems.  By Richard O'Keefe.

* ADDED: Ignore SGML declaration in <!SGML ...>

* FIXED: Do not require ; after character-entity

* ADDED: Expand character and parameter entities while parsing literals
  in a DTD (Richard O'Keefe).


VERSION 1.0.13
==============

* FIXED: Interpret <!ENTITY e STARTTAG "x"> as <!ENTITY e "<x>"> (well,
  dependent on the delimiters).  (Richard O'Keefe).

* FIXED: Allow omitted end-tag for RCDATA and CDATA elements (only effective
  when hitting the end of the file).

* FIXED: Proper parsing of <!NOTATION ...> declaration.  Also fixed
  dtd_property(DTD, notations(Notations)) and modified
  dtd_property(DTD, notation(N, Decl)).

* ADDED: <!ENTITY #DEFAULT ...> (Richard O'Keefe).

* FIXED: Ignore newline after entity

* FIXED: Allow omitted ; expanding entities in CDATA attributes

* FIXED: Possible crash with SHORTREF endding in &#RE.

* FIXED: avoid crash on illegal syntax in DTD omited-tag declaration

VERSION 1.0.12
==============

* FIXED: More white-space issues in handling quoted attribute values.

* ADDED: XML NAMECHARS to the default set.  This seems to match HTML-4
  better and will only in exceptional cases harm normal SGML processing.

* ADDED/MODIFIED: Attributes not in the source, but with a default or
  fixed value declared in the DTD are now included in the output.  The
  old behaviour can be used using the defaults(false) option to
  load_structure/3.

* FIXED: expand parameter-entities in <!USEMAP declaration.

* FIXED: sgml utility to canonise space in output of `list' attributes.

* FIXED: proper entity-expansion and blank-canonisation in attribute-vaues
  (Richard O'Keefe).

* FIXED: false warning at start of NUTOKEN attribute (Richard O'Keefe).

VERSION 1.0.11
==============

* ADDED: handling of #CONREF attribute default (Richard O'Keefe).

* FIXED: sgml utility not to print "C" at the end when there where errors
  (Richard O'Keefe)

* FIXED: handle value-shorthand for nmtoken (Richard O'Keefe)

* FIXED: &RE; SHORTREF handling if the newline appears as the first
  character of a (new) #PCDATA block.

* CONFIG: Added -with-prolog=<Prolog> by Milan Zamazal for integration
  as Debian (linux) package.


VERSION 1.0.10
==============

* UPDATE: calls to select/3 for compatibility to SWI-Prolog 3.4

* FIXED: Allow <!USEMAP before <!SHORTREF

* FIXED: handling the #empty map (SGML SHORTREF).

* MODIFIED: state-engine for <>, using a new state S_DECL0 after seeing <
  to decide whether this is a non-escaped < in CDATA or a real tag.  Also
  changed comment-handling to avoid the need for parser->previous_char.

* ADDED: sgml utility allow for parsing stdin.

* PERFORMANCE: Improved expand_[p]entities(), providing about 10%
  overall improvement.

* FIXED: crash in sgml (demo-)driver app causing a crash if the input
  file has no extension (Richard O'Keefe).

* ADDED: support for RCDATA declared-content elements

* FIXED: SGML-mode: immediately close EMPTY elements (i.e. do not allow
  for a closing </img>).

* IMPROVED: Error reporting on elements not in the DTD.

* ADDED: get_sgml_parser(Parser, dtd(-DTD)).

VERSION 1.0.8
=============

* FIXED: Problem in windows version regarding text/binary file and \ <-> /
  difference.

* FIXED: Problem finding HTML4 .soc file

* FIXED: entity_file() to avoid a crash if the entity is not in the catalog.

* ADDED: Parse not-quoted attribute values that require quotes by parsing
  upto the next layout character.  Give a warning.  For example:
  <hr width=50%> is parsed as <hr width="50%">, but a warning is displayed.

* FIXED: Crash if start of file is not a declaration but ordinary non-blank
  text.

* ADDED: Improved source-location handling and some additional call-backs
  to the call-back interface, preparing the parser for supporting SGML
  syntax highlighting and checking editors.  See get_sgml_parser/2 and
  sgml_parse/2 predicates.

VERSION 1.0.7
=============

* IMPROVED: Redirect all memory management to print a fatal error message
  instead of crashing.

* IMPROVED: Handle the (illegal) comment <!-- some text -- more text -->
  more elegantly: assume <!-- will be terminated by --> and generate a
  warning if text was found outside --comment--.

* FIXED: Some issues in marked-section handling

* ADDED: Direct error reporting of sgml application through callback for
  demo purposes.  Message now includes the current dialect.

* FIXED: sgml application: do not convert case in XML mode.

* FIXED: Do not report error on not-declared xmlns attribute in XML mode.

* Cleaned Makefiles

VERSION 1.0.6
=============

* ADDED: SGML based documentation of the package with converters to LaTeX
  and HTML in Prolog.

* ADDED/MODIFIED: number(NumberMode) option to the load_structure/3.
  By default NUMBER and NUMBERS tokens are now parsed as tokens of digits.
  Using number(integer) they are converted to Prolog integers, provided
  they fit (Richard O'Keefe).

* ADDED: If a document is parsed without DTD and a catalog is provided,
  try finding a matching DTD file from the catalog.  If successful
  print a warning and load this DTD.

* FIXED: Ensure the -xml flag to the sgml utility works again.

* INSTALL: Check for existence of runtex

* INSTALL: Do not cache Prolog related variables.

* FIXED: signed/unsigned character handling in catalog.c (Richard O'Keefe)

* MODIFIED: Representation for source-locations.


VERSION 1.0.5
=============

* MODIFIED: Get SYSTEM entities relative to the file in which the
  entity is declared.  Get PUBLIC entities from the second argument
  if the catalog (entry) is not found.

* FIXED: Deal with elements only containing shortref references

* MODIFIED: Only insert missing close-tags that should not be on closing
  outer environments, not because an element is encountered that fits in
  an outer environment.  Improves error behaviour.

* ADDED: Print default list values in dtd2pl

* ADDED: Support for the content-model ANY.

* ADDED: option -xml to pl2dtd to force it loading a DTD in XML mode.

* FIXED: Do not expand SHORTREF inside CDATA marked sections and elements.

* ADDED: Properly deal with NUTOKEN: handling DTD default and validate type.

* FIXED: Expand parameter entities in SHORTREF declaraction (Richard O'Keefe).

* FIXED: Handling of < as last character of a CDATA element

* FIXED: proper handling of &#RE; in SHORTREF

* FIXED: Open CDATA element when encountering a CDATA entity.

* FIXED: SHORTTAG with attributes: <foo a=b/value/


VERSION 1.0.4
=============

* FIXED: file_to_dtd() not to free the created DTD.  This makes dtd2pl work
  again. (Richard O'Keefe)

* FIXED: Allow for layout before sub-models: ( (a,b)|c).  (Andrew Dadakov)

* FIXED: Allow for quoted nmtoken, etc. in ATTLIST declaration.
  (Andrew Dadakov)


VERSION 1.0.3
=============

* FIXED: Allow for (a,b), etc. instead of just (a|b) where an element-list
  is expected.


VERSION 1.0.2
=============

* ADDED: Partial SHORTTAG support (<tag/content/ and </>)

* ADDED: Prolog interface: map multi-valued attributes to a list.

* FIXED: ESIS output of the sgml utility to provide better compliant output
  for attributes (before the open-tag, including the type and in UPPERCASE).

* ADDED: Handling <!SHORTREF ...> and friends.

* FIXED: Added &#RS;, &#RE;, &#TAB; and &#SPACE; (Richard O'Keefe)

* FIXED: Processing instruction is now <?....[?]> (i.e. optional closing ?)
  Q: Is this XML or SGML?  Check docs!

* FIXED: Line-number info for DOCTYPE declarations holding [declaractions].

* FIXED: NUMBER attribute declaration with default (skip layout afterwards)

* ADDED: Support for NOTATION attribute

* FIXED: memory allocation/free bug in model-reduction ((a|b)*)

* ADDED: Passing processing instructions to the user

* FIXED: Independent case-sensitivity switch for entities (SGML entities are
  case sensitive).

* ADDED: SGML Blank-space handling

* FIXED: Completeness test for A&B?

* ADDED: Dummy make check (Richard O'Keefe)


VERSION 1.0.1
=============

* ADDED: Programmable XML namespace canonisation.

* ADDED: White space handling using the xlm:space attribute as well as
  allow for setting the initial default as option to load_structure.

* FIXED: Allow for <!ENTITY name 'value'> (i.e. without CDATA type decl).

* FIXED: Allow for <!DOCTYPE name [DTD]> (i.e. no public nor system)

* FIXED: Avoid crash on bad attribute-list

* ADDED: Reporting errors and warnings through print_message/2.

* FIXED: Handling of end-of-file in CDATA 
