mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-15 05:44:58 +00:00
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.
This directory contains some example stylesheets for use with the term_to_xml library module. You can apply a stylesheet to an XML document using the program xsltproc (available from http://xmlsoft.org/XSLT) or any other XSLT tool. You can also include a reference to the stylesheet in the XML document and have your browser apply the stylesheet, although this only works with some browsers. These stylesheets can also be used with mdb's `browse --xml' command (see the user guide for more details on `browse --xml'). mercury_term.xsl Stylesheet to convert an XML document generated with term_to_xml.write_xml_doc/6 back to a Mercury term suitable for reading with io.read/3. xul_tree.xsl Stylesheet to convert an XML document generated with term_to_xml.write_xml_doc/6 to a XUL tree structure suitable for browsing with Mozilla or Firefox. html_234tree.xsl Converts a 234 tree (as defined in the standard library) to an XHTML table. The paths of each key and value are also shown. This is useful for looking up values or keys in 234 trees (which are used to implement the `map' standard library type) from the debugger by using the search facilities of your web browser, although it's impractical for very large 234 trees and doesn't work with nested 234 trees.