-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The Xml module does not normalize the document, making it difficult to use addenda #76
Comments
This bug is preventing to move debian-history to migrate to XML. It's not the bug in the normalization of output to the file but the way output strings are stored on @{$self->{TT}{doc_out}}. Although code expects array item to contain one line, it actually contain new line character for XML case. If you carefully check output under debug, this is obvious since it lists multiple lines as the matched string. (Yes, it's too much to realize. I actually needed to change source to clearly mark matched line ... but that is another story) This reviled that array item contained multiple lines. So what is needed seems to be something like: This is a simple code to split multi-line item into multiple items of array. This sort-of works right if this is inserted after encoding setting before checking match with $position around line 651. Now the question is the detail around "\n" handling. Avoiding perl odd rule using -1 for split seemed to be good thing to consider in order not to drop tailing "\n" for split. I thought doing the following seems to be better if each array item itself @{$self->{TT}{doc_out}} = map {"$\n"} map {split '\n', $, -1 } @{$self->{TT}{doc_out}}; But this seems to produce too many "\n"s. The initial map {"$_\n"} looks stupid time consuming code. So Setting one of:
So I propose to add following as patch to address this bug. This works OK to add translator names into legalnotice within bookinfo tag. |
If you check my patch doesn't have any unwanted side effects, please upload new package with this fix. Than many XML doc get benefit of addendum for buster. Please. |
I will test your patch ASAP, but that's the beginning of the new term at university here. My free time is really scarce, sorry... Do not hesitate to ping me regularly if you don't see anything coming. |
I am not familiar with test suite. Now that I have some idea how to change its behavior of parser for docbook without patching the source, test was done via "-o". I tested on 4 simple XML book and article files based on examples in https://tdg.docbook.org/tdg/4.5/ with minor edits. I think applying OPTION1 gives best result. po4a-normalize doesn't work, so there is some space for improvement. But this should give good reference test for book and article. OPTIONS1 := So default needs to be updated. I will propose patch later. Here is the test run on 0.54 |
Apparently, pasting XML look-like doesn't work. See it in tarball. Sorry. |
Hello again @osamuaoki I have the feeling that this issue can be closed, since #153 was merged to master. Could you please confirm? Thanks in advance, |
Yah... this is non-issue now, I think |
Thanks for confirming. Thus closing. |
Initially reported on Alioth by me, back in 2005:
The text was updated successfully, but these errors were encountered: