[fpc-devel] fpdoc content syntax suggestion

Marco van de Voort marcov at stack.nl
Sat Jul 10 12:52:05 CEST 2010

In our previous episode, Sergei Gorelkin said:
> > Not using XML would require a major rewrite of fpdoc - it is deeply rooted
> > in XML, as you'll find out - and I am not very keen on this. So hold your
> > horses there, please...
> > 
> I'd suggest the following:
> 1) XML stays :-)

> 2) The fpdoc is modified in a way that, after parsing the initial XML,
> every text node within <short> or <descr> elements is additionally parsed
> with another parser.

> 3) The "another parser" does its job, placing its results into a DOM
> fragment.

> 4) The original text node is replaced with the resulting subtree.

If I want to edit with tags, it should be possible to do it straight away,
and not force the wikiwakkawhatever syntax.  This also allows to workaround
bugs in the wiki<->html parsers.
> 5) Choose the new format so it does not use '<' and '&' extensively,
> because these will have to be escaped.
> This way, it will be possible to mix 'old' and 'new' syntax within a
> single document to any extent, and we won't need to touch the backends at
> all.

I don't understand this, since if I follow these steps, the stored nodes
still may  contain the wiki syntax, and thus need backend changes?

Or am I wrong and are you suggesting encoding the xml/html to wiki as much as
possible before editing, and decoding it to xml/html tags afterwards?

IOW what is the storage format?

More information about the fpc-devel mailing list