<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Don't call me DOM &#187; Development</title>
	<atom:link href="http://people.w3.org/~dom/archives/category/development/feed/" rel="self" type="application/rss+xml" />
	<link>http://people.w3.org/~dom</link>
	<description>W3C has the DOM, and the Dom ; pick the one you prefer.</description>
	<lastBuildDate>Sat, 07 Nov 2009 11:02:42 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>WebIDL checker</title>
		<link>http://people.w3.org/~dom/archives/2009/07/webidl-checker/</link>
		<comments>http://people.w3.org/~dom/archives/2009/07/webidl-checker/#comments</comments>
		<pubDate>Thu, 30 Jul 2009 07:14:54 +0000</pubDate>
		<dc:creator>Dom</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://people.w3.org/~dom/?p=302</guid>
		<description><![CDATA[A growing number of W3C groups are in the process of developing JavaScript APIs: the HTML Working Group, the Web Applications Working Group, the SVG Working Group, the Geolocation Working Group, and the newly created Device APIs and Policy Working Group of which I am one of the Staff Contacts.
The Web Applications Working Group has [...]]]></description>
			<content:encoded><![CDATA[<p>A growing number of W3C groups are in the process of developing JavaScript <abbr title='Application Programming Interface'>API</abbr>s: the <a href="http://www.w3.org/html/">HTML Working Group</a>, the <a href="http://www.w3.org/2008/webapps/">Web Applications Working Group</a>, the <a href="http://www.w3.org/Graphics/SVG/">SVG Working Group</a>, the <a href="http://www.w3.org/2008/geolocation/">Geolocation Working Group</a>, and the newly created <a href="http://www.w3.org/2009/dap/">Device APIs and Policy Working Group</a> of which I am one of the Staff Contacts.</p>
<p>The Web Applications Working Group has been developing a common IDL format to define these APIs, called <a href="http://www.w3.org/TR/WebIDL/">WebIDL</a>, which basically takes the <a href="http://www.omg.org/cgi-bin/apps/doc?formal/02-06-39.pdf">OMG IDL format</a> and extend it to make it more useful and informative in the context of JavaScript APIs.</p>
<p>In the context of the development of the <a href="http://bondi.omtp.org/1.0/apis/index.html">OMTP BONDI APIs</a> that will serve as input to the new Device APIs and Policy Working Group, an OMTP Member, Aplix, developed and released under an open-source license a tool called <a href="http://widl.webvm.net/svn/widlproc/trunk/doc/widlproc.html">widlproc</a> that checks the validity of WebIDL interfaces, and turns valid fragments into an XML format.</p>
<p>I already have plenty of ideas on how to exploit that XML serialization of WebIDLs, but as a first step into the world of WebIDLs, I have developed and set up <a href="http://www.w3.org/2009/07/webidl-check">on-line WebIDL checker</a> that provides a wrapper around widlproc. You feed it with the address of an HTML document containing WebIDLs and it:</p>
<ul>
<li>automatically extracts WebIDLs fragments from an HTML document (using XPath),</li>
<li>verifies the validity of these fragments (through widlproc),</li>
<li>outputs error messages when finding invalid fragments,</li>
<li>outputs an HTML representation of the APIs otherwise (by applying an <a href="http://www.w3.org/2009/07/widlprocxmltohtmlfragment.xsl">XSLT style sheet</a> to wildproc output).</li>
</ul>
<p>Some examples of results:</p>
<ul>
<li>on the <a href="http://www.w3.org/2009/07/webidl-check?doc=http%3A%2F%2Fdev.w3.org%2Fhtml5%2Fspec%2FOverview.html">140 WebIDLs included in the HTML 5 specification</a> (where it would have <a href="http://www.w3.org/2009/07/webidl-check?doc=http%3A%2F%2Fdev.w3.org%2Fcvsweb%2F~checkout~%2Fhtml5%2Fspec%2FOverview.html%3Frev%3D1.2668%26content-type%3Dtext%2Fhtml%3B%2520charset%3Dutf-8">detected</a> the <a href="http://lists.w3.org/Archives/Public/www-archive/2009Jul/0084.html">bugs I reported earlier</a> by running widlproc manually on the spec)</li>
<li>on the <a href="http://www.w3.org/2009/07/webidl-check?doc=http%3A%2F%2Fwww.w3.org%2FTR%2F2009%2FWD-geolocation-API-20090707%2F">latest draft of the GeoLocation API</a></li>
<li>on the <a href="http://www.w3.org/2009/07/webidl-check?doc=http%3A%2F%2Flists.w3.org%2FArchives%2FPublic%2Fpublic-device-apis%2F2009Apr%2Fatt-0001%2Fcamera.html">Camera API proposed by Nokia</a> for the Device APIs and Policy Working Group &#8211; where the tool reports an error for the use of the <code>sequence</code> keyword that hasn&#8217;t made it yet in the official WebIDL spec (but is defined in the <a href="http://dev.w3.org/2006/webapi/WebIDL/#idl-sequence">editor&#8217;s version</a>) and thus isn&#8217;t recognized by widlproc yet.</li>
</ul>

<p>It is clearly a niche-tool &#8211; how many people on earth are ever going to write a WebIDL ? But hopefully it will help in detecting bugs in WebIDLs produced by W3C groups and others.</p>]]></content:encoded>
			<wfw:commentRss>http://people.w3.org/~dom/archives/2009/07/webidl-checker/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using /etc/xml/catalog with org.apache.xml.resolver </title>
		<link>http://people.w3.org/~dom/archives/2009/07/using-etcxmlcatalog-with-org-apache-xml-resolver/</link>
		<comments>http://people.w3.org/~dom/archives/2009/07/using-etcxmlcatalog-with-org-apache-xml-resolver/#comments</comments>
		<pubDate>Thu, 16 Jul 2009 14:50:30 +0000</pubDate>
		<dc:creator>Dom</dc:creator>
				<category><![CDATA[XSLT]]></category>

		<guid isPermaLink="false">http://people.w3.org/~dom/?p=300</guid>
		<description><![CDATA[I have just reported the bug in the w3c-dtd-xhtml Ubuntu package that had prevented me from using the Apache XML Catalog resolver to use local XHTML DTDs rather than the on-line ones when using the Saxon XSLT processor.

Hitting the on-line DTDs on every invokation of Saxon  unnecessarily burdens the W3C Web site. I had [...]]]></description>
			<content:encoded><![CDATA[<p>I have just <a href="https://bugs.launchpad.net/bugs/400259">reported the bug in the w3c-dtd-xhtml Ubuntu package</a> that had prevented me from using the Apache XML Catalog resolver to use local XHTML DTDs rather than the on-line ones when using the Saxon XSLT processor.</p>

<p>Hitting the on-line DTDs on every invokation of Saxon  <a href="http://www.w3.org/blog/systeam/2008/02/08/w3c_s_excessive_dtd_traffic">unnecessarily burdens the W3C Web site</a>. I had already found <a href="http://xml.apache.org/commons/components/resolver/resolver-article.html">guidance on how to use the Apache XML Catalog resolver</a> to avoid that, but it wouldn&#8217;t work with the default XML catalog list provided by Ubuntu in <code>/etc/xml/catalog</code> for the XHTML DTDs.</p>

<p>After some investigation, it appeared that the use of a bogus URL as a SystemID in the intermediaries XHTML catalog files prevents the proper parsing of these catalogs, and thus make the local DTDs undiscoverable.</p>

<p>With the patch provided in my bug report, I can now happily use <code>/etc/xml/catalog</code> with saxon and never hit the network when transforming XHTML files:</p>
<pre><code>
java -cp /usr/share/java/xml-commons-resolver-1.1.jar:<var>path-to-saxon8</var>/saxon8.jar -Dxml.catalog.files=/etc/xml/catalog -Dxml.catalog.verbosity=1 net.sf.saxon.Transform -novw -r org.apache.xml.resolver.tools.CatalogResolver         -x org.apache.xml.resolver.tools.ResolvingXMLReader         -y org.apache.xml.resolver.tools.ResolvingXMLReader <var>XMLFile</var> <var>XSLTFile</var>
</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://people.w3.org/~dom/archives/2009/07/using-etcxmlcatalog-with-org-apache-xml-resolver/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Validating XHTML Basic 1.1</title>
		<link>http://people.w3.org/~dom/archives/2009/06/validating-xhtml-basic-1-1/</link>
		<comments>http://people.w3.org/~dom/archives/2009/06/validating-xhtml-basic-1-1/#comments</comments>
		<pubDate>Tue, 16 Jun 2009 16:03:23 +0000</pubDate>
		<dc:creator>Dom</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Mobile Web]]></category>
		<category><![CDATA[Work environment]]></category>

		<guid isPermaLink="false">http://people.w3.org/~dom/?p=291</guid>
		<description><![CDATA[As I was trying to validate a large number of XHTML MP 1.2 files (the ones in one of the OMA&#8217;s XHTML MP test suite &#8211; whose welcome page itself ironically is not well-formed), I realized that the tool I was using, based on the WDG HTML validator as packaged by Debian, was making network [...]]]></description>
			<content:encoded><![CDATA[<p>As I was trying to validate a large number of XHTML MP 1.2 files (the ones in one of the <a href="http://testfest.openmobilealliance.org/XHTML_Suite_3/">OMA&#8217;s XHTML MP test suite</a> &#8211; whose welcome page itself ironically is not well-formed), I realized that the tool I was using, based on the <a href="http://htmlhelp.com/tools/validator/">WDG HTML validator</a> as <a href="http://packages.debian.org/en/etch/all/wdg-html-validator">packaged by Debian</a>, was making network access requests when used on these XHTML MP 1.2 files. I then moved to use <code>xmllint</code> with the <code>--valid</code> option, but it had the same behavior.</p>

<p>As one of the W3C Systems team member, I&#8217;m acutely aware <a href="http://www.w3.org/blog/systeam/2008/02/08/w3c_s_excessive_dtd_traffic">how bad is the practice of fetching DTDs over the network</a> over and over again.</p>

<p>Furthermore, the OMA XHTML MP 1.2 DTDs are broken &#8211; they include non-UTF-8 characters in the comments of one of the modules (bug that I have reported a while ago but that still hasn&#8217;t been fixed apparently).</p>

<p>But given that XHTML MP 1.2 is mostly equivalent to XHTML Basic 1.1, I thought I would validate the said files against that DTD &#8211; but I wanted to make sure I wouldn&#8217;t hit the network when doing so.</p>

<p>Unfortunately, the XHTML Basic 1.1 DTD was not installed in my local XML catalog by default as part of the others DTD in the <code>w3c-dtd-xhtml package</code> &#8211; I&#8217;ve filed a <a href="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=533327">bug report</a> in the hope that it will be in the future, along with the XHMTL+RDFa DTD.</p>

<p>So I looked into adding the XHTML Basic 1.1 DTD to my local XML catalog, and marking it as an equivalent of the XHTML MP 1.2 DTD at the same time. Given that this wasn&#8217;t exactly straightforward, I thought I would document here what I did to set that up on my Ubuntu Jaunty install, in the event that someone else would need to do something simiar:</p>
<ul>
<li>first, I added the following lines to my <code>/etc/xml/catalog</code> file:
<pre><code>&lt;delegatePublic publicIdStartString="-//W3C//DTD XHTML Basic 1.1" catalog="file:///etc/xml/w3c-dtd-xhtml.xml"/&gt;
&lt;!-- Making XHTML MP an equivalent of XHTML Basic 1.1 --&gt;
&lt;delegatePublic publicIdStartString="-//OMA//DTD XHTML Mobile 1.2" catalog="file:///etc/xml/w3c-dtd-xhtml.xml"/&gt;</code></pre></li>
<li>I edited <code>/etc/xml/w3c-dtd-xhtml.xml</code> to add the following lines:
<pre><code>&lt;delegatePublic publicIdStartString="-//W3C//DTD XHTML Basic 1.1//EN" catalog="file:///usr/share/xml/xhtml/schema/dtd/basic11/catalog.xml"/>
&lt;!-- Making XHTML MP an equivalent of XHTML Basic 1.1 -->
&lt;delegatePublic publicIdStartString="-//OMA//DTD XHTML Mobile 1.2//EN" catalog="file:///usr/share/xml/xhtml/schema/dtd/basic11/catalog.xml"/>
</code></pre></li>
<li>I created the directory <code>/usr/share/xml/xhtml/schema/dtd/basic11/</code> and put the following files in it (available as a <a href="/~dom/2009/xhtmlbasic11cat.zip">Zip file</a>):
<ul><li><a href="http://www.w3.org/MarkUp/DTD/xhtml-basic11.cat">the SGML Catalog definition of XHTML Basic 1.1</a> &#8211; since I&#8217;m now using <code>xmllint</code> rather than the WDG validator, I&#8217;m not sure if it works or is useful as is</li>
<li><a href="/~dom/2009/catalog.xml">a modified XML Catalog file</a> that points both the XHTML Basic 1.1 FPI (<code>-//W3C//DTD XHTML Basic 1.1//EN</code>) and the XHMTL MP 1.2 FPI (<code>-//OMA//DTD XHTML Mobile 1.2//EN</code>) to the XHTML Basic 1.1 DTD</li>
<li>a <a href="/~dom/2009/xhtml-basic11-f.dtd">corrected version of the flat DTD for XHTML Basic 1.1</a>, that includes all the necessary modules as a single file &#8211; while it was based on an <a href="http://www.w3.org/MarkUp/DTD/xhtml-basic11-f.dtd">old version developed by the XHTML Working Group</a>, I had to update it quite a bit to make it actually represent what the XHTML Basic 1.1 spec says</li>
<li>I have also included other files that I had found in the similar catalog directory for XHTML Basic 1.0, but I think they&#8217;re only useful for SGML-based validation, rather than XML-based &#8211; they are also in the Zip file, but may not be useful</li>
</ul>

<p>With these changes, I&#8217;m now able to validate my XHTML MP/Basic files without hitting the network. But the main lesson for me remains that it isn&#8217;t exactly trivial to add DTDs to a catalog when it isn&#8217;t done by people who actually know what they&#8217;re doing&hellip;</p>]]></content:encoded>
			<wfw:commentRss>http://people.w3.org/~dom/archives/2009/06/validating-xhtml-basic-1-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>beta.w3.org is live!</title>
		<link>http://people.w3.org/~dom/archives/2009/03/betaw3org-is-live/</link>
		<comments>http://people.w3.org/~dom/archives/2009/03/betaw3org-is-live/#comments</comments>
		<pubDate>Fri, 20 Mar 2009 16:31:33 +0000</pubDate>
		<dc:creator>Dom</dc:creator>
				<category><![CDATA[Web development]]></category>

		<guid isPermaLink="false">http://people.w3.org/~dom/?p=272</guid>
		<description><![CDATA[The long-announced W3C site redesign is finally going live, in beta for the time being, at beta.w3.org.
Although I&#8217;m far from having been the lead in that project &#8211; nobody has even come closed to the amount of energy and willpower Ian has put into it -, I&#8217;m still quite proud of the areas where I [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://www.w3.org/QA/2008/06/about_the_love_w3org_redesign.html">long-announced W3C site redesign</a> is finally going live, in beta for the time being, at <a href="http://beta.w3.org"><code>beta.w3.org</code></a>.</p>
<p>Although I&#8217;m far from having been the lead in that project &#8211; nobody has even come closed to the amount of energy and willpower <a href="http://www.w3.org/People/Jacobs/">Ian</a> has put into it -, I&#8217;m still quite proud of the areas where I have been able to contribute to, in particular the completely new information architecture, the focus on usability on user-centric navigation, as well as some participation in the software architecture and development that is used in the background of this redesign.</p>
<p>I&#8217;m hoping many will find the new site a vast improvement on the current site, and that we&#8217;ll also get plenty of <a href="http://beta.w3.org/Help/about-redesign.html#howtohelp">contributions</a>, in the form of comments, bug reports, and some of the texts that we still need to complete some of our new pages.</p>]]></content:encoded>
			<wfw:commentRss>http://people.w3.org/~dom/archives/2009/03/betaw3org-is-live/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Synchronizing text and video</title>
		<link>http://people.w3.org/~dom/archives/2009/02/synchronizing-text-and-video/</link>
		<comments>http://people.w3.org/~dom/archives/2009/02/synchronizing-text-and-video/#comments</comments>
		<pubDate>Fri, 13 Feb 2009 12:31:32 +0000</pubDate>
		<dc:creator>Dom</dc:creator>
				<category><![CDATA[Video]]></category>
		<category><![CDATA[Work environment]]></category>
		<category><![CDATA[XSLT]]></category>

		<guid isPermaLink="false">http://people.w3.org/~dom/?p=235</guid>
		<description><![CDATA[After having visited the land of transcription as my first stop in the world of Web video, the next logical step was to look into how this wonderful transcription of my video could be actually shown along with the video.
Transcriber, the tool I used to generate the captions of the video, saves the transcription into [...]]]></description>
			<content:encoded><![CDATA[<p>After having <a href="http://people.w3.org/~dom/archives/2009/02/diving-in-transcription/">visited the land of transcription</a> as my first stop in the <a href="http://people.w3.org/~dom/archives/2009/02/exploring-the-world-of-web-video/">world of Web video</a>, the next logical step was to look into how this wonderful transcription of my video could be actually shown along with the video.</p>
<p><a href="http://trans.sourceforge.net/en/presentation.php">Transcriber</a>, the tool I used to generate the captions of the video, saves the <a href="http://www.w3.org/2009/02/presentation-viewer/parisweb-transcriber.xml">transcription into its own XML format</a>:</p>
<pre ><code>&lt;Episode program="<span xml:lang="fr">ParisWeb 2007 - Les Bonnes Pratiques du Web Mobile</span>" 
  air_date="2007-11-16">
&lt;Trans scribe="<span xml:lang="fr">Dominique Hazael-Massieux</span>" 
  audio_filename="parisweb" version="5" version_date="090210" xml:lang="fr">
  &lt;Speakers>
    &lt;Speaker id="spk1" name="<span xml:lang="fr">Stéphane Deschamps</span>" 
      check="no" type="male" dialect="native" accent="French" scope="local"/>
    &lt;/Speaker>
  &lt;/Speakers>
  &lt;Section type="report" startTime="0" endTime="44.209">
    &lt;Turn startTime="0" endTime="19.933" speaker="spk1" mode="planned">
      &lt;Sync time="0"/>
      <span xml:lang="fr">Y'a quelque chose auquel on croit beaucoup à ParisWeb,</span>
      &lt;Sync time="3.458"/>
      <span xml:lang="fr">c'est "les standards, c'est bon, mangez-en",</span>
      &lt;Sync time="6.553"/>
      <span xml:lang="fr">c'est pour ça que cette association existe</span>
    &lt;/Turn>
  &lt;/Section>
&lt;/Trans></code></pre>

<p>It offers the possibility to export it in a variety of other formats (including HTML), but for sake of exploring one of the technologies in development in W3C for that precise use-case, <a href="http://www.w3.org/TR/ttaf1-dfxp/">Timed Text DFXP</a>, I started to look into transforming their XML format into Timed Text.</p>
<p>Another motivation for that was that <a href="http://home.gna.org/subtitleeditor/">Subtitle Editor</a>, the other tool I had looked at, is able to import and export timed text data; this also meant that very same tool would allow me to quickly visualize the subtitles superimposed to the video, one of the advantages that it had over Transcriber.</p>
<p>It turned out (unsurprisingly, I suppose) that the conversion between the two formats was really quite easy through <a href="http://www.w3.org/2009/02/presentation-viewer/transcriber2dfxp.xsl">an XSLT style sheet</a>; the main structural difference between the two formats is that Transcriber notes break points as XML elements (<code>&lt;Sync&gt;</code> in the example above), while TimedText wraps the transcripted content into elements (<code>&lt;span&gt;</code> or <code>&lt;p&gt;</code>).</p>
<p>So, now that I had a <a href="http://www.w3.org/2009/02/presentation-viewer/parisweb.xml">Timed Text version of my transcription</a>, how did that help me putting the transcripted video on the Web?</p>
<p>Looking quickly on the Web, it seems that some Video hosting services, including dotSub and dailymotion but not (I think) Youtube, allows publishers to upload subtitles with their videos; as I have verified since, dotSub even supports importing and exporting subtitles in TimedText format.</p>
<p>But I was curious to know how to include these subtitles in a self-hosted video situation; I had little hope to find subtitles support through the classical <code>&lt;object></code> tag in HTML, but I was hoping that the new <a href="http://dev.w3.org/html5/spec/Overview.html#video"><code>&lt;video></code> element in HTML 5</a> would help solve that problem.</p>
<p>Unfortunately, it doesn&#8217;t out of the box as of the draft dated of February 12 :</p>
<blockquote cite="http://www.w3.org/TR/2009/WD-html5-20090212/#video">
<p>[&hellip;] authors are expected to provide alternative media streams and/or to embed accessibility aids (such as caption or subtitle tracks) into their media streams.</p>
</blockquote>
<p>That certainly seemed extremely suboptimal to me &#8211; having to download a whole video to access its transcript doesn&#8217;t sound like a good use of anyone bandwidth. <a href="http://blog.gingertech.net/2008/12/12/attaching-subtitles-to-html5-video/">Discussions on fixing that current state of the HTML 5 spec have apparently started</a>, and brought to my attention the work that my colleague Philippe had started to implement <a href="http://www.w3.org/2008/12/dfxp-testsuite/web-framework/HTML5_player.js">a JavaScript-based TimedText player</a> for HTML 5.</p>
<p>This was exactly what I needed, and I thus started to play with that code to embed subtitles of my video in an HTML page.</p>
<p>And this is what got me started to look into <a href="http://people.w3.org/~dom/archives/2009/02/the-beauty-of-htmlmediaelementthe-beauty-of-htmlmediaelement/">why the new <code>&lt;video&gt;</code> element in HTML 5 is actually a game changer</a>, rather than just a nice wrapper around the existing functionalities in <code>&lt;object&gt;</code> &#8211; which is what my next blog post will look into.</p>]]></content:encoded>
			<wfw:commentRss>http://people.w3.org/~dom/archives/2009/02/synchronizing-text-and-video/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Exploring the world of Web video</title>
		<link>http://people.w3.org/~dom/archives/2009/02/exploring-the-world-of-web-video/</link>
		<comments>http://people.w3.org/~dom/archives/2009/02/exploring-the-world-of-web-video/#comments</comments>
		<pubDate>Wed, 11 Feb 2009 14:33:20 +0000</pubDate>
		<dc:creator>Dom</dc:creator>
				<category><![CDATA[Mobile Web]]></category>
		<category><![CDATA[Video]]></category>
		<category><![CDATA[Web development]]></category>
		<category><![CDATA[Work environment]]></category>

		<guid isPermaLink="false">http://people.w3.org/~dom/?p=190</guid>
		<description><![CDATA[A colleague of mine recently pointed me to Michael Wesch&#8217;s great and inspiring anthropological introduction to YouTube, which made me curious about the use of video as an expression mechanism on the Web.
Coupling this with my recent upgrade in the camcorder world to a fully digital device, and the early results of the Video in [...]]]></description>
			<content:encoded><![CDATA[<p>A colleague of mine recently pointed me to <a href="http://www.youtube.com/watch?v=TPAO-lZ4_hU">Michael Wesch&#8217;s great and inspiring <cite>anthropological introduction to YouTube</cite></a>, which made me curious about the use of video as an expression mechanism on the Web.</p>
<p>Coupling this with my recent upgrade in the camcorder world to a fully digital device, and the early results of the <a href="http://www.w3.org/2008/WebVideo/">Video in the Web activity</a> W3C started a year ago, I had to start playing in this area to understand it better.</p>

<p>As a starting point, I thought that I would use the <a href="http://www.dailymotion.com/parisweb/parisweb/video/x4lzho_bonnes-pratiques-du-web-mobile_tech">video of the presentation I made to ParisWeb back in 2007</a> on the Mobile Web Best Practices, also <a href="http://videos.paris-web.fr/2007/">available un-flashed on ParisWeb servers</a> &#8211; usefully made available in a <a href="http://creativecommons.org/licenses/by-nc-sa/3.0/deed">by-nc-sa Creative Commons license</a>.</p>

<p>One thing that I needed to take into account, but was also a driver for this exploratory work, is that we are about to adopt a W3C internal policy that we can only publish media on-line if we ensure a minimum level of accessibility &#8211; at this time, this minimum level requires providing a full transcript of any material.</p>

<p>This post serves as an introduction to my adventures in the hazardous world of Web videos, where you&#8217;ll find me finding my way:</p>
<ul>
<li>in the <a href="http://people.w3.org/~dom/archives/2009/02/diving-in-transcriptiondiving-in-transcription/">world of transcription, and the tools available to that end on linux</a>,</li>
<li>in the <a href="http://people.w3.org/~dom/archives/2009/02/synchronizing-text-and-videosynchronizing-text-and-video/">formats for publishing and associating the transcripts with the video</a>,</li>
<li>the <a href="http://people.w3.org/~dom/archives/2009/02/the-beauty-of-htmlmediaelementthe-beauty-of-htmlmediaelement/">proposed HTMLMediaElement DOM Interface</a> to make it possible to synchronize events with media playing, adding a pinch of JQuery, RDFa and Media Fragment to taste.</li>
</ul>
<p>At the end of these stories, you will join me in rejoicing in front of a <a href="http://www.w3.org/2009/02/presentation-viewer/parisweb2007-dom.html">synchronized, close-captioned and annotated video and slides presentations viewer for your browser</a> &#8211; if you browser lives sufficiently on the edge, that is (which I think at this time means specifically Firefox 3.1 beta), and if you&#8217;re patient enough to deal with video operations on a 85 MB video. And if you speak or read French.</p>
<p>And if you&#8217;re not patient enough to go past these obstacles, I have prepared a <a href="http://dotsub.com/view/ed3cbe9c-07d1-45fc-bd76-2d0d58870e0e">screencast of the system in action</a>:</p>
<object  height="347" width="420" type="application/x-shockwave-flash" name="mpl" data="http://dotsub.com/static/players/portalplayer.swf">
<param name="swliveconnect" value="true"  />
<param name="allowFullScreen" value="true" />
<param name="allowScriptAccess" value="always" />
<param name="flashvars" value="mediauri=/media/ed3cbe9c-07d1-45fc-bd76-2d0d58870e0e/m/flv/en&amp;screenshoturi=http://dotsub.com/media/ed3cbe9c-07d1-45fc-bd76-2d0d58870e0e/p&amp;mediaDuration=38000&amp;lang=eng "/>
<object height="347" width="420" type="video/x-flv" data="http://dotsub.com/media/ed3cbe9c-07d1-45fc-bd76-2d0d58870e0e/m/flv/e" ></object>
</object>
<p>Transcript:</p>
<blockquote title="Transcript of the screencast of a presentation viewer in HTML">
<p>[the screen shows a Web page in a browser, split in 4 zones]</p>
<p>This is a screencast of a presentation viewer written in HTML and Javascript.</p>
<p>You can see here [on the top left corner] the area where the video will appear,
here [on the top right corner] the slides that will accompany the video presentation,
and there [on the bottom left corner] a table of contents.</p>
<p>If I start the video here [clicking on the play control of the video],
you can see the closed captions appearing below the video.</p>
<p>And then I can navigate in the video and the presentation using the table of content.</p>
<p>And you can see how the video and the slides get updated live,
and I can even have side notes appearing on the side [bottom right corner] of the screen.</p>
</blockquote>
<p>(also available as <a href="http://media.w3.org/2009/02/presentation-viewer-screencast.ogv">Ogg/Theora video</a> with a <a href="http://media.w3.org/2009/02/presentation-viewer-screencast.xml">Timed Text transcript</a>.)</p>]]></content:encoded>
			<wfw:commentRss>http://people.w3.org/~dom/archives/2009/02/exploring-the-world-of-web-video/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
<enclosure url="http://dotsub.com/media/ed3cbe9c-07d1-45fc-bd76-2d0d58870e0e/m/flv/en" length="2433090" type="video/x-flv" />
<enclosure url="http://media.w3.org/2009/02/presentation-viewer-screencast.ogv" length="688128" type="video/ogg" />
		</item>
		<item>
		<title>Microblogging</title>
		<link>http://people.w3.org/~dom/archives/2009/01/microblogging/</link>
		<comments>http://people.w3.org/~dom/archives/2009/01/microblogging/#comments</comments>
		<pubDate>Tue, 20 Jan 2009 03:52:44 +0000</pubDate>
		<dc:creator>Dom</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Web development]]></category>
		<category><![CDATA[Work environment]]></category>

		<guid isPermaLink="false">http://people.w3.org/~dom/?p=168</guid>
		<description><![CDATA[In case it wasn&#8217;t clear from the past three entries posted here, I have started to microblog on Identi.ca &#8211; the open version of Twitter. I&#8217;m still trying to figure out whether I should have my posts also mirrored on twitter, where most of other microbloggers I know are gathered &#8211; oh for openmicroblogging in [...]]]></description>
			<content:encoded><![CDATA[<p>In case it wasn&#8217;t clear from the past three entries posted here, I have <a href="http://identi.ca/dontcallmedom">started to microblog</a> on Identi.ca &#8211; the open version of Twitter. I&#8217;m still trying to figure out whether I should have my posts also mirrored on twitter, where most of other microbloggers I know are gathered &#8211; oh for <a href="http://openmicroblogging.org/">openmicroblogging</a> in Twitter!</p>
<p>I had started aggregating my microblogs on this blog through <a href="http://projects.radgeek.com/feedwordpress/">feedwordpress</a>, but found the results too noisy &#8211; in particular since this blog is syndicated on the <a href="http://www.w3.org/2007/08/w3t-planet/">W3C Team blogs&#8217; galaxy</a> where the microblogs would end up filling all the entries. I&#8217;m still looking into finding a good way to show my microblogs on this site, though; for the time being, they are a link away.</p>
<p>Note that Twitter doesn&#8217;t think my name can contain more than 20 characters &#8211; a curious echo to a <a href="http://www.nimbustier.net/blogs/2008/11/delit-dexces-de-nom-chez-airfrance">similar problem I experienced with Air France</a>.</p>
<p>We&#8217;ll see how that microblogging experiment works out; I had already been using Twitter from time to time on the <a href="http://twitter.com/mobiweb">mobiweb account</a> without much regularity, but from my short experimentation, I think a personal microblog has more chances to get used.</p>]]></content:encoded>
			<wfw:commentRss>http://people.w3.org/~dom/archives/2009/01/microblogging/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JQuery, yummy</title>
		<link>http://people.w3.org/~dom/archives/2009/01/jquery-yummy/</link>
		<comments>http://people.w3.org/~dom/archives/2009/01/jquery-yummy/#comments</comments>
		<pubDate>Tue, 13 Jan 2009 10:45:07 +0000</pubDate>
		<dc:creator>Dom</dc:creator>
				<category><![CDATA[Web development]]></category>

		<guid isPermaLink="false">http://people.w3.org/~dom/?p=154</guid>
		<description><![CDATA[I have resisted for a long time to use Javascript in my Web projects, for two main reasons:

it is relatively painful to write standard-compliant (read DOM-compliant) javascript;
I&#8217;ve brainwashed myself to associate Javascript with accessibility problems.


I keep fighting myself on that second reason &#8211; the movement toward Graceful Degradation &#38; Progressive Enhancement certainly helps me making [...]]]></description>
			<content:encoded><![CDATA[<p>I have resisted for a long time to use Javascript in my Web projects, for two main reasons:</p>
<ul>
<li>it is relatively painful to write standard-compliant (read DOM-compliant) javascript;</li>
<li>I&#8217;ve brainwashed myself to associate Javascript with accessibility problems.</li>
</ul>

<p>I keep fighting myself on that second reason &#8211; the movement toward <a href="http://accessites.org/site/2007/02/graceful-degradation-progressive-enhancement/">Graceful Degradation &amp; Progressive Enhancement</a> certainly helps me making peace with myself on that front. I guess some of my early Web experience where I ended up coding an entire Web site mostly in Javascript gnaws at my standardista conscience&hellip;</p>

<p>In terms of the pain in writing DOM-based scripts, and since I have re-started writing a bit of Javascript in the past two years, I must say that my recent experience with <a href="http://docs.jquery.com/Core">JQuery</a> has been really good, and makes go away pretty much most of the pain of finding elements, looping through them, creating nodes, etc. It does bring a bit of syntactic awkwardness with all these lambda functions embedded everywhere, but overall, it makes coding in Javascript a pleasure rather than a dread!</p>]]></content:encoded>
			<wfw:commentRss>http://people.w3.org/~dom/archives/2009/01/jquery-yummy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DTD comparison</title>
		<link>http://people.w3.org/~dom/archives/2007/09/dtd-comparison/</link>
		<comments>http://people.w3.org/~dom/archives/2007/09/dtd-comparison/#comments</comments>
		<pubDate>Wed, 12 Sep 2007 11:57:08 +0000</pubDate>
		<dc:creator>Dom</dc:creator>
				<category><![CDATA[Mobile Web]]></category>
		<category><![CDATA[QA]]></category>
		<category><![CDATA[Web development]]></category>

		<guid isPermaLink="false">http://people.w3.org/~dom/archives/2007/09/124/</guid>
		<description><![CDATA[As a follow-up on my toying with DTDs, I added a new Python script to my toolbox this morning: dtd-compare.py allows to compare the vocabularies defined in several DTDs to see which elements and attributes are present or absent among them.
For instance, running python dtd-compare.py http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd http://www.openmobilealliance.org/tech/DTD/xhtml-mobile10.dtd  http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd has allowed me to build [...]]]></description>
			<content:encoded><![CDATA[<p>As a follow-up on my <a href="http://people.w3.org/~dom/archives/2007/07/generating-html-documentation-from-dtd/">toying with DTDs</a>, I added a new Python script to my toolbox this morning: <a href="http://dev.w3.org/cvsweb/2007/dtd-doc/dtd-compare.py">dtd-compare.py</a> allows to compare the vocabularies defined in several DTDs to see which elements and attributes are present or absent among them.</p>
<p>For instance, running <kbd>python dtd-compare.py http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd http://www.openmobilealliance.org/tech/DTD/xhtml-mobile10.dtd  http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd</kbd> has allowed me to build a <a href="http://www.w3.org/2007/09/dtd-comparison.html">comparison of the various mobile XHTML flavors</a> with the content of XHTML 1.0 Strict.</p>
<p>I haven&#8217;t included XHTML MP 1.1 and XHTML MP 1.2 in that comparison chart since the officlal DTDs seems to have syntax errors, reported by the script as follows:</p>
<pre>
ERROR: character set conversion problem: 'utf8' codec can't decode byte 0xa9 in position 260: unexpected code byte at http://www.openmobilealliance.org/tech/DTD/xhtml-mobile11.dtd:1:0
ERROR: character set conversion problem: 'utf8' codec can't decode byte 0x92 in position 715: unexpected code byte at http://www.openmobilealliance.org/tech/DTD/xhtmlmp12-form-1.mod:1:0
</pre>]]></content:encoded>
			<wfw:commentRss>http://people.w3.org/~dom/archives/2007/09/dtd-comparison/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Generating HTML documentation from DTD</title>
		<link>http://people.w3.org/~dom/archives/2007/07/generating-html-documentation-from-dtd/</link>
		<comments>http://people.w3.org/~dom/archives/2007/07/generating-html-documentation-from-dtd/#comments</comments>
		<pubDate>Tue, 31 Jul 2007 13:58:21 +0000</pubDate>
		<dc:creator>Dom</dc:creator>
				<category><![CDATA[QA]]></category>
		<category><![CDATA[Web development]]></category>

		<guid isPermaLink="false">http://people.w3.org/~dom/archives/2007/07/generating-html-documentation-from-dtd/</guid>
		<description><![CDATA[I consider myself fairly fluent in XML technologies, but there is at least one technology that I have never bothered to fully learn, nor that I am planning to ever fully learn, and this would be XML DTDs.
Some people would like DTDs to disappear completely off the face of XML, and while I wouldn&#8217;t disagree [...]]]></description>
			<content:encoded><![CDATA[<p>I consider myself fairly fluent in XML technologies, but there is at least one technology that I have never bothered to fully learn, nor that I am planning to ever fully learn, and this would be XML DTDs.</p>
<p><a href="http://www.tbray.org/ongoing/When/200x/2005/12/15/Drop-the-Doctype">Some people would like DTDs to disappear completely off the face of XML</a>, and while I wouldn&#8217;t disagree with them, I still have to live in a world where some markup languages are formalized using DTDs, and even more importantly, where the greatest part of the developed markup language productions is checked using DTD (typically with the <a href="http://validator.w3.org/">W3C Markup Validator</a>).</p>
<p>So, instead of learning the arcane syntax of DTDs, I wrote this <a href="http://dev.w3.org/cvsweb/2007/dtd-doc/">dtd-doc.py Python script</a> that relies on an <a href="http://www.garshol.priv.no/download/software/xmlproc/dtd-parser-doco.html">existing Python library that parses DTD</a> (and thus on having someone who actually read and understood the DTD specification). It takes as parameter a DTD URI, and outputs a couple of HTML tables describing which elements and attributes are defined in the given DTD.</p>
<p>You can see the result of the script in the just-released <a href="http://www.w3.org/2007/07/xhtml-basic-ref.html">XHTML Basic 1.1 reference</a>.</p>
<p>The script is not anywhere the nicest code I&#8217;ve ever written, and it probably actually tops the list of the ugliest Python I&#8217;ve ever written; but then, it&#8217;s dealing with DTDs, so that seems only fair!</p>
]]></content:encoded>
			<wfw:commentRss>http://people.w3.org/~dom/archives/2007/07/generating-html-documentation-from-dtd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A bright eclipse</title>
		<link>http://people.w3.org/~dom/archives/2007/07/a-bright-eclipse/</link>
		<comments>http://people.w3.org/~dom/archives/2007/07/a-bright-eclipse/#comments</comments>
		<pubDate>Fri, 06 Jul 2007 07:05:19 +0000</pubDate>
		<dc:creator>Dom</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Work environment]]></category>

		<guid isPermaLink="false">http://people.w3.org/~dom/archives/2007/07/a-bright-eclipse/</guid>
		<description><![CDATA[Most of the Web development I work on is, for good or for worse, using PHP &#8211; my natural preference would go to coding in Python, but PHP is what was and is available on the W3C servers, and I&#8217;ve become much more fluent in it than in any other programming language.

One of the most [...]]]></description>
			<content:encoded><![CDATA[<p>Most of the Web development I work on is, for good or for worse, using PHP &#8211; my natural preference would go to coding in Python, but PHP is what was and is available on the W3C servers, and I&#8217;ve become much more fluent in it than in any other programming language.</p>

<p>One of the most annoying things to me with PHP (at least with PHP4, I haven&#8217;t really worked with PHP5 yet) is how clumsy the object model is and how lame the API appears: after more than 7 years of continuous development in PHP, I still have difficulties remembering the name of very classical functions, or when I do, I can&#8217;t remember the order of the arguments &#8211; the functions dedicated to arrays are a typical example of these, probably because they didn&#8217;t have a well-known C ancestor, and thus were likely designed on the fly by the early PHP creators.</p>

<p>Also, I have only recently started to use <a href="http://www.phpdoc.org/">phpDocumentor</a>, a rather powerful package that allows to create nice documentation for PHP projects, to the (unavoidable) cost of following the classical JavaDoc documentation style. But once this documentation gets created, I felt really disappointed that the effort put in it couldn&#8217;t be used directly while developing without having to navigate through it in my browser.</p>

<p>The obvious answer to these problems is to use an <abbr title='Integrated Development Environment'>IDE</abbr>, but the past few times I had been looking, I didn&#8217;t find anything very exciting for PHP development on linux, and thus have been using Emacs with mod_php for many years.</p>

<p>But my last investigation of the topic, motivated by a few attempts to code in Java for the <a href="http://www.w3.org/2005/MWI/BPWG/Group/TaskForces/Checker/">mobileOK checker new generation</a>, was the good one: the oh-so well-known <a href="http://www.eclipse.org/">Eclipse IDE</a> has a &#8220;PHP perspective&#8221; (in Eclipse jargon, a module to handle PHP development) that just reached version 1.0: <a href="http://www.eclipse.org/pdt/">PDT, standing for PHP Development Tools</a>.</p>

<p>I first tried to get it to run on the version of Eclipse provided with Ubuntu, but quickly ran into dependencies hell &#8211; but given that this attempt just followed the release of a new version of both Eclipse and PDT, I can&#8217;t say, retrospectively that I am too surprised. So I eventually opted for the <a href="http://europa-mirror1.eclipse.org/tools/pdt/downloads/?release=S20070401-RC3">all in one package</a> made available, and have been happily experimenting with it for the past few days.</p>

<p>My general impression is extremely good; I don&#8217;t have to think anymore to remember my function names or my classes definitions, syntax errors are highlighted in a much more reliable fashion than they ever were in Emacs, and the tools to navigate through the code or create documentation are really practical and useful.</p>

<p>I still have to figure how to get better keyboard navigation &#8211; I still have to use the mouse to do e.g. CVS operations, which could be a back-to-zero problem shouldn&#8217;t I find the proper way to configure this. The thing is, there is one commonality between Eclipse and Emacs, they are full-blown operating systems in the guide of editors or IDE&#8230;</p>]]></content:encoded>
			<wfw:commentRss>http://people.w3.org/~dom/archives/2007/07/a-bright-eclipse/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Making this blog mobile friendly</title>
		<link>http://people.w3.org/~dom/archives/2006/09/making-this-blog-mobile-friendly/</link>
		<comments>http://people.w3.org/~dom/archives/2006/09/making-this-blog-mobile-friendly/#comments</comments>
		<pubDate>Wed, 20 Sep 2006 09:08:51 +0000</pubDate>
		<dc:creator>Dom</dc:creator>
				<category><![CDATA[Mobile Web]]></category>
		<category><![CDATA[Web development]]></category>

		<guid isPermaLink="false">http://people.w3.org/~dom/archives/2006/09/making-this-blog-mobile-friendly/</guid>
		<description><![CDATA[As I quickly noted when I got my Treo 650 PDA, this very blog didn&#8217;t look quite good when used on the Web browser included with it (Blazer v4).
Eigth months later, and with the Mobile Web Best Practices now in implementation feedback phase, I thought it was time that I applied the very principles I [...]]]></description>
			<content:encoded><![CDATA[<p>As I quickly noted when <a href="http://people.w3.org/~dom/archives/2006/01/using-a-treo-650-pda-with-debian-on-a-dell/">I got my Treo 650 <abbr title="Personal Digital Assistant">PDA</abbr></a>, this very blog didn&#8217;t look quite good when used on the Web browser included with it (Blazer v4).</p>
<p>Eigth months later, and with the <a href="http://www.w3.org/TR/2006/CR-mobile-bp-20060627/">Mobile Web Best Practices</a> now in implementation feedback phase, I thought it was time that I applied the very principles I had contributed to develop to this blog (powered by <a href="http://wordpress.org/">Wordpress</a>).</p>
<p>I had already done part of this &#8220;mobilizing&#8221; game for the <a href="http://www.w3.org/Mobile/">Mobile Web Initiative home page</a>, which is powered by a different blog engine (<a href="http://b2evolution.net">b2evolution</a>, on which I plan to write soon), so this wasn&#8217;t exactly an unchartered territory for me; but here comes a summary of the main things I had to tweak to make it work (as <a href="http://validator.w3.org/mobile/?uri=http%3A%2F%2Fpeople.w3.org%2F%7Edom%2F">confirmed by the Best Practices checker</a>, but even more so by real usage on my Treo).</p>
<p>My main goal was to make this content accessible on mobile devices, rather than providing the best possible user experience on each mobile device, so I chose to target what the Best Practices call the <a href="http://www.w3.org/TR/2006/CR-mobile-bp-20060627/#ddc">default delivery context</a>, in other words, a well-defined set of limitations one should take into account when designing for mobile devices in general rather than adapting the content for each and every device.</p>
<p>First thing I did was to seek compliance with the <a href="http://www.w3.org/TR/2006/CR-mobile-bp-20060627/#CONTENT_FORMAT_SUPPORT"><cite>CONTENT_FORMAT_SUPPORT</cite></a> of the Best Practices, which means serving this blog as <a href="http://www.w3.org/TR/2000/REC-xhtml-basic-20001219/">XHTML Basic</a>, served as <code>application/xhtml+xml</code>;  I have simply re-applied the <a href="http://www.w3.org/2005/MWI/BPWG/techs/ServingContentWithDoubleContentType">technique I&#8217;ve written up a few weeks ago</a> to permit serving my blog as XHTML Basic to all the clients that say they prefer <code>application/xhtml+xml</code> to <code>text/html</code>, with a workaround for Internet Explorer ambiguous behavior; given that the technique was already developed for PHP, this was mostly a copy and paste exercice.</p>]]></content:encoded>
			<wfw:commentRss>http://people.w3.org/~dom/archives/2006/09/making-this-blog-mobile-friendly/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Mobile Web Best Practices checker</title>
		<link>http://people.w3.org/~dom/archives/2006/06/mobile-web-best-practices-checker/</link>
		<comments>http://people.w3.org/~dom/archives/2006/06/mobile-web-best-practices-checker/#comments</comments>
		<pubDate>Thu, 29 Jun 2006 12:50:05 +0000</pubDate>
		<dc:creator>Dom</dc:creator>
				<category><![CDATA[Mobile Web]]></category>
		<category><![CDATA[QA]]></category>
		<category><![CDATA[Web development]]></category>

		<guid isPermaLink="false">http://people.w3.org/~dom/archives/2006/06/mobile-web-best-practices-checker/</guid>
		<description><![CDATA[As announced in the WWW2006 conference and as part of the Press Release accompanying the publication of the Mobile Web Best Practices as a Candidate Recommendation, work has started on the development of an open-source Best Practices checker.
It is still at alpha release stage and hasn&#8217;t been properly reviewed by the Mobile Web Best Practices [...]]]></description>
			<content:encoded><![CDATA[<p>As announced in the <a href="http://www2006.org/">WWW2006 conference</a> and as part of the <a href="http://www.w3.org/2006/06/mwbp-pressrelease">Press Release accompanying the publication of the Mobile Web Best Practices as a Candidate Recommendation</a>, work has started on the development of an <a href="http://dev.w3.org/cvsweb/2006/mwbp-validator/">open-source</a> <a href="http://www.w3.org/2006/05/mwbp-check/">Best Practices checker</a>.</p>
<p>It is still at alpha release stage and hasn&#8217;t been properly reviewed by the <a href="http://www.w3.org/2005/MWI/BPWG/">Mobile Web Best Practices Working Group</a>; meanwhile, developing it has been a lot of fun!</p>
<p>First, for once, I was able to code in Python; even though my skills in Python are still rough and my ratio PHP/Python line codes must be around 1/40, I would give all my PHP code for keeping Python code only. For mostly historical and logistical reasons, most of my day to day coding has been (and likely will continue to be) made in PHP, but PHP really looks like an ugly pig compared to the lightness and flexibility of Python. Really.</p>
<p>Secundly, I was able to work with unit-tests from the very beginning; I&#8217;m usually doing a lot of database-bound applications, which I find really cumbersome to unit-test; in this case, given that the code targets HTTP delivered content, designing and setting up unit tests was extremely easy, and proved similarly valuable: it&#8217;s hard to over-estimate the confidence you get in your code when you know it passes a series of well-defined tests.</p>
<p>Thirdly, while some of the code is really mobile-specific, a lot of it could be used a basis for a more general Web Best practices checker: it can make interesting remarks on form controls (e.g., check whether each control has a corresponding label), on images and their dimensions (e.g., whether the dimensions of the images are defined in the markup and whether they match the dimensions of the image itself), on auto-refreshing and markup-redirect pages, on the proper usage of HTML headings, on the usage of tables layout, etc. Codifying some of these well-known Web design issues in actual tests and code was sometimes challenging, but mostly very rewarding.</p>
<p>Finally, I got to use a nice set of very Webby technologies:</p>
<ul>
<li>first of all, the checker uses thoroughly caching for its HTTP requests, thanks to <a href="http://bitworking.org/projects/httplib2/">httplib2</a> which does most of the dirty work;</li>
<li>given that the checker also does some markup validation, it relies on <a href="http://www.garshol.priv.no/download/software/xmlproc/">xmlproc</a> catalog&#8217;s handling capabilities to skip any HTTP activity for known DTDs;</li>
<li>a great chunk of the analysis made rely on <a href="http://www.saxproject.org/">SAX</a> parsing; it was my first opportunity to use SAX in some real coding, and I have to say I found it quite pleasant to use</li>
<li>some of the devil-lies-in-the-details tests for encoding and MIME-types needed careful comparison between the various specifications involved (HTML, HTTP, MIME-Types, CSS among others)</li>
<li>I got a fairly nice logic/presentation separation through the use of templates; for (potential) compatibility with the Markup Validator, I used a <a href="http://htmltmpl.sourceforge.net/">Python implementation</a> of Perl&#8217;s <code>HTML::Template</code> language</li>
</ul>
<p>There is still quite a lot of work to be done to make it more robust and more complete; in particular, I need to analyse CSS style sheets for testing some of the best practices: I was thrilled when I discovered <a href="http://cthedot.de/cssutils/">cssutils &#8211; CSS Cascading Style Sheets library for Python</a>, until I realized it doesn&#8217;t implement the most important CSS DOM interface I needed. I&#8217;m left with the option of either implementing it myself, or looking at using some other non-Python library (e.g. <a href="http://www.freespiders.org/projects/libcroco/docs/cssom-api.html">libcroco</a>). I&#8217;m also hoping to use <a href="http://www.mnot.net/cacheability/">Mark Nottingham&#8217;s cacheability engine</a> to implement the test for the Best Practice on caching, if I can get it to play well with the other modules.</p>
<p>But I&#8217;m already quite satisfied with all I learnt during this first phase, and the feedback I&#8217;ve been able to provide the Working Group based on this coding (which reminds me that I still have some rather thorny implementation feedback to send!).</p>
<p>The code is already <a href="http://dev.w3.org/cvsweb/2006/mwbp-validator/">available</a> and there are some velleity of an <a href="http://dev.w3.org/cvsweb/~checkout~/2006/mwbp-validator/doc/install.html?rev=1.3&#038;content-type=text/html;%20charset=iso-8859-1">installation document</a> if anybody wants to play with it; if you want to contribute to the project, I very much welcome so; just drop me an email at <code>&lt;<a href="mailto:dom@w3.org">dom@w3.org</a>&gt;</code> to get in touch!</p>]]></content:encoded>
			<wfw:commentRss>http://people.w3.org/~dom/archives/2006/06/mobile-web-best-practices-checker/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Small SURBL Python library</title>
		<link>http://people.w3.org/~dom/archives/2006/04/small-surbl-python-library/</link>
		<comments>http://people.w3.org/~dom/archives/2006/04/small-surbl-python-library/#comments</comments>
		<pubDate>Tue, 18 Apr 2006 11:59:25 +0000</pubDate>
		<dc:creator>Dom</dc:creator>
				<category><![CDATA[Web development]]></category>
		<category><![CDATA[spam]]></category>

		<guid isPermaLink="false">http://people.w3.org/~dom/archives/2006/04/small-surbl-python-library/</guid>
		<description><![CDATA[The spammers have striken again, and we received reports that one of our extremely useful public service was used to work around URL matching techniques for spammers. In other words, a spammer who would have been identified (in email messages, blog comments) as using http://example.net/ as a URI in his spam could workaround it by [...]]]></description>
			<content:encoded><![CDATA[<p>The spammers have striken again, and we received reports that one of our extremely useful public service was used to work around URL matching techniques for spammers. In other words, a spammer who would have been identified (in email messages, blog comments) as using <code>http://example.net/</code> as a URI in his spam could workaround it by putting a link to <code>http://our-useful-service.example.org?uri=http://example.net/</code> instead, and given that the said service more or less entirely preserves the content as is, this allowed indeed to put a link to the incriminated content.</p>
<p>The reporter of this abuse of service had the good idea to mention an existing technical solution to this type of problem: <a href="http://www.surbl.org/">SURBL</a> is a registry of registered domain names that have been reported as used by spammers. Although I&#8217;m not a big fan of this type of registries (they really seem the lowest type of trust network one can imagine, too easily abused), faced with the alternative of shutting down the service entirely or reducing the possibility of abusing it, I took the second option.</p>
<p>As the said service (that I&#8217;m not mentioning explicitely in case it would draw more attention that it needs at this point) is written in Python, I&#8217;ve been looking for a Python implementation of the SURBL mechanism; unfortunately, I haven&#8217;t been able to found one and so had to write my <a href="http://dev.w3.org/cvsweb/~checkout~/2006/surbl.py?rev=1.2&amp;content-type=text/plain">own implementation</a>, which seems to work well (units tests also helped) and now supports the alluded on-line service.</p>
<p>SURBL uses DNS queries as a way to query their registry: you ask whether <code>spam.example.multi.surbl.org</code> exists; if it does, then <code>spam.example</code> is part of the blacklist, otherwise it isn&#8217;t. In terms of implementation, the only (rather small) difficulty is to identify the relevant part of the URI you want to check, namely the registered name used in the authority component of the URI. This implies removing the possible port and user information parts in the authority component, but also the possible sub-domains of a registered domain; this would be entirely trivial if one didn&#8217;t have to take into accounts delegated second-top-level domain names (e.g. as <code>co.uk</code>).</p>
<p>SURBL&#8217;s architecture is a rather smart way to re-use the existing caching/query infrastructure deployed for DNS (e.g. I just had to import <a href="http://dnspython.org">DNS Python</a> to query their blacklist). I suspect that the software infrastructure behind DNS implements caching more widely than most implementations of HTTP do, and thus would induce a smaller load on their servers &#8211; although I haven&#8217;t quite checked it. Of course, the DNS system is particularly well fitting to this, given that the queried items follow (by definition) the naming rules of DNS. Also, I guess that the primary usage of the system (mail filtering) made DNS a pre-requisite, while access to an HTTP client may be less obvious. But I wonder if there would be any compelling reasons to make this also available as an HTTP service?</p>
]]></content:encoded>
			<wfw:commentRss>http://people.w3.org/~dom/archives/2006/04/small-surbl-python-library/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Doing HTTP caching in PHP</title>
		<link>http://people.w3.org/~dom/archives/2006/03/doing-http-caching-in-php/</link>
		<comments>http://people.w3.org/~dom/archives/2006/03/doing-http-caching-in-php/#comments</comments>
		<pubDate>Fri, 10 Mar 2006 14:45:27 +0000</pubDate>
		<dc:creator>Dom</dc:creator>
				<category><![CDATA[Mobile Web]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://people.w3.org/~dom/archives/2006/03/doing-http-caching-in-php/</guid>
		<description><![CDATA[Since the Mobile Web Best Practices highlights that caching is a particularly important feature when browing the Web on a mobile device, I just wrote a new associated technique on how to do proper caching when using PHP.
While Mark Nottingham&#8217;s excellent tutorial on the topic covers most of it already, the technique provides some additional [...]]]></description>
			<content:encoded><![CDATA[<p>Since the <a href="http://www.w3.org/TR/mobile-bp/">Mobile Web Best Practices</a> highlights that <a href="http://www.w3.org/TR/mobile-bp/#CACHING">caching is a particularly important feature</a> when browing the Web on a mobile device, I just wrote a new <a href="http://www.w3.org/2005/MWI/BPWG/techs/">associated technique</a> on <a href="http://www.w3.org/2005/MWI/BPWG/techs/CachingWithPhp">how to do proper caching when using PHP</a>.</p>
<p>While <a href="http://www.mnot.net/cache_docs/">Mark Nottingham&#8217;s excellent tutorial</a> on the topic covers most of it already, the technique provides some additional code example, as well as some illustration as how to use it with MySQL.</p>
<p>Nothing ground breaking, but I&#8217;ve been using this code in most of my PHP applications over the past years, and it certainly gives a nice and warm feeling of being a good HTTP citizen when you <a href="http://www.ircache.net/cgi-bin/cacheability.py">pass the Cacheability validation</a>.</p>
<p>(As we&#8217;re trying our best to keep the <a href="http://www.w3.org/Mobile/">Mobile Web Initiative home page</a> in conformance with the best practices, this code has just found a new usage in a mobile context&#8230;)</p>]]></content:encoded>
			<wfw:commentRss>http://people.w3.org/~dom/archives/2006/03/doing-http-caching-in-php/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
