= Roadmap =

Some future objectives for the software.

== HTML Parsing ==

Parsing of HTML fragments would be done to permit translation into the Moin
document tree. This would then allow round-trip conversion:

########## A graph showing the process is given below...

{{{#!graphviz
//format=svg
//transform=notugly
digraph htmlparsing {
  node [shape=box,fontsize="13.0",fontname="sans-serif",tooltip="The MoinLight architecture"];
  edge [tooltip="The MoinLight architecture"];
  rankdir=LR;

  moin [label="Moin content",shape=folder,style=filled,fillcolor=cyan];

  subgraph {
    rank=same;
    moinparser [label="Moin parser"];
    moinserialiser [label="Moin serialiser"];
  }

  subgraph {
    rank=same;
    tree1 [label="Document tree",shape=folder,style=filled,fillcolor=cyan];
    tree2 [label="Document tree",shape=folder,style=filled,fillcolor=cyan];
  }

  subgraph {
    rank=same;
    htmlserialiser [label="HTML serialiser"];
    htmlparser [label="HTML parser"];
  }

  html [label="HTML content",shape=folder,style=filled,fillcolor=cyan];

  moin -> moinparser -> tree1 -> htmlserialiser -> html -> htmlparser -> tree2 -> moinserialiser -> moin;
}
}}}

########

Pages could be retained for storage in Moin format, presented in a Web browser
in HTML, edited using HTML editing controls, and then converted back for
storage.

In order to maintain various details of the original document, additional
annotations would be employed in the generated HTML. Such annotations would
appear within `class` attribute values, encoding details of the original
content such as indentation, padding and other aspects of that content which
are superfluous or inappropriate to the core HTML representation of the
document, but which can be interpreted in order to restore the form of the
original document.

=== HTML Regions ===

The HTML parser might also permit the parsing of regions or sections
explicitly marked as HTML. Currently, such regions are merely propagated into
the serialised document.

== Configuration Files ==

Instead of configuring the conversion [[Metadata|metadata]] programmatically
or using command line options with the [[moinconvert]] tool, it would be
useful to be able to define settings in configuration files.

== Externally Available Extensions ==

Currently, the extensions (macros, themes, parsers, and so on) available to
MoinLight are defined within the `moinformat` package. However, it should be
possible to define extra extensions that reside in other locations.

== Themed Output for Extensions ==

Macros and other extensions should be able to provide specific theme resources
that are referenced in page output and bundled in the deployed content.

== Pragmas and Directives ==

In order to adjust the handling and display of content, these features of Moin
should be supported, with the ability to define handlers.

Currently, directives are only recognised and recorded in the document tree.

== Section Numbering ==

Effectively taking table of contents numbering, headings should be numbered if
requested.

== Variables and Wikidicts ==

These features of Moin should be supported since they permit convenient
customisation of content.

Currently, variables are recognised and can be defined using the
[[moinconvert]] tool, but built-in variables involving pages and users could
be supported (the latter would involve use of any available editing history),
and nominated pages could be parsed to provide dictionary content.

== Macros ==

=== Include ===

This macro has proven useful in Moin to combine page content. To support it
usefully, it must interact sensibly with tables of contents, perhaps requiring
adjustments to the table of contents macro to avoid such tables appearing on
included pages, also causing top-level tables to reference sections in the
included pages.

=== Table of Contents ===

Building on the ability to be able to provide its own stylesheet resources,
the macro should also support expandable entries, perhaps using form controls
so that a concise, single-level table of contents can be shown and expanded as
necessary.

== Parsers ==

=== Highlight ===

This parser in Moin 1.9 uses the Pygments library to produce tokens that are
then used to produce syntax highlighted output via the selected Moin
formatter.
