Revision [8492]

This is an old revision of AdvancedFormatter made by DarTar on 2005-05-26 08:14:48.


Advanced Formatter

This is the development page (stub) for an advanced Wikka formatter.

The code written by JavaWoman (tested and ready to be installed on this server as a beta feature) addresses several issues of the current formatter. In particular, it fixes a number of small formatting bugs, and adds new important features - like automatic generation of id's for headers and forms - required for XHTML compliance and for extensions like anchors, TOC's and advanced styling through CSS.

What's new

Although - given Wikka accepts can use embedded HTML - it cannot be guaranteed that an id generated by this method is unique it tries its best to make it unique:
      • ids are organized into groups, with the group name used as a prefix;
      • if an id is specified it is compared with other ids in the same group; if an identical id exists within the same group, a sequence suffix is added, otherwise the specified id is accepted and recorded as a member of the group
      • if no id is specified (or an invalid one) an id will be generated, and given a sequence suffix if needed
For headings, it is possible to derive an id from the heading content to support this, any embedded whitespace is replaced with underscores to generate a recognizable id that will remain (mostly) constant even if new headings are inserted in a page.
The method supports embedded HTML as well: as long as the formatter passes each id found in embedded HTML through this method it can take care that the id is valid and unique. This works as follows:
      • indicate an 'embedded' id with group 'embed'
      • NO prefix will be added for this reserved group
      • ids will be recorded and checked for uniqueness and validity
      • invalid ids are replaced
      • already-existing ids in the group are given a sequence suffix
The result is that as long as the already-defined id is valid and unique, it will be remain unchanged (but recorded to ensure uniqueness overall).


The code


There are no comments on this page.
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki