Commit Graph

3 Commits

Author SHA1 Message Date
Peter Wang
89e59e7cc8 Delete support for browsing terms as XML.
The 'browse --xml' command has not worked with current versions of
xsltproc for quite some time, but we have not received any bug reports,
nor has anyone tried to fix it. We have a method for interactively
exploring a term in 'browse --web' so IMHO there is no need to keep
support for 'browse --xml'.

browser/browse.m:
browser/browser_info.m:
browser/declarative_user.m:
trace/mercury_trace_browse.c:
trace/mercury_trace_browse.h:
trace/mercury_trace_cmd_browsing.c:
trace/mercury_trace_cmd_parameter.c:
trace/mercury_trace_cmd_parameter.h:
trace/mercury_trace_internal.c:
    Delete code.

doc/mdb_categories:
doc/user_guide.texi:
    Delete documentation.

configure.ac:
    Don't search for a XUL browser and xsltproc.

scripts/mdbrc.in:
    Delete 'xml_browser_cmd' and 'xml_tmp_filename' lines.

scripts/xul_tree.xsl:
    Delete now unused file.

scripts/Mmakefile:
    Conform to deletions.

tests/debugger/Mmakefile:
tests/debugger/browser_test.exp:
tests/debugger/browser_test.exp3:
tests/debugger/browser_test.inp:
tests/debugger/mdb_command_test.inp:
tests/debugger/save.exp2:
tests/declarative_debugger/browse_arg.exp:
tests/declarative_debugger/browse_arg.inp:
    Don't test 'browse --xml' any longer.

extras/xml_stylesheets/README:
    Delete reference to 'browse --xml' command.

NEWS:
    Announce change.
2020-10-14 17:41:54 +11:00
Ian MacLarty
6b92f5b2f8 Add an XSLT style sheet to convert 234 trees to HTML tables.
Estimated hours taken: 1
Branches: main

Add an XSLT style sheet to convert 234 trees to HTML tables.

Fix a bug in the XUL stylesheet.

Add link to xsltproc download site to user guide.

doc/user_guide.texi
	Add link to xsltproc download site.

extras/xml_stylesheets/README:
	Document the new stylesheet.

extras/xml_stylesheets/html_tree234.xsl:
	The stylesheet traverses the 234 tree in order, emitting
	HTML table rows as it goes.

extras/xml_stylesheets/xul_tree.xsl:
	Pass the fieldtermpath template parameter correctly.
2005-06-30 08:12:05 +00:00
Ian MacLarty
92add6376a Add library module to convert Mercury terms to XML documents and generate DTDs
Estimated hours taken: 60
Branches: main

Add library module to convert Mercury terms to XML documents and generate DTDs
for Mercury types.

There is a natural mapping from Mercury terms to XML documents since both are
tree structures.  Each functor of a Mercury type is mapped to an element name
in the XML document.  Extra information such as the original functor name, type
and field name are stored as attribute values.

Once a Mercury term is in XML it can be converted to many different formats
using the appropriate stylesheet.  For example it could be converted to HTML
for a web server or converted to XUL to generate user interface components.
The advantage of this approach is that once the appropriate stylesheet has been
set up, generating HTML, XUL, MusicXML or whatever is as easy as generating a
Mercury term.

This library will be used to create a graphical term browser for mdb and
possibly browsable HLDS dumps.

extras/xml_stylesheets/README
extras/xml_stylesheets/mercury_term.xsl
extras/xml_stylesheets/xul_tree.xsl
	Some example stylesheets.  One to convert XML generate with the
	to_xml library to a Mercury term and one to generate a XUL
	term browser for viewing with Mozilla or Firefox.

library/library.m
	Add to_xml.

library/to_xml.m
	The to_xml module with predicates for generating XML for
	Mercury terms and DTDs for Mercury types.

tests/hard_coded/Mmakefile
tests/hard_coded/write_xml.exp
tests/hard_coded/write_xml.m
	Test to_xml predicates.
2004-12-07 04:55:51 +00:00