Re: [AD] Makedoc patch (was: 4.0.x branch)

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Hi,

Stepan Roh wrote:
[snip]
Why? XML has nothing to do with HTML generation, it just defines format
for storing text data. Generation is as complicated as with _tx (if you
don't want to depend on external software, which _tx is not).

Incorrect on both counts. Generating HTML from XML is as simple as substituting tags. Simply turn <function> into <div class="function">, and output the CSS you want. As for dependence on external software, I find that hard to beleive. I have a 150 line micro XML parser - enough to understand the basic constructs that you saw in those documents. With some small changes, it could be adapted to Peter's Lisp s-expressions.

For reference, you can grab it here:
http://pages.infinit.net/voidstar/xmlparse.c

It uses callbacks, much like SaX. Line lengths are limited though (static buffer), but that can be fixed.


XML was created to exchange data and to convert documents from one format to another. Isn't this what we're doing with ._tx?



Both are non-standard hacks. Writing generators could take a long time.

The XML parser took me a few hours. Making it substitue tags to generate HTML will take another couple of hours. Getting it to plit allegro.xml into multiple files (like the ._tx) might be a little trickier, but not all that complicated.

Either keep _tx format or move to something standard like DocBook
SGML/DocBook XML. There is no need to reimplementing the wheel.

So wait. You don't want XML, but you do want XML? I'm confused now...
I'd rather not depend on external software (interpretting DocBook) or writting a full XML parser.

We don't *need* to use DTDs to define XML files. We can, but don't have to. DTDs are optional. So appart from adding the <?xml> tag at the beginning, the documents are perfectly valid xml files.

--
- Robert J Ohannessian
"Microsoft code is probably O(n^20)" (my CS prof)
http://pages.infinit.net/voidstar/



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/