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 696974 - Embed DTDs with GResource
Embed DTDs with GResource
Status: RESOLVED FIXED
Product: empathy
Classification: Core
Component: General
unspecified
Other All
: Normal normal
: ---
Assigned To: empathy-maint
empathy-maint
Depends on:
Blocks:
 
 
Reported: 2013-03-31 15:03 UTC by Emanuele Aina
Modified: 2013-04-01 10:30 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
utils: Add empathy_xml_validate_from_resource() (2.23 KB, patch)
2013-03-31 15:03 UTC, Emanuele Aina
committed Details | Review
Embed DTDs for XML validation as GResources (6.36 KB, patch)
2013-03-31 15:03 UTC, Emanuele Aina
committed Details | Review
utils: Drop the file-based empathy_xml_validate() (2.26 KB, patch)
2013-03-31 15:15 UTC, Emanuele Aina
committed Details | Review
utils: Drop the file-based empathy_xml_validate() (2.26 KB, patch)
2013-04-01 10:30 UTC, Emanuele Aina
committed Details | Review
Embed DTDs for XML validation as GResources (6.31 KB, patch)
2013-04-01 10:30 UTC, Emanuele Aina
committed Details | Review
utils: Add empathy_xml_validate_from_resource() (2.23 KB, patch)
2013-04-01 10:30 UTC, Emanuele Aina
committed Details | Review

Description Emanuele Aina 2013-03-31 15:03:25 UTC
There is no value in storing the DTD used to validate the custom XML formats
separately from the code that uses them. Embedding them in the library with the
GResource framework will avoid errors due to broken installations and possibly
increase performance due to better cache utilization.
Comment 1 Emanuele Aina 2013-03-31 15:03:28 UTC
Created attachment 240210 [details] [review]
utils: Add empathy_xml_validate_from_resource()

Validate against dtd stored in a GResource.
Comment 2 Emanuele Aina 2013-03-31 15:03:33 UTC
Created attachment 240211 [details] [review]
Embed DTDs for XML validation as GResources
Comment 3 Emanuele Aina 2013-03-31 15:15:18 UTC
Created attachment 240215 [details] [review]
utils: Drop the file-based empathy_xml_validate()

After embedding all the DTDs with GResource the file-based
empathy_xml_validate() is no longer needed, replaced by
empathy_xml_validate_from_resource().
Comment 4 Guillaume Desmottes 2013-04-01 06:11:16 UTC
Review of attachment 240210 [details] [review]:

Feel free to merge once the coding style issue is fixed.

::: libempathy/empathy-utils.c
@@ +111,2 @@
 gboolean
+empathy_xml_validate_from_resource (xmlDoc      *doc,

should be "xmlDoc *doc" according to our coding style.
Comment 5 Guillaume Desmottes 2013-04-01 06:18:14 UTC
Review of attachment 240211 [details] [review]:

++ assuming it distchecks.
Comment 6 Guillaume Desmottes 2013-04-01 06:18:34 UTC
Review of attachment 240215 [details] [review]:

++
Comment 7 Emanuele Aina 2013-04-01 10:29:48 UTC
The following fixes have been pushed:
f9ba3c0 utils: Drop the file-based empathy_xml_validate()
3992967 Embed DTDs for XML validation as GResources
4299f29 utils: Add empathy_xml_validate_from_resource()
Comment 8 Emanuele Aina 2013-04-01 10:30:14 UTC
Created attachment 240289 [details] [review]
utils: Drop the file-based empathy_xml_validate()

After embedding all the DTDs with GResource the file-based
empathy_xml_validate() is no longer needed, replaced by
empathy_xml_validate_from_resource().
Comment 9 Emanuele Aina 2013-04-01 10:30:20 UTC
Created attachment 240290 [details] [review]
Embed DTDs for XML validation as GResources
Comment 10 Emanuele Aina 2013-04-01 10:30:27 UTC
Created attachment 240291 [details] [review]
utils: Add empathy_xml_validate_from_resource()

Validate against dtd stored in a GResource.