On Fri, Jul 16, 2004 at 10:21:46AM +0200, Jordi Vilalta wrote:
Hi,
On Fri, 16 Jul 2004, Martin Quinson wrote:
> I am near the point where I decide that nsgml creates more problem than it
> solves. Making a ?ML parser in perl from the scratch shouldn't be that
> difficult after all.
My current implementation of the XML parser is quite generic and
customizable (I think). Maybe it could replace the current sgml one (when
it gets mature).
It's maybe time that:
- you create a user on alioth, so that we can give you the cvs write access
- you show us the code of this xml module
?
> The only reasons why I don't go further and reimplement my
own parser is the
> complexity of the code. As I said recently, I don't even remember the
> differences between translate and indent (I guess that's a good argument to
> reingeenering the code ;). And there is some weird parts to support sgml
> specificities such as conditional compilation (ok, that would be also easier
> without nsgml). There is the file inclusion mecanism, also (but it should be
> generalized, and put in the core of po4a so that other module can use it).
I think that this issue about the file inclusion, and the file encodings
are two of the main lacks of the po4a core. The rest are only format
modules, and these can always be extended.
Yes, the more urgent is to move out the file inclusion mecanism to
TransTractor.pm I may try to work on this next week, but I'm completely
overhelmed currently. If you want to work on this, please mail the list
before so that we make sure we don't dupplicate the effort, and please
process.
The problem is that detecting a file inclusion in the source is format
dependant. In sgml, that's done with entities while the macro so is used in
groff.
A solution may be to do something like that at the begining of each module:
map { if (/^.so (.*)/) $doc->includefile($1) } $doc->{TT}{doc_in};
It is a very crude proof of concept, though. The right solution may even be
completely different ;)
For the encoding issues, it's even worse. I don't have even the begining of
an answer. We may have to wait until Denis comes back.
> Ok, the real reason is my chronical lack of time, and the fear
of introducing
> new bugs which I would have to fix ASAP since some people begin to use po4a...
It's open source, there are lots of hands out there, that can help ;)
Well. I hope so, but if I break po4a, it's kind of my responsability to fix
it, isn't it?
--
Testing can only prove the presence of bugs.
--- Dijkstra