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.
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.
Estimated hours taken: 15
Branches: main
Allow custom functor to element mappings in term_to_xml library.
Disable setting of the `field' attribute in generated XML until a bug in the
runtime system has been fixed. The bug causes a seg fault when
construct.get_functor is called on a functor with an existentially quantified
argument type.
Add a check to see if a DTD can be generated for a type under a custom mapping
scheme. This involves checking that the mapping scheme does not generate the
same element for any two distinct functors that could appear in ground terms of
the type.
Also do not generate DTDs for types other than discriminated unions, arrays,
strings, ints, characters and floats since we cannot predict what the children
will be for other types (e.g. curried preds). Note that XML can still
be generated for any type deconstruct.deconstruct/5 can handle.
NEWS
Mention term_to_xml module.
extras/xml_stylesheets/xul_tree.xsl
Hide the field name by default (since we don't populate this attribute
at the moment).
Fix a bug where quotes were not being printed around strings.
The `typename' attribute has now become simply `type'.
library/term_to_xml.m
Allow custom functor to element mappings and include two predefined
mappings.
Do not call construct.get_functor when writing out an XML document so
that the previously mentioned runtime bug doesn't bite. This line of
code just needs to be uncommented - the line is responsible for getting
the field names of the arguments of a functor.
Check that a mapping scheme cannot assign the same element to
two different functors when a DTD is requested.
tests/hard_coded/write_xml.m
tests/hard_coded/write_xml.exp
Test custom and predefined mapping schemes.
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.