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 126452 - Compilation error in data/albumthemse/BlueStripes with index.xml.in parsing
Compilation error in data/albumthemse/BlueStripes with index.xml.in parsing
Status: RESOLVED FIXED
Product: gthumb
Classification: Other
Component: general
unspecified
Other All
: Urgent major
: ---
Assigned To: Paolo Bacchilega
Paolo Bacchilega
: 128865 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2003-11-07 17:06 UTC by Damien Carbery
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Damien Carbery 2003-11-07 17:06:43 UTC
A few days ago intltool-merge was modified to require the XML::Parser perl
module.
I installed this module and expat 1.95.7, a prerequesite of XML::Parser
onto my Solaris 9 sparc system.

Now I get the following gthumb build error.
If I change the first line of index.xml.in to add quotes around the numbers
on the first line the error moves to the next line.
I don't know if it is an XML::Parser installation/configuration error but
that happened without error.
Suggestions are welcome.

make[4]: Entering directory
`/export/home/gnome/2.4/nightly/src-2.4-20031107/gthumb/data/albumthemes/BlueStripes'
LC_ALL=C ../../../intltool-merge ../../../po index.xml.in index.xml -x -u
-c ../../../po/.intltool-merge-cache

not well-formed (invalid token) at line 1, column 32, byte 32 at
/usr/perl5/site_perl/5.6.1/sun4-solaris-64int/XML/Parser.pm line 187
Found cached translation database
Merging translations into index.xml.
make[4]: *** [index.xml] Error 255
rm index.xml
make[4]: Leaving directory
`/export/home/gnome/2.4/nightly/src-2.4-20031107/gthumb/data/albumthemes/BlueStripes'
Comment 1 Luis Villa 2003-11-16 18:30:16 UTC
This happens on linux (fedora core 1) as well. Updating to reflect that.
Comment 2 Luis Villa 2003-11-16 19:03:48 UTC
Adding some quotes around the thumbnail* values gets me a different
error, but it still errors:

[louie@localhost gthumb]$ xmllint
data/albumthemes/BlueStripes/index.xml.in
data/albumthemes/BlueStripes/index.xml.in:1: namespace error :
Namespace prefix gthumb on set_var is not defined
<gthumb:set_var thumbnail_width="185" thumbnail_height="146"/>
                                                            ^
data/albumthemes/BlueStripes/index.xml.in:2: parser error : Extra
content at the end of the document
<gthumb:set_var preview_width="600" preview_height="400"/>
Comment 3 Paolo Bacchilega 2003-11-16 21:41:39 UTC
is there a way of avoiding the xml parsing?
Comment 4 Alexander Kirillov 2004-01-22 23:02:32 UTC
*** Bug 128865 has been marked as a duplicate of this bug. ***
Comment 5 Luis Villa 2004-01-27 05:09:07 UTC
I've cc'd Kenneth, Brian, and Danilo- I'm sure one of these guys
should be able to figure out the problem, or at least answer your
question, Paolo. Happens with head intltool and head gthumb, at least,
and it looks like also with what comes with fedora- not 100% sure I've
cleared out enough bits to verify that, though.
Comment 6 Luis Villa 2004-02-21 23:41:45 UTC
Poke? Danilo? Brian? I'm still seeing this with HEAD, it's sort of
gross. :/
Comment 7 david.hawthorne 2004-02-24 13:00:56 UTC
I still seeing this too, on a SuSE machine. I'd rather not have to
hack together a build of it.
Comment 8 Danilo Segan 2004-02-24 13:28:03 UTC
Sorry for missing this.

Files in question are apparently not well formed XML files (check with
"xmllint" *without* -valid option). Someone with better XML experience
should be able to help there.

I see several problems (and I'm severly lacking on XML front):
- there's no one root element (that's error Luis is seeing: "Extra
content at the end of document"), and this can be "fixed" by
surrounding entire document with something like "<temp>" and "</temp>".
- namespaces (tags with ":" in them) cannot be used unless properly
defined (and I don't know how does one do that)
- image.xml.in's use stuff like "<gthumb:if images > 1 />" which is
certainly not well-formed XML

intltool previously used regular expressions, so that made a lot of
stuff pass, which might not even resemble well-formed XML.
Comment 9 Danilo Segan 2004-02-24 13:35:01 UTC
Just to add a couple more notes.

These seem to be templates for HTML, and they most probably shouldn't
be translated via intltool this way.  My suggestion would be to
extract strings for use via code instead, and to put that into
generated "galleries" only when actually generating resulting files
(this would at no cost fix many localization issues, such as string
composition that is used, allowing plural forms, etc.).