[Po4a-devel] Dealing with series of comments in the XML module

Nicolas François nicolas.francois at centraliens.net
Fri Feb 29 17:21:37 UTC 2008


Hi,

On Fri, Feb 29, 2008 at 07:59:55PM +0900, nori1 at dolphin.c.u-tokyo.ac.jp wrote:
> 
> Test data for the XML module contain
> 
> <!-- The content of this document is licensed under the XXX license -->
> <!-- See bla bla -->
> 
> as an input data and
> 
> <!-- The content of this document is licensed under the XXX license 
>  See bla bla -->
> 
> as its corresponding output data.  Does this mean that the conversion
> of a series of comments into one comment is an expected behavior?
> 
> Since the Wml module temporarily converts '#'-headed comments into an
> XML-syntax comments and uses the XML module for parsing, the
> conversion of a series of comments results in a bug.  I'd like to know
> whether this should be fixed in the XML module or in the Wml
> module. ;-)

This was currently not an issue in the Xml module, but if it is a limitation
for the Wml module, it can be changed (I don't think any module or user
rely on it).
I think it can be fixed in the translate_paragraph subroutine of the Xml
module (before the first pushline)

I will add a test to the Xml testsuite to check how it evolves for
something like:

    <p>
	<!-- first comment block -->
	<!-- second comment block
	     multiline -->
	paragraph foo
	bar
	<!-- comment inside the paragraph -->
	baz qux
	<!-- comment after the paragraph -->
    </p>

The goal is just to check how it evolves, but if the resulting translated
document changes, and if it looks more like the original comments, then
it's better.
Just update the testsuite when you update the Xml module.



BTW, I will soon make a new release (I hope this weekend), to fix an
important bug (#459451 - po4a failures with perl 5.10).

The Wml module is currently not released in the po4a tarballs, so I will
not really care about this module during this release.
Just let me know when you think it is of an acceptable quality for a
release.  We can plan a later release with Wml (and also translations).

(I also need to translate / remove the French IRC session extract in the
TODO session of the Wml manpage)

Kind Regards,
-- 
Nekral



More information about the Po4a-devel mailing list