GNOME Bugzilla – Bug 145325
xhtml/xml support for Web Albums
Last modified: 2005-02-27 16:41:31 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.
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
Created attachment 35273 [details] [review] xhtml+css conformance [patch 2/2] Second patch. Christophe Bisière
Your patches, with some little changes, have been applied now, thanky you. Will you port the other themes too?
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
Oops, typo. The first URL is: http://bisiere.name/gallery/demo/BlueStripes/index.html Christophe
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.
Patch applied.
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
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
all patches applied now, thank you.
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
I see from http://www.westciv.com/style_master/academy/browser_support/element_type.html that you are right. Thanks for the effort.