On 26 May 2010, at 23:18, Sylvain Galineau wrote:
> Or we can let each browser vendor figure out whether and how they'll render the unknown arbitrarily deep
> XML they might come across. By now it's painfully clear which approach I believe to be most likely to
> result in solid, complete, working implementations so I'll stop :)
Is this really so hard? I don't speak XSLT, but with the help of a few examples I found online, I've just thrown together the attached, which gives a reasonable default view (IMHO) of "generic" XML. OK, it wouldn't do anything useful with *truly* generic XML, but it handles the kind of structure used in the WOFF spec and would allow arbitrary extensions along similar lines. It doesn't seem to me that this is significantly different from what you'd have to do in order to present your "property list" in a comparable format, and it's every bit as extensible.
To see what this does, run
xsltproc woff-metadata.xsl metadata-sample.xml > metadata-sample.html
where metadata-sample.xml is the example from Appendix B, or the metadata block from a real WOFF file; then view the resulting HTML with the browser of your choice.
I didn't tackle the issue of displaying only the user's preferred language, where multiple localizations are present. This is left as an exercise for the reader...... :)
JK