After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 336765 - Fix keep-entities (-k) XML merging
Fix keep-entities (-k) XML merging
Status: RESOLVED FIXED
Product: gnome-doc-utils
Classification: Deprecated
Component: xml2po
CVS HEAD
Other Linux
: Normal normal
: ---
Assigned To: Danilo Segan
Danilo Segan
Depends on:
Blocks:
 
 
Reported: 2006-03-31 19:59 UTC by Danilo Segan
Modified: 2019-03-25 23:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Re-enable keeping entities (592 bytes, patch)
2006-03-31 20:07 UTC, Danilo Segan
none Details | Review

Description Danilo Segan 2006-03-31 19:59:46 UTC
This is listed in TODO, and the problematic part of xml2po.py is the following snippet in replaceNodeContentsWithText function:

            # Lets add document DTD so entities are resolved
            dtd = doc.intSubset()
            tmp = ''
            if expand_entities: # FIXME: we get a "Segmentation fault" in libxml2.parseMemory() when we include DTD otherwise
                tmp = dtd.serialize('utf-8')
            tmp = tmp + '<%s>%s</%s>' % (starttag, text, endtag)


It seems now this was a problem with libxml2 (yet I suspected it was my code), since it now works for me without any problems on libxml2 2.6.21 (anyone knows when the change happened?).


I am just adding it to Bugzilla since it's a common request, along with a very simple patch that should apply to many different xml2po versions (for those not wishing to recompile g-d-u from CVS).
Comment 1 Danilo Segan 2006-03-31 20:07:35 UTC
Created attachment 62479 [details] [review]
Re-enable keeping entities
Comment 2 Danilo Segan 2006-03-31 20:08:12 UTC
Fixed in CVS, testcase added.
Comment 3 Danilo Segan 2006-03-31 23:34:21 UTC
The bug was still in my own code, when doing in-place modifications of document tree in the same function. Improved fix in CVS.