
24 Aug 1999: Cost: Multiple versions of Cost (2.1, 2.2) don't like to 
	live together on the same system (pkgIndex.tcl, 'set COSTLIB ...')

COSTPATH: use ';' as separator on Windows instead of ':'
Ought to: Have Cost look for a "cost.cfg" file at startup;
search in $COSTLIB first, then in each directory specified
in COSTPATH.  (cfg files could add further subdirectories e.g.,
OR: only load cfg file before 'require'ing  a spec from that dir;
or, maybe not)


RATFINK: Try ShellExecute() instead of ExecFile() to launch URLs...

autoconf: 
    add --enable-debug option to add -DDEBUG to @DEFS@, for development [done]
    add --disable-expat option, in case people want to redistribute
	Cost and find the MPL incompatible.

Build RPM for Linux dist; see
http://www.redhat.com/mirrors/LDP/HOWTO/RPM-HOWTO-6.html
for instructions.

Implement XLINK/XPTR/XPATH, as soon as W3C straightens out the spec. 

Add dynamic document construction (see ExCost for example).

Reorganize code to make it easier to "plug in" new parsers;
(will probably need two interfaces - input from Tcl_Channel or string;
also Tcl-based and C-based).
merge 'loadxml', 'loadsgmls', etc., into a single command;
add support for rxp parser, TclXML parser, SP parser (C++ API), etc.,


Allow ilinks to span multiple documents (tough to do in the current 
implementation: need 'document' query clause, relations must be
global entities).

Implement XPTR/XLINK and/or HYQ/HYLINK and/or TEIPTRs.

Think about Unicode support.

autoconf: add --with-parser={sgmls|nsgmls} ; set default parser.

Need (?) "proper ancestors" query clause "pancestor" -- 
equivalent to "parent ancestor".

selectDocument / withDocument probably ought to keep track 
of the current node instead of always selecting the root node.

Need: some way for 'loaddoc' to select which parser to use.
[ added, sort of ]

Add support for XML namespaces/SGML architectures.

Implement: freeDocument command

Relations/ilinks: need to support 'aggregate' anchors, possibly spans.

[10 Nov 1998] Need to make sure everything works under Tcl 8.0.
	[ it appears to now -- ca. Dec 1998 ]

Ratfink docs: cite <http://www.sema.be/sgml-web/products/rtf2rdc/r2r-gen.htm> 

[26 Aug 1997] Cost does not work as expected with multiple Tcl interpreters;
not thread-safe either.  Need to get rid of all global variables.  [Done.]
[still not thread-safe]

Another useful utility: [cost:where]; return semi-readable
description of current node's location; should be user-configurable;
useful for printing warning messages.  (Include: node address, element 
type/stack, source location if available),

[24 May 1996] -- long-term project -- the 'sgmls | costsh' pipeline
model doesn't work very well under Windows (or, I expect, the Mac).
Try integrating SP.DLL and/or YASP.DLL as alternative input sources.
Possibly see David Durand's TclYasp for a starting point.

[24 May 1996] -- remove all stdio references.  Remaining: error
reporting in costq.c. [done, finally, 16 Jul 1999]

[15 May 1996] -- documentation -- add note that node addresses
are fragile: if a document changes, node addresses extracted from
a previous revision will no longer point to the same location.
Also note that they cannot locate attributes, entities, PIs, etc., 
and the address format may be enhanced in a later release.
Also consider James Clark's suggestion that the preorder 
traversal index works just as well as the path position
for this purpose (and requires less memory overhead internally).

[7 May 1996] -- Simple.tcl -- add output handlers (a la SGMLSpl)
for stuff like moving output around.  Doing this in a filter  
doesn't catch prefix/suffix or 'output' calls in startAction &c.
See msg from Adrian Gartland...

[30 April 1996]
I'm still finding it very hard to re-use translation specs.
This is partly due to the way the CostDoc transpecs were written
to begin with, but there are some specific features that Cost
is lacking that would make this easier; in particular the
ability to "extend" an existing specification.

Need to set up mailing list.  A couple people have done some
really neat things with Cost; should add links to their work
from the Cost home page (after getting permission, of course...)

Handling figures/graphics formats; collect all the various
makefile rules, put them together in a single package and
add to the distribution.   Under Unix, with a sufficiently
powerful 'make' (like IRIX's 'pmake' or GNU make) this
makes converting from one format to another quite easy
(e.g., just say "make foo.eps" to convert "foo.fig" into "foo.eps"
for inclusion in a TeX document)

[7 March 1996]
Need sanity-checks in 'loadsgmls' -- easy to crash.
'pgrow' after 8K bombs.

In 'loaddoc', redirect stderr to nowhere.

BUG: 'query? within FOO within FOO within FOO' is equivalent to
just 'query? within FOO'.  Need to fix code and documentation
(check _proper_ ancestors, not just ancestors.)

Need to handle SUBDOC better; there are still a few bugs.

Add tree editing/transformation/building facilities.

[19Feb96]: query parsing needs to report an error message back to Tcl
instead of printing it on stderr.

Write tutorial/cookbook document [outline done];
Move the longer examples out of the reference manual into
the tutorial.

Extend node addresses so that any node can be addressed,
not just ELs and PELs (investigate HyTime "grovepos"
construct for ideas.)

Add 'dataloc'-like feature for locating spans of character data.

for specification access commands; add '<spec> subst <name>' --
equivalent to 'subst [<spec> get <name>]'.  This is common
enough that it may be worth adding built-in support.

[ 14 Jan 1996, for PMR ]
	add 'nodes' clause, iterate over a list of nodes by address [done]
	'unsetprop' command [done]
	'haspropval' query clause [done]
	glob-style pattern/regexp matching and searching?

Also add: 'nodeset' clause (sort a node list and do one pass);
nodeset union, intersection, and difference primitives.

Clean up Cost_Init(), main(), Tcl_AppInit(), and costinit.tcl
so that Cost can be used like other extensions. [done, I think]
[later: added Tcl_PkgProvide() call; still need to get rid of globals].

Clarify installation instructions; 

Document 'needsExtension' &c.
[on second thought, don't -- scrap those and use Tcl 7.5 'package' 
command instead.]

Add support for NSGMLS output format (-oid, -oentity, -oincluded). 
(With these options, it _may_ be possible to implement a
HyTime engine.  Need to investigate further...)

Improve error checking and error messages, especially in 
the 'specification' command.

Figure out how to support comments in list data (again esp. in specs).
[ Done, partly; thanks to Boris Tobotras for patch ]

Enhance query language by adding subqueries, e.g.,:

	query* doctree element FOO ( propval BAR | attval BAR )  

Provide facility for user-defined query clauses.

Add relations and links. [done, sort of]

Implement HyLex or HyLex-like functionality for analyzing 
character data.

Add more HyTime- or HyTime-like functionality.  (I don't
plan to add full HyTime support to Cost since this is, 
in general, not possible for a structure-controlled application.)

Implement (subset of) implicit and explicit LINK.

Add support for architectural form processing as per
HyTime (post-corrigenda) Annex C.

Add TR9401 catalog and HyTime FSI support for handling external
data entities.

Clean up and document COSTDOC so that it's usable 
as a general-purpose, extensible DTD. [in progress]

Build library of HTML analysis tools, if useful.

Build library of utilities for LaTeX, HTML, RTF, plain text,
Frame MIF, etc., conversion. [ RTF: done (RATFINK) ]

Collect library of support utilities for common DTDs (TEI,
DOCBOOK, OSFDOC; SNAFU, HTML, QWERTZ/LinuxDoc, etc.); 
possibly these will consist of mappings onto (to-be-defined)
architectural forms that the above conversion utilities can use.

Maybe add autoconfigure script after all... Check the 
configure script in jhobb's version of BLT (1.8); looks
almost reasonable. [done]


[ 15 Apr 1999 ];  licensing:
> The Artistic licence prevents you from making substantial changes
> and redistributing the code, in essence. It was a good attempt at 
> a GPL-like licence, but I find it's too restrictive--OTOH, it does
> keep vendors from shipping extremely broken implementations of Perl,
> as they're wont to do with typical BSD'd software.
	[ from "Joshua E. Rodd" <jerodd@noah.dhs.org>, in comp.lang.tcl ]
Argh.  Might need to find a new license now.
[ Done; switched to Tcl-style license, which appears to be "freeer" ]

Possibly: withNode! query... { script } -- signals an error
if the query fails.

Thread-safety issues:
    tokbuf, tokbufsize in rdsgmls.c
    freelist in node.c
    string_table, string_table_size in intern.c.

