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 145325 - xhtml/xml support for Web Albums
xhtml/xml support for Web Albums
Status: RESOLVED FIXED
Product: gthumb
Classification: Other
Component: general
unspecified
Other Linux
: Normal minor
: ---
Assigned To: Paolo Bacchilega
Paolo Bacchilega
Depends on:
Blocks:
 
 
Reported: 2004-07-02 20:18 UTC by Curtis Hovey
Modified: 2005-02-27 16:41 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
xhtml+css conformance [patch 1/2] (4.83 KB, patch)
2004-12-29 12:43 UTC, Christophe Bisière
none Details | Review
xhtml+css conformance [patch 2/2] (28.92 KB, patch)
2004-12-29 12:45 UTC, Christophe Bisière
none Details | Review
patch against 2.6.3 -- XHTML 1.1 and CSS conformance for all themes (116.00 KB, patch)
2005-02-25 14:37 UTC, Christophe Bisière
none Details | Review
Web export -- Add summary attribute to table elements (20.17 KB, patch)
2005-02-26 16:14 UTC, Christophe Bisière
none Details | Review
Web export -- Escape markups in user or system supplied strings (6.83 KB, patch)
2005-02-26 23:45 UTC, Christophe Bisière
none Details | Review

Description Curtis Hovey 2004-07-02 20:18:13 UTC
1. I'm using gthumb 2.4.

2. I created an index.ghtml, image.ghtml, and thumbnail.ghtml that were
well-formed XML.  The index and image templates use XHTML 1.0 Strict DTDs.  

3. The exported photo album is not well-formed--the img elements are not written
as empty.  The ghtml:image element is always transformed to an SGML-based HTMl
element.

The Web export should be upgraded to XHTML because it is the current standard,
and because an XML img element causes fewer problems in HTML 4 than the reverse.
Comment 1 Christophe Bisière 2004-12-29 12:43:48 UTC
Created attachment 35272 [details] [review]
xhtml+css conformance [patch 1/2]

This is a proposal to achieve xhtml 1.1 and css conformance for web export.

Patch 1/2 (touch src/*):
* create a <gthumb:language/> element (used in index.gthtml and image.gthtml to
set the xml:lang attribute);
* eat spaces after gthumb tags for nicer output (stupid hack!)
* various tweaks to achieve xhtml 1.1 conformance and add flexibility in css

Patch 2/2 (touch data/albumthemes/Classic/*):
* complete rewrite of the Classic theme for xhtml 1.1 and css conformance 
* theme is now defined by two css: layout.css (positions, size, etc.) and
style.css (colors, etc.)
* page layout is still based on tables (page layout using div positioning is
possible, but requires many ugly hacks to achieve consistency across browsers)
* Classic theme tested on:
- Linux Gentoo: gecko-based browsers (Firefox 1.0, epiphany 1.4.6), opera
7.54ul, Konqueror 3.3.1
- Windows: IE6

A demo output is available online: http://bisiere.name/gallery/demo/index.html

Comments are welcome, esp. w.r.t.:
- How does it look like with other browsers (IE5, Mac browsers, etc.)?
- I'm wondering if it is portable to fiddle into the string returned by
setlocale. If not, I should convert it with g_locale_to_utf8 sooner.

If there is any interest in this proposal, I could convert the other themes.

Christophe Bisière
Comment 2 Christophe Bisière 2004-12-29 12:45:55 UTC
Created attachment 35273 [details] [review]
xhtml+css conformance [patch 2/2]

Second patch.

Christophe Bisière
Comment 3 Paolo Bacchilega 2004-12-31 11:59:29 UTC
Your patches, with some little changes, have been applied now, thanky you.  
Will you port the other themes too?
Comment 4 Christophe Bisière 2005-02-25 14:37:02 UTC
Created attachment 37935 [details] [review]
patch against 2.6.3 -- XHTML 1.1 and CSS conformance for all themes

Purpose:
* Make all themes XHTML 1.1 and CSS compliant
* simplify a bit layout.css to ease creation of new themes

Tested against:
* Firefox (1.0) et alii, konqueror (3.3.2), opera (7.54 u2), IE6

Demos available online at:
http://bisiere.name/gallery/demo/BlueStrips/index.html
http://bisiere.name/gallery/demo/Classic/index.html
http://bisiere.name/gallery/demo/ClassicClips/index.html
http://bisiere.name/gallery/demo/Clean/index.html
http://bisiere.name/gallery/demo/NeatRound/index.html
http://bisiere.name/gallery/demo/NeatSquare/index.html

Comments are welcome.

Cheers,

Christophe
Comment 5 Christophe Bisière 2005-02-25 14:42:18 UTC
Oops, typo. The first URL is:
http://bisiere.name/gallery/demo/BlueStripes/index.html

Christophe
Comment 6 Curtis Hovey 2005-02-26 01:47:01 UTC
I really appreciate the effort to make sane markup.  Tidy (the engine behind the
FireFox extension HTML Validator) reports that the summary is missing from the
tables.  The summary attribute is for WAI 3 compliance, and it provides a
description of the content.  It is not a very important attribute, and there may
not be information available to to make it, but the caption may be suitable.

Has the table caption element been explored as an option for the caption.  It
seems incorrect to place an inline span after a block-level table, particularly
when the span contains information that rightly belongs in the caption.  Using
the CSS caption-side: bottom may be appropriate for some treatments. 
Comment 7 Paolo Bacchilega 2005-02-26 13:16:11 UTC
Patch applied.
Comment 8 Christophe Bisière 2005-02-26 16:14:42 UTC
Created attachment 37976 [details] [review]
Web export -- Add summary attribute to table elements

This patch makes Tidy happy! 
Test it on: http://bisiere.name/gallery/demo/BlueStripes/index.html

Please apply on top of my previous (#37935) patch.

Christophe
Comment 9 Christophe Bisière 2005-02-26 23:45:40 UTC
Created attachment 37988 [details] [review]
Web export -- Escape markups in user or system supplied strings

This patch escapes xml "special characters" (e.g. <, >, &, ") in "suspect"
strings, i.e. user strings (through input fields in the web export dialog box),
system strings (file names, date and times, etc.), and i18n strings.

I wrote it in paranoid mode: any string which does not appear to be safe by
just inspecting catalog-web-export.c:gth_parsed_doc_print (e.g., a result from
a printf "%d") has been escaped.

Could you please review this patch? In particular, is it safe to split/join a
utf8 string using g_strsplit/g_strjoinv like I do?

Thanks and bye,

Christophe
Comment 10 Paolo Bacchilega 2005-02-27 09:55:13 UTC
all patches applied now, thank you.
Comment 11 Christophe Bisière 2005-02-27 10:20:41 UTC
Hi Curtis,

Curtis wrote:
> Has the table caption element been explored as an option for the caption. 
> It seems incorrect to place an inline span after a block-level table,
> particularly when the span contains information that rightly belongs in the 
> caption.  Using the CSS caption-side: bottom may be appropriate for some
> treatments. 

Unfortunately, AFAIK IE6/Win does not support the caption-side property, and I
founded no correct way to make it render a caption at the bottom of a table :

* <caption align=”bottom”> or <caption valign=”bottom”> works, but breaks XHTML
1.1 conformance;

* Placing <caption>...</caption> just before </table>  does not help at all
(caption is still rendered at the top) AND breaks XHTML 1.1 conformance;

Christophe
Comment 12 Curtis Hovey 2005-02-27 16:41:31 UTC
I see from
http://www.westciv.com/style_master/academy/browser_support/element_type.html
that you are right.  Thanks for the effort.