<?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/"
	>

<channel>
	<title>CowWorking - Enterprise 2.0, SaaS и приложения для среднего и малого бизнеса</title>
	<atom:link href="http://cowworking.ru/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://cowworking.ru</link>
	<description>Мы создаем программное обеспечение формата SaaS</description>
	<pubDate>Sun, 12 Apr 2009 21:00:41 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Команда CowTeam</title>
		<link>http://cowworking.ru/?p=55</link>
		<comments>http://cowworking.ru/?p=55#comments</comments>
		<pubDate>Sun, 12 Apr 2009 20:35:42 +0000</pubDate>
		<dc:creator>max</dc:creator>
		
		<category><![CDATA[Новости]]></category>

		<guid isPermaLink="false">http://cowworking.ru/?p=55</guid>
		<description><![CDATA[Мы создаем инструменты для компаний среднего и малого бизнеса. Инструменты эффективного и удобного и эффективного использования технологий интернета и Web 2.0.
Enterprise 2.0 - возможность для компаний и корпораций снизить расходы на содержание IT-инфраструктуры и повысить эффективность затрат собственного бизнеса.
Наши проекты:

Apple Life - &#8220;яблочный&#8221; форум
Сделка Века 2.0 - мы пишем о SaaS, SOA, рассматриваем кейсы эффективного [...]]]></description>
			<content:encoded><![CDATA[<p>Мы создаем инструменты для компаний среднего и малого бизнеса. Инструменты эффективного и удобного и эффективного использования технологий интернета и Web 2.0.</p>
<p>Enterprise 2.0 - возможность для компаний и корпораций снизить расходы на содержание IT-инфраструктуры и повысить эффективность затрат собственного бизнеса.</p>
<h2>Наши проекты:</h2>
<ul>
<li><a href="http://www.applelife.ru" target="_blank">Apple Life</a> - &#8220;яблочный&#8221; форум</li>
<li><a href="http://www.sdelkaveka.ru" target="_blank">Сделка Века 2.0</a> - мы пишем о SaaS, SOA, рассматриваем кейсы эффективного внедрения  продуктов Enterprise 2.0</li>
<li><a href="http://www.cowworking.ru" target="_blank">cowWorking</a> - принципиально новый продукт Enterprise 2.0 категории полноценных виртуальных офисов. Дата запуска будет объявлена дополнительно. Следите за пресс-релизами.</li>
</ul>
<h2>Мы горячо поддерживаем:</h2>
<ul>
<li><a href="http://en.wikipedia.org/wiki/Widget_engine" target="_blank">Технологию</a> <a href="http://en.wikipedia.org/wiki/Web_widget" target="_blank">виджетов</a>. Мы публикуем на нашем сайте официальные спецификации виджетов с переводами.</li>
</ul>
<p>Для связи: max@sdelkaveka.ru</p>
]]></content:encoded>
			<wfw:commentRss>http://cowworking.ru/?feed=rss2&amp;p=55</wfw:commentRss>
		</item>
		<item>
		<title>Виджеты: цифровая подпись</title>
		<link>http://cowworking.ru/?p=47</link>
		<comments>http://cowworking.ru/?p=47#comments</comments>
		<pubDate>Sun, 12 Apr 2009 20:30:50 +0000</pubDate>
		<dc:creator>max</dc:creator>
		
		<category><![CDATA[Виджеты]]></category>

		<guid isPermaLink="false">http://cowworking.ru/?p=47</guid>
		<description><![CDATA[ 
Widgets 1.0: Digital Signature
W3C Working Draft 14 April 2008

This Version:
http://www.w3.org/TR/2008/WD-widgets-digsig-20080414/
Latest Version:
http://www.w3.org/TR/widgets-digsig/
Previous Version:
None.
Latest Editor&#8217;s Draft:
http://dev.w3.org/2006/waf/widgets-digsig/
Version history:
Twitter messages (non-editorial changes only): http://twitter.com/widgetspecs (RSS)
Editor:
Marcos Caceres, Invited      Expert


Copyright © 2008 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C liability,     trademark and document     use rules apply.


Abstract
This [...]]]></description>
			<content:encoded><![CDATA[<div class="head"><!--begin-logo--><a href="http://www.w3.org/"><img src="http://www.w3.org/Icons/w3c_home" alt="W3C" width="72" height="48" /></a> <!--end-logo--></p>
<h1 id="widgets" class="head">Widgets 1.0: Digital Signature</h1>
<h2 id="editors" class="no-num no-toc">W3C Working Draft 14 April 2008</h2>
<dl>
<dt>This Version:</dt>
<dd><a href="http://www.w3.org/TR/2008/WD-widgets-digsig-20080414/">http://www.w3.org/TR/2008/WD-widgets-digsig-20080414/</a></dd>
<dt>Latest Version:</dt>
<dd><a href="http://www.w3.org/TR/widgets-digsig/">http://www.w3.org/TR/widgets-digsig/</a></dd>
<dt>Previous Version:</dt>
<dd>None.</dd>
<dt>Latest Editor&#8217;s Draft:</dt>
<dd><a href="http://dev.w3.org/2006/waf/widgets-digsig/">http://dev.w3.org/2006/waf/widgets-digsig/</a></dd>
<dt>Version history:</dt>
<dd>Twitter messages (non-editorial changes only): <a href="http://twitter.com/widgetspecs">http://twitter.com/widgetspecs</a> (<a href="http://twitter.com/statuses/user_timeline/14349303.rss">RSS</a>)</dd>
<dt>Editor:</dt>
<dd><a href="http://datadriven.com.au/">Marcos Caceres</a>, Invited      Expert</dd>
</dl>
<p><!--begin-copyright--></p>
<p class="copyright"><a rel="license" href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> © 2008 <a href="http://www.w3.org/"><acronym title="World Wide Web     Consortium">W3C</acronym></a><sup>®</sup> (<a href="http://www.csail.mit.edu/"><acronym title="Massachusetts Institute     of Technology">MIT</acronym></a>, <a href="http://www.ercim.org/"><acronym title="European Research Consortium     for Informatics and Mathematics">ERCIM</acronym></a>, <a href="http://www.keio.ac.jp/">Keio</a>), All Rights Reserved. W3C <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>,     <a href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a> and <a href="http://www.w3.org/Consortium/Legal/copyright-documents">document     use</a> rules apply.</p>
<p><!--end-copyright--></div>
<hr />
<h2 id="abstract" class="no-num no-toc">Abstract</h2>
<p class="no-num no-toc">This document defines a profile of the <cite><a href="http://www.w3.org/TR/xmldsig-core/">XML-Signature Syntax and    Processing</a></cite> specification to allow a widget resource to be    digitally signed. Vendors and authors can digitally sign widgets as a    trust and quality assurance mechanism. Prior to instantiation, a widget    user agent can use the digital signature to verify the authenticity and    data integrity of the files in a widget resource. In the rare case where a    widget damages the end-user&#8217;s device, the digital signature may provide a    user with legal recourse to prove that a widget resource was signed by a    particular author or publisher.</p>
<h2 id="status" class="no-num no-toc">Status of this Document</h2>
<p><em>This section describes the status of this document at the time of    its publication. Other documents may supersede this document. A list of    current W3C publications and the latest revision of this technical report    can be found in the <a href="http://www.w3.org/TR/">W3C technical reports    index</a> at http://www.w3.org/TR/.</em></p>
<p>This is the <a href="http://www.w3.org/2005/10/Process-20051014/tr.html#first-wd">W3C    First Public Working Draft</a> of the <em>Widgets    1.0: Digital Signature</em>. This document is produced the <a href="http://www.w3.org/2006/appformats/">Web Application Formats</a> (WAF) Working Group (WG). This WG is part of the <a href="http://www.w3.org/2006/rwc/Activity">Rich Web Clients Activity</a> and this activity is within the W3C&#8217;s <a href="http://www.w3.org/Interaction/">Interaction Domain</a>.</p>
<p>This document was produced by a group operating under the <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5 February    2004 W3C Patent Policy</a>. W3C maintains a <a rel="disclosure" href="http://www.w3.org/2004/01/pp-impl/38483/status">public list of any patent disclosures</a> made in    connection with the deliverables of the group; that page also includes    instructions for disclosing a patent. An individual who has actual    knowledge of a patent which the individual believes contains <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential">Essential    Claim(s)</a> must disclose the information in accordance with <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">section    6 of the W3C Patent Policy</a>.</p>
<p>This document is produced by the <a href="http://www.w3.org/2006/appformats/">Web Application Formats WG</a>,    part of the <a href="http://www.w3.org/2006/rwc/Activity">Rich Web Clients    Activity</a> in the W3C <a href="http://www.w3.org/Interaction/">Interaction Domain</a>. It is    expected that this document will progress along the W3C&#8217;s Recommendation    track. Publication as a Working Draft does not imply endorsement by the    W3C Membership. This is a draft document and may be updated, replaced or    obsoleted by other documents at any time. It is inappropriate to cite this    document as other than work in progress.</p>
<p><strong>You can find the latest <a href="http://dev.w3.org/2006/waf/widgets-digsig/">Editor&#8217;s Draft</a> of    this document in the <a href="http://dev.w3.org/">W3C&#8217;s CVS    repository</a>, which is updated on a very regular basis.</strong> Please    send comments to <a href="mailto:public-appformats@w3.org">public-appformats@w3.org</a>, the    W3C&#8217;s public email list for issues related to Web Application Formats. <a href="http://lists.w3.org/Archives/Public/public-appformats/">Archives</a> of the    list are available. A detailed <a href="http://dev.w3.org/cvsweb/2006/waf/widgets/">list of changes</a> from    the previous version is also available from the W3C&#8217;s CVS server.</p>
<p class="note">Implementers should be aware that this document is not    stable. <strong>Implementers who are not taking part in the discussions    are likely to find the specification changing out from under them in    incompatible ways.</strong> Vendors interested in implementing this    document before it eventually reaches the Candidate Recommendation stage    should join the aforementioned mailing lists and take part in the    discussions.</p>
<h2 id="toc" class="no-num no-toc">Table of Contents</h2>
<p><!--begin-toc--></p>
<ul class="toc">
<li><a href="http://www.w3.org/TR/widgets-digsig/#introduction"><span class="secno">1. </span>Introduction</a>
<ul class="toc">
<li><a href="http://www.w3.org/TR/widgets-digsig/#signature"><span class="secno">1.1 </span>Signature       Profile</a></li>
</ul>
</li>
<li><a href="http://www.w3.org/TR/widgets-digsig/#conformance"><span class="secno">2. </span>Conformance</a></li>
<li><a href="http://www.w3.org/TR/widgets-digsig/#definitions"><span class="secno">3. </span>Definitions</a></li>
<li><a href="http://www.w3.org/TR/widgets-digsig/#procedure"><span class="secno">4. </span>Procedure for     Signing a Widget Resource</a></li>
<li><a href="http://www.w3.org/TR/widgets-digsig/#procedure0"><span class="secno">5. </span>Procedure for     Verifying a Digital Signature</a></li>
<li class="no-num"><a href="http://www.w3.org/TR/widgets-digsig/#acknowledgements">Acknowledgements</a></li>
<li class="no-num"><a href="http://www.w3.org/TR/widgets-digsig/#references">References</a></li>
</ul>
<p><!--end-toc--></p>
<h2 id="introduction"><span class="secno">1. </span>Introduction</h2>
<p>Digitally signing a widget resource involves signing all of its file    entries using a unique private key that is known only to the signer. The    resulting signature, along with the signer&#8217;s digital certificate, is    structured into an XML document, and included at the root of a widget    resource under the name <code>signature.xml</code>.</p>
<div class="example">
<p>Example of a <code>signature.xml</code> document:</p>
<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;Signature xmlns="http://www.w3.org/2000/09/xmldsig#"&gt;

	&lt;SignedInfo&gt;
		&lt;CanonicalizationMethod
			Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/&gt;
		&lt;SignatureMethod
			Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" /&gt;
		&lt;Reference URI="config.xml"&gt;

			&lt;DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
			&lt;DigestValue&gt;j6...8nk=&lt;/DigestValue&gt;
		&lt;/Reference&gt;
		&lt;Reference URI="index.html"&gt;

     		&lt;DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
     		&lt;DigestValue&gt;lm...34=&lt;/DigestValue&gt;
		&lt;/Reference&gt;
		&lt;Reference URI="icon.png"&gt;

			&lt;DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
			&lt;DigestValue&gt;pq...56=&lt;/DigestValue&gt;
		&lt;/Reference&gt;
	&lt;/SignedInfo&gt;
	&lt;SignatureValue&gt;MC0E~LE=&lt;/SignatureValue&gt;

	&lt;KeyInfo&gt;
		&lt;X509Data&gt;
			&lt;X509Certificate&gt;MI...lVN&lt;/X509Certificate&gt;
		&lt;/X509Data&gt;
	&lt;/KeyInfo&gt;

&lt;/Signature&gt;</code></pre>
</div>
<h3 id="signature"><span class="secno">1.1 </span>Signature Profile</h3>
<p>The signature scheme defined in this specification imposes a number of    <dfn id="restrictions">restrictions</dfn> on the XML-Signature Syntax and    Processing Specification <a href="http://www.w3.org/TR/widgets-digsig/#xmldsig">[XMLDsig]</a>:</p>
<ol>
<li>Every <a href="http://www.w3.org/TR/widgets-digsig/#file-entry">file entry</a> in a widget resource <em class="ct">must</em> be signed. The resulting digital signature must be     serialized into an UTF-8 encoded XML document and placed at the root of     the widget archive under the name <code>signature.xml</code>.</li>
<li><code>Reference</code> elements <em class="ct">must</em> use the SHA1     as the digest method.</li>
<li>The signature method to produce the <code>SignatureValue</code> <em class="ct">must</em> be RSA-SHA1.</li>
<li>A <code>KeyInfo</code> element must be present and the digital     certificate format <em class="ct">must</em> conform to the <a href="http://www.w3.org/TR/widgets-digsig/#x509v3">[X509v3]</a> specification. Implementations <em class="ct">must</em> be prepared to accept all X.509 certificates     versions identified in <a href="http://www.w3.org/TR/widgets-digsig/#x509v3">[X509v3]</a> via the version     field. To be clear, the value of the version field identifies the version     of an X.509 certificate in the following way:
<ul>
<li><code>0</code> is X.509 version 1,</li>
<li><code>1</code> is X.509 version 2,</li>
<li><code>2</code> is X.509 version 3,</li>
<li>if the version field is omitted, then the X.509 version is 1</li>
</ul>
</li>
<li><code>SignatureProperties</code> elements are ignored by this     specification, but they may be present in a signature document.</li>
</ol>
<p class="issue">(For <code>SignatureProperties</code>, we are considering    defining one element: <code>WidgetSigningProfile</code>, with a version    parameter. All of which would be signed.)</p>
<p class="note">Note: The intention of these restrictions is to define a    light-weight profile of <a href="http://www.w3.org/TR/widgets-digsig/#xmldsig">[XMLDsig]</a> that does not    require widget user agents to implement <a href="http://www.w3.org/TR/widgets-digsig/#xpath">[XPath]</a>.</p>
<h2 id="conformance"><span class="secno">2. </span>Conformance</h2>
<p>As well as sections marked as non-normative, examples and notes in this    specification are non-normative. Everything else in this specification is    normative.</p>
<p>The key words <em class="ct">must</em>, <em class="ct">must not</em>,    <em class="ct">required</em>, <em class="ct">should</em>, <em class="ct">should not</em>, <em class="ct">recommended</em>, <em class="ct">may</em> and <em class="ct">optional</em> in this specification    are to be interpreted as described in <a href="http://www.w3.org/TR/widgets-digsig/#rfc2119">[RFC2119]</a>.</p>
<p>There are two classes of product that can claim conformance to this    specification:</p>
<ul>
<li>A <a href="http://www.w3.org/TR/widgets-digsig/#digital">digital signature document</a>.</li>
<li>A widget user agent</li>
</ul>
<p>Products that generate a digital signature document <em class="ct">must</em> generate XML documents that conform to <cite> </cite><a href="http://www.w3.org/TR/widgets-digsig/#xmldsig">[XMLDsig]</a> and adhere to the <a href="http://www.w3.org/TR/widgets-digsig/#restrictions">restrictions</a> imposed by this specification.</p>
<p>Products that check the conformance of a digital signature document <em class="ct">must not</em> claim conformance to this specification, though    they can claim to verify that a digital signature document conforms to    this specification.</p>
<p>A widget user agent <em class="ct">must</em> behave as described by this    specification in order to claim conformance, specially when faced with an    <span>invalid widget resource</span> or a non-conforming    digital signature document.</p>
<h2 id="definitions"><span class="secno">3. </span>Definitions</h2>
<p>A <dfn id="widget">widget resource</dfn> is a byte-stream or file that    conforms to section 4.0 and section 5.0 of the <a href="http://www.w3.org/TR/widgets-digsig/#widgets0">[Widgets Packaging]</a> specification.</p>
<p>A <dfn id="file-entry">file entry</dfn> is the amalgamation of data held    by a <dfn id="local">local file header</dfn>, <dfn id="file-data">file    data</dfn>, and (optional) <dfn id="data-descriptor">data descriptor</dfn> <a href="http://www.w3.org/TR/widgets-digsig/#zip">[ZIP]</a> for each physical file stored in a zip archive.</p>
<p>A <dfn id="digital">digital signature document</dfn> is a well-formed    XML document named <code>signature.xml</code> generated by applying the <a href="http://www.w3.org/TR/widgets-digsig/#procedure1">procedure for signing a widget resource</a> described    in this document. The document will conform to <a href="http://www.w3.org/TR/widgets-digsig/#xmldsig">[XMLDsig]</a>.</p>
<p>An <dfn id="invalid">invalid zip archive</dfn> in this specification is    one where the digital signature document is either in error, or there is a    mismatch between the data in the digital signature document and/or the    data in a file entry (meaning that the authenticity or data integrity of    the zip archive could not be verified). For rules on dealing with invalid    zip archives, please see the &#8220;Dealing with Invalid Zip Archives&#8221;     section in the <a href="http://www.w3.org/TR/widgets-digsig/#widgets0">[Widgets Packaging]</a> specification.</p>
<p>A <dfn id="digitally">digitally signed widget resource</dfn> is one that    contains a file entry with a file name field that matches    &#8216;<code>signature.xml</code>&#8216; in a any case form, though the lower case    form is <em class="ct">recommended</em>. The <code>signature.xml</code> document <em class="ct">must</em> contain a <code>Reference</code> element    for every file entry in the widget resource. In addition, the file data of    the file entry <em class="ct">must</em> conform to <a href="http://www.w3.org/TR/widgets-digsig/#xmldsig">[XMLDsig]</a>, but in accordance to the <a href="http://www.w3.org/TR/widgets-digsig/#procedure1">procedure for signing a widget resource</a>.</p>
<p>A <dfn id="decompressed">decompressed representation</dfn> of a file    entry is the data extracted from the data field of a local file header    (and decompressed using <a href="http://www.w3.org/TR/widgets-digsig/#deflate">[Deflate]</a> when the    compression method field is <code>8</code>).</p>
<h2 id="procedure"><span class="secno">4. </span>Procedure for Signing a    Widget Resource</h2>
<p>The <dfn id="procedure1">procedure for signing a widget resource</dfn> to produce a conforming <a href="http://www.w3.org/TR/widgets-digsig/#digital">digital signature document</a> is as follows:</p>
<ol>
<li>If the widget resource contains zero file entries, treat this zip     archive as an <a href="http://www.w3.org/TR/widgets-digsig/#invalid">invalid zip archive</a>.</li>
<li>Let <var>doc</var> be a new XML <a href="http://www.w3.org/TR/widgets-digsig/#dom3core">[DOM3CORE]</a> document encoded in UTF-8 <a href="http://www.w3.org/TR/widgets-digsig/#xml">[XML]</a>.</li>
<li>Create a <code>SignedInfo</code> element.</li>
<li>For each <var><a href="http://www.w3.org/TR/widgets-digsig/#file-entry">file entry</a></var> in the widget     resource, if the file name field of the local file header of the file     entry does not case insensitively match <code>signature.xml</code>:
<ol>
<li>Let <var>path</var> be the value of the file name field of the local       file header.</li>
<li>If <var>general purpose bit 11</var> of the <var><a href="http://www.w3.org/TR/widgets-digsig/#local">local file header</a></var> is <code>0</code>, then       convert the character encoding of <var>path</var> from <a href="http://www.w3.org/TR/widgets-digsig/#cp437">[CP437]</a> to <a href="http://www.w3.org/TR/widgets-digsig/#utf-8">[UTF-8]</a>.</li>
<li>Verify that path is a valid zip-relative-path, as defined in <a href="http://www.w3.org/TR/widgets-digsig/#widgets0">[Widgets Packaging]</a>.</li>
<li>Create a <code>Reference</code> element.</li>
<li>Create a <code>URI</code> attribute in the <code>Reference</code> element and assign it the value of <var>path</var>.</li>
<li>Let <var>hash-value</var> be the digests of applying the SHA-1       algorithm to the file entry&#8217;s <a href="http://www.w3.org/TR/widgets-digsig/#decompressed">decompressed       representation</a> (see <a href="http://www.w3.org/TR/widgets-digsig/#xmldsig">[XMLDsig]</a> for how to do       this).</li>
<li>Create a <code>DigestValue</code> element and append the       <var>hash-value</var> as a <code>Text</code> node.</li>
<li>Create a <code>DigestMethod</code> element with an       <code>Algorithm</code> attribute, and give that attribute the value       <code>http://www.w3.org/2000/09/xmldsig#sha1</code>.</li>
<li>Append this <code>Reference</code> element to the       <code>SignedInfo</code> element.</li>
</ol>
</li>
<li>Create a <code>CanonicalizationMethod</code> element and set the value     of its <code>Algorithm</code> attribute to     <code>http://www.w3.org/TR/2001/REC-xml-c14n-20010315</code>.</li>
<li>Create a <code>SignatureMethod</code> element and set the value of its     <code>Algorithm</code> attribute to     <code>http://www.w3.org/2000/09/xmldsig#rsa-sha1</code>.</li>
<li>Calculate the digest of the <code>SignedInfo</code> element using     RSA-SHA1, sign it and place the signature in the     <code>&lt;SignatureValue&gt;</code> element.</li>
<li>Place the signer&#8217;s certificate in the <code>KeyInfo</code> element.</li>
<li>Create a <code>Signature</code> element in the     <code>http://www.w3.org/2000/09/xmldsig#</code> namespace.</li>
<li>Place the <code>SignedInfo</code>, <code>SignatureValue</code>, and     <code>KeyInfo</code> elements into the <code>Signature</code> element.</li>
<li>Open the zip archive so that a file entry can be written (eg. as a     buffered output stream).</li>
<li>Serialize the <code>Signature</code> element and all its children into     a UTF-8 encoded XML file in canonical form and save it in the root of the     <a href="http://www.w3.org/TR/widgets-digsig/#widget">widget resource</a> as <code>signature.xml</code> overriding the contents of any existing <code>signature.xml</code> file     entry.</li>
</ol>
<h2 id="procedure0"><span class="secno">5. </span>Procedure for Verifying a    Digital Signature</h2>
<p>The <dfn id="procedure2">procedure for verifying a digital    signature</dfn> is as follows. The algorithm first checks the validity of    the digital signature and then verifies that all resources in a widget    resource.</p>
<p>If a steps results in a <code>false</code> condition or is otherwise    <dfn id="in-error">in error</dfn>, then a widget user agent <em class="ct">must</em> treat the widget resource<em> </em>as an <a href="http://www.w3.org/TR/widgets-digsig/#invalid">invalid zip archive</a> and all processing of the widget    resource <em class="ct">must</em> stop.</p>
<ol>
<li>Find the the file entry whose file name field case insensitively     matches <code>signature.xml</code>.</li>
<li>Parse the <a href="http://www.w3.org/TR/widgets-digsig/#decompressed">decompressed representation</a> of     <code>signature.xml</code> into a DOM tree using a valid XML Parser to     check that the document is well-formed <a href="http://www.w3.org/TR/widgets-digsig/#xml">[XML]</a>.</li>
<li>Check that a <code>Signature</code> element exists and it contains a     <code>SignedInfo</code> element.</li>
<li>Check that every <var><a href="http://www.w3.org/TR/widgets-digsig/#file-entry">file entry</a></var> in     the zip archive has a corresponding <code>Reference</code> element in the     <code>SingedInfo</code> element:
<ol>
<li>Let <var>path</var> be the value of the file name field of the local       file header of the <var><a href="http://www.w3.org/TR/widgets-digsig/#file-entry">file entry</a></var>.</li>
<li>If <var>general purpose bit 11</var> of the <var><a href="http://www.w3.org/TR/widgets-digsig/#local">local file header</a></var> of the <var><a href="http://www.w3.org/TR/widgets-digsig/#file-entry">file entry</a></var> is <code>0</code>, then convert       the character encoding of <var>path</var> from <a href="http://www.w3.org/TR/widgets-digsig/#cp437">[CP437]</a> to <a href="http://www.w3.org/TR/widgets-digsig/#utf-8">[UTF-8]</a>.</li>
<li>Check that <var>path</var> is a valid zip-relative-path (absolute       URI references are considered <a href="http://www.w3.org/TR/widgets-digsig/#in-error">in error</a>)</li>
</ol>
</li>
<li>Apply the <a href="http://www.w3.org/TR/xmldsig-core/#sec-SignatureValidation">Signature     Validation</a> algorithm as defined in <a href="http://www.w3.org/TR/widgets-digsig/#xmldsig">[XMLDsig]</a>:
<ol>
<li>If the widget user agent cannot verify the certificate from its list       of explicitly trusted root certificates, then the certificate <em class="ct">must</em> be treated as invalid.</li>
</ol>
</li>
<li>Extract the <a href="http://www.w3.org/TR/widgets-digsig/#decompressed">decompressed representation</a> of     each file entry in the widget archive, making sure to retain the     directory structure of each file entry.
<ol>
<li class="issue">NEED SECURITY CONSIDERATIONS HERE.</li>
</ol>
</li>
<li>Apply the <a href="http://www.w3.org/TR/xmldsig-core/#sec-ReferenceValidation">Reference     Validation</a> algorithm as defined in <a href="http://www.w3.org/TR/widgets-digsig/#xmldsig">[XMLDsig]</a>,
<ol>
<li class="issue">THIS SECTION IS STILL UNDER DEVELOPMENT.</li>
<li>Let base URI be the absolute path to where the widget archive was       extracted (eg. <code>file:///temp/widget/</code>)</li>
<li>Validate against the matched file entry&#8217;s <a href="http://www.w3.org/TR/widgets-digsig/#decompressed">decompressed representation</a>. The relative URI       references are evaluated with respect to a base URI that points at       where the widget resource was demcompressed.</li>
</ol>
</li>
</ol>
<h2 id="acknowledgements" class="no-num">Acknowledgements</h2>
<p class="issue">This section will be completed as the document matures.</p>
<h2 id="references" class="no-num">References</h2>
<p class="issue">This section will be completed as the document matures.</p>
<dl>
<dt><dfn id="canonical">[Canonical XML]</dfn></dt>
<dd>Canonical XML. W3C Recommendation. J. Boyer. March 2001.     http://www.w3.org/TR/2001/REC-xml-c14n-20010315.     http://www.ietf.org/rfc/rfc3076.txt</dd>
<dt><dfn id="cp437">[CP437]</dfn></dt>
<dd><a href="ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/PC/CP437.TXT">cp437_DOSLatinUS     to Unicode table</a>. <a href="ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/PC/CP437.TXT">ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/PC/CP437.TXT</a> </dd>
<dt><dfn id="deflate">[Deflate]</dfn></dt>
<dd><a href="http://www.faqs.org/rfcs/rfc1951.html">DEFLATE Compressed     Data Format Specification version 1.3</a>, P. Deutsch, The Internet     Society, May 1996.</dd>
<dt><dfn id="dom3core">[DOM3CORE]</dfn></dt>
<dd><a href="http://www.w3.org/TR/DOM-Level-3-Core">Document Object Model     (DOM) Level 3 Core Specification</a>, A. Le Hors, P. Le Hégaret,     L. Wood, G. Nicol, J. Robie, M. Champion, S. Byrne, editors. World Wide     Web Consortium, April 2004.</dd>
<dt><dfn id="rfc2119">[RFC2119]</dfn></dt>
<dd><cite><a href="http://www.ietf.org/rfc/rfc2119">Key words for use in     RFCs to Indicate Requirement Levels</a></cite>, S. Bradner. IETF, March     1997.</dd>
<dt><dfn id="utf-8">[UTF-8]</dfn></dt>
<dd>RFC 2279. UTF-8, a transformation format of ISO 10646. F. Yergeau.     January 1998. http://www.ietf.org/rfc/rfc2279.txt</dd>
<dt><dfn id="widgets0">[Widgets Packaging]</dfn></dt>
<dd><cite>Widgets 1.0: Packaging and Configuration</cite>.</dd>
<dt><dfn id="widgets1">[Widgets Requirements]</dfn></dt>
<dd><cite>Widgets 1.0 Requirements</cite>, M. Caceres. W3C, July 2007.</dd>
<dt><dfn id="xml">[XML]</dfn></dt>
<dd><cite><a href="http://www.w3.org/TR/REC-xml/">Extensible Markup     Language (XML) 1.0 (Third Edition)</a></cite>. T. Bray, J. Paoli, C. M.     Sperberg-McQueen, E. Maler, F. Yergeau. W3C, February 2004.</dd>
<dt><dfn id="xmldsig">[XMLDsig]</dfn></dt>
<dd><cite><a href="http://www.w3.org/TR/xmldsig-core/">XML-Signature     Syntax and Processing</a></cite>. Mark Bartel, John Boyer, Barb Fox,     Brian LaMacchia and Ed Simon, authors. Donald Eastlake, Joseph Reagle,     and David Solo, editors. W3C, February 2002.</dd>
<dt><dfn id="xpath">[XPath]</dfn></dt>
<dd>XML Path Language (XPath) Version 1.0. W3C Recommendation. J. Clark,     S. DeRose. October 1999. http://www.w3.org/TR/1999/REC-xpath-19991116</dd>
<dt><dfn id="x509v3">[X509v3]</dfn></dt>
<dd>ITU-T Recommendation X.509 version 3 (1997). &#8220;Information     Technology - Open Systems Interconnection - The Directory Authentication     Framework&#8221; ISO/IEC 9594-8:1997.</dd>
<dt><dfn id="zip">[ZIP]</dfn></dt>
<dd><cite><a href="http://www.pkware.com/documents/casestudies/APPNOTE.TXT">.ZIP File     Format Specification</a></cite>. PKWare Inc.</dd>
</dl>
]]></content:encoded>
			<wfw:commentRss>http://cowworking.ru/?feed=rss2&amp;p=47</wfw:commentRss>
		</item>
		<item>
		<title>Виджеты: упаковка и конфигурация</title>
		<link>http://cowworking.ru/?p=44</link>
		<comments>http://cowworking.ru/?p=44#comments</comments>
		<pubDate>Sun, 12 Apr 2009 20:29:01 +0000</pubDate>
		<dc:creator>max</dc:creator>
		
		<category><![CDATA[Виджеты]]></category>

		<guid isPermaLink="false">http://cowworking.ru/?p=44</guid>
		<description><![CDATA[

Widgets 1.0: Packaging and Configuration
W3C Working Draft 22 December 2008

This version:
http://www.w3.org/TR/2008/WD-widgets-20081222/
Latest version:
http://www.w3.org/TR/widgets/
Previous versions:
http://www.w3.org/TR/2008/WD-widgets-20080414/
http://www.w3.org/TR/2007/WD-widgets-20071013/
http://www.w3.org/TR/2006/WD-widgets-20061109/
Latest Editor&#8217;s draft:
http://dev.w3.org/2006/waf/widgets/
Version history:
Twitter messages (non-editorial changes only): http://twitter.com/widgetspecs (RSS)
Editor:
Marcos Caceres, W3C Invited Expert


Copyright © 2008 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C liability, trademark and document use rules apply.


Abstract
This document standardizes a Zip-based packaging format, an XML-based    configuration [...]]]></description>
			<content:encoded><![CDATA[<div class="head"><!--begin-logo--><a href="http://www.w3.org/"><img src="http://www.w3.org/Icons/w3c_home" alt="W3C" width="72" height="48" /></a></p>
<p><!--end-logo--></p>
<h1 class="head">Widgets 1.0: Packaging and Configuration</h1>
<h2 id="w3c-working-draft-date" class="no-num no-toc">W3C Working Draft 22 December 2008</h2>
<dl>
<dt>This version:</dt>
<dd><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/">http://www.w3.org/TR/2008/WD-widgets-20081222/</a></dd>
<dt>Latest version:</dt>
<dd><a href="http://www.w3.org/TR/widgets/">http://www.w3.org/TR/widgets/</a></dd>
<dt>Previous versions:</dt>
<dd><a href="http://www.w3.org/TR/2008/WD-widgets-20080414/">http://www.w3.org/TR/2008/WD-widgets-20080414/</a></dd>
<dd><a href="http://www.w3.org/TR/2007/WD-widgets-20071013/">http://www.w3.org/TR/2007/WD-widgets-20071013/</a></dd>
<dd><a href="http://www.w3.org/TR/2006/WD-widgets-20061109/">http://www.w3.org/TR/2006/WD-widgets-20061109/</a></dd>
<dt>Latest Editor&#8217;s draft:</dt>
<dd><a href="http://dev.w3.org/2006/waf/widgets/">http://dev.w3.org/2006/waf/widgets/</a></dd>
<dt>Version history:</dt>
<dd>Twitter messages (non-editorial changes only): <a href="http://twitter.com/widgetspecs">http://twitter.com/widgetspecs</a> (<a href="http://twitter.com/statuses/user_timeline/14349303.rss">RSS</a>)</dd>
<dt>Editor:</dt>
<dd><a href="http://datadriven.com.au/">Marcos Caceres</a>, W3C Invited Expert</dd>
</dl>
<p><!--begin-copyright--></p>
<p class="copyright"><a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> © 2008 <a href="http://www.w3.org/"><acronym title="World Wide Web Consortium">W3C</acronym></a><sup>®</sup> (<a href="http://www.csail.mit.edu/"><acronym title="Massachusetts Institute of Technology">MIT</acronym></a>, <a href="http://www.ercim.org/"><acronym title="European Research Consortium for Informatics and Mathematics">ERCIM</acronym></a>, <a href="http://www.keio.ac.jp/">Keio</a>), All Rights Reserved. W3C <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>, <a href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a> and <a href="http://www.w3.org/Consortium/Legal/copyright-documents">document use</a> rules apply.</p>
<p><!--end-copyright--></div>
<hr />
<h2 id="abstract" class="no-num no-toc">Abstract</h2>
<p>This document standardizes a Zip-based packaging format, an XML-based    configuration document format and a series of steps that user agents follow when    processing and verifying various aspects of widgets.The packaging format    acts as a container for files used by a widget. The configuration document    is an XML vocabulary that authors can use to declare metadata and    configuration parameters for a widget. The steps for processing a widget    resource describe the expected behavior and means of error handling for    widget user agents while processing the packaging format, configuration    document, and other relevant files. This document also defines    conformance criteria and expected behavior for conformance checkers, which are tools that aid    authors in verifying that Zip archives and configuration documents conform to this specification.</p>
<p>This document is part of the Widgets 1.0 Family of   Specifications, which together standardize widgets.</p>
<h2 id="sotd" class="no-num no-toc">Status of this Document</h2>
<p><em>This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the <a href="http://www.w3.org/TR/">W3C technical reports index</a> at http://www.w3.org/TR/.</em></p>
<p>This document was produced by a group operating under the <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5 February 2004 W3C Patent Policy</a>. W3C maintains a <a rel="disclosure" href="http://www.w3.org/2004/01/pp-impl/42538/status">public list of any patent disclosures</a> made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential">Essential Claim(s)</a> must disclose the information in accordance with <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">section 6 of the W3C Patent Policy</a>.</p>
<p>This is the 22 December 2008 Last Call Working Draft version of the &#8220;Widgets 1.0: Packaging and Configuration&#8221; specification. The Last Call period ends on 31 January 2009. This version reflects over of two years work addressing requirements 1 to 23 of the Widgets 1.0: Requirements document <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#widgets-reqs">[Widgets-Reqs]</a>. The requirements were addressed and specified through extensive research,  and via consultation with W3C members and the public via the Working Group&#8217;s mailing lists (<a href="http://lists.w3.org/Archives/Public/public-appformats/">WAF archive</a>, <a href="http://lists.w3.org/Archives/Public/public-webapps/">WebApps archive</a>). The purpose of this Last Call is to give external interested parties a final opportunity to publicly comment on how widgets should be packaged and configured before the Working Group makes a call for implementations. The Working Group&#8217;s goal is to make sure that vendor&#8217;s requirements for packaging and configuration have been effectively addressed and clearly specified.</p>
<p>This document is produced by the <a href="http://www.w3.org/2008/webapps/">Web Applications WG</a>, part of the <a href="http://www.w3.org/2006/rwc/Activity">Rich Web Clients Activity</a> in the W3C <a href="http://www.w3.org/Interaction/">Interaction Domain</a>. It is expected that this document will progress along the W3C&#8217;s Recommendation track. Publication as a Working Draft does not imply endorsement by the W3C Membership. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.</p>
<p><strong>You can find the latest <a href="http://dev.w3.org/2006/waf/widgets/">Editor&#8217;s Draft</a> of this document in the <a href="http://dev.w3.org/">W3C&#8217;s CVS repository</a>, which is updated on a very regular basis.</strong> The public is encouraged to send comments to the Web Apps Working Group&#8217;s public mailing list <a href="mailto:public-webapps@w3.org">public-Webapps@w3.org</a> (<a href="http://lists.w3.org/Archives/Public/public-webapps/">archive</a>). See <a href="http://www.w3.org/Mail/">W3C mailing list and archive usage guidelines</a>. A detailed <a href="http://dev.w3.org/cvsweb/2006/waf/widgets/">list of changes</a> from the previous version is also available from the W3C&#8217;s CVS server.</p>
<p><strong class="redNote">Implementers should be aware that this document is not stable.</strong> Implementers who are not taking part in the discussions are likely to find the specification changing out from under them in incompatible ways. Vendors interested in implementing this document before it eventually reaches the Candidate Recommendation stage should join the aforementioned mailing lists and take part in the discussions.</p>
<p class="note">User agents that wish to extend this specification in any way are encouraged to discuss their extensions on a public forum, such as <a href="mailto:public-webapps@w3.org">public-Webapps</a> so their extensions can be considered for standardization.</p>
<h2 id="table-of-contents" class="no-num no-toc">Table of Contents</h2>
<p><!--begin-toc--></p>
<ol class="toc">
<li><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#introduction"><span class="secno">1 </span>Introduction</a>
<ol class="toc">
<li><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#note-to-last-call-reviewers"><span class="secno">1.1 </span>Note to Last Call Reviewers</a></li>
<li><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#design-goals-and-requirements"><span class="secno">1.2 </span>Design Goals and Requirements</a></li>
<li><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#how-this-document-is-organized"><span class="secno">1.3 </span>How this Document is Organized</a></li>
<li><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-widget-family-of-specifications"><span class="secno">1.4 </span>The Widget Family of Specifications</a></li>
<li><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#global-definitions"><span class="secno">1.5 </span>Global Definitions</a></li>
</ol>
</li>
<li><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#conformance"><span class="secno">2 </span>Conformance</a></li>
<li><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#widget-user-agents"><span class="secno">3 </span>Widget User Agents</a>
<ol class="toc">
<li><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#dependencies-on-other-specifications-and-file-formats"><span class="secno">3.1 </span>Dependencies on Other Specifications and File Formats</a></li>
<li><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#internationalized-tag-set-support"><span class="secno">3.2 </span>Internationalized Tag Set Support</a></li>
<li><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#zip-support"><span class="secno">3.3 </span>Zip Support</a></li>
</ol>
</li>
<li><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#conformance-checker"><span class="secno">4 </span>Conformance Checker</a></li>
<li><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#zip-archive"><span class="secno">5 </span>Zip Archive</a>
<ol class="toc">
<li><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#compression-methods"><span class="secno">5.1 </span>Compression Methods</a></li>
<li><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#version-of-zip-implementation-needed-to-extract-a-file-entry"><span class="secno">5.2 </span>Version of Zip Implementation Needed to Extract a File Entry</a></li>
<li><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#zip-relative-paths"><span class="secno">5.3 </span>Zip Relative Paths</a></li>
<li><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#reserved-characters"><span class="secno">5.4 </span>Reserved Characters</a></li>
</ol>
</li>
<li><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#widget-resources"><span class="secno">6 </span>Widget Resources</a>
<ol class="toc">
<li><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#invalid-widgets"><span class="secno">6.1 </span>Invalid Widgets</a></li>
<li><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#files-and-content-types"><span class="secno">6.2 </span>Files and Content Types</a></li>
<li><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#reserved-file-and-folder-names"><span class="secno">6.3 </span>Reserved File and Folder Names</a></li>
<li><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#digital-signatures"><span class="secno">6.4 </span>Digital Signatures</a></li>
<li><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#content-localization"><span class="secno">6.5 </span>Content Localization</a></li>
<li><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#start-file-and-default-start-files"><span class="secno">6.6 </span>Start file and Default Start Files</a></li>
<li><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#custom-icons-and-default-icons"><span class="secno">6.7 </span>Custom Icons and Default Icons</a></li>
<li><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#thumbnail"><span class="secno">6.8 </span>Thumbnail</a></li>
<li><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#mime-type"><span class="secno">6.9 </span>MIME Type</a></li>
<li><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#file-extension"><span class="secno">6.10 </span>File Extension</a></li>
</ol>
</li>
<li><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#configuration-document"><span class="secno">7 </span>Configuration Document</a>
<ol class="toc">
<li><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#namespace"><span class="secno">7.1 </span>Namespace</a></li>
<li><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#proprietary-extensions"><span class="secno">7.2 </span>Proprietary Extensions</a></li>
<li><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#attribute-types"><span class="secno">7.3 </span>Attribute Types</a></li>
<li><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-widget-element"><span class="secno">7.4 </span>The <code>widget</code> Element</a></li>
<li><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-name-element"><span class="secno">7.5 </span>The <code>name</code> Element</a></li>
<li><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-description-element"><span class="secno">7.6 </span>The <code>description</code> Element</a></li>
<li><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-author-element"><span class="secno">7.7 </span>The <code>author</code> Element</a></li>
<li><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-license-element"><span class="secno">7.8 </span>The <code>license</code> Element</a></li>
<li><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-icon-element"><span class="secno">7.9 </span>The <code>icon</code> Element</a></li>
<li><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-access-element"><span class="secno">7.10 </span>The <code>access</code> Element</a></li>
<li><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-content-element"><span class="secno">7.11 </span>The <code>content</code> Element</a></li>
<li><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-update-element"><span class="secno">7.12 </span>The <code>update</code> Element</a></li>
<li><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-feature-element"><span class="secno">7.13 </span>The <code>feature</code> Element</a></li>
<li><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#window-modes"><span class="secno">7.14 </span>Window Modes</a></li>
<li><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#indicating-text-directionality-with-its:span"><span class="secno">7.15 </span>Indicating Text Directionality with <code>&lt;its:span&gt;</code></a></li>
</ol>
</li>
<li><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#steps-for-processing-a-widget-resource"><span class="secno">8 </span>Steps for Processing a Widget Resource</a>
<ol class="toc">
<li><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#dealing-with-invalid-widgets"><span class="secno">8.1 </span>Dealing with Invalid Widgets</a></li>
<li><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#extracting-the-file-data-from-a-file-entry"><span class="secno">8.2 </span>Extracting the File Data from a File Entry</a></li>
<li><a class="no-num" href="http://www.w3.org/TR/2008/WD-widgets-20081222/#step-1-acquire-a-potential-zip-archive">Step 1 - Acquire a Potential Zip Archive</a></li>
<li><a class="no-num" href="http://www.w3.org/TR/2008/WD-widgets-20081222/#step-2-verify-the-zip-archive-and-its-file-entries">Step 2 - Verify the Zip archive and its File Entries</a></li>
<li><a class="no-num" href="http://www.w3.org/TR/2008/WD-widgets-20081222/#step-3-set-the-configuration-defaults">Step 3 - Set the Configuration Defaults</a></li>
<li><a class="no-num" href="http://www.w3.org/TR/2008/WD-widgets-20081222/#step-4-locate-digital-signatures-for-the-widget">Step 4 - Locate Digital Signatures for the Widget</a></li>
<li><a class="no-num" href="http://www.w3.org/TR/2008/WD-widgets-20081222/#step-5-process-the-digital-signatures">Step 5 - Process the Digital Signatures</a></li>
<li><a class="no-num" href="http://www.w3.org/TR/2008/WD-widgets-20081222/#step-6-determine-the-base-folder-and-widget-locale">Step 6 - Determine the Base folder and Widget Locale</a></li>
<li><a class="no-num" href="http://www.w3.org/TR/2008/WD-widgets-20081222/#step-7-locate-the-configuration-document">Step 7 - Locate the Configuration Document</a></li>
<li><a class="no-num" href="http://www.w3.org/TR/2008/WD-widgets-20081222/#step-8-process-the-configuration-document">Step 8 - Process the configuration document</a></li>
<li><a class="no-num" href="http://www.w3.org/TR/2008/WD-widgets-20081222/#step-9-locate-the-start-file">Step 9 - Locate the Start File</a></li>
<li><a class="no-num" href="http://www.w3.org/TR/2008/WD-widgets-20081222/#step-10-locate-the-default-icons-and-thumbnail">Step 10 - Locate the default icons and thumbnail</a></li>
</ol>
</li>
<li><a class="no-num" href="http://www.w3.org/TR/2008/WD-widgets-20081222/#appendix">Appendix</a>
<ol class="toc">
<li><a class="no-num" href="http://www.w3.org/TR/2008/WD-widgets-20081222/#embedding-a-widget-resource-into-an-html-document">Embedding a Widget Resource into an HTML Document</a></li>
<li><a class="no-num" href="http://www.w3.org/TR/2008/WD-widgets-20081222/#relaxng-schema-for-the-configuration-document">RelaxNG Schema for the Configuration Document</a></li>
</ol>
</li>
<li><a class="no-num" href="http://www.w3.org/TR/2008/WD-widgets-20081222/#acknowledgements">Acknowledgements</a></li>
<li><a class="no-num" href="http://www.w3.org/TR/2008/WD-widgets-20081222/#normative-references">Normative References</a></li>
<li><a class="no-num" href="http://www.w3.org/TR/2008/WD-widgets-20081222/#informative-references">Informative References</a></li>
</ol>
<p><!--end-toc--></p>
<h2 id="introduction"><span class="secno">1 </span>Introduction</h2>
<p><em>Widgets</em> are full-fledged client-side applications that are authored using Web standards. They are typically downloaded and installed on a client machine or device where they typically run as stand-alone applications outside of a Web browser. Examples range from simple clocks, stock tickers, news casters, games and weather forecasters, to complex applications that pull data from multiple sources to be &#8220;mashed-up&#8221; and presented to a user in some interesting and useful way (see <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#widgets-landscape">[Widgets-Landscape]</a> for more information). The runtime environment in which a widget runs is referred to as a <em>widget user agent</em>.</p>
<h3 id="note-to-last-call-reviewers"><span class="secno">1.1 </span>Note to Last Call Reviewers</h3>
<p><em>This section is non-normative.</em></p>
<p>The editor of this specification responds rapidly to all feedback and continuously makes corrections to this document. So, unless you are reading this document on the date of publication, <strong class="redNote">it is extremely  likely that this document has been superseded</strong>. Instead of reviewing this published draft, please review the <a href="http://dev.w3.org/2006/waf/widgets/">latest editor&#8217;s draft</a> and make sure you cite the date of that draft in the feedback you send to the Web Apps Working Group&#8217;s public mailing list <a href="mailto:public-webapps@w3.org">public-Webapps@w3.org</a>.</p>
<p>Please also be sure to check the mailing list <a href="http://lists.w3.org/Archives/Public/public-webapps/">archive</a> to see if any issue you uncover has already been addressed. To help with cataloguing issues, prefix emails to the mailing list with the string <samp>[widgets]</samp>. Any and all feedback is welcomed.</p>
<h3 id="design-goals-and-requirements"><span class="secno">1.2 </span>Design Goals and Requirements</h3>
<p><em>This section is non-normative.</em></p>
<p>The design goals and requirements for this specification are addressed in the   <cite>Widgets 1.0 Requirements</cite> <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#widgets-reqs">[Widgets-Reqs]</a> document. This document addresses the following requirements:</p>
<ul>
<li><a href="http://www.w3.org/TR/widgets-reqs/#r1.-packaging">R1. Packaging Format</a>, see <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#packaging-format">packaging format</a>.</li>
<li><a href="http://www.w3.org/TR/widgets-reqs/#r2.-mime">R2. MIME Type</a>, see the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#widget-mime-type">widget MIME Type</a>.</li>
<li><a href="http://www.w3.org/TR/widgets-reqs/#r3.-file">R3. File Extension</a>, see the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#widget-file-extension"> widget file extension</a>.</li>
<li><a href="http://www.w3.org/TR/widgets-reqs/#r4.-internal">R4. Internal Abstract Structure</a>, see <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#zip-archive">Zip archive</a> and the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#widget-resource">widget resource</a>.</li>
<li><a href="http://www.w3.org/TR/widgets-reqs/#r5.-reserved">R5. Reserved Resources Names</a>, see <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#reserved-file-names">reserved file names</a>.</li>
<li><a href="http://www.w3.org/TR/widgets-reqs/#r6.-addressing">R6. Addressing Scheme</a>, see <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#valid-path">valid path</a>.</li>
<li><a href="http://www.w3.org/TR/widgets-reqs/#r7.-multilingual">R7. Multilingual Resource Names</a>, see <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#zip-relative-path">Zip relative path</a>, particularly in respect to <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#utf-8">[UTF-8]</a> support.</li>
<li><a href="http://www.w3.org/TR/widgets-reqs/#r8.-localization">R8. Localization Guidelines</a>, see <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#content-localization">content localization</a>.</li>
<li><a href="http://www.w3.org/TR/widgets-reqs/#r9.-automatic">R9. Automatic Localization</a>, see <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#content-localization">content localization</a>.</li>
<li><a href="http://www.w3.org/TR/widgets-reqs/#r10.-">R10. Device Independent Delivery</a></li>
<li><a href="http://www.w3.org/TR/widgets-reqs/#r11.-">R11. Data Compression</a>, see the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#valid-compression-methods">valid compression methods</a>.</li>
<li><a href="http://dev.w3.org/2006/waf/widgets-reqs/#r12.-">R12. Derive the MIME types of Resources</a>, see <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#rules-for-identifying-the-mime-type-of-a-file-0">rules for identifying the MIME type of a file</a>.</li>
<li><a href="http://www.w3.org/TR/widgets-reqs/#r13.-">R13. Format and Schema</a>, see the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#configuration-document-0">configuration document</a>, <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#configuration-defaults">configuration defaults</a>, and the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#relaxng-schema-for-the-configuration-document">RelaxNG Schema for the configuration document</a>.</li>
<li><a href="http://www.w3.org/TR/widgets-reqs/#r14.-">R14. Widget Metadata</a>, see configuration document&#8217;s <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#name"><code>name</code></a>, <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-description-element"><code>description</code></a>, and <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-license-element"><code>license</code></a> element.</li>
<li><a href="http://www.w3.org/TR/widgets-reqs/#r15.-">R16. Authorship Metadata</a>, see configuration document&#8217;s <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-author-element"><code>author</code></a> element.</li>
<li><a href="http://www.w3.org/TR/widgets-reqs/#r16.-">R16. Copyright Notice and License Metadata</a>, see configuration document&#8217;s <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-license-element"><code>license</code></a> element.</li>
<li><a href="http://www.w3.org/TR/widgets-reqs/#r17.-">R17. Visual Rendering Dimensions</a>, see widget element&#8217;s <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#width-0"><code>width</code></a> and <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#height-0"><code>height</code></a> attributes.</li>
<li><a href="http://www.w3.org/TR/widgets-reqs/#r18.-">R18. Declarative Bootstrap</a>, see <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-content-element"><code>content</code></a> element.</li>
<li><a href="http://www.w3.org/TR/widgets-reqs/#r19.-">R19. Automated Bootstrap</a>, see <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#default-start-files">default start files</a>.</li>
<li><a href="http://www.w3.org/TR/widgets-reqs/#r20.-">R20. Iconic Representations</a>, see <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-icon-element"><code>icon</code></a> element and the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#default-icons-0">default icons</a>.</li>
<li><a href="http://www.w3.org/TR/widgets-reqs/#r21.-">R21. Configuration Parameters</a>, see <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-access-element"><code>access</code></a> element.</li>
<li><a href="http://www.w3.org/TR/widgets-reqs/#r22.-">R22. Feature Access Declarations</a>, see <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#feature"><code>feature</code></a> element.</li>
<li><a href="http://www.w3.org/TR/widgets-reqs/#r23.-">R23. Configuration Document Independence</a>, see <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#configuration-document-0">configuration document</a>.</li>
</ul>
<h3 id="how-this-document-is-organized"><span class="secno">1.3 </span>How this Document is Organized</h3>
<p><em>This section is non-normative.</em></p>
<p>The reader should be aware that this document is organized into two halves, but not   explicitly marked as such. The first half defines the various aspects of what constitutes   the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#packaging-format">packaging format</a>, the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#configuration-document-0">configuration document</a>, and <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#reserved">reserved</a> files, such   as <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#default-icons-0">default icons</a> and <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#localized-folder-0">localized folder</a>s, as well as some of the expected behavior of <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#conformance-checker-0">conformance     checker</a>s, which are implementations that check the conformance of a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#zip-archive">Zip archive</a> or a   <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#configuration-document-0">configuration document</a> to this specification. Where possible, the first half    avoids describing too many aspects related to processing, which are described in more detail in the   second half of the document.</p>
<p>The second half, which starts in the section titled &#8220;<a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#steps-for-processing-a-widget-resource-0">Steps for Processing a Widget Resource</a>&#8220;, defines the steps required to process a widget as well as the expected behavior of a widget user agent as it processes the packaging format, the configuration document, and attempts to perform internationalization. The second half of this document also deals with error handling in the event that a widget user agent encounters unsupported or missing files, or erroneous <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#dom3core">[DOM3Core]</a> nodes in the configuration document. Wherever processing is relevant, sections in the first half of the document link to sections in the second half of the document.</p>
<p>This specification should be read like all other specifications. First, it should be read cover-to-cover; multiple times. Then, it should be read backwards at least once. Then it should be read by picking random sections from the contents list and following all the cross-references.</p>
<h3 id="the-widget-family-of-specifications"><span class="secno">1.4 </span>The Widget Family of Specifications</h3>
<p><em>This section is non-normative.</em></p>
<p>This specification is part of the <dfn id="widgets-1.0-family-of-specifications">Widgets 1.0 family of specifications</dfn>, which together standardize widgets as a whole. <cite>The Widgets 1.0: APIs and Events</cite> <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#widgets-apis">[Widgets-APIs]</a> specification defines APIs to store preferences and capture events. The <cite>Widgets 1.0: Digital Signature</cite> <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#widgets-digsig">[Widgets-DigSig]</a> specification defines a means for widgets to be digitally signed using a custom profile of the <cite>XML-Signature Syntax and Processing Specification.</cite> The <cite>Widgets 1.0: Security Model</cite> <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#widgets-security">[Widgets-Security]</a> specification defines a security model that defines what a widget can or cannot do at runtime. The <cite>Widgets: 1.0: Automatic Updates</cite> <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#widgets-updates">[Widgets-Updates]</a> specification defines a version control model that allows widgets to be kept up-to-date over <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#http">[HTTP]</a>.</p>
<h3 id="global-definitions"><span class="secno">1.5 </span>Global Definitions</h3>
<p>The following definitions are used globally throughout this specification. Please note that other terms are given throughout this document and defined where they are used.</p>
<p>An <dfn id="author">author</dfn> is a person who creates a widget resource or an authoring tool that generates widget resources.</p>
<p>The <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#widgets-landscape">[Widgets-Landscape]</a> defines a <dfn id="widget">widget</dfn> as an end-user&#8217;s conceptualization of an interactive single purpose application for displaying and/or updating local data or data on the Web, packaged in a way to allow a single download and installation on a user&#8217;s machine, <q>mobile phone, or Internet-enabled mobile device</q>. Because widgets are packaged, they can be liberally shared by users without relying on <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#http">[HTTP]</a> (i.e., users can share widgets over Bluetooth or through other distribution channels).</p>
<p><dfn id="reserved">Reserved</dfn> means that a character, or text string, or a file that is identified by a particular <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#file-name"><code>file-name</code></a>, has a specified purpose and meaning in this specification or in some other specification or system. The reason why something is reserved and how it must or must not be used is given when the term is used.</p>
<p>A character, or text string, or a file is <dfn id="arbitrary">arbitrary</dfn> if it is not <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#reserved">reserved</a>.</p>
<p>The <dfn id="space-characters" title="space characters">space characters</dfn>, for the purposes of this specification, are <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#unicode">[Unicode]</a> code points:</p>
<ul>
<li>U+0020 SPACE,</li>
<li>U+0009 CHARACTER TABULATION (tab),</li>
<li>U+000A LINE FEED (LF),</li>
<li>U+000B LINE TABULATION,</li>
<li>U+000C FORM FEED (FF),</li>
<li>U+000D CARRIAGE RETURN (CR).</li>
</ul>
<p>The <dfn id="control-characters">control characters</dfn>, for the purpose of this specification, are <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#unicode">[Unicode]</a> code points in the range U+0000 NUL to U+001F INFORMATION   SEPARATOR 1, and character U+007F DELETE.</p>
<h2 id="conformance"><span class="secno">2 </span>Conformance</h2>
<p>As well as sections marked as non-normative, all diagrams, examples, and notes in this specification are non-normative. Everything else in this specification is normative.</p>
<p>The key words <em class="ct">must</em>, <em class="ct">must not</em>, <em class="ct">required</em>, <em class="ct">should</em>, <em class="ct">should not</em>, <em class="ct">recommended</em>, <em class="ct">may</em> and <em class="ct">optional</em> in this specification are to be interpreted as described in <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#rfc2119">[RFC2119]</a>.</p>
<p>This specification describes the conformance criteria for user agents (relevant to implementers) and various resource types (relevant to authors and authoring tool implementers).</p>
<p>There are four classes of products that can claim conformance to this specification:</p>
<ol>
<li>A <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#widget-user-agent">widget user agent</a>.</li>
<li>A <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#widget-resource">widget resource</a>.</li>
<li>A <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#configuration-document-0">configuration document</a>.</li>
<li>A <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#conformance-checker-0">conformance checker</a>.</li>
</ol>
<p>Products that generate widget resources and/or allow authoring of configuration documents <em class="ct">must not</em> claim conformance to this specification, though they can claim to produce widget resources or configuration documents that are conforming to this specification. Authoring tools and markup generators <em class="ct">must</em> generate conforming configuration documents and/or widget resources.</p>
<p>Products that check the conformance of widget resources or configuration documents can claim conformance to this specification. They can also claim to verify that a widget resource or a configuration document is conforming to the relevant section(s) of this specification.</p>
<h2 id="widget-user-agents"><span class="secno">3 </span>Widget User Agents</h2>
<p>A <dfn id="widget-user-agent">widget user agent</dfn> is a user agent that attempts to implement this specification, as well as the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#widgets-apis">[Widgets-APIs]</a>, <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#widgets-security">[Widgets-Security]</a>, <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#widgets-digsig">[Widgets-DigSig]</a>, and <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#widgets-updates">[Widgets-Updates]</a> specifications.</p>
<p>A widget user agent <em class="ct">must</em> behave as described by this specification in order to claim conformance, even when faced with a non-conforming <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#widget-resource">widget resource</a> or a non-conforming <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#configuration-document-0">configuration document</a>.</p>
<p class="note">Note: Implementers can partially check their level of conformance to this specification by successfully passing the test cases of the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#widgets-test-suite">[Widgets-Test-Suite]</a>. Note, however, that passing all the tests in the test suite  does not imply conformance to this specification; It only implies that the implementation conforms to aspects tested by the test suite.</p>
<h3 id="dependencies-on-other-specifications-and-file-formats"><span class="secno">3.1 </span>Dependencies on Other Specifications and File Formats</h3>
<p>This specification relies on several other specifications, some of which are file formats.</p>
<p>A specification is said to be <dfn id="supported">supported</dfn> by a widget user agent if the widget user agent attempts to implement that specification. In addition, a widget user agent is said to support a particular file format if it is able to process or render that file format.</p>
<p>In addition to this specification, a widget user agent <em class="ct">must</em> support the following specifications and file formats:</p>
<ul>
<li><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#zip">[ZIP]</a>, but with the exclusions listed in the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#zip-support">Zip support</a> section.</li>
<li><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#png">[PNG]</a>, <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#gif87">[GIF87]</a>, and <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#jpeg">[JPEG]</a> and   <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#gif89">[GIF89]</a> image files formats.</li>
<li><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#xml">[XML]</a> and <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#xmlns">[XMLNS]</a>.</li>
<li><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#dom3core">[DOM3CORE]</a>.</li>
<li><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#html4">[HTML4]</a>.</li>
<li><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#xmlhttprequest">[XMLHttpRequest]</a>.</li>
<li><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#ecmascript">[ECMAScript]</a>.</li>
<li><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#utf-8">[UTF-8]</a>.</li>
<li><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#deflate">[Deflate]</a>.</li>
</ul>
<p>A widget user agent <em class="ct">may</em> also support the following file formats as <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-icon-element">icon</a>s:</p>
<ul>
<li><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#ico">[ICO]</a>.</li>
<li><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#svgtiny">[SVGTiny]</a>.</li>
</ul>
<h3 id="internationalized-tag-set-support"><span class="secno">3.2 </span>Internationalized Tag Set Support</h3>
<p>To facilitate content localization in <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#configuration-document-0">configuration document</a>s, a widget user agent <em class="ct">should</em> support the Internationalized Tag Set&#8217;s (<a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#its">[ITS]</a>) <code>its:span</code> element and the <code>its:dir</code> attribute. Support of other ITS elements and attributes is <em class="ct">not required</em>.</p>
<p>Although this specification specifies the elements of the configuration document in which <code>&lt;its:span&gt;</code> and the <code>its:dir</code> attribute can be used (below), it does not define how they are to be interpreted and processed by a widget user agent. If a widget user agent implements <code>&lt;its:span&gt;</code> and <code>its:dir</code>, then the widget user agent <em class="ct">must</em> do so in conformance to the processing rules defined by the ITS specification.</p>
<h3 id="zip-support"><span class="secno">3.3 </span><dfn>Zip Support</dfn></h3>
<p>A widget user agent is <em class="ct">not required</em> to implement or support any of the following aspects of the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#zip">[ZIP]</a> specification:</p>
<ul>
<li>Any decompression algorithm, other than <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#deflate">[Deflate]</a> and Stored (no compression) <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#zip">[ZIP]</a>.</li>
<li>File spanning or multiple volumes.</li>
<li>Zip64 extensions.</li>
<li>Any digital signature method, other than the method defined in <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#widgets-digsig">[Widgets-DigSig]</a>.</li>
<li>Any decryption methods.</li>
<li>Any patented aspects.</li>
</ul>
<h2 id="conformance-checker"><span class="secno">4 </span>Conformance Checker</h2>
<p>A <dfn id="conformance-checker-0">conformance checker</dfn> (<a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#conformance-checker-0"><abbr title="conformance checker">CC</abbr></a>) is a user agent that verifies that a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#widget-resource">widget resource</a> or a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#configuration-document-0">configuration document</a> conforms to this specification.This specification defines the expected behavior of conformance checkers in sections marked as <strong>conformance checker behavior</strong> throughout this document.</p>
<p>This specification asks CCs to <dfn id="inform">inform</dfn> authors of conformance violations, which means they <em class="ct">should</em> display messages to authors in a human readable manner that would assist them in correcting problems. Wording of messages is left to the discretion of implementers.</p>
<p>A widget user agent <em class="ct">may</em> behave as a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#conformance-checker-0">conformance checker</a>.</p>
<h2 id="zip-archive"><span class="secno">5 </span><dfn>Zip Archive</dfn></h2>
<p>The <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#file">file</a>s of a widget are <dfn id="packaged">packaged</dfn> using the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#zip">[ZIP]</a> file format (in other words, Zip is the <dfn id="packaging-format">packaging format</dfn> for widgets).</p>
<p>A <dfn id="file-entry">file entry</dfn> is the amalgamation of data held by a <dfn id="local-file-header">local file header</dfn>, <dfn id="file-data">file data</dfn>, and (optional) <dfn id="data-descriptor">data descriptor</dfn> <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#zip">[ZIP]</a> for each physical file stored in a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#zip-archive">Zip archive</a>.</p>
<p>A <dfn id="potential-zip-archive">potential Zip archive</dfn> is a data object   that has not been verified to be a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#valid-zip-archive">valid Zip archive</a>.</p>
<p>A <dfn id="valid-zip-archive">valid Zip archive</dfn> is a data object that conforms to the production of a   <dfn id="x.zip-file">.Zip file</dfn> as defined by the <cite>Zip File Format Specification</cite> <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#zip">[ZIP]</a>, with the exclusion or support for the features and conditions defined in the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#zip-support">Zip Support</a> section. <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#step-2-verify-the-zip-archive-and-its-file-entries">Step 2</a> of the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#steps-for-processing-a-widget-resource-0">Steps for Processing a Widget Resource</a> describes how widget user agents  verify that a Zip archive conforms to this specification.</p>
<p>The <dfn id="magic-numbers-for-a-zip-archive">magic numbers for a Zip archive</dfn> is the byte sequence: <code>50 4B 03 04</code>.</p>
<p>To conform to this specification, a Zip archive <em class="ct">must</em> contain one or more file entries and <em class="ct">must not</em> be an <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#invalid-widget">invalid widget</a>.</p>
<h3 id="compression-methods"><span class="secno">5.1 </span><dfn>Compression Methods</dfn></h3>
<p>The <dfn id="compression-method">compression method</dfn> is the compression algorithm or storage method used to encode the file data of a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#file-entry">file entry</a>. The compression method that is used to store the file data of a file entry is identified by the numeric value derived from the <dfn id="compression-method-field"><var>compression method field</var></dfn> <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#zip">[ZIP]</a>.</p>
<p>The <dfn id="valid-compression-methods">valid compression methods</dfn>, as indicated by the <var>compression method field,</var> for a file entry are:</p>
<dl>
<dt><code>8</code></dt>
<dd>Data is compressed using <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#deflate">[Deflate]</a>.</dd>
<dt><code>0</code></dt>
<dd>Data is <dfn id="stored">Stored</dfn> (no compression) <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#zip">[ZIP]</a>.</dd>
</dl>
<p><strong>Author requirements</strong>: File data <em class="ct">must</em> be compressed with either <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#deflate">[Deflate]</a> or <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#stored">stored</a> (no compression). Of the valid compression methods, <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#deflate">[Deflate]</a> is the <em class="ct">recommended</em> compression method. Using any other compression methods will result in an <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#invalid-widget">invalid widget</a>.</p>
<h4 id="conformance-checker-behavior" class="no-toc no-num">Conformance checker behavior</h4>
<p>A conformance checker <em class="ct">must</em> check that each <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#file-entry">file entry</a> uses one of the valid compression methods. If a CC encounters a file entry that uses the Stored compression method, then it should <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#inform">inform</a> the author that file entry <em class="ct">should</em> be recompressed with <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#deflate">[Deflate]</a>. If a CC encounters a compression method that is not a valid compression method, it <em class="ct">must</em> <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#inform">inform</a> the author that the resource as an <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#invalid-widget">invalid widget</a>.</p>
<h3 id="version-of-zip-implementation-needed-to-extract-a-file-entry"><span class="secno">5.2 </span>Version of Zip Implementation Needed to Extract a File Entry</h3>
<p>The <dfn id="version-needed-to-extract">version needed to extract</dfn> is the 2-byte sequence in the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#local-file-header"><var>local file header</var></a> of a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#file-entry">file entry</a> that indicates the minimum version supported version of the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#zip">[ZIP]</a> specification needed to extract the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#file-data">file data</a>.</p>
<p>The <dfn id="valid-versions-needed-to-extract">valid versions needed to extract</dfn> values are as follows. Each value is assigned one or more meanings by the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#zip">[Zip]</a> specification:</p>
<dl>
<dt><code>0x100</code> (equivalent to 1.0)</dt>
<dd>Default value specified in Zip.</dd>
<dt><code>0x200</code> (equivalent to 2.0)</dt>
<dd>The file data <em class="ct">may</em> have been compressed using <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#deflate">[Deflate]</a>,</dd>
<dd>or the file data <em class="ct">may</em> be a folder,</dd>
<dd>or the file <em class="ct">may</em> have been encrypted using traditional PKWARE encryption.</dd>
</dl>
<p class="note">Note: If the Zip archive has been encrypted using traditional PKWARE encryption, then it will be treated as an <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#invalid-widget">invalid widget</a>.</p>
<h3 id="zip-relative-paths"><span class="secno">5.3 </span><dfn>Zip Relative Paths</dfn></h3>
<p>For the purpose of this specification, a <dfn id="zip-relative-path">Zip relative path</dfn> is the variable-length string derived from a <dfn id="file-name-field"><var>file name field</var></dfn> of a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#local-file-header"><var>local file header</var></a> of a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#file-entry">file entry</a>.</p>
<p>The <dfn id="valid-encodings">valid encodings</dfn> for a Zip relative path are either <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#cp437">[CP437]</a> or <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#utf-8">[UTF-8]</a>. It is <em class="ct">recommended</em> that the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#file-name-field"><var>file name field</var></a> be encoded using <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#utf-8">[UTF-8]</a>.</p>
<p><strong>Author requirements</strong>: As stated in <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#zip">[Zip]</a>, the appropriate <dfn id="encoding-indicator">encoding indicator</dfn> <em class="ct">must</em> be used, meaning that if the Zip relative path is encoded using <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#utf-8">[UTF-8]</a>, then <var>general purpose bit 11</var> of the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#local-file-header"><var>local file header</var></a> <em class="ct">must</em> be set to <code>1</code>; otherwise, it <em class="ct">must</em> be set to <code>0</code>.</p>
<p class="note">Note: A Zip relative path is said to be <em>relative</em> as it stores the string that represents file and folder names relative to where the Zip archive was created on a file system (e.g. <samp>images/bg.png</samp>), as opposed to storing an absolute path (e.g. <samp>c:imagesbg.png</samp>). The value of a Zip relative path will generally resemble the string value of a name of the file or folder(s) on the device on which the Zip archive was created, but with the exception of the path delimiter being a U+002F SOLIDUS &#8220;/&#8221; character.</p>
<p><strong>Author requirements:</strong> It is <em class="ct">recommended</em> that authors keep their path lengths below 255 bytes. Note that a character can require more than one byte to encode, making the length of the path in characters less than 255.</p>
<p>A <dfn id="valid-zip-relative-path">valid Zip relative path</dfn> is one that case-insensitively matches the production of <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#zip-rel-path"><code>Zip-rel-path</code></a> in the following <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#abnf">[ABNF]</a>. Note that <dfn id="alpha">ALPHA</dfn>, <dfn id="digit">DIGIT</dfn>, and <dfn id="sp">SP</dfn> are defined in <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#abnf">[ABNF]</a> (but essentially represent alphanumerical characters and the U+0020 SPACE character). <dfn id="language-tag"><code>Language-Tag</code></dfn> is defined in <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#bcp47">[BCP47]</a>. In addition, <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#reserved0">reserved characters</a> <em class="ct">must not</em> appear anywhere in the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#file-name"><code>file-name</code></a>.</p>
<pre><code><dfn id="zip-rel-path">Zip-rel-path</dfn>     = [ *localized-folder ] [ *folder-name ] [ file-name ] /
                   [ localized-folder ] [ *folder-name ] / [ folder-name ]
<dfn id="localized-folder">localized-folder</dfn> = "locales" "/" Language-Tag "/"
<dfn id="folder-name">folder-name</dfn>      = file-name "/"<dfn id="file-name">
file-name</dfn>        = 1*254( *base-name [ file-extension ] )
<dfn id="base-name">base-name</dfn>        = allowed-chars
<dfn id="file-extension-0">file-extension</dfn>   = "." 1*allowed-chars
<dfn id="allowed-chars">allowed-chars</dfn>    = cp437-chars / utf8-chars
<dfn id="utf8-chars">utf8-chars</dfn>       = safe-chars / U+0080 and beyond
<dfn id="cp437-chars">cp437-chars</dfn>      = safe-chars / x80-FF
<dfn id="safe-chars">safe-chars</dfn>       = ALPHA / DIGIT / SP / "$" / "%" / "'" / "-" / "_" / "@"
                    / "~" / "!" / "(" / ")" / "^" / "&amp;" / "+"
                    / "," / "." / "=" / "[" / "]" </code></pre>
<p class="note">Note: Authors should be aware that, at the time of writing, there are some interoperability issues with regards to using characters outside the allowed-chars for file or folder names in a Zip archive. If an author chooses to use <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#cp437-chars"><code>cp437-chars</code></a> or the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#utf8-chars"><code>UTF8-chars</code></a>, they should thoroughly test their widgets on various platforms prior to distribution; otherwise it is suggested that authors restrict file and folder names to the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#allowed-chars"><code>allowed-chars</code></a> (characters in the US-ASCII range).</p>
<p>This specification does not put a restriction on the byte length of Zip relative paths, a widget user agent <em class="ct">should</em> be prepared to deal with path lengths longer than 250 bytes.</p>
<h4 id="conformance-checker-behavior-0" class="no-toc no-num">Conformance Checker Behavior</h4>
<p>A CC <em class="ct">must</em> inform the author about any file entry whose <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#file-name-field"><var>file name field</var></a> is not a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#valid-zip-relative-path">valid Zip relative path</a>.</p>
<p>A CC <em class="ct">must</em> inform the author of any Zip relative paths whose length exceed 250 bytes, and <em class="ct">should</em> inform the author of any Zip relative path whose length exceeds 120 bytes.</p>
<p class="note">Note: Having excessively long path names (e.g. over 120 characters) can also result in interoperability issues on some operating systems. Note that a character can require more than one byte to encode, making the length of the path in characters less than 255.</p>
<h3 id="reserved-characters"><span class="secno">5.4 </span>Reserved Characters</h3>
<p>In addition to the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#control-characters">control characters</a>, the following characters are <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#reserved">reserved</a> and <em class="ct">must not</em> appear anywhere in a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#file-name"><code>file-name</code></a>.</p>
<p class="note">Note: These characters are reserved to maintain interoperability across various file systems and with generic <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#uri">[URI]</a>s.</p>
<table border="1" width="100%" summary="characaters not allowed in a zip relative path">
<caption> <dfn id="reserved0">Reserved Characters</dfn> </caption>
<thead>
<tr>
<th>Representative Glyph</th>
<th>Unicode Character</th>
</tr>
</thead>
<tbody>
<tr>
<td>&lt;</td>
<td>U+003C LESS-THAN SIGN</td>
</tr>
<tr>
<td>&gt;</td>
<td>U+003E GREATER-THAN SIGN</td>
</tr>
<tr>
<td>:</td>
<td>U+003A COLON</td>
</tr>
<tr>
<td>&#8220;</td>
<td>U+0022 QUOTATION MARK</td>
</tr>
<tr>
<td>/</td>
<td>U+002F SOLIDUS</td>
</tr>
<tr>
<td></td>
<td>U+005C REVERSE SOLIDUS</td>
</tr>
<tr>
<td>|</td>
<td>U+007C VERTICAL LINE</td>
</tr>
<tr>
<td>?</td>
<td>U+003F QUESTION MARK</td>
</tr>
<tr>
<td>*</td>
<td>U+002A ASTERISK</td>
</tr>
</tbody>
</table>
<p class="note">Note to authors: It is recommended that authors avoid using the following <dfn id="words">words</dfn> as either a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#folder"><code>folder</code></a> or a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#base-name"><code>base-name</code></a> in a Zip relative path as they are reserved by some operating systems (case insensitive): CON, PRN, AUX, NUL, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, LPT9, CLOCKS$. For example, the following names are ok: &#8220;CON-tact.txt&#8221;, &#8220;printer.lpt1&#8243;, &#8220;DCOM1.pdf&#8221;. However, &#8220;com3.txt&#8221; &#8220;Lpt1&#8243;, &#8220;CoM9.gif&#8221; would not be. In addition, authors should avoid using 2 and 3 letters names for folders at the root of a widget resource.</p>
<p class="note">In addition, authors should also avoid having a &#8220;.&#8221; U+002E FULL STOP as the last character of a file or folder name as some operating systems will remove the character when the file is extracted from the Zip archive onto the device. Authors should also avoid having the space character (<a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#sp">SP</a>) at the start or end of a file name. Authors should also take caution when using the &#8220;+&#8221; U+002B PLUS SIGN, as it might cause issues on some operating systems.</p>
<h4 id="conformance-checker-behavior-1" class="no-toc no-num">Conformance Checker Behavior</h4>
<p>A CC <em class="ct">must</em> inform an author of the presence of any of the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#reserved0">reserved characters</a> or <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#control-characters">control characters</a> in a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#file-name"><code>file-name</code></a>.</p>
<p>A CC <em class="ct">should</em> inform an author of the presence of a U+0020 SPACE character at the start or end of a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#file-name"><code>file-name</code></a>.</p>
<p>A CC <em class="ct">should</em> inform an author of the presence of any U+002E FULL STOP at the end of a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#file-name"><code>file-name</code></a>.</p>
<p>A CC <em class="ct">should</em> inform an author of any <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#base-name"><code>base-name</code></a> that case insensitively matches any of the following strings: <code>CON</code>, <code>PRN</code>, <code>AUX</code>, <code>NUL</code>, <code>COM1</code>, <code>COM2</code>, <code>COM3</code>, <code>COM4</code>, <code>COM5</code>, <code>COM6</code>, <code>COM7</code>, <code>COM8</code>, <code>COM9</code>, <code>LPT1</code>, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, LPT9, CLOCKS$.</p>
<p>A CC <em class="ct">may</em> inform an author of the presence of any U+002B PLUS SIGN in a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#file-name"><code>file-name</code></a>.</p>
<h2 id="widget-resources"><span class="secno">6 </span>Widget Resources</h2>
<p>A <dfn id="widget-resource">widget resource</dfn> is a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#valid-zip-archive">valid Zip archive</a> that contains:</p>
<ul>
<li>One or more <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#start-file">start file</a>s, located at the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#root-of-the-widget">root of the widget</a> or in <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#localized-folder-0">localized folder</a>s.</li>
<li>Zero or more <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#configuration-document-0">configuration document</a>s, located at the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#root-of-the-widget">root of the widget</a> or in <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#localized-folder-0">localized folder</a>s.</li>
<li>Zero or more <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-icon-element">icon</a>s, located at the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#root-of-the-widget">root of the widget</a> or in <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#localized-folder-0">localized folder</a>s.</li>
<li>Zero or more <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#thumbnail-0">thumbnail</a>, located either at the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#root-of-the-widget">root of the widget</a> or in <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#localized-folder-0">localized folder</a>s.</li>
<li>Zero or more <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#arbitrary">arbitrary</a> <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#file">file</a>s located either at the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#root-of-the-widget">root of the widget</a> or in <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#arbitrary">arbitrary</a> <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#folder">folder</a>s or in <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#localized-folder-0">localized folder</a>s.</li>
<li>Zero or more <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#digital-signature">digital signature</a>s located at the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#root-of-the-widget">root of the widget</a>.</li>
</ul>
<p class="note">See <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#step-1-acquire-a-potential-zip-archive">step 1</a> - Acquire a Potential Zip Archive for instructions on how to process a widget resource.</p>
<h3 id="invalid-widgets"><span class="secno">6.1 </span>Invalid Widgets</h3>
<p>During the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#steps-for-processing-a-widget-resource-0">steps for processing a widget resource</a>, certain error conditions will result in a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#zip-archive">Zip archive</a> being treated as an invalid widget. An <dfn id="invalid-widget">invalid widget</dfn> is a condition whereby a Zip archive, or a file within the Zip archive, is deemed to be corrupt beyond recovery or non-conforming to this specification.</p>
<p>See the section <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#dealing-with-invalid-widgets">Dealing with Invalid Widgets</a> for instructions on how a widget user agent must treat an invalid widget.</p>
<h3 id="files-and-content-types"><span class="secno">6.2 </span><dfn>Files and Content Types</dfn></h3>
<p>The <dfn id="root-of-the-widget">root of the widget</dfn> is the top-most folder level of the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#zip-archive">Zip archive</a>. The root of the widget contains <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#file">file</a>s and <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#folder">folder</a>s, some of which are <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#reserved">reserved</a> (see <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#reserved-file-names">reserved file names</a>).</p>
<p>A <dfn id="file">file</dfn> is the decompressed representation of a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#file-entry">file entry</a>. Unlike <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#http">[HTTP]</a> resources, files within a Zip archive are not available in multiple representations, nor are they dynamically generated at runtime. Additionally, there is no notion of a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#mime">[MIME]</a> type within Zip (i.e., no <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/infrastructure.html#content-type-0"> Content-Type metadata</a>), so widget user agents <em class="ct">must</em> use <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#file-extension-to-mime-mapping">file extension to MIME mapping</a> followed by <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#content-type-sniffing">content-type sniffing</a> to determine the MIME type of a file.</p>
<p>A <dfn id="folder">folder</dfn> is a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#file-entry">file entry</a> whose <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#file-name-field"><var>file name field</var></a> matches the production of <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#folder-name"><code>folder-name</code></a> in a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#valid-zip-relative-path">valid Zip relative path</a> (the last character of the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#file-name-field"><var>file name field</var></a> <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#zip">[ZIP]</a> is a U+002F SOLIDUS) and whose <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#version-needed-to-extract"><var>version needed to extract</var></a> is <code>0x200</code>. A folder <em class="ct">may</em> logically contain files or other folders.</p>
<p>The <dfn id="base-folder">base folder</dfn> is the folder from which all relative paths are resolved.</p>
<p><dfn id="file-extension-to-mime-mapping">File extension to MIME mapping</dfn> is the process of mapping the file extension of a file to some MIME type.</p>
<p><dfn id="content-type-sniffing">Content-type sniffing</dfn> is the process of determining the MIME type of a file by examining its content. Examination of content involves examining the bytes of a file for well-known patterns of byte sequences (e.g. the byte sequence <code>EF BB BF</code>, which identifies a text file as being encoded in <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#utf-8">[UTF-8]</a>). Some of these patterns have been registered with the <a href="http://www.iana.org/">Internet Assigned Numbers Authority</a> (IANA), as part of a MIME type registration, under the name <dfn id="magic-numbers">magic numbers</dfn>.</p>
<p>A <dfn id="processable-file">processable file</dfn> is a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#file">file</a> that has been verified as residing inside a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#widget-resource">widget resource</a> and that has a MIME type <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#supported">supported</a> by the widget user agent.</p>
<h3 id="reserved-file-and-folder-names"><span class="secno">6.3 </span>Reserved File and Folder Names</h3>
<p>The following table contains a list of <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#base-name"><code>base-name</code></a>s and possible <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#file-extension-0"><code>file-extension</code></a>s that when combined  form <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#file-name"><code>file-name</code></a>s that are <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#reserved">reserved</a> for some purpose by this specification. All reserved <code>file name</code>s <em class="ct">must</em> be treated as <strong><em>case insensitive</em></strong>.</p>
<table border="1">
<caption> <dfn id="reserved-file-names">Reserved file names</dfn> </caption>
<thead>
<tr>
<th>base-name</th>
<th>file-extensions</th>
<th>Reserved for purpose</th>
</tr>
</thead>
<tbody>
<tr>
<td>config</td>
<td>xml</td>
<td><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#configuration-document-0">Configuration Document</a></td>
</tr>
<tr>
<td>signature[<code>0..9</code>]</td>
<td>xml</td>
<td><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#digital-signature">Digital signature</a></td>
</tr>
<tr>
<td>icon</td>
<td>png, gif, ico, svg</td>
<td><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#default-icon">Default icon</a></td>
</tr>
<tr>
<td>thumbnail</td>
<td>png, gif, ico, svg</td>
<td><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#thumbnail-0"> Thumbnail</a></td>
</tr>
</tbody>
</table>
<p>The following table contains a list of <code>folder-names</code> that are <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#reserved">reserved</a> for some purpose by this specification. All reserved file names <em class="ct">must</em> be treated as <strong><em>case insensitive</em></strong>.</p>
<table border="1">
<caption> <dfn id="reserved-folder-names">Reserved folder names</dfn> </caption>
<thead>
<tr>
<th>folder-name</th>
<th>reserved for purpose</th>
</tr>
</thead>
<tbody>
<tr>
<td>locales/</td>
<td>container of localized content</td>
</tr>
</tbody>
</table>
<h3 id="digital-signatures"><span class="secno">6.4 </span>Digital Signatures</h3>
<p>A widget resource contains a <dfn id="digital-signature">digital signature</dfn>, and hence is <dfn id="digitally-signed">digitally signed</dfn>, if it contains one or more <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#file">file</a>s that conform to the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#widgets-digsig">[Widgets-DigSig]</a> specification.</p>
<p>The <dfn id="naming-convention-for-digital-signatures">naming convention for digital signatures</dfn> is a string that case-insensitively matches the production of <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#dig-sig-file-names"><code>dig-sig-file-names</code></a> in the following ABNF:</p>
<pre><code><dfn id="dig-sig-file-names">dig-sig-file-names</dfn> = "signature" *[0..9] ".xml"</code></pre>
<h3 id="content-localization"><span class="secno">6.5 </span><dfn>Content Localization</dfn></h3>
<p>Authors can localize the content of a widget by placing files inside folders that follow the <dfn id="language-tag-0">Language Tag</dfn> conventions set forth in <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#bcp47">[BCP47]</a>; that is, by naming folders using values derived from the <a href="http://www.iana.org/assignments/language-subtag-registry">IANA Language Subtag Registry</a> such as &#8220;en-us&#8221;, &#8220;en-gb&#8221;, and so on, but avoiding subtags marked as deprecated, grandfathered, or redundant. These localized folders are then placed inside the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#container-for-localized-content">container for localized content</a> (which is simply a folder called &#8216;locales/&#8217; that sits at the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#root-of-the-widget">root of the widget</a>).</p>
<p>When an author places localized content in the container for localized content, the widget user agent will   automatically select the appropriate localized version of a widget&#8217;s files based on   locale information derived from the system locale. The <dfn id="system">system     locale</dfn> is the end-user&#8217;s preferred language and regional settings derived from the   operating system or widget user agent (e.g. English, Australia).</p>
<p class="note">Note: See also the <cite><a href="http://www.w3.org/TR/2004/NOTE-ws-i18n-scenarios-20040730/#locale">Web Services   Internationalization Usage Scenarios</a></cite> and the <cite><a href="http://www.unicode.org/reports/tr35/#Locale">Unicode Locale Data Markup Language</a></cite> for an informative discussion on the term locale.</p>
<p>A <dfn id="localized-widget">localized widget</dfn> is a widget resource that has a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#container-for-localized-content">container for localized content</a>, which   contains one or more <span>localized   folders</span>.</p>
<p>The <dfn id="container-for-localized-content"> container for localized content </dfn> is a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#folder">folder</a> at the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#root-of-the-widget">root of the widget</a> whose the first five characters of the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#folder-name"><code>folder-name</code></a> case insensitively match the string &#8216;<code>locales/</code>&#8216;.</p>
<p>A <dfn id="localized-folder-0">localized folder</dfn> is a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#folder">folder</a> whose <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#file-name-field"><var>file name   field</var></a> matches  <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#localized-folder"><code>localized-folder</code></a>. A widget resource <em class="ct">may</em> contain zero or more localized folders. Localized folders <em class="ct">may</em> contain zero or more <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#arbitrary">arbitrary</a> folders and/or files.</p>
<p><strong>Author requirements:</strong> According to <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#bcp47">[BCP47]</a>, one should avoid region, script or other subtags except where they add useful distinguishing information to a localized folder. In addition, one should avoid including empty localized folders in a widget resource (unless there is a good reason to include them) as the a widget user agent will match them when it attempts to <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#determine-the-base-folder-and-widget-locale">determine the <var>base folder</var> and <var>widget locale</var></a>.</p>
<p>A <dfn id="localized-file">localized file</dfn> is any resource that has been placed inside a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#localized-folder-0">localized folder</a>. The contents of the resource <em class="ct">may</em> or <em class="ct">may not</em> be translated, localized, or altered for the given context. A widget resource <em class="ct">may</em> contain zero or more localized files. Any resource, except <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#digital-signature">digital signature</a>s, can be localized.</p>
<p class="note">Note: A widget user agent will treat any localized digital signature as an <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#arbitrary">arbitrary</a> resource.</p>
<p class="example">For example, a localized folder &#8220;/ja&#8221; (Japanese) might contain an HTML document translated into Japanese.</p>
<p><strong>Author requirements:</strong> Localized folders <em class="ct">must</em> be at the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#root-of-the-widget">root of the widget</a> (a localized folder not at the root of the widget will be treated as an <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#arbitrary">arbitrary</a> folder). At runtime, the widget user agent will set the (HTML or XML) base of the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#start-file"><var>start file</var></a> to the localized folder (even if the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#start-file"><var>start file</var></a> does not reside inside the localized folder). Localizing a widget resource is <em class="ct">optional</em> and authors <em class="ct">should</em> provide a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#start-file">start file</a> at the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#root-of-the-widget">root of the widget</a>. Please be aware that if localization fails, and there is no default start file at the root of the widget, then the widget user agent will treat the widget resource as an <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#invalid-widget">invalid widget</a>.</p>
<p class="note">Note: See <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#step-6-determine-the-base-folder-and-widget-locale">Step 6</a> - determine the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#base-folder-0"><var>base folder</var></a> and <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#widget-locale"><var>widget locale</var></a> for the algorithm to process a localized widget.</p>
<h4 id="localized-widget-example" class="no-toc no-num">Localized Widget Example</h4>
<p><em>This section is non-normative.</em></p>
<p>The following is an example of a localized widget with multiple localized icons, start files and configuration documents. Some relevant things to note from the example:</p>
<ul>
<li>The config.xml file at the root configures English (en/, en-gb/) and Korean versions of the widget.</li>
<li>All localized instances rely on the same un-localized script (engine.js)</li>
<li>The Spanish version (es/) has its own custom configuration document and icon.</li>
</ul>
<div class="example">
<div class="code_sniplet" style="border-left: 10px solid #aaaaaa; float: right; width: 50%;">
<p><img src="http://www.w3.org/TR/2008/WD-widgets-20081222/images/text.png" alt="file: " width="16" height="16" />/en-au/cats.html</p>
<pre><code>&lt;!doctype html&gt;
&lt;h1&gt;G'day! LOL Cats!&lt;/h1&gt;
&lt;script src="/scripts/engine.js"&gt;
...</code></pre>
<hr /><img src="http://www.w3.org/TR/2008/WD-widgets-20081222/images/text.png" alt="file: " width="16" height="16" />/es/gatos.html</p>
<pre><code>&lt;!doctype html&gt;
&lt;h1&gt;Gatos Graciosos!&lt;/h1&gt;
&lt;script src="/scripts/engine.js"&gt;
...</code></pre>
</div>
<ul class="dir_listing">
<li class="widget_icon"> <img src="http://www.w3.org/TR/2008/WD-widgets-20081222/images/widget.png" alt="widget file: " width="16" height="16" /> LOLcats.wgt
<ul>
<li class="doc_icon"><img src="http://www.w3.org/TR/2008/WD-widgets-20081222/images/text.png" alt="file: " width="16" height="16" /> cats.html <span class="comment">/*written in Korean*/</span></li>
<li class="config_icon"><img src="http://www.w3.org/TR/2008/WD-widgets-20081222/images/config.png" alt="configuration document: " width="16" height="16" /> config.xml <span class="comment">/*configures English and Korean*/</span></li>
<li class="doc_icon"><img src="http://www.w3.org/TR/2008/WD-widgets-20081222/images/image.png" alt="icon: " width="16" height="16" /> icon.png <span class="comment">/*default icon*/</span></li>
<li class="doc_icon"><img src="http://www.w3.org/TR/2008/WD-widgets-20081222/images/signature.png" alt="Digital Signature: " width="16" height="16" /> signature.xml <span class="comment">/*not localizable*/</span></li>
<li class="folder"> <img src="http://www.w3.org/TR/2008/WD-widgets-20081222/images/folder.png" alt="folder: " width="16" height="16" /> scripts/
<ul>
<li><img src="http://www.w3.org/TR/2008/WD-widgets-20081222/images/script.png" alt="script: " width="16" height="16" /> engine.js <span class="comment">/*used by all HTML files*/</span></li>
</ul>
</li>
<li class="folder"> <img src="http://www.w3.org/TR/2008/WD-widgets-20081222/images/folder.png" alt="folder: " width="16" height="16" /> locales <span class="comment">/*container for localized content*/</span>
<ul>
<li><img src="http://www.w3.org/TR/2008/WD-widgets-20081222/images/folder.png" alt="folder: " width="16" height="16" /> en-gb/
<ul>
<li><img src="http://www.w3.org/TR/2008/WD-widgets-20081222/images/text.png" alt="file: " width="16" height="16" /> cats.html</li>
</ul>
</li>
<li><img src="http://www.w3.org/TR/2008/WD-widgets-20081222/images/folder.png" alt="folder: " width="16" height="16" /> en/
<ul>
<li><img src="http://www.w3.org/TR/2008/WD-widgets-20081222/images/text.png" alt="file: " width="16" height="16" /> cats.html</li>
</ul>
</li>
<li><img src="http://www.w3.org/TR/2008/WD-widgets-20081222/images/folder.png" alt="folder: " width="16" height="16" /> es/
<ul>
<li><img src="http://www.w3.org/TR/2008/WD-widgets-20081222/images/text.png" alt="file: " width="16" height="16" /> gatos.html         <span class="comment">/*Spanish version*/</span></li>
<li><img src="http://www.w3.org/TR/2008/WD-widgets-20081222/images/config.png" alt="configuration document: " width="16" height="16" /> config.xml <span class="comment">/*different author and         license*/</span></li>
<li><img src="http://www.w3.org/TR/2008/WD-widgets-20081222/images/image.png" alt="icon: " width="16" height="16" /> icon.png <span class="comment">/*localized icon*/</span></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<h4 id="conformance-checker-behavior-2" class="no-toc no-num">Conformance Checker Behavior</h4>
<p>A CC <em class="ct">should</em> inform the author if they have used deprecated, grandfathered, or redundant language tags from the <a href="http://www.iana.org/assignments/language-subtag-registry">IANA Language Subtag Registry</a>.</p>
<p>Upon encountering any localized folders named with a region or script subtag, a CC <em class="ct">should</em> inform the author to avoid region or script subtags.</p>
<h3 id="start-file-and-default-start-files"><span class="secno">6.6 </span>Start file and Default Start Files</h3>
<p>The <dfn id="start-file">start file</dfn> of a widget resource is a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#file">file</a> that is used by the widget user agent when the widget is instantiated. When a start file is not explicitly declared via the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-content-element"><code>content</code></a> element or the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-content-element"><code>content</code></a> element&#8217;s <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#src-0"><code>src</code></a> attribute is <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#in-error">in error</a>, the start file will be one of the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#default-start-files">default start files</a>.</p>
<p>A <dfn id="default-start-file">default start file</dfn> is a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#start-file">start file</a> that a widget user agent will attempt to locate when the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#start-file"><var>start file</var></a> of the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#configuration-defaults">configuration defaults</a> is <code>null</code> (i.e., when an author omitted the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-content-element"><code>content</code></a> element in the configuration document or the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-content-element"><code>content</code></a> element is <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#in-error">in error</a>).</p>
<p>The <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#file-name"><code>file-name</code></a> and MIME type of the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#default-start-files">default start files</a> is given by the following table. A widget user agent is only <em class="ct">required</em> to support the <code>text/html</code> MIME type; support of other MIME types is <em class="ct">optional</em>.</p>
<p>A widget user agent will attempt to locate a file entry whose <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#file-name"><code>file-name</code></a> matches one of the default start files based on the order they appear in the table below (from top to bottom). File names must be treated as  <strong><em>case insensitive</em></strong>.</p>
<table border="1">
<caption> <dfn id="default-start-files">Default Start Files</dfn> </caption>
<tbody>
<tr>
<th scope="col">file-name</th>
<th scope="col">MIME type</th>
</tr>
<tr>
<td>index.htm</td>
<td>text/html</td>
</tr>
<tr>
<td>index.html</td>
<td>text/html</td>
</tr>
</tbody>
</table>
<p class="note">See <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#step-9-locate-the-start-file">step 9</a> for instructions for finding a default start file.</p>
<p><strong>Author requirements:</strong> Always include at least one <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#start-file">start file</a> in a widget resource.</p>
<h4 id="conformance-checker-behavior-3" class="no-toc no-num">Conformance checker behavior</h4>
<p>A CC <em class="ct">must</em> check that the widget resource contains at least one start file by:</p>
<ol>
<li>Checking within all configuration documents that the author has used a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#correct">correct</a> content element to point to a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#supported">supported</a> file that exists within the widget package.</li>
<li>Checking for the presence of a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#default-start-file">default start file</a> at the root of the widget and in all localized folders.</li>
</ol>
<p>If the widget does not contain a start file, or the start file is not one that is supported, then the CC <em class="ct">must</em> inform the author.</p>
<h3 id="custom-icons-and-default-icons"><span class="secno">6.7 </span>Custom Icons and Default Icons</h3>
<p>An <dfn id="icon">icon</dfn> is an <em class="ct">optional</em> <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#file">file</a> that is used to represent the widget in various application contexts (e.g. the icon that the user double-clicks to instantiate a widget, or an icon in a dock or task bar or some other visual context). There are two kinds of icons defined by this specification, <em>custom icons</em> and <em>default icons</em>.</p>
<p>An icon <em class="ct">must</em> be located either at the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#root-of-the-widget">root of the widget</a> or in a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#localized-folder-0">localized folder</a>.</p>
<h4 id="custom-icons" class="no-toc no-num">Custom Icons</h4>
<p>A <dfn id="custom-icon">custom icon</dfn> is an <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-icon-element">icon</a> explicitly declared to be used as an icon by an author via an <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-icon-element"><code>icon</code></a> element of the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#configuration-document-0">configuration document</a>. The MIME type of a custom icon is derived by the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#rules-for-identifying-the-mime-type-of-a-file-0">rules for identifying the MIME type of a file</a>.</p>
<h4 id="default-icons" class="no-toc no-num">Default Icons</h4>
<p>A <dfn id="default-icon">default icon</dfn> is an <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-icon-element">icon</a> whose file-name <strong><em>case insensitively</em></strong> matches a file-name given in the first column of the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#default-icons-0">default icons</a> table below and whose MIME type matches the MIME type given in the second column of the table.</p>
<p>A default icon <em class="ct">must</em> be located either at the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#root-of-the-widget">root of the widget</a> or in a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#localized-folder-0">localized folder</a>.</p>
<p>A widget user agent <em class="ct">must</em> search for a default icon&#8217;s <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#file-name"><code>file-name</code></a> based on the order they appear in the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#default-icons-0">default icons</a> table below (from top to bottom).</p>
<p>As indicated by the level of support column in the default icons table below, a widget user agent is <em class="ct">required</em> to support the <code>image/png</code> and <code>image/gif</code> MIME types; support of other MIME types is <em class="ct">optional</em>.</p>
<table border="1">
<caption> <dfn id="default-icons-0">Default Icons</dfn> </caption>
<tbody>
<tr>
<th scope="col">file-name</th>
<th scope="col">MIME type</th>
<th scope="col">Defined by</th>
<th scope="col">Level of Support</th>
</tr>
<tr>
<td>icon.svg</td>
<td>image/svg+xml</td>
<td><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#svgtiny">[SVGTiny]</a></td>
<td><em class="ct">optional</em></td>
</tr>
<tr>
<td>icon.ico</td>
<td>image/vnd.microsoft.icon</td>
<td><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#ico">[ICO]</a></td>
<td><em class="ct">optional</em></td>
</tr>
<tr>
<td>icon.png</td>
<td>image/png</td>
<td><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#png">[PNG]</a></td>
<td><em class="ct">required</em></td>
</tr>
<tr>
<td>icon.gif</td>
<td>image/gif</td>
<td><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#gif89">[GIF89]</a><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#gif87">[GIF87]</a></td>
<td><em class="ct">required</em></td>
</tr>
</tbody>
</table>
<h4 id="conformance-checker-behavior-4" class="no-toc no-num">Conformance checker behavior</h4>
<p>If no <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#default-icon">default icon</a> has been included, and the CC determines that no <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#custom-icon">custom icon</a>s have been declared in the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#configuration-document-0">configuration document</a>, a CC <em class="ct">should</em> inform the author that it is desirable, but optional, to include a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#default-icon">default icon</a>.</p>
<p>If a CC encounters an icon in a format either than <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#png">[PNG]</a> or <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#gif89">[GIF89]</a> or <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#gif87">[GIF87]</a>, then the CC should inform the author that these formats might not be <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#supported">supported</a> on all widget user agents.</p>
<h3 id="thumbnail"><span class="secno">6.8 </span>Thumbnail</h3>
<p>A <dfn id="thumbnail-0">thumbnail</dfn> is an <em class="ct">optional</em> <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#file">file</a> inside the widget resource that graphically represents the widget in a running state. The thumbnail <em class="ct">must</em> be located either at the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#root-of-the-widget">root of the widget</a> or in a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#localized-folder-0">localized folder</a>.</p>
<p>To be treated as a thumbnail by the widget user agent, the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#file-name"><code>file-name</code></a> of a file entry <em class="ct">must</em> <strong><em>case insensitively</em></strong> match one of the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#file-name"><code>file-name</code></a> values given in the first column of the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#default-thumbnails">default thumbnails</a> table below. In addition, the MIME type <em class="ct">must</em> match the MIME type given in the second column of the default thumbnails table below. A widget user agent will search for a thumbnail&#8217;s filename based on the order they appear in the table below (from top to bottom).</p>
<table border="1">
<caption> <dfn id="default-thumbnails">Default Thumbnails</dfn> </caption>
<tbody>
<tr>
<th scope="col">file-name</th>
<th scope="col">MIME type</th>
</tr>
<tr>
<td>thumbnail.png</td>
<td>image/png</td>
</tr>
<tr>
<td>thumbnail.gif</td>
<td>image/gif</td>
</tr>
<tr>
<td>thumbnail.jpg</td>
<td>image/jpg</td>
</tr>
</tbody>
</table>
<p><strong>Author requirement:</strong> it is <em class="ct">recommended</em> that authors use a screenshot of their widget in its running state as the thumbnail.</p>
<h4 id="conformance-checker-behavior-5" class="no-toc no-num">Conformance checker behavior</h4>
<p>If a CC determines that the widget resource does not contain a <em class="ct">thumbnail</em>, it <em class="ct">may</em> inform the author that the inclusion of a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#thumbnail-0">thumbnail</a> is desirable but, nonetheless, <em class="ct">optional</em>.</p>
<h3 id="mime-type"><span class="secno">6.9 </span>MIME Type</h3>
<p>The <dfn id="widget-mime-type">widget MIME Type</dfn> is <code>application/widget</code> <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#mime">[MIME]</a>.</p>
<p><strong>Author requirement</strong>: Over the wire (e.g. over HTTP), a widget resource <em class="ct">must</em> be labeled with an <code>application/widget</code> MIME type. Failure to correctly label a widget resource will likely result in it being treated as an invalid widget.</p>
<p class="note">Note: Widget user agents can support other legacy/proprietary widget types, but they must remain conforming to this specification when dealing with widget resources.</p>
<p class="issue"><strong>Note:</strong> The <code>application/widget</code> MIME type has not yet been registered with <a href="http://www.iana.org/">IANA</a>. This will happen when the specification reaches Candidate Recommendation status.</p>
<h3 id="file-extension"><span class="secno">6.10 </span>File Extension</h3>
<p>A <dfn id="widget-file-extension">widget file extension</dfn> is the string <code>.wgt</code> in any case form (e.g. <code>my.wgt</code>, <code>my.WGt</code>, <code>my.WgT</code>, etc. are all valid).</p>
<p>The file extension <code>.wgt</code> is <em class="ct">required</em> for widget resources on systems where it&#8217;s customary for file names to include an extension that symbolizes the MIME type.</p>
<p><strong>Author requirement:</strong> As long as the widget resource is appropriately labeled as a <code>application/widget</code> when the widget resource is served over HTTP, the widget file extension is <em class="ct">not required</em>.</p>
<h2 id="configuration-document"><span class="secno">7 </span>Configuration Document</h2>
<p>A <dfn id="configuration-document-0">configuration document</dfn> is an <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#xml">[XML]</a> document that has a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-widget-element"><code>widget</code></a> element at its root that is in the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#widget-namespace">widget namespace</a>.</p>
<p>A <dfn id="valid-configuration-document-file-name">valid configuration document file name</dfn> is <code>config.xml</code>, in any case form. Within a widget resource, a configuration document <em class="ct">must</em> have a valid configuration document file name.</p>
<p>Configuration documents can exist either at the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#root-of-the-widget">root of the widget</a> or in a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#localized-folder-0">localized folder</a>.</p>
<p class="note">Note: Any configuration document not at the root of the widget or not in a localized folder will be treated by the widget user agent as an <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#arbitrary">arbitrary</a> resource.</p>
<p><strong>Author requirement:</strong> Authors <em class="ct">should</em> only place configuration documents in localized folders if the content of the configuration document has been localized. It is <em class="ct">recommended</em> that authors always include a configuration document at the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#root-of-the-widget">root of the widget</a> and, for constancy, that the <code>config.xml</code> filename be in lowercase form.</p>
<div class="example">
<p>The following is an example of a <code>config.xml</code> document:</p>
<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;widget xmlns="http://www.w3.org/ns/widgets"
        identifier="http://datadriven.com.au/exampleWidget"
        version="2.0 Beta"
        height="200"
        width="200"&gt;
  &lt;name&gt;The example widget!&lt;/name&gt;
  &lt;update href="http://www.bla.com/update.php"/&gt;

  &lt;description&gt;
    A sample widget to demonstrate some of the possibilities.
  &lt;/description&gt;
  &lt;author href="http://foo-bar.example.org/"
    email="foo-bar@example.org"&gt;Foo Bar Corp&lt;/author&gt;
  &lt;icon src="icons/example.png"/&gt;
  &lt;icon src="icons/boo.png"/&gt;
  &lt;content src="index.html"/&gt;
  &lt;access network="true"/&gt;
  &lt;license&gt;
Example license (based on MIT License)
Copyright (c) 2008 The Foo Bar Corp.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
INSULT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  &lt;/license&gt;
&lt;/widget&gt;</code></pre>
</div>
<p class="note">Note: Implementers are encouraged to expose relevant information provided by the configuration document to the user. Having &#8220;visual metadata&#8221; encourages authors to make full use of the configuration document format.</p>
<p class="note">See &#8220;<a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#step-7-locate-the-configuration-document">Step 7</a> for instructions on how to process a configuration document.</p>
<h3 id="namespace"><span class="secno">7.1 </span>Namespace</h3>
<p>The <dfn id="widget-namespace">widget namespace</dfn> is <code>http://www.w3.org/ns/widgets</code> <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#xmlns">[XMLNS]</a>.</p>
<p><strong>Authoring requirements:</strong> Authors <em class="ct">must</em> assign the widget namespace to the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-widget-element"><code>widget</code></a> element. Authors should be aware that, if the namespace is missing then Zip archive will be treated as an <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#invalid-widget">invalid widget</a>.</p>
<h3 id="proprietary-extensions"><span class="secno">7.2 </span>Proprietary Extensions</h3>
<p>Vendors wishing to extend the configuration document format with their own <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#xml">[XML]</a> elements and attributes (or those defined in other specifications) <em class="ct">may</em> do so by using a separate namespace <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#xmlns">[XMLNS]</a>. This specification does not define a model for processing XML elements outside the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#widget-namespace">widget namespace</a>. For the sake of interoperability, extensions to the configuration document are <em class="ct">not recommended</em>.</p>
<div class="example">
<p>Example of extending the configuration document format:</p>
<pre><code>&lt;widget xmlns="http://www.w3.org/ns/widgets"
   <strong>xmlns:ex="http://widgextension.org/"</strong>&gt;
       &lt;icon src="idle.png" <strong> ex:role="inactive"/&gt;
       </strong>&lt;icon src="big.png" <strong>ex:role="big"</strong>/&gt;
       <strong>&lt;ex:datasource&gt;{a:"b",c:"d"}&lt;/ex:datasource&gt;</strong>
       &lt;content src="widget.html"/&gt;
&lt;/widget&gt;</code></pre>
</div>
<h3 id="attribute-types"><span class="secno">7.3 </span>Attribute Types</h3>
<p>This section defines the different <dfn id="attribute-types-0">attribute types</dfn> used in the configuration document and what constitutes valid values for those attribute types. Some general rules for how attributes are to be processed by widget user agents and conformance checkers are also given in this section.</p>
<dl>
<dt>Version attribute</dt>
<dd> An attribute defined as containing a valid version-tag. A <dfn id="valid-version-tag">valid version-tag</dfn> is a string that matches the production for <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#valid-version-tag-0"><code>valid-version-tag</code></a> in the following <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#abnf">[ABNF]</a>:</p>
<pre><code><dfn id="valid-version-tag-0">valid-version-tag</dfn>  = version-identifier  *[ "." version-identifier ]
<dfn id="version-identifier">version-identifier</dfn> = ALPHA / DIGIT / SP / "$" / "%" / "'" / "-" / "_"
                    / "~" / "!" / "(" / ")" / "^" / "&amp;" / "+" / "@"
                    / "," / "=" / "[" / "]" / "/" / "" / "*" / "?"
                    / "|"/ ":"</code></pre>
</dd>
<dd><strong>Author Requirements:</strong> it is <em class="ct">recommended</em> that authors create version strings that conform to the following <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#abnf">[ABNF]</a>:</p>
</dd>
<dd>
<pre><code>
rec-version-tag = 1*2DIGIT ["."  1*2DIGIT [ "." 1*2DIGIT] [ ALPHA / SP / DIGIT]]</code></pre>
</dd>
<dd>
<dl class="example">
<dt>Example valid version tags:</dt>
<dd><code>Version 1.0 Beta</code>, <code>1.0 RC1</code>, <code>1.0-Build/1580</code>, <code>Joey the dog [5.1.2100]</code>.</dd>
<dt>Example of recommended version tags:</dt>
<dd><code>1.0</code>, <code>1.10.1beta1</code>, <code>1.02.12rc1</code>.</dd>
</dl>
<p class="note">Note: For the purpose of this specification, version tags have no significant semantics; they are just treated as arbitrary strings (e.g. &#8216;1.0&#8242; is not greater than &#8216;2.0&#8242;, but is simply different). This may change in future versions of this specification.</p>
</dd>
<dt>Numeric attribute</dt>
<dd>An attribute defined as containing a valid non-negative integer. A <dfn id="valid-non-negative-integer">valid non-negative integer</dfn> is a string that consists of one of more characters in the range U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9). For example, the characters &#8220;2&#8243;, &#8220;323&#8243;, &#8220;23214&#8243;, and so on.</p>
</dd>
<dt><dfn id="keyword-attribute">Keyword attribute</dfn></dt>
<dd>An attribute defined as requiring a certain string value (e.g. <code>apple</code> or <code>orange</code>). The values <em class="ct">must</em> be specified exactly, in the case given in this specification, and with no leading or trailing <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#space-characters">space characters</a>. Implementations <em class="ct">must</em> only perform literal comparisons, and <em class="ct">must</em> not use <strong><em>case insensitive</em></strong> comparisons nor trim attribute values before comparison.</p>
</dd>
<dt><dfn id="boolean-attribute">Boolean attribute</dfn></dt>
<dd>A keyword attribute that can only be used with a valid boolean value: a <dfn id="valid-boolean-value">valid boolean value</dfn> is a string that <em><strong>case insensitively</strong></em> matches <code>true</code> or <code>false</code>. The default behavior, which is used when the attribute is omitted or has a value other than the two allowed values, is <code>false</code>. How a widget user agent is supposed to interpret a boolean attribute is described when the term is used.</p>
</dd>
<dt><dfn id="mime-type-attribute">MIME type attribute</dfn></dt>
<dd>An attribute defined as containing a valid MIME type. A <dfn id="valid-mime-type">valid MIME type</dfn> is one that matches the production for <code>valid-MIME-type</code> in the following <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#abnf">[ABNF]</a>:</p>
<pre><code>valid-MIME-type = type "/" subtype *(";" parameter)</code></pre>
<p>The <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#type-0"><code>type</code></a> , <code>subtype</code>, and <code>parameter</code> tokens are defined in <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#rfc2045">[RFC2045]</a>.</p>
</dd>
<dt><dfn id="uri-attribute">URI attribute</dfn></dt>
<dd>An attribute defined as containing a valid URI. A <dfn id="valid-uri">valid URI</dfn> is one that matches the URI token of <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#uri">[URI]</a> or the IRI token of <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#rfc3987">[RFC3987]</a>.</p>
</dd>
<dt><dfn id="path-attribute">Path attribute</dfn></dt>
<dd>An attribute defined as containing a valid path. A <dfn id="valid-path">valid path</dfn> is one that matches the <code>path</code> token of <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#uri">[URI]</a>. A path can be either <dfn id="absolute">absolute</dfn>, meaning that it is already resolved to the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#root-of-the-widget">root of the widget</a> (e.g. &#8220;/images/bg.png&#8221;) or <dfn id="relative">relative</dfn>, meaning that it is resolved relative  to some <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#folder">folder</a> in the widget resource.</p>
</dd>
<dt><dfn id="window-mode-attribute">Window mode attribute</dfn></dt>
<dd><strong class="redNote">This feature is at risk!</strong> A <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#keyword-attribute">keyword attribute</a> whose value is one of the following <dfn id="valid-window-mode">valid window mode</dfn>s:<code> application</code>, <code>floating</code>, <code> fullscreen</code>, <code>docked</code>.</p>
</dd>
<dt><dfn id="xml:lang"><code>xml:lang</code></dfn> attribute</dt>
<dd>A <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#keyword-attribute">keyword attribute</a> defined as containing a <dfn id="basic-language-range">basic language range</dfn>, defined in <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#bcp47">[BCP47]</a>, from the <a href="http://www.iana.org/assignments/language-subtag-registry">IANA Language Subtag Registry</a>.The <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#xml">[XML]</a> specification defines the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#xml:lang"><code>xml:lang</code></a> attribute and its influence on child elements that are XML text content. Widget user agents are <em class="ct">not required</em> to validate language ranges against the <a href="http://www.iana.org/assignments/language-subtag-registry">IANA Language Subtag Registry</a>.</p>
</dd>
<dd><strong>Author requirements:</strong> Authors <em class="ct">should</em> avoid subtags from the <a href="http://www.iana.org/assignments/language-subtag-registry">IANA Language Subtag Registry</a> marked as deprecated, grandfathered, or redundant.</p>
</dd>
<dt><code>its:dir</code> attribute</dt>
<dd>A <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#keyword-attribute">keyword attribute</a> defined as containing a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#valid-its:dir-value">valid <code>its:dir</code> value</a> (i.e.,  <code>ltr</code>, or <code>rtl</code>, or  <code>lro</code>, or <code>rlo</code>). To use the <code>its:dir</code> attribute, the <code>its</code> namespace (see <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#its">[ITS]</a>) <em class="ct">must</em> be declared on the element where it is used or somewhere in the element&#8217;s ancestor chain.</p>
</dd>
</dl>
<h3 id="the-widget-element"><span class="secno">7.4 </span>The <dfn><code>widget</code></dfn> Element</h3>
<p>The <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-widget-element"><code>widget</code></a> serves as a container for the other elements; as such, it <em class="ct">must</em> be used.</p>
<dl>
<dt>Context in which this element <em class="ct">must</em> be used:</dt>
<dd>This is the  root element of a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#configuration-document-0">configuration document</a>.</dd>
<dt>Expected children (in any order):</dt>
<dd><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#name"><code>name</code></a>: zero or one.</dd>
<dd><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-description-element"><code>description</code></a>: zero or one.</dd>
<dd><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-icon-element"><code>icon</code></a>: zero or more.</dd>
<dd><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-access-element"><code>access</code></a>: zero or one.</dd>
<dd><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-author-element"><code>author</code></a>: zero or one.</dd>
<dd><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-license-element"><code>license</code></a>: zero or one.</dd>
<dd><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-content-element"><code>content</code></a>: zero or one.</dd>
<dd><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-update-element"><code>update</code></a>: zero or one.</dd>
<dd><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#feature"><code>feature</code></a>: zero or more.</dd>
</dl>
<h4 id="attributes" class="no-toc no-num">Attributes</h4>
<dl>
<dt><code><dfn id="id">id</dfn></code> <!-- know also as mike's-greasy-dogtag-bang-baby-id --> </dt>
<dd>Optional. A <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#valid-uri">valid URI</a> that denotes a  identifier for the widget.</dd>
<dt><code><dfn id="version">version</dfn></code></dt>
<dd>Optional. A <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#valid-version-tag">valid version-tag</a> that specifies the version of the widget.</dd>
<dt><code><dfn id="height">height</dfn></code></dt>
<dd>Optional. A <a title="valid non-negative integer" href="http://www.w3.org/TR/2008/WD-widgets-20081222/#valid-non-negative-integer">valid non-negative integer</a> greater than <code>0</code> that controls the initial height dimensions of the instantiated widget in <a href="http://www.w3.org/TR/CSS21/syndata.html#length-units">CSS pixels</a> <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#css21">[CSS21]</a>. When the value is missing, the widget user agent will assume the value <code>300</code>.</dd>
<dt><code><dfn id="width">width</dfn></code></dt>
<dd>Optional. A <a title="valid non-negative integer" href="http://www.w3.org/TR/2008/WD-widgets-20081222/#valid-non-negative-integer">valid non-negative integer</a> greater than <code>0</code> that controls the initial width dimensions of the instantiated widget in <a href="http://www.w3.org/TR/CSS21/syndata.html#length-units">CSS pixels</a> <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#css21">[CSS21]</a>. When the value is missing, the widget user agent will assume the value <code>150</code>.</dd>
<p><!--dt><code><dfn>platform</dfn></code></dt>
<dd>Optional. A value that specifies the minimum platform capabilities that are required by the widget to be able to run on a widget user agent. The value <code>1.0</code> implies the capabilities that are specified by the <span>Widgets 1.0 family of specifications</span>. When the value is missing, a widget user agent will assume the value <code>1.0</code>.</dd -->
<dt><code><dfn id="mode">mode</dfn></code></dt>
<dd><strong class="redNote">This feature is at risk!</strong> Optional. A <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#valid-window-mode">valid window mode</a>. When the value is missing, the widget user agent will assume the value <code>default</code>.</dd>
<dt><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#xml:lang"><code>xml:lang</code></a></dt>
<dd>Optional. A <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#basic-language-range">basic language range</a>.</dd>
</dl>
<p class="note">Note: The <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#width-0"><code>width</code></a> and <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#height-0"><code>height</code></a> attributes are only relevant to widgets with a visual output.</p>
<h4 id="usage-example" class="no-toc no-num">Usage Example</h4>
<p><em>This section is non-normative.</em></p>
<p>The following example shows how the widget element can be used. It also demonstrates the use of the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#xml:lang"><code>xml:lang</code></a> attribute.</p>
<div class="example">
<pre><code>&lt;widget xmlns="http://www.w3.org/ns/widgets"
        id="http://datadriven.com.au/exampleWidget"
        version="2.0 Beta"
        height="200"
        width="200"
        xml:lang="pt"&gt;
  &lt;description&gt;este é um exemplo das possibilidades!&lt;/description&gt;
&lt;/widget&gt;</code></pre>
</div>
<h3 id="the-name-element"><span class="secno">7.5 </span>The <dfn><code>name</code></dfn> Element</h3>
<p>The <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#name"><code>name</code></a> element represents a human-readable name for a widget resource that can be used, for example, in an application menu or in other contexts.</p>
<p><!-- metadata element --></p>
<dl>
<dt>Context in which this element <em class="ct">may</em> be used:</dt>
<dd>In a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-widget-element"><code>widget</code></a> element.</dd>
<dt>Content model:</dt>
<dd>Any.</dd>
<dt>Occurrences:</dt>
<dd>Zero or one.</dd>
</dl>
<h4 id="attributes-0" class="no-toc no-num">Attributes</h4>
<dl>
<dt><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#xml:lang"><code>xml:lang</code></a></dt>
<dd>Optional. A <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#basic-language-range">basic language range</a>.</dd>
<dt><code>its:dir</code></dt>
<dd>Optional. A <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#valid-its:dir-value">valid <code>its:dir</code> value</a>.</dd>
</dl>
<h4 id="usage-example-0" class="no-toc no-num">Usage Example</h4>
<p><em>This section is non-normative.</em></p>
<p>The following example shows the usage of the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#name"><code>name</code></a> element.</p>
<div class="example">
<pre><code>&lt;widgets xmlns="http://www.w3.org/ns/widgets"&gt;
   &lt;name xml:lang="pt"&gt;Boletim Metereológico&lt;/name&gt;
&lt;/widget&gt;</code></pre>
</div>
<h3 id="the-description-element"><span class="secno">7.6 </span>The <dfn><code>description</code></dfn> Element</h3>
<p>The <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-description-element"><code>description</code></a> element represents a human-readable description of the widget.</p>
<p><!-- metadata element --></p>
<dl>
<dt>Context in which this element <em class="ct">may</em> be used:</dt>
<dd>In a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-widget-element"><code>widget</code></a> element.</dd>
<dt>Content model:</dt>
<dd>Any.</dd>
<dt>Occurrences:</dt>
<dd>Zero or one.</dd>
<dt><!-- XXX Define "description for the widget" using the definition of textContent. That definition should be used inline as it doesn't make much sense to reference the DOM specification just for that. --></dt>
</dl>
<h4 id="attributes-1" class="no-toc no-num">Attributes</h4>
<dl>
<dt><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#xml:lang"><code>xml:lang</code></a></dt>
<dd>Optional. A <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#basic-language-range">basic language range</a>.</dd>
<dt><code>its:dir</code></dt>
<dd>Optional. A <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#valid-its:dir-value">valid <code>its:dir</code> value</a>.</dd>
</dl>
<h4 id="usage-example-1" class="no-toc no-num">Usage Example</h4>
<p><em>This section is non-normative.</em></p>
<p>An example usage of the description element.</p>
<div class="example">
<pre><code>&lt;widgets xmlns="http://www.w3.org/ns/widgets"&gt;
  &lt;name&gt;Tornado Chaser&lt;/name&gt;
  &lt;description&gt;
Combining the latest weather info with your GPS position,
this widget alerts you of any significant storm activity in your
area. When a big one hits, the widget plots the best route on a map based
on the storm's trajectory so you can chase it! With support for
built-in cameras, you can quickly upload all the meteorological action to
your blog or to the insane storm chaser web site! Awesome!
  &lt;/description&gt;
&lt;/widget&gt;</code></pre>
</div>
<h3 id="the-author-element"><span class="secno">7.7 </span>The <dfn><code>author</code></dfn> Element</h3>
<p>An <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-author-element"><code>author</code></a> element represents people or an organization attributed with the  creation of the widget.</p>
<p><!-- metadata element --></p>
<dl>
<dt>Context in which this element <em class="ct">may</em> be used:</dt>
<dd>In the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-widget-element"><code>widget</code></a> element.</dd>
<dt>Content model:</dt>
<dd>Any.</dd>
<dt>Occurrences:</dt>
<dd>Zero or one.</dd>
</dl>
<h4 id="attributes-2" class="no-toc no-num">Attributes</h4>
<dl>
<dt><code><dfn id="href">href</dfn></code></dt>
<dd>Optional. A <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#uri-attribute">URI attribute</a> that represents a link that is associated with the author (e.g. the homepage of the author).</dd>
<dt><code><dfn id="email">email</dfn></code></dt>
<dd>Optional. A string that represents an email address associated with the author.</dd>
<dt><!-- We expect this to be mostly useful for other authors inspecting the                   widget. --></dt>
<dt><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#xml:lang"><code>xml:lang</code></a></dt>
<dd>Optional. A <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#basic-language-range">basic language range</a>.</dd>
<dt><code>its:dir</code></dt>
<dd>Optional. A <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#valid-its:dir-value">valid <code>its:dir</code> value</a>.</dd>
</dl>
<h4 id="usage-example-2" class="no-toc no-num">Usage Example</h4>
<p><em>This section is non-normative.</em></p>
<p>The following example shows the expected usage of the author element.</p>
<div class="example">
<pre><code>&lt;widgets xmlns="http://www.w3.org/ns/widgets"&gt;
        &lt;name&gt;Cup-a-Joe's Cafe Finder Widget&lt;/name&gt;
        &lt;author href  = "http://cup-a-joes-website-visit-us.com"
                email = "joe@cup-a-joes-website-visit-us.com"&gt;
          Joey and Princesa Bacalhau
        &lt;/author&gt;
&lt;/widget&gt;</code></pre>
</div>
<h3 id="the-license-element"><span class="secno">7.8 </span>The <dfn><code>license</code></dfn> Element</h3>
<p>The <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-license-element"><code>license</code></a> element represents an end-user license agreement or a copyright statement for the widget.</p>
<dl>
<dt>Context in which this element <em class="ct">may</em> be used:</dt>
<dd>In the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-widget-element"><code>widget</code></a> element.</dd>
<dt>Content model:</dt>
<dd>Any.</dd>
<dt>Occurrences:</dt>
<dd>Zero or one.</dd>
</dl>
<h4 id="attributes-3" class="no-toc no-num">Attributes</h4>
<dl>
<dt><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#href-0"><code>href</code></a></dt>
<dd>Optional. A <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#valid-uri">valid URI</a> that points to a representation of a software and/or content license. When the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#href-0"><code>href</code></a> attribute is present, the widget user agent <em class="ct">should</em> allow users the ability to view or otherwise access the referenced license.</dd>
<dt><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#xml:lang"><code>xml:lang</code></a></dt>
<dd>Optional. A <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#basic-language-range">basic language range</a>.</dd>
<dt><code>its:dir</code></dt>
<dd>Optional. A <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#valid-its:dir-value">valid <code>its:dir</code> value</a>.</dd>
</dl>
<h4 id="usage-example-3" class="no-toc no-num">Usage Example</h4>
<p><em>This section is non-normative.</em></p>
<p>This example shows the expected usage of the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-license-element"><code>license</code></a> element&#8217;s <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#href-0"><code>href</code></a> attribute.</p>
<div class="example">
<pre><code>&lt;widgets xmlns="http://www.w3.org/ns/widgets"&gt;
  &lt;license href="http://creativecommons.org/licenses/by/3.0/"&gt;
        Creative Commons Attribution License
  &lt;/license&gt;
&lt;/widget&gt;</code></pre>
</div>
<p>This example shows the  expected usage of the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-license-element"><code>license</code></a> element when the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#href-0"><code>href</code></a> attribute is omitted.</p>
<div class="example">
<pre><code>&lt;widgets xmlns="http://www.w3.org/ns/widgets"&gt;
  &lt;license&gt;
  Copyright (c) 2008 The Foo-Bar Corporation
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  USE OR OTHER DEALINGS IN THE SOFTWARE.
   &lt;/license&gt;
&lt;/widget&gt;</code></pre>
</div>
<h3 id="the-icon-element"><span class="secno">7.9 </span>The <dfn><code>icon</code></dfn> Element</h3>
<p>The <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-icon-element"><code>icon</code></a> element represents a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#custom-icon">custom icon</a> for the widget. A widget user agent <em class="ct">should</em> expose a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#custom-icon">custom icon</a> in a way that it is visible to the end user.</p>
<p><!-- metadata element --></p>
<dl>
<dt>Context in which this element <em class="ct">may</em> be used:</dt>
<dd>In the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-widget-element"><code>widget</code></a> element.</dd>
<dt>Content model:</dt>
<dd>Empty.</dd>
<dt>Occurrences:</dt>
<dd>Zero or more.</dd>
</dl>
<h4 id="attributes-4" class="no-toc no-num">Attributes</h4>
<dl>
<dt><code title="attr-icon-src"><dfn id="src">src</dfn></code></dt>
<dd>Required. A <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#valid-path">valid path</a> that points to an image file inside the widget resource.</dd>
<dt><code><dfn id="width-0">width</dfn></code></dt>
<dd>Optional. A <a title="valid non-negative integer" href="http://www.w3.org/TR/2008/WD-widgets-20081222/#valid-non-negative-integer">valid non-negative integer</a> greater than <code>0</code> that represents the width of the icon in <a href="http://www.w3.org/TR/CSS21/syndata.html#length-units">CSS pixels</a> <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#css21">[CSS21]</a>. This attribute is only applicable to graphic formats that have no intrinsic width or height (e.g., SVG). If the file pointed to by the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#src-0"><code>src</code></a> is a supported raster graphic, this value <em class="ct">may</em> be <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#ignored">ignored</a> by the widget user agent. If the file pointed to by the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#src-0"><code>src</code></a> is a vector graphic format, then this value will be used. </dd>
<dt><code><dfn id="height-0">height</dfn></code></dt>
<dd>Optional. A <a title="valid non-negative integer" href="http://www.w3.org/TR/2008/WD-widgets-20081222/#valid-non-negative-integer">valid non-negative integer</a> greater than <code>0</code> that represents the height of the icon in <a href="http://www.w3.org/TR/CSS21/syndata.html#length-units">CSS pixels</a> <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#css21">[CSS21]</a>.This attribute is only applicable to graphic formats that have no intrinsic width or height (e.g., SVG). If the file pointed to by the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#src-0"><code>src</code></a> is a supported raster graphic, this value <em class="ct">may</em> be <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#ignored">ignored</a> by the widget user agent. If the file pointed to by the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#src-0"><code>src</code></a> is a vector graphic format, then this value will be used. </dd>
</dl>
<p><strong>Author requirement:</strong> Authors <em class="ct">should not</em> use the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#width-0"><code>width</code></a> and <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#height-0"><code>height</code></a> attributes for raster graphic formats (as the values will be <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#ignored">ignored</a>).</p>
<h4 id="usage-example-4" class="no-toc no-num">Usage Example</h4>
<p><em>This section is non-normative.</em></p>
<p>This example shows the expected usage of the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-icon-element"><code>icon</code></a> element. The example declares three icon elements, two of which are raster and one of which is an <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#svgtiny">[SVGTiny]</a> file. The raster graphics would be used for display contexts smaller than 256&#215;256 pixels. Tree order of the elements is irrelevant.</p>
<div class="example">
<pre><code>&lt;widgets xmlns="http://www.w3.org/ns/widgets"&gt;
  &lt;icon src="icons/medium.png"/&gt;
  &lt;icon src="icons/big.svg" width="256" height="256"/&gt;
  &lt;icon src="icons/tiny.png"/&gt;
&lt;/widget&gt;</code></pre>
</div>
<h3 id="the-access-element"><span class="secno">7.10 </span>The <dfn><code>access</code></dfn> Element</h3>
<p>The <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-access-element"><code>access</code></a> element indicates, through its attributes, what kind of security permissions are afforded to the widget by the widget user agent.  <!-- processing element --> When the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-access-element"><code>access</code></a> element is absent, a widget user agent <em class="ct">must</em> deny access to networked resources and to plugins.</p>
<dl>
<dt>Context in which this element <em class="ct">may</em> be used:</dt>
<dd>In the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-widget-element"><code>widget</code></a> element.</dd>
<dt>Content model:</dt>
<dd>Empty.</dd>
<dt>Occurrences:</dt>
<dd>Zero or one.</dd>
<dt>Expected children:</dt>
<dd>none.</dd>
</dl>
<h4 id="attributes-5" class="no-toc no-num">Attributes</h4>
<dl>
<dt><dfn id="network"><code>network</code></dfn></dt>
<dd>Optional. A <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#boolean-attribute">boolean attribute</a> that indicates that the widget might need to access network resources as specified in <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#widgets-security">[Widgets-Security]</a>. </dd>
<dt><dfn id="plugins"><code>plugins</code></dfn></dt>
<dd>Optional. A <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#boolean-attribute">boolean attribute</a> that indicates that the widget might need browser plugins (such as Flash or Java) to function. <dfn id="plugin">Plugin</dfn> means a runtime component that is not bound to the security model of a widget user agent. In other words, a plugin operates under its own security model and policies (e.g., Flash and Java applets).</dd>
</dl>
<p class="note">Note: Widget user agents are not required to support, or otherwise implement, proprietary plugins.</p>
<p><strong>Conformance checkers requirements:</strong> If the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-access-element"><code>access</code></a> element is used, at least one of its attributes <em class="ct">must</em> be used.</p>
<h4 id="usage-example-5" class="no-toc no-num">Usage example</h4>
<p><em>This section is non-normative.</em></p>
<p>This example shows the expected usage of the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-access-element"><code>access</code></a> element. Assume the <code>flash_version.html</code> file combines Adobe Flash and HTML content.</p>
<div class="example">
<pre><code>&lt;widget
  xmlns ="http://www.w3.org/ns/widgets"
  width ="400"
  height="500"&gt;
  &lt;name&gt;Flight Tracker&lt;/name&gt;
  &lt;access network="true" plugins="true"/&gt;
  &lt;content src="flash_version.html"/&gt;
&lt;/widget&gt;</code></pre>
</div>
<h3 id="the-content-element"><span class="secno">7.11 </span>The <dfn><code>content</code></dfn> Element</h3>
<p>The <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-content-element"><code>content</code></a> element is used by an author to declare which <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#start-file">start file</a> the widget user agent will use when it instantiates the widget.</p>
<dl>
<dt>Context in which this element <em class="ct">may</em> be used:</dt>
<dd>In the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-widget-element"><code>widget</code></a> element.</dd>
<dt>Content model:</dt>
<dd>Empty.</dd>
<dt>Occurrences:</dt>
<dd>Zero or one.</dd>
</dl>
<h4 id="attributes-6" class="no-toc no-num">Attributes</h4>
<dl>
<dt><code><dfn id="src-0">src</dfn></code></dt>
<dd>Required. A <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#path-attribute">path attribute</a> that allows an author to point to a  <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#file">file</a> within the widget resource.</dd>
<dt><code><dfn id="type">type</dfn></code></dt>
<dd>Optional. A <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#mime-type-attribute">MIME Type attribute</a> that indicates the MIME type of the file referenced by the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#src-0"><code>src</code></a> attribute. When the value is missing, the widget user agent will assume the value <code>text/html</code>.</dd>
<dt><code><dfn id="charset">charset</dfn></code></dt>
<dd>Optional. A keyword attribute that denotes the character set of the file identified by the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#src-0"><code>src</code></a> attribute. The allowed values are any name of a character set listed in <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#iana-charsets">[IANA-Charsets]</a> (widget user agents are only required to support UTF-8). When the value is missing, the widget user agent will assume the value <code>UTF-8</code>.</dd>
</dl>
<h4 id="usage-example-6" class="no-toc no-num">Usage example</h4>
<p><em>This section is non-normative.</em></p>
<p>This example shows the expected usage of the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-content-element"><code>content</code></a> element.</p>
<div class="example">
<pre><code>&lt;widgets xmlns="http://www.w3.org/ns/widgets"&gt;

  &lt;content src="myWidget.html"/&gt;
&lt;/widgets&gt;</code></pre>
</div>
<p>This example shows the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-content-element"><code>content</code></a> element being used with a <code><dfn id="charset-0">charset</dfn></code> attribute to override the default value of this attribute (<code>UTF-8</code>) with the GB2312 character set, which the author has  used to encode  simplified Chinese characters.</p>
<div class="example">
<pre><code>&lt;widgets xmlns="http://www.w3.org/ns/widgets"&gt;
  &lt;name xml:lang="zh-cn"&gt;古老瓷地图&lt;/name&gt;
  &lt;content src="china-maps.html" charset="GB2312"/&gt;
&lt;/widgets&gt;</code></pre>
</div>
<p>This example shows the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-content-element"><code>content</code></a> element being used with a <code><dfn id="type-0">type</dfn></code> attribute to instantiate a widget created with a proprietary MIME type.</p>
<div class="example">
<pre><code>&lt;widgets xmlns="http://www.w3.org/ns/widgets"&gt;
  &lt;name&gt;Location-Based Games Finder&lt;/name&gt;
  &lt;content src="lbg-maps.swf" type="application/x-shockwave-flash"/&gt;
  &lt;access network="true" plugins="true"/&gt;
&lt;/widgets&gt;</code></pre>
</div>
<h3 id="the-update-element"><span class="secno">7.12 </span>The <dfn><code>update</code></dfn> Element</h3>
<p>The <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-update-element"><code>update</code></a> element points, via the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#href-0"><code>href</code></a> attribute,  to an update description document (see <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#widgets-updates">[Widgets-Updates]</a>). The update description document is processed by the widget user agent to check for the availability of an updated version of the widget.</p>
<dl>
<dt>Context in which this element <em class="ct">may</em> be used:</dt>
<dd>In the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-widget-element"><code>widget</code></a> element.</dd>
<dt>Content model:</dt>
<dd>Empty.</dd>
<dt>Occurrences:</dt>
<dd>Zero or one.</dd>
</dl>
<h4 id="attributes-7" class="no-toc no-num">Attributes</h4>
<dl>
<dt><code><dfn id="href-0">href</dfn></code></dt>
<dd>Required. A <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#uri-attribute">URI attribute</a> that indicates the location of an update description document as described in <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#widgets-updates">[Widgets-Updates]</a>.</dd>
</dl>
<h4 id="usage-example-7" class="no-toc no-num">Usage example</h4>
<p><em>This section is non-normative.</em></p>
<p>This example shows the expected usage of the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-update-element"><code>update</code></a> element.</p>
<div class="example">
<pre><code>&lt;widget xmlns   = "http://www.w3.org/ns/widgets"
        id      = "http://example.com/myWidget"
        version = "1.0"&gt;
  &lt;update
   href="http//example.com/update.php?widget=myWidget&amp;amp;version=1.0"/&gt;
&lt;/widget&gt;</code></pre>
</div>
<h3 id="the-feature-element"><span class="secno">7.13 </span>The <code><dfn>feature</dfn></code> Element</h3>
<p>The <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#feature"><code>feature</code></a> is used by an author to denote that, at runtime, a widget <em class="ct">may</em> require access to a <em>feature</em>. A <dfn id="feature">feature</dfn> is a runtime component (e.g. an API) that is not part of the standard set provided by the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#widgets-1.0-family-of-specifications">Widgets 1.0 family of specifications</a>.</p>
<p>When a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#feature"><code>feature</code></a> element is nested inside another feature element, it denotes a <dfn id="fallback-relationship">fallback relationship</dfn>: if the feature identified by the outermost element is unavailable, then the widget user agent will check for the availability of the feature identified by the child&#8217;s element&#8217;s <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#name"><code>name</code></a> attribute.</p>
<p class="note">Note: the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#feature"><code>feature</code></a> element is not a means to import javascript libraries or other resources available on the Web. The <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#feature"><code>feature</code></a> element should be viewed as a standardized way to request the binding of an (URI) identifiable runtime component to a widget for use at runtime.</p>
<dl>
<dt>Context in which this element <em class="ct">may</em> be used:</dt>
<dd>In the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-widget-element"><code>widget</code></a> element or in the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#feature"><code>feature</code></a> element.</dd>
<dt>Occurrences:</dt>
<dd>Zero or more.</dd>
<dt>Expected children:</dt>
<dd><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#feature"><code>feature</code></a>: Zero or one.</dd>
</dl>
<h4 id="attributes-8" class="no-toc no-num">Attributes</h4>
<dl>
<dt><code><dfn id="name">name</dfn></code></dt>
<dd>Required. A <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#uri-attribute">URI attribute</a> that identifies a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#feature">feature</a> required by the widget at runtime (such as an API).</dd>
<dt><code>required</code></dt>
<dd>Optional. A <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#boolean-attribute">boolean attribute</a> that indicates that this feature or a feature identified in a child   <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#feature"><code>feature</code></a> element <em class="ct">must</em> be available to the widget at runtime.</dd>
</dl>
<h4 id="usage-example-8" class="no-toc no-num">Usage example</h4>
<p><em>This section is non-normative.</em></p>
<div class="example">
<pre><code>&lt;widget xmlns="http://www.w3.org/ns/widgets"&gt;
   &lt;feature name="urn:proprietary.camera.api" required="true"&gt;
      &lt;!-- can't find it? use the alternative one --&gt;
      &lt;feature name="http://w3.org/apis/camera"/&gt;
   &lt;/feature&gt;
&lt;/widget&gt;</code></pre>
</div>
<h3 id="window-modes"><span class="secno">7.14 </span><dfn>Window Modes</dfn></h3>
<p style="color: red;"><strong>Warning: Feature at risk!</strong> This specification    does not define the semantics of the window modes. We seek input regarding what, if anything,    should be specified in this spec versus what should be left as an implementation    detail. The <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-widget-element"><code>widget</code></a> element&#8217;s <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#mode"><code>mode</code></a> attribute and associated window modes will be dropped without substantial evidence that they are needed.</p>
<h3 id="indicating-text-directionality-with-its:span"><span class="secno">7.15 </span>Indicating Text Directionality with <code>&lt;its:span&gt;</code></h3>
<p>Although it is <em class="ct">optional</em> for a widget user agent to implement <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#its">[ITS]</a>, it is <em class="ct">recommended</em> that authors use the <code>&lt;its:span&gt;</code> element to indicate the directionality of arbitrary content when needed. Directionality is indicated by either using the <code>dir</code> attribute, with one of the following <dfn id="valid-its:dir-value">valid <code>its:dir</code> value</dfn>s, as defined in ITS:</p>
<dl>
<dt><code>ltr</code></dt>
<dd>Left to right text.</dd>
<dt><code>rtl</code></dt>
<dd>Right to left text.</dd>
<dt><code>lro</code></dt>
<dd>Left-to-right override.</dd>
<dt><code>rlo</code></dt>
<dd>Right-to-left override.</dd>
</dl>
<div class="example">
<p>For example,</p>
<pre><code>&lt;widget
   xmlns="http://www.w3.org/ns/widgets"
   xmlns:its="http://www.w3.org/2005/11/its"&gt;
  &lt;name&gt;Yay for the
  "&lt;its:span dir="rtl"&gt;<span title="fun fish" dir="rtl">متعة الأسماك!</span>&lt;/its:span&gt;" Widget&lt;/name&gt;

  &lt;description its:dir="rtl"&gt;<span title="fun fish" dir="rtl">متعة الأسماك!</span> &lt;/description&gt;
&lt;/widget&gt;</code></pre>
</div>
<p>The <code>its:dir</code> attribute and the <code>&lt;its:span&gt;</code> element can be used as a child of the following elements of the configuration document:</p>
<ul>
<li><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#name"><code>name</code></a></li>
<li><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-description-element"><code>description</code></a></li>
<li><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-author-element"><code>author</code></a></li>
<li><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-license-element"><code>license</code></a></li>
</ul>
<h2 id="steps-for-processing-a-widget-resource"><span class="secno">8 </span>Steps for Processing a Widget Resource</h2>
<p class="note">Note: The following steps and associated parsing rules are written with more concern for clarity than efficiency. As such, user agents may optimize any of   the parsing rules and the steps, or may perform the steps in a different order, so long as the end result is indistinguishable from the result that would be obtained by following the specification.</p>
<p>The <dfn id="steps-for-processing-a-widget-resource-0">steps for processing a widget resource</dfn> involves ten steps that a   <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#widget-user-agent">widget user agent</a> <em class="ct">must</em> follow, in sequential order, responding accordingly if any of the steps result in an error. The procedures for what to do when an error is encountered are described as part of each step; however, there are times when it will not be possible for the widget user agent to recover from an error and it will be forced to treat the widget as an <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#invalid-widget">invalid widget</a>. What to do in a situation when a widget user agent encounters and invalid widget is described below.</p>
<p>Once a widget resource has been successfully processed, a widget user agent may <dfn id="install">install</dfn> and <dfn id="instantiate">instantiate</dfn> the widget resource as described in <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#widgets-security">[Widgets-Security]</a>.</p>
<h3 id="dealing-with-invalid-widgets"><span class="secno">8.1 </span><dfn>Dealing with Invalid Widgets</dfn></h3>
<p>This section describes what to do in the event a widget user agent needs to treat a Zip archive as an <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#invalid-widget">invalid widget</a>.</p>
<p>In the event that an implementation encounters an <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#invalid-widget">invalid widget</a> during   the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#steps-for-processing-a-widget-resource-0">steps for processing a widget resource</a>, the widget user agent <em class="ct">must</em> abort all processing of the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#steps-for-processing-a-widget-resource-0">steps for processing a widget resource</a> and <em class="ct">may</em> inform the end-user with   an appropriate localized error message (see example in the note below). The wording of   an appropriate localized error message is left to the discretion of implementers; however, their   presence is nonetheless <em class="ct">recommended</em>.</p>
<p class="example">An example of an appropriate error dialog would be &#8220;This widget cannot be installed because it was created using an unsupported compression method.&#8221;</p>
<h3 id="extracting-the-file-data-from-a-file-entry"><span class="secno">8.2 </span><dfn>Extracting the File Data from a File Entry</dfn></h3>
<p>When processing a widget resource, a widget user agent will have to decompress (or otherwise extract) the file data of <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#file-entry">file entry</a> into its original representation. Specifying exactly how to extract file entries from a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#zip-archive">Zip archive</a> is beyond the scope of this specification. Instead, implementers <em class="ct">must</em> follow the processing rules defined in the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#zip">[ZIP]</a> specification to extract file entries for Zip archive.</p>
<p>A  widget user agent is <em class="ct">not required</em> to extract all the file entries   in a Zip archive at the same time. It <em class="ct">may</em> extract specific file entries as   they are needed for processing or rendering.</p>
<p class="note">Note: As a security precaution, implementations are discouraged from extracting file entries from untrusted widgets directly onto the file system. Instead, implementations should consider a virtual file system or mapping to access files inside a Zip archive.</p>
<h3 id="step-1-acquire-a-potential-zip-archive" class="no-num"><dfn>Step 1</dfn> - Acquire a Potential Zip Archive</h3>
<p>Step 1 involves acquiring a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#potential-zip-archive">potential Zip archive</a> and checking if it is a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#zip-archive"> Zip archive</a> by using the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#rules-for-determining-if-a-potential-zip-archive-is-a-zip-archive-0">rules for determining if a potential Zip archive is a Zip archive</a>. A widget user agent will acquire a potential Zip archive from a data transfer protocol that  either labels resources with a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#mime">[MIME]</a> type (e.g. <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#http">[HTTP]</a>) or from a data transfer protocol that does not   label resources with a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#mime">[MIME]</a> type (e.g., BitTorrent, Bluetooth, etc.).</p>
<p>An implementation is <em class="ct">not required</em> to acquire all the bytes of a potential zip archive before applying the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#rules-for-determining-if-a-potential-zip-archive-is-a-zip-archive-0">rules for determining if a potential Zip archive is a Zip archive</a>. It <em class="ct">may</em> perform the check once it has acquired the first four bytes of the resource.</p>
<h4 id="acquisition-of-potential-zip-archive-labeled-with-a-mime-type" class="no-toc no-num">Acquisition of <dfn>potential Zip archive labeled with a MIME type</dfn></h4>
<p>When attempting to acquire a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#potential-zip-archive">potential Zip archive</a> over some protocol that labels resources with a MIME type, a widget user agent <em class="ct">must</em> only attempt to process resources labeled with the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#widget-mime-type">widget MIME type</a> (<code>application/widget</code>) regardless of file extension or no file extension. Unless the widget user agent supports legacy or proprietary MIME types, all other MIME types are in error and the widget user agent <em class="ct">must</em> treat the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#potential-zip-archive">potential Zip archive</a> as an <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#invalid-widget">invalid widget</a>.</p>
<p class="example">For example, in <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#http">[HTTP]</a>, where the <code>Content-Type</code> header matches <code>application/widget</code>.</p>
<p>If the protocol used for acquisition of a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#potential-zip-archive">potential Zip archive</a> does not provide, or otherwise include a MIME type, then a widget user agent <em class="ct">may</em> treat the acquired <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#potential-zip-archive">potential Zip archive</a> as if it has been acquired from a protocol that does not label resources with a MIME type.</p>
<div class="example">
<p>In this example, the <code>Content-Type</code> is in error, so the widget user agent <strong>would not</strong> attempt to process the following potential Zip archive:</p>
<dl>
<dt>Request</dt>
<dd>
<pre><code>GET /foo.wgt HTTP/1.1
Host: www.example.com
Accept: application/widget</code></pre>
</dd>
<dt>Response</dt>
<dd>
<pre><code>HTTP/1.1 200 OK
Date: Tue, 04 Sep 2007 00:00:38 GMT
Last-Modified: Mon, 03 Sep 2007 06:47:19 GMT
Content-Length: 1337
Content-Type: application/x-gadget</code></pre>
</dd>
</dl>
</div>
<h4 id="acquisition-of-potential-zip-archive-not-labeled-with-a-mime-type" class="no-toc no-num">Acquisition of  <dfn>potential Zip archive not labeled with a MIME type</dfn></h4>
<p>A widget user agent <em class="ct">must</em> attempt to process a resource regardless of the file extension (including situations when there is no file extension) by applying the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#rules-for-determining-if-a-potential-zip-archive-is-a-zip-archive-0">rules for determining if a potential Zip archive is a Zip archive</a>.</p>
<h4 id="rules-for-determining-if-a-potential-zip-archive-is-a-zip-archive" class="no-toc no-num">Rules for Determining if a potential Zip archive is a Zip archive</h4>
<p>The <dfn id="rules-for-determining-if-a-potential-zip-archive-is-a-zip-archive-0">rules for determining if a potential Zip archive is a Zip archive</dfn> is as follows.</p>
<p>If the first four bytes of the potential Zip archive do not match the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#magic-numbers-for-a-zip-archive">magic numbers for a Zip archive</a> (<code>50 4B 03 04</code>) then a widget user agent <em class="ct">must</em> treat the resource as an <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#invalid-widget">invalid widget</a>. Otherwise, the widget user agent <em class="ct">must</em> treat the potential Zip archive as a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#zip-archive">Zip archive</a>.</p>
<p>With the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#zip-archive">Zip archive</a>, the widget user agent <em class="ct">must</em> <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#step-2-verify-the-zip-archive-and-its-file-entries">verify the Zip archive and its file entries</a>.</p>
<h3 id="step-2-verify-the-zip-archive-and-its-file-entries" class="no-num"><dfn>Step 2</dfn> - <dfn>Verify the Zip archive and its File Entries</dfn></h3>
<p>To verify that a Zip archive and its file entries conform to this specification, a widget user agent <em class="ct">must</em> perform the following checks. This specification does not provide the technical details of how to actually perform the checks. Instead, implementers <em class="ct">must</em> follow the  <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#zip">[Zip]</a> specification.</p>
<p>The potential widget resource can be considered <dfn id="verified">verified</dfn> only once the  checks below have been completed.</p>
<p>If any of the following conditions occur/apply (indicating that a condition is met), then a widget user agent <em class="ct">must</em> treat the Zip archive is an <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#invalid-widget">invalid widget</a>:</p>
<ol>
<li>The zip archive is  split into multiple files or spans multiple volumes <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#zip">[ZIP]</a>.</li>
<li>The Zip archive is encrypted (which is denoted by general purpose bit <code>0</code> being set and by the presence of <dfn id="archive-decryption-header">archive decryption header</dfn> and an <dfn id="archive-extra-data-record">archive extra data record</dfn> <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#zip">[ZIP]</a>).</li>
<li>The Zip archive is digitally signed using any of the digital signature methods defined in <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#zip">[ZIP]</a>.</li>
<li>The Zip archive contains zero file entries.</li>
<li>The Zip archive  contains only <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#folder">folder</a>s.</li>
</ol>
<p>Next, for each <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#file-entry">file entry</a> in the Zip archive, the widget user agent <em class="ct">must</em> perform the following checks. If any of the following conditions occur/apply (indicating that a condition is met), then the widget user agent <em class="ct">must</em> treat the Zip archive as an <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#invalid-widget">invalid widget</a>. For each file entry in the Zip archive, check the following data from the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#local-file-header">local file header</a>:</p>
<ol>
<li>The value of the <dfn id="crc-32">CRC-32</dfn> field (defined in <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#zip">[ZIP]</a>) fails a CRC-32 check.</li>
<li>The <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#version-needed-to-extract"><var>version needed to extract</var></a> is greater than <code>20</code> (meaning the archive is using a feature unsupported by this specification, such as Zip64).</li>
<li>The value of the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#compression-method-field"><var>compression method field</var></a> is not one of the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#valid-compression-methods">valid compression methods</a> (<code>0</code> or <code>8</code>).</li>
<li>The <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#file-name-field"><var>file name field</var></a> is an empty string.</li>
<li>The <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#file-name-field"><var>file name field</var></a> contains <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#reserved0">reserved characters</a>.</li>
<li>The <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#file-name-field"><var>file name field</var></a> is a sequence exclusively composed of (one or more) <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#space-characters">space characters</a> or a mixed sequence of space characters and U+002E FULL STOP (&#8221;.&#8221;) (e.g. &#8221; . .   &#8220;).</li>
<li>The <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#file-name-field"><var>file name field</var></a> is not a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#valid-zip-relative-path">valid Zip relative path</a>.</li>
<p><!-- li> The value of the <var>extended language encoding extra field</var> (defined in <span>[ZIP]</span>) is not <code>null</code> or is not an empty string or does not exactly match &quot;UTF8&quot;.</li -->
<li>There two are resources whose file name fields, upon normalization, case insensitively match (&#8217;<code>images/BG.png</code>&#8216; and &#8216;<code>iMaGeS/bG.pNg</code>&#8216; are considered canonically equivalent)</li>
</ol>
<p>A widget user agent <em class="ct">must</em> now set the configuration defaults (<a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#step-3-set-the-configuration-defaults">step 3</a>).</p>
<h3 id="step-3-set-the-configuration-defaults" class="no-num"><dfn>Step 3</dfn> - Set the Configuration Defaults</h3>
<p>Widget user agents <em class="ct">must</em> assume the following configuration defaults at this point of processing:</p>
<table border="1" summary="The configuration defaults that a widget user agent must set prior to instantiation.">
<caption> <dfn id="configuration-defaults">Configuration Defaults</dfn> </caption>
<thead>
<tr>
<th scope="col">Variable</th>
<th scope="col">Type</th>
<th scope="col">Default Value</th>
<th scope="col">Overridden by</th>
<th scope="col">Description</th>
</tr>
<tr>
<th scope="row"><dfn id="signatures"><var>signatures</var></dfn></th>
<td>File entry list</td>
<td><code>null</code></td>
<td><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#step-4-locate-digital-signatures-for-the-widget">Step 4</a></td>
<td>The list of file entries that are <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#digital-signature">digital signature</a>s.</td>
</tr>
<tr>
<th scope="row"><dfn id="signed"><var>signed</var></dfn></th>
<td>boolean</td>
<td><code>false</code></td>
<td><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#step-5-process-the-digital-signatures">Step 5</a></td>
<td>The value indicates if the widget is <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#digitally-signed">digitally signed</a>. Will only be set to <code>true</code> if a signature can be validated via <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#widgets-digsig">[Widgets-DigSig]</a>.</td>
</tr>
<tr>
<th scope="row"><dfn id="base-folder-0"><var>base folder</var></dfn></th>
<td>DOMString</td>
<td><code>""</code></td>
<td><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#step-6-determine-the-base-folder-and-widget-locale">Step 6</a></td>
<td>The <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#base-folder-0">base folder</a>.</td>
</tr>
<tr>
<th scope="row"><dfn id="wua-language-list"><var>wua-language list</var></dfn></th>
<td>List</td>
<td>See description.</td>
<td><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#step-6-determine-the-base-folder-and-widget-locale">Step 6</a></td>
<td>The user&#8217;s <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#system">system locale</a> as a comma-separated list of <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#basic-language-range">basic language     range</a>s. The first item represents the user&#8217;s     most preferred language range, followed by the next most preferred language and so forth.     For example, &#8216;<code>en,fr,es</code>&#8216;, where English is preferred over French, and French is     preferred over Spanish, and Spanish is preferred over the widget user agent&#8217;s default. Each language range <em class="ct">must</em> match the <code>language-range</code> production in <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#bcp47">[BCP47]</a>. When generating this list, improperly formed ranges <em class="ct">must</em> be <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#ignored">ignored</a>. Widget user agents <em class="ct">should</em>, nevertheless,     attempt to populate the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#wua-language-list"><var>wua-language list</var></a> with valid language subtags that     are well-formed (which can help with canonicalization and matching obsolete and     grandfathered subtags with a &#8220;preferred value&#8221;).</td>
</tr>
<tr>
<th scope="row"><dfn id="widget-locale"><var>widget locale</var></dfn></th>
<td>DOMString</td>
<td><code>null</code></td>
<td><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#step-6-determine-the-base-folder-and-widget-locale">Step 6</a></td>
<td>The locale under which the widget will be instantiated, as a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#language-tag-0">language tag</a>.</td>
</tr>
<tr>
<th scope="row"><dfn id="widget-config-doc"><var>widget config doc</var></dfn></th>
<td>File entry</td>
<td><code>null</code></td>
<td><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#step-7-locate-the-configuration-document">Step 7</a></td>
<td>The file entry that is the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#configuration-document-0">configuration document</a> for the widget resource.</td>
</tr>
</thead>
<tfoot>
<tr>
<th scope="col">Variable</th>
<th scope="col">Type</th>
<th scope="col">Default Value</th>
<th scope="col"> Overridden by</th>
<th scope="col">Description</th>
</tr>
</tfoot>
<tbody>
<tr>
<th scope="row"><dfn id="widget-id"><var>widget id</var></dfn></th>
<td>DOMString</td>
<td><code>null</code></td>
<td><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#step-8-process-the-configuration-document">Step 8</a></td>
<td>The identifier, corresponding to the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-widget-element"><code>widget</code></a> element&#8217;s <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#id"><code>id</code></a> attribute in the configuration document.</td>
</tr>
<tr>
<th scope="row"><dfn id="widget-version"><var>widget version</var></dfn></th>
<td>DOMString</td>
<td><code>null</code></td>
<td><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#step-8-process-the-configuration-document">Step 8</a></td>
<td>The widget&#8217;s version, corresponding to the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-widget-element"><code>widget</code></a> element&#8217;s version attribute in the configuration document.</td>
</tr>
<tr>
<th scope="row"><dfn id="widget-width"><var>widget width</var></dfn></th>
<td>integer</td>
<td><code>300</code></td>
<td><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#step-8-process-the-configuration-document">Step 8</a></td>
<td>The widget&#8217;s visual width, corresponding to the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-widget-element"><code>widget</code></a> element&#8217;s <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#width-0"><code>width</code></a> attribute in the configuration document.</td>
</tr>
<tr>
<th scope="row"><dfn id="widget-height"><var>widget height</var></dfn></th>
<td>integer</td>
<td><code>150</code></td>
<td><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#step-8-process-the-configuration-document">Step 8</a></td>
<td>The widget&#8217;s visual height, corresponding to the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-widget-element"><code>widget</code></a> element&#8217;s <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#height-0"><code>height</code></a> attribute in the configuration document.</td>
</tr>
<tr>
<th scope="row"><dfn id="widget-window-mode"><var>widget window mode</var></dfn></th>
<td>DOMString</td>
<td><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-widget-element"><code>widget</code></a></td>
<td><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#step-8-process-the-configuration-document">Step 8</a></td>
<td><strong class="redNote">This feature is at risk!</strong> The window mode that corresponds to the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-widget-element"><code>widget</code></a> element&#8217;s <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#mode"><code>mode</code></a> attribute in the configuration document.</td>
</tr>
<tr>
<th scope="row"><dfn id="widget-name"><var>widget name</var></dfn></th>
<td>DOMString</td>
<td><code>null</code></td>
<td><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#step-8-process-the-configuration-document">Step 8</a></td>
<td>The widget&#8217;s name, corresponding to the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#name"><code>name</code></a> element in the     configuration document.</td>
</tr>
<tr>
<th scope="row"><dfn id="widget-description"><var>widget description</var></dfn></th>
<td>DOMString</td>
<td><code>null</code></td>
<td><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#step-8-process-the-configuration-document">Step 8</a></td>
<td>The description given to the widget by the author, corresponding to the text content of the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-description-element"><code>description</code></a> element in the     configuration document.</td>
</tr>
<tr>
<th scope="row"><dfn id="widget-license"><var>widget license</var></dfn></th>
<td>DOMString</td>
<td><code>null</code></td>
<td><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#step-8-process-the-configuration-document">Step 8</a></td>
<td>The software license assigned to the widget by the author, corresponding to the text content of the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-license-element"><code>license</code></a> element in the     configuration document.</td>
</tr>
<tr>
<th scope="row"><dfn id="widget-license-href"><var>widget license href</var></dfn></th>
<td>URI</td>
<td><code>null</code></td>
<td><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#step-8-process-the-configuration-document">Step 8</a></td>
<td>The URI for a software license given to the widget by the author, corresponding <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#href-0"><code>href</code></a> attribute of the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-license-element"><code>license</code></a> element in the     configuration document.</td>
</tr>
<tr>
<th scope="row"><dfn id="access-plugins"><var>access plugins</var></dfn></th>
<td>boolean</td>
<td><code>false</code></td>
<td><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#step-8-process-the-configuration-document">Step 8</a></td>
<td>If the widget will be able to use plugins at runtime, corresponding to the value of the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-access-element"><code>access</code></a> element&#8217;s <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#plugin"><code>plugin</code></a> attribute.</td>
</tr>
<tr>
<th scope="row"><dfn id="access-network"><var>access network</var></dfn></th>
<td>boolean</td>
<td><code>false</code></td>
<td><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#step-8-process-the-configuration-document">Step 8</a></td>
<td>If the widget will be able to access networked resources at runtime, corresponding to the value of the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-access-element"><code>access</code></a> element&#8217;s <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#network"><code>network</code></a> attribute.</td>
</tr>
<tr>
<th scope="row"><dfn id="author-name"><var>author name</var></dfn></th>
<td>DOMString</td>
<td><code>null</code></td>
<td><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#step-8-process-the-configuration-document">Step 8</a></td>
<td>The name of the author who created the widget, corresponding to the text content of the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-author-element"><code>author</code></a> element.</td>
</tr>
<tr>
<th scope="row"><dfn id="author-email"><var>author email</var></dfn></th>
<td>DOMString</td>
<td><code>null</code></td>
<td><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#step-8-process-the-configuration-document">Step 8</a></td>
<td>The email of the author who created the widget, corresponding to the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-author-element"><code>author</code></a> element&#8217;s <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#email"><code>email</code></a> attribute.</td>
</tr>
<tr>
<th scope="row"><dfn id="author-href"><var>author href</var></dfn></th>
<td>URI</td>
<td><code>null</code></td>
<td><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#step-8-process-the-configuration-document">Step 8</a></td>
<td>The URI associated with the author who created the widget, corresponding to the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-author-element"><code>author</code></a> element&#8217;s <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#href-0"><code>href</code></a> attribute.</td>
</tr>
<tr>
<th scope="row"><dfn id="widget-start-file"><var>widget start file</var></dfn></th>
<td>File entry</td>
<td><code>null</code></td>
<td><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#step-8-process-the-configuration-document">Step 8</a>, <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#step-9-locate-the-start-file">Step 9</a></td>
<td>The <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#start-file">start file</a> for the widget resource, corresponding to either one of the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#default-start-files">default start files</a> or the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#file">file</a> identified by the content element&#8217;s <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#src-0"><code>src</code></a> attribute.</td>
</tr>
<tr>
<th scope="row"><dfn id="start-file-content-typ"><var>start file content-typ</var></dfn>e</th>
<td>DOMString</td>
<td><code>text/html</code></td>
<td><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#step-8-process-the-configuration-document">Step 8</a></td>
<td>The MIME type of the start file, corresponding to the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-content-element"><code>content</code></a> element&#8217;s <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#type-0"><code>type</code></a> attribute or to a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#default-start-file">default     start file</a>.</td>
</tr>
<tr>
<th scope="row"><dfn id="update-href"><var>update href</var></dfn></th>
<td>URI</td>
<td><code>null</code></td>
<td><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#step-8-process-the-configuration-document">Step 8</a></td>
<td>The URI for where an update description can be downloaded, corresponding to the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-update-element"><code>update</code></a> element&#8217;s <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#href-0"><code>href</code></a> attribute.</td>
</tr>
<tr>
<th scope="row"><dfn id="feature-list"><var>feature list</var></dfn></th>
<td>List</td>
<td><code>null</code></td>
<td><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#step-8-process-the-configuration-document">Step 8</a></td>
<td>A list of URIs that correspond to features that were requested, via feature elements, by the author and are <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#supported">supported</a> by the widget user agent. Each item in the list corresponds to a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#feature"><code>feature</code></a> element&#8217;s <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#name"><code>name</code></a> attribute.</td>
</tr>
<tr>
<th scope="row"><dfn id="icons"><var> icons</var></dfn></th>
<td>List of file entries</td>
<td><code>null</code></td>
<td><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#step-8-process-the-configuration-document">Step 8</a>, <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#step-10-locate-the-default-icons-and-thumbnail">Step 10</a></td>
<td>The  icons of the widget as they correspond to the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#default-icon">default icon</a>s and to     the occurrence of <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#custom-icon">custom icon</a>s that are <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#supported">supported</a> by the     widget resource.</td>
</tr>
<tr>
<th scope="row"><dfn id="start-file-encoding"><var>start file encoding</var></dfn></th>
<td>DOMString</td>
<td><code>UTF-8</code></td>
<td><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#step-8-process-the-configuration-document">Step 8</a></td>
<td>The character encoding of the start file, corresponding to the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-content-element"><code>content</code></a> element&#8217;s <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#charset-0"><code>charset</code></a> attribute.</td>
</tr>
<tr>
<th scope="row"><dfn id="widget-thumbnail"><var>widget thumbnail</var></dfn></th>
<td>File entry</td>
<td><code>null</code></td>
<td><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#step-10-locate-the-default-icons-and-thumbnail">Step 10</a></td>
<td>A file entry that corresponds to a  default thumbnail.</td>
</tr>
</tbody>
</table>
<p>Once the above configuration defaults have been set, a widget user agent <em class="ct">must</em> attempt to locate digital signatures for the widget (<a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#step-4-locate-digital-signatures-for-the-widget">step 4</a>).</p>
<h3 id="step-4-locate-digital-signatures-for-the-widget" class="no-num"><dfn>Step 4</dfn> - Locate Digital Signatures for the Widget</h3>
<p>The algorithm to locate digital signatures for the widget is as follows:</p>
<ol>
<li>Let <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#signatures"><var>signatures</var></a> be an empty list.</li>
<li>For each <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#file-entry"><var>file entry</var></a> in the <var>Zip-archive</var>, if the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#file-name-field"><var>file name field </var></a> case insensitively matches the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#naming-convention-for-digital-signatures">naming convention for digital signatures</a>, append this <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#file-entry"><var>file entry</var></a> to the list of <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#signatures"><var>signatures</var></a>.</li>
<li>If  <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#signatures"><var>signatures</var></a> is empty, terminate this algorithm and go to <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#step-6-determine-the-base-folder-and-widget-locale">step 6</a>.</li>
<li>Otherwise, sort the list of <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#signatures"><var>signatures</var></a> by the file name field in descending order (i.e. <code>signature001.xml</code> followed by<code> signature9.xml</code> followed by <code>signature.xml</code>).</li>
<li>Go to <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#step-5-process-the-digital-signatures">Step 5</a> and process the digital signatures.</li>
</ol>
<h3 id="step-5-process-the-digital-signatures" class="no-num"><dfn>Step 5</dfn> - <dfn>Process the Digital Signatures</dfn></h3>
<p>The following algorithm describes how to process the list of <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#signatures"><var>signatures</var></a> created in step 4.</p>
<p class="note">Note: How a widget user agent uses a digital signature is determined by the security policy implemented by that widget user agent. As such, this specification does not mandate processing rules dependent on the verification of one or more digital signature documents or on the revocation status obtained for the certificates associated with a verified digital signature document.</p>
<p>For each <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#file-entry"><var>file entry</var></a> in <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#signatures"><var>signatures</var></a>, apply the Procedure for Verifying a Digital Signature Document in the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#widgets-digsig">[Widgets-DigSig]</a> specification in the order they appear in the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#signatures"><var>signatures</var></a> list:</p>
<ol>
<li>If the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#file-entry"><var>file entry</var></a> is a <strong>verified digital signature</strong>, as defined in <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#widgets-digsig">[Widgets-DigSig]</a>, set <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#signed"><var>signed</var></a> to <code>true</code>.</li>
<li>If the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#file-entry"><var>file entry</var></a> is deemed by the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#widgets-digsig">[Widgets-DigSig]</a> to be an <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#invalid-widget">invalid widget</a>, then a widget user agent <em class="ct">must</em> treat this widget as an <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#invalid-widget">invalid widget</a>.</li>
<li>If the widget user agent determines that an <strong>exit criteria</strong>, as defined in <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#widgets-digsig">[Widgets-DigSig]</a>, has been met, terminate this algorithm and  go to <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#step-6-determine-the-base-folder-and-widget-locale">step 6</a>. Otherwise, select the next <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#file-entry"><var>file entry</var></a> in the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#signatures"><var>signatures</var></a> list and go to 1 in this algorithm.</li>
<li>If every <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#file-entry"><var>file entry</var></a> has been processed in accordance to  <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#widgets-digsig">[Widgets-DigSig]</a>, but no exit criteria has been met, then go to <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#step-6-determine-the-base-folder-and-widget-locale">step 6</a>.</li>
</ol>
<h3 id="step-6-determine-the-base-folder-and-widget-locale" class="no-num"><dfn>Step 6</dfn> - Determine the Base folder and Widget Locale</h3>
<p>Before attempting to <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#locate-the-configuration-document">locate the configuration document</a>, the widget user agent <em class="ct">must</em> check for the existence of any <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#localized-folder-0">localized folder</a>s that match the end-user&#8217;s language preferences (as contained by the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#wua-language-list"><var>wua-language list</var></a>).</p>
<p>This step makes use of the <dfn id="lookup">lookup</dfn> mechanism as defined in section 3.4 of <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#rfc4647">[RFC4647]</a> (part of <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#bcp47">[BCP47]</a>). The aim is to match, in order, one of the language ranges in the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#wua-language-list"><var>wua-language list</var></a> to a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#localized-folder-0">localized folder</a> in the widget resource.</p>
<p>The algorithm to <dfn id="determine-the-base-folder-and-widget-locale">determine the <var>base folder</var> and <var>widget locale</var></dfn> are as follows:</p>
<ol>
<li>If the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#wua-language-list"><var>wua-language list</var></a> is &#8216;<code>empty</code>&#8216;, or <code>null</code>, or &#8216;<code>i-default</code>&#8216;, or contains a single &#8216;<code>*</code>&#8216;, or is a sequence of items that only contain the &#8216;<code>*</code>&#8216; character, then terminate this algorithm and attempt to <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#locate-the-configuration-document">locate the configuration document</a>.</li>
<li>For each <var>range</var> in the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#wua-language-list"><var>wua-language list</var></a>:
<ol style="list-style-type: lower-alpha;">
<li>If this <var>range</var> is a single &#8216;<code>*</code>&#8216;, then terminate this algorithm and attempt to  <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#locate-the-configuration-document">locate the configuration document</a>.</li>
<li>If this <var>range</var> begins with the subtag &#8216;<code>*</code>&#8216;, then skip this range and, skipping all the steps below, repeat number 2 of this algorithm.</li>
<li>Else if this <var>range</var> contains a subtag &#8216;<code>*</code>&#8216;, remove the &#8216;<code>*</code>&#8216; and its preceding hyphen (<code>U+002F</code>) and continue (for example, &#8216;<code>en-*-US</code>&#8216; becomes &#8216;<code>en-US</code>&#8216;).</li>
<li>Let <var>potential range </var>be the concatenation of the string &#8216;<code>localized/</code>&#8216; and the <var>range</var> (e.g. &#8220;<code>en-us</code>&#8221; becomes &#8220;<code>locales/en-us</code>&#8220;).</li>
<li>For each    <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#file-entry">file entry</a> in the widget resource, check  if the   first characters of the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#file-name-field"><var>file name field</var></a> match the <var>potential language range</var> (e.g., if the potential range is &#8216;<code>locales/en-us</code>&#8216;, then &#8216;<code>locales/en-us/anyfile</code>&#8216; would match),
<ol style="list-style-type: lower-roman;">
<li>If they match:
<ol type="A">
<li>Let <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#widget-locale"><var>widget locale</var></a> be the value of the current <var>range</var> in lowercase form.</li>
<li>Let <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#base-folder-0"><var>base folder</var></a> be the <var>potential range</var>.</li>
<li>Terminate this algorithm and attempt to locate the configuration document.</li>
</ol>
</li>
<li>Else, remove the last subtag of the range and repeat this step 2.d. (e.g., if the range is currently &#8220;en-US&#8221;, make the range &#8220;en&#8221; and search for &#8216;<code>locales/en</code>&#8216;).</li>
</ol>
</li>
</ol>
</li>
<li>If no match is made, attempt to locate the configuration document (<a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#step-7-locate-the-configuration-document">step 7</a>).</li>
</ol>
<p class="example">For example, if the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#wua-language-list"><var>wua-language list</var></a> is &#8220;en-AU&#8221; and a match is made on file entry whose name is &#8220;locales/En-Au/config.xml&#8221;, then <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#base-folder-0"><var>base folder</var></a> would be &#8220;&#8221;locales/En-Au/&#8221;, and the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#widget-locale"><var>widget locale</var></a> would be &#8220;en-au&#8221;.</p>
<p class="example">For example, if the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#wua-language-list"><var>wua-language list</var></a> is &#8220;de-CH,fr-CH,it-CH&#8221; and folders included &#8220;locales/de&#8221;, &#8220;locales/fr-FR&#8221; , and &#8220;locales/IT&#8221;, then the folder &#8220;locales/de&#8221; would be matched, then <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#base-folder-0"><var>base folder</var></a> would be &#8220;locales/de&#8221; and the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#widget-locale"><var>widget locale</var></a> would be &#8220;de&#8221;.</p>
<h3 id="step-7-locate-the-configuration-document" class="no-num"><dfn>Step 7</dfn> - Locate the Configuration Document</h3>
<p>This step involves searching within the zip archive for a configuration document. The configuration document, if it exists, will be located at either the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#root-of-the-widget">root of the widget</a> or in a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#localized-folder-0">localized folder</a>.</p>
<p>The algorithm to <dfn id="locate-the-configuration-document">locate the configuration document</dfn> is as follows:</p>
<ol>
<li>Search the widget resource for a file entry whose <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#file-name-field"><var>file name field</var></a> <strong><em>case insensitively</em></strong> matches the concatenation of the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#base-folder-0"><var>base folder</var></a> and the string <code>config.xml</code> (e.g. <code>locales/en-us/config.xml</code>). If a match is made, set <var>config doc</var> to be this file entry.</li>
<li>If no match is made, search for a file entry residing at the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#root-of-the-widget">root of the widget</a> whose <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#file-name-field"><var>file name field</var></a> <em><strong>case insensitively</strong></em> matches <code>config.xml</code>. If a match is made, set <var>config doc</var> to be this file entry.</li>
<li>If no match is made, attempt to <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#step-9-locate-the-start-file">locate the start file</a>, otherwise process the configuration document (<a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#step-8-process-the-configuration-document">step 8</a>).</li>
</ol>
<h3 id="step-8-process-the-configuration-document" class="no-num"><dfn>Step 8</dfn> - <dfn>Process the configuration document</dfn></h3>
<p>The <var>config doc</var> <em class="ct">must</em> be processed as described in the following sub-sections. The purpose of processing the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#configuration-document-0">configuration document</a> is to override the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#configuration-defaults">configuration defaults</a>, which are   used during instantiation and at runtime <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#widgets-security">[Widgets-security]</a>).</p>
<p>The main algorithm for processing a configuration document is given by the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#rules-for-processing-a-configuration-document-0">rules for processing a configuration document</a>. To maintain interoperability across implementations, this step also makes use of the following rules  for processing certain <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#attribute-types-0">attribute types</a> and <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#file">file</a>s:</p>
<ul>
<li><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#rules-for-parsing-a-non-negative-integer-0">Rules for parsing a non-negative Integer</a>.</li>
<li><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#rules-for-removing-whitespace-0">Rules for removing whitespace</a>.</li>
<li><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#rules-for-identifying-the-mime-type-of-an-image-0">Rules for identifying the MIME type of an image</a>.</li>
<li><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#rules-for-identifying-the-mime-type-of-a-file-0">Rules for identifying the MIME type of a file</a>.</li>
</ul>
<h4 id="rules-for-processing-a-configuration-document" class="no-toc no-num">Rules for Processing a Configuration Document</h4>
<p>The <dfn id="rules-for-processing-a-configuration-document-0">rules for processing a configuration document</dfn> are given in the following algorithm.</p>
<p>The term <dfn id="in-error">in error</dfn> is typically used to mean that an element or attribute in a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#configuration-document-0">configuration document</a> is not conforming  to the rules of this specification. Rules for how  an element or an attribute are to be treated when it is in error are always given when the term is used. Typically the specification will say that the erroneous DOM nodes <em class="ct">must</em> be <dfn id="ignored">ignored</dfn>, meaning that the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#widget-user-agent">widget user agent</a> <em class="ct">must</em> act as if those nodes were not present.</p>
<p>An element or an attribute is <dfn id="correct">correct</dfn> if it is not <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#in-error">in error</a>.</p>
<p>The term <dfn id="text-node">text node</dfn> refers to any <code>Text</code> node, including <code>CDATASection</code> nodes (any <code>Node</code> with node type <code>3</code> or <code>4</code>) as defined in <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#dom3core">[DOM3Core]</a>.</p>
<ol>
<li>Let <var>doc</var> be the result of loading the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#widget-config-doc"><var>widget config doc</var></a> as a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#dom3core">[DOM3Core]</a> <code>Document</code> using a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#xmlns">[XMLNS]</a>-aware parser. The parser <em class="ct">must</em> support <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#xml:lang"><code>xml:lang</code></a>, and process any occurrence of the xml:lang attribute in accordance to the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#xml">[XML]</a> specification.</li>
<li>If the document is not well-formed <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#xml">[XML]</a>, terminate this algorithm and treat this widget resource as an <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#invalid-widget">invalid widget</a>.</li>
<li>Let <var>root element</var> be the <code>documentElement</code> of <var>doc</var>.</li>
<li>If the <var>root element</var> is not a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-widget-element"><code>widget</code></a> element in the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#widget-namespace">widget namespace</a>, then treat this widget resource as an <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#invalid-widget">invalid widget</a>.</li>
<li>Otherwise,
<dl>
<dt>it is a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-widget-element"><code>widget</code></a> element:</dt>
<dd>If any one of the following attributes is <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#in-error">in error</a> or invalid, then that attribute <em class="ct">must</em> be <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#ignored">ignored</a>. All declared attributes  <em class="ct">must</em> be processed.</p>
</dd>
<dd>If the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#id"><code>id</code></a> attribute is used, and it is a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#valid-uri">valid URI</a>, then     let <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#widget-id"><var>widget id</var></a> be the value of the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#id"><code>id</code></a> attribute.</p>
</dd>
<dd>If the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#version"><code>version</code></a> attribute is used, and it is a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#valid-version-tag">valid version-tag</a>, then let <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#widget-version"><var>widget version</var></a> be the value of the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#version"><code>version</code></a> attribute.</p>
</dd>
<dd>If the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#height-0"><code>height</code></a> attribute is used, apply the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#rules-for-parsing-a-non-negative-integer-0">rules for parsing a non-negative integer</a> to its value. If the value is not <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#in-error">in error</a> and greater than <code>0</code>, let <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#widget-height"><var>widget height</var></a> be the value of the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#height-0"><code>height</code></a> attribute.</p>
</dd>
<dd>If the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#width-0"><code>width</code></a> attribute is used, apply the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#rules-for-parsing-a-non-negative-integer-0">rules for parsing a non-negative integer</a> to its value. If the value is not <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#in-error">in error</a> and greater than <code>0</code>, let <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#widget-width"><var>widget width</var></a> be the value of the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#width-0"><code>width</code></a> attribute.</p>
</dd>
<dd>If the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#mode"><code>mode</code></a> attribute is used, and it is a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#valid-window-mode">valid window mode</a>, then let <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#widget-window-mode"><var>widget window mode</var></a> be the value of the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#mode"><code>mode</code></a> attribute. <strong class="redNote">This feature is at risk!</strong></p>
</dd>
<dd>If the widget element does not contain any child elements, then terminate this algorithm and go to <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#step-9-locate-the-start-file">step 9</a>.</p>
</dd>
</dl>
</li>
<li>For each child element that is a direct descendent of the <var>root element</var>, starting from the first moving to the last in tree order, if it is:
<dl class="switch">
<dt>A <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#name"><code>name</code></a> element</dt>
<dd>If this is not the first <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#name"><code>name</code></a> element, then this element and  its child nodes are  <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#in-error">in error</a> and <em class="ct">must</em> be <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#ignored">ignored</a>.</p>
</dd>
<dd>If this is the first <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#name"><code>name</code></a> element encountered, then let <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#widget-name"><var>widget     name</var></a> be the result of applying the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#rules-for-getting-text-content-0">rules for getting text content</a> to     this element.</p>
</dd>
<dt>A <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-description-element"><code>description</code></a> element</dt>
<dd>If this is not the first <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-description-element"><code>description</code></a> element, then this element and  its child nodes are  <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#in-error">in error</a> and <em class="ct">must</em> be <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#ignored">ignored</a>.</p>
</dd>
<dd>If this is the first <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-description-element"><code>description</code></a> element encountered, then let <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#widget-description"><var>widget description</var></a> be the result of applying the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#rules-for-getting-text-content-0">rules for getting text content</a> to this element.</p>
</dd>
<dt>An <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-author-element"><code>author</code></a> element</dt>
<dd>If this is not the first <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-author-element"><code>author</code></a> element, then this element and its child nodes are  <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#in-error">in error</a> and <em class="ct">must</em> be <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#ignored">ignored</a>.</p>
</dd>
<dd>If this is the first <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-author-element"><code>author</code></a> element used, then:</p>
<ol>
<li>let <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#author-name"><var>author name</var></a> be the result of applying the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#rules-for-getting-text-content-0">rules for getting text content</a> to       this element.</li>
<li>If the  <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#href-0"><code>href</code></a> attribute is used, and it is a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#valid-uri">valid uri</a>, then         let <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#author-href"><var>author href</var></a> be the value of the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#href-0"><code>href</code></a> attribute. Otherwise, the attribute is <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#in-error">in error</a> and <em class="ct">must</em> be <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#ignored">ignored</a>.</li>
<li>If the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#email"><code>email</code></a> attribute is used, then let <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#author-email"><var>author email</var></a> be the         value of the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#email"><code>email</code></a> attribute.</li>
</ol>
</dd>
<dt>A <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-license-element"><code>license</code></a> element</dt>
<dd>If this is not the first <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-license-element"><code>license</code></a> element, then this element and  its child nodes are  <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#in-error">in error</a> and <em class="ct">must</em> be <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#ignored">ignored</a>.</p>
</dd>
<dd>If this is the first <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-license-element"><code>license</code></a> element used, then</p>
<ol>
<li>Let <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#widget-license"><var>widget      license</var></a> be the result of applying the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#rules-for-getting-text-content-0">rules for getting text content</a> to this element.</li>
<li>If the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#href-0"><code>href</code></a> attribute is used, and it is a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#valid-uri">valid uri</a>, then        let <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#widget-license-href"><var>widget license href</var></a> be the value of the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#href-0"><code>href</code></a> attribute. However, if the attribute is <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#in-error">in error</a> then it <em class="ct">must</em> be <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#ignored">ignored</a>.</li>
</ol>
</dd>
<dt>An <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-icon-element"><code>icon</code></a> element</dt>
<dd>If the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#file">file</a> identified by the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#src-0"><code>src</code></a> attribute is missing, or not a valid path, or corrupt, or is an unsupported MIME type, or already exists in the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#icons"><var> icons</var></a> list, then this element is in error and <em class="ct">must</em> be <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#ignored">ignored</a>. Otherwise:</p>
<ol>
<li>If the a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#src-0"><code>src</code></a> attribute  is a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#valid-path">valid path</a> that points to a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#file">file</a>, apply the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#rules-for-identifying-the-mime-type-of-an-image-0">rules for identifying the MIME type of an image</a>. If the MIME type is <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#supported">supported</a>, then add the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#file-entry">file entry</a> identified by the value of     the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#src-0"><code>src</code></a> attribute to the list of <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#icons"><var> icons</var></a>.</li>
<li>If the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#height-0"><code>height</code></a> attribute is used, apply the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#rules-for-parsing-a-non-negative-integer-0">rules for parsing a     non-negative integer</a> to its value. If the value is not <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#in-error">in error</a> and     greater than <code>0</code>, make the value of the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#height-0"><code>height</code></a> attribute a property of this file entry.</li>
<li>If the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#width-0"><code>width</code></a> attribute is used, apply the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#rules-for-parsing-a-non-negative-integer-0">rules for parsing a     non-negative integer</a> to its value. If the value is not <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#in-error">in error</a> and     greater than <code>0</code>,  make the  value of the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#width-0"><code>width</code></a> attribute  a property of this file entry.</li>
</ol>
</dd>
<dt>A <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-content-element"><code>content</code></a> element</dt>
<dd>If this is not the first <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-content-element"><code>content</code></a> element, then this element and  its child nodes are  <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#in-error">in error</a> and <em class="ct">must</em> be <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#ignored">ignored</a>.</p>
</dd>
<dd>If this is the first <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-content-element"><code>content</code></a> element and it has a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#src-0"><code>src</code></a> attribute that is a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#valid-path">valid path</a> that points to a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#file">file</a>, then check if the file is <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#supported">supported</a> by the widget user agent by applying the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#rules-for-identifying-the-mime-type-of-a-file-0">rules for identifying the MIME type of a file</a>. If the file is <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#supported">supported</a>, let the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#widget-start-file"><var>widget start file</var></a> be the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#file-entry">file entry</a> referenced by the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#src-0"><code>src</code></a> attribute. If the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#src-0"><code>src</code></a> attribute is missing, or <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#in-error">in error</a>, then a widget user agent <em class="ct">must</em> treat the widget resource as an <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#invalid-widget">invalid widget</a>.</p>
</dd>
<dd>If the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#type-0"><code>type</code></a> attribute is used and there is a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#correct">correct</a> <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#src-0"><code>src</code></a> attribute, and it is a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#valid-mime-type">valid MIME type</a> that is <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#supported">supported</a>, then let the <var>start file content-type</var> be the value of the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#type-0"><code>type</code></a> attribute. If the MIME type is invalid, or unsupported by the widget user agent, then a widget user agent <em class="ct">must</em> treat the widget resource as an <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#invalid-widget">invalid widget</a>. Otherwise, the attribute is <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#in-error">in error</a> and  <em class="ct">must</em> be <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#ignored">ignored</a>.</p>
</dd>
<dd>If the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#charset-0"><code>charset</code></a> attribute is used and there is a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#correct">correct</a> <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#src-0"><code>src</code></a> attribute, and it is an encoding that is <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#supported">supported</a> by the widget user agent, then let the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#start-file-encoding"><var>start file encoding</var></a> be the value of the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#charset-0"><code>charset</code></a> attribute. If the encoding is invalid, or unsupported by the widget user agent, then a widget user agent <em class="ct">may</em> use the default encoding (UTF-8) or treat the widget as an <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#invalid-widget">invalid widget</a>. Otherwise, the attribute is <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#in-error">in error</a> and <em class="ct">must</em> be <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#ignored">ignored</a>.</p>
</dd>
<dt>A <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#feature"><code>feature</code></a> element</dt>
<dd>If the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#name"><code>name</code></a> attribute is not a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#valid-uri">valid URI</a>, then this element is <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#in-error">in error</a> and <em class="ct">must</em> be <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#ignored">ignored</a>.</p>
</dd>
<dd>If the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#name"><code>name</code></a> attribute is a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#valid-uri">valid URI</a>, then normalize the value of the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#name"><code>name</code></a> attribute using  <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#uri">[URI]</a> normalization. If upon <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#uri">[URI]</a> normalization the feature identified by the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#name"><code>name</code></a> attribute is <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#supported">supported</a> by the widget user agent, then add  the normalized value of the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#name"><code>name</code></a> attribute to the list of  <var>features</var>. Otherwise, the attribute is <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#in-error">in error</a> and the element <em class="ct">must</em> be <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#ignored">ignored</a>.</p>
</dd>
<dt>An <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-access-element"><code>access</code></a> element</dt>
<dd>If this is not the first <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-access-element"><code>access</code></a> element, then this element and  its child nodes are  <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#in-error">in error</a> and <em class="ct">must</em> be <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#ignored">ignored</a>.</p>
</dd>
<dd>If this is the first <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-access-element"><code>access</code></a> element and if the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#network"><code>network</code></a> attribute is used, and it is a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#valid-boolean-value">valid boolean value</a>, then let <var>allow network</var> be the value of the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#network"><code>network</code></a> attribute. Otherwise, the attribute is <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#in-error">in error</a> and <em class="ct">must</em> be <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#ignored">ignored</a>.</p>
</dd>
<dd>If this is the first <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-access-element"><code>access</code></a> element and if the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#plugins"><code>plugins</code></a> attribute is used, and it is a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#valid-boolean-value">valid boolean value</a>, then let <var>allow plugins</var> be the value of the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#plugins"><code>plugins</code></a> attribute. Otherwise, the attribute is <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#in-error">in error</a> and <em class="ct">must</em> be <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#ignored">ignored</a>.</p>
</dd>
<dt>An <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-update-element"><code>update</code></a> element</dt>
<dd>If this is not the first <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-update-element"><code>update</code></a> element, then this element and  its child nodes are  <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#in-error">in error</a> and <em class="ct">must</em> be <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#ignored">ignored</a>.</p>
</dd>
<dd>If this is the first <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-update-element"><code>update</code></a> element used and the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#href-0"><code>href</code></a> attribute is used, and it is a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#valid-uri">valid uri</a>, then      let <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#update-href"><var>update href</var></a> be the value of the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#href-0"><code>href</code></a> attribute.</p>
</dd>
<dt>A <code>Comment</code> node, or a <code>ProcessingInstruction</code> node, or a <code>Text</code> node that only contains <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#space-characters">space characters</a>, or a <code>CDATASection</code> node that only contains <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#space-characters">space characters</a>, or anything else:</dt>
<dd>This is <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#in-error">in error</a> and <em class="ct">must</em> be <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#ignored">ignored</a>.</p>
</dd>
</dl>
</li>
<li>Once all the elements have been processed go to <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#step-9-locate-the-start-file">step 9</a>.</li>
</ol>
<h4 id="rules-for-getting-text-content" class="no-toc no-num">Rules for Getting Text Content</h4>
<p>The <dfn id="rules-for-getting-text-content-0">rules for getting text content</dfn> are  given in   the following algorithm. The algorithm always returns a string, which <em class="ct">may</em> be empty.</p>
<p>Let <var>input</var> be the element to be processed.</p>
<ol>
<li>Let <var>result</var> be an empty string.</li>
<li>If the widget user agents supports <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#its">[ITS]</a>:
<ol type="a">
<li>If the element has the <code>dir</code> attribute from the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#its">[ITS]</a> namespace with a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#valid-its:dir-value">valid <code>its:dir</code> value</a>, then process its text nodes in accordance to the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#its">[ITS]</a> specification.</li>
</ol>
</li>
<li>Ignoring any <code>Text</code> nodes that only contain <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#space-characters">space characters</a>,     or <code>CDATASection</code> nodes that only contain <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#space-characters">space characters</a>, let     <var>result</var> be the concatenation of the <var>input</var>&#8217;s <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#text-node">text node</a>s, in     <a href="http://www.w3.org/TR/DOM-Level-3-Core/glossary.html#dt-document-order">document     order</a>, as a string:
<ol type="a">
<li>If the node is an element that contains any <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#text-node">Text node</a>s, recursively         apply the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#rules-for-getting-text-content-0">rules for getting text content</a> to that element and concatenate the       returned value to <var>result</var>.</li>
</ol>
</li>
<li>While <var>position</var> doesn&#8217;t point past the end of <var>input</var>, append <var>character</var> to the end of <var>result</var> and let <var>position</var> become the character in <var>input</var>.</li>
<li>Return <var>result</var>.</li>
</ol>
<div class="example">
<p>Generally speaking, the processing model described in this section involves walking through an element&#8217;s children and concatenating all the <code>Text</code> and <code>CDATASection</code> nodes into a single string. This is more or less equivalent to invoking <code><a href="http://www.w3.org/TR/DOM-Level-3-Core/java-binding.html#org.w3c.dom.Node">getTextContent()</a></code> DOM3 Java interface on an element (part of the <code>Node</code> interface). Subsequent instances of a correct element will be ignored.</p>
<p>For example, the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-author-element"><code>author</code></a> and <code>blink</code> elements would be ignored, but their <code>Text</code> nodes would be extracted. The resulting <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#widget-name"><var>widget name</var></a> would be &#8220;<samp>The Awesome Super Dude Widget</samp>&#8221; (carriage returns removed for legibility):</p>
<pre><code>&lt;widget xmlns="http://www.w3.org/ns/widgets"&gt;
   &lt;name&gt;
     The &lt;blink&gt;Awesome&lt;/blink&gt;
     &lt;author email="dude@example.com"&gt;Super &lt;blink&gt;Dude&lt;/blink&gt;&lt;/author&gt;
     Widget&lt;/name&gt;
&lt;/widget&gt;</code></pre>
</div>
<h4 id="rules-for-parsing-a-non-negative-integer" class="no-toc no-num">Rules for Parsing a Non-negative Integer</h4>
<p>The <dfn id="rules-for-parsing-a-non-negative-integer-0">rules for parsing a non-negative integer</dfn> are as given in the following algorithm. When invoked, the steps <em class="ct">must</em> be followed in the order given, aborting at the first step that returns a value. This algorithm will either return zero, a positive integer, or an error. Leading spaces are <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#ignored">ignored</a>. Trailing spaces and any trailing garbage characters are ignored.</p>
<ol>
<li>Let <var>input</var> be the string being parsed.</li>
<li>Let <var>result</var> have the value <code>0</code>.</li>
<li>Let <var>input</var> be the result of applying the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#rules-for-removing-whitespace-0">rules for removing whitespace</a> on <var>input</var>.</li>
<li>If the length of <var>input</var> is <code>0</code>, return an error.</li>
<li>Let <var>position</var> be a pointer into <var>input</var>, initially pointing at the start of the string.</li>
<p><!-- XXX --></p>
<li>Let <var>nextchar</var> be the character in <var>input</var> at <var>position</var>.</li>
<li>If the <var>nextchar</var> is not one of U+0030 (<code>0</code>) .. U+0039 (<code>9</code>), then return an error.</li>
<p><!-- Ok. At this point we know we have a number. It might have                            trailing garbage which we'll ignore, but it's a number, and we                            won't return an error. --></p>
<li>If the <var>nextchar</var> is one of U+0030 (<code>0</code>) .. U+0039 (<code>9</code>):
<ol type="a">
<li>Multiply <var>result</var> by ten.</li>
<li>Add the value of the <var>nextchar</var> to <var>result</var>.</li>
<li>Increment <var>position</var>.</li>
<li>If <var>position</var> is not past the end of <var>input</var>, go to step 6.</li>
</ol>
</li>
<li>Return <var>result</var>.</li>
</ol>
<h4 id="rules-for-removing-whitespace" class="no-toc no-num">Rules for Removing Whitespace</h4>
<p>The <dfn id="rules-for-removing-whitespace-0">rules for removing whitespace</dfn> are as given in the following algorithm. As with the previous algorithms, when this one is invoked, the steps <em class="ct">must</em> be followed in the order given, aborting at the first step that returns a value. This algorithm returns a string with all <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#space-characters">space characters</a> removed.</p>
<ol>
<li>Let <var>input</var> be the string to be parsed.</li>
<li>Let <var>result</var> be the empty string.</li>
<li>While <var>position</var> doesn&#8217;t point past the end of <var>input</var> and the <var>character</var> at <var>position</var> is not one of the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#space-characters">space characters</a>, append <var>character</var> to the end of <var>result</var> and let <var>position</var> become the character in <var>input</var>.</li>
<li>Return <var>result</var>.</li>
</ol>
<h4 id="rules-for-identifying-the-mime-type-of-an-image" class="no-toc no-num">Rules for Identifying the MIME type of an Image</h4>
<p>The <dfn id="rules-for-identifying-the-mime-type-of-an-image-0">rules for identifying the MIME type of an image</dfn> are given by the following algorithm. Widget user agents are <em class="ct">required</em> to support the MIME types given in the table below, except for image/svg+xml, which is <code>optional</code>.</p>
<ol>
<li>If the file entry has a file extension, attempt to match the file extension to one in the first column in the image identification table. If there is a match, then return the MIME Type value and terminate this algorithm.</li>
<li>If the file entry  has no file extension, if the first bytes of the decompressed file entry&#8217;s data field matches one of the   byte sequences in the bytes in hexadecimal column of the following table, then return the   MIME type in the corresponding cell in the second column on the same row. Otherwise,   return <code>unknown/unknown</code>.</li>
</ol>
<table border="1">
<caption> <dfn id="image-identification-table">Image identification table</dfn> </caption>
<thead>
<tr>
<th>file extension</th>
<th>Magic Number</th>
<th>MIME type</th>
<th>Comment <!-- update the table above if you change this! --></th>
<th>Defined by</th>
</tr>
</thead>
<tbody>
<tr>
<td>gif</td>
<td>47 49 46 38 37 61</td>
<td>image/gif</td>
<td>The string &#8220;<code>GIF87a</code>&#8220;, a GIF signature.</td>
<td><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#gif87">[GIF87]</a></td>
</tr>
<tr>
<td>gif</td>
<td>47 49 46 38 39 61</td>
<td>image/gif</td>
<td>The string &#8220;<code>GIF89a</code>&#8220;, a GIF signature.</td>
<td><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#gif89">[GIF89]</a></td>
</tr>
<tr>
<td>png</td>
<td>89 50 4E 47 0D 0A 1A 0A</td>
<td>image/png</td>
<td>The PNG signature.</td>
<td><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#png">[PNG]</a></td>
</tr>
<tr>
<td>ico</td>
<td>00 00 01 00</td>
<td>image/vnd.microsoft.icon</td>
<td>A 0 word following by a 1 word, a Windows Icon file format signature.</td>
<td><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#ico">[ICO]</a></td>
</tr>
<tr>
<td>svg</td>
<td></td>
<td>image/svg+xml</td>
<td>Widget user agents that support SVG should parse files in accordance to the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#svgtiny">[SVGTiny]</a> specification.</td>
<td><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#svgtiny">[SVGTiny]</a></td>
</tr>
</tbody>
</table>
<h4 id="rules-for-identifying-the-mime-type-of-a-file" class="no-toc no-num">Rules for Identifying the MIME Type of a file</h4>
<p>The <dfn id="rules-for-identifying-the-mime-type-of-a-file-0">rules for identifying the MIME type of a file</dfn> are given by the following algorithm. Widget user agents are <em class="ct">required</em> to support the MIME types given in the table below.</p>
<ol>
<li> If the file entry  has a file extension, attempt to match the file extension to one in the first column in the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#file-identification-table">file identification table</a>. If there is a match, then return the MIME Type value.</li>
<li>If there is no file extension, the MIME type of a file can be sniffed by using the rules set forth in <span>[HTML5]</span>&#8217;s section on <a href="http://www.w3.org/html/wg/html5/#content-type-sniffing%20">determining the type of a       resource</a>. To reduce the risk of exposing the end-user to malicious attacks, those   rules <em class="ct">must</em> be followed by a widget user agents exactly as specified in <span>[HTML5]</span>.</li>
</ol>
<table border="1">
<caption><dfn id="file-identification-table">file identification table</dfn></caption>
<tbody>
<tr>
<th scope="col">File Extensions</th>
<th scope="col">MIME Type</th>
<th scope="col">Defined by</th>
</tr>
<tr>
<td>html, htm</td>
<td>text/html</td>
<td><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#html4">[HTML4]</a></td>
</tr>
<tr>
<td>css</td>
<td>text/css</td>
<td><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#css21">[CSS21]</a></td>
</tr>
<tr>
<td>js</td>
<td>application/javascript</td>
<td><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#ecmascript">[ECMAScript]</a></td>
</tr>
<tr>
<td>xml</td>
<td>application/xml</td>
<td><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#xml">[XML]</a></td>
</tr>
<tr>
<td>txt</td>
<td>text/plain</td>
<td></td>
</tr>
<tr>
<td>wav, wave</td>
<td>audio/x-wav</td>
<td></td>
</tr>
</tbody>
</table>
<h3 id="step-9-locate-the-start-file" class="no-num"><dfn>Step 9</dfn> - <dfn>Locate the Start File</dfn></h3>
<p class="no-num">This step involves finding and verifying the start file.</p>
<ol>
<li>If the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#widget-start-file"><var>widget start file</var></a> is not <code>null</code>, terminate this algorithm and go to <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#step-10-locate-the-default-icons-and-thumbnail">step 10</a>.</li>
<li>If the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#widget-start-file"><var>widget start file</var></a> is <code>null</code>, then try to find one of the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#default-start-files">default     start files</a> in the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#base-folder-0">base folder</a>.</li>
<li>If none is found, and the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#base-folder-0"><var>base folder</var></a> is not the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#root-of-the-widget">root of the widget</a>, attempt to     find one of the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#default-start-files">default start files</a> at the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#root-of-the-widget">root of the widget</a>. If none are found, then     treat this widget resource as an <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#invalid-widget">invalid widget</a>.</li>
<li>If one of the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#default-start-files">default start files</a> is     found, let the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#widget-start-file"><var>widget start file</var></a> be the file entry of that default start file.</li>
<li>If the start file is not <code>null</code>, check that it is a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#correct">correct</a> file of a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#supported">supported</a> MIME Type.</li>
</ol>
<h3 id="step-10-locate-the-default-icons-and-thumbnail" class="no-num"><dfn>Step 10</dfn> - Locate the default icons and thumbnail</h3>
<p>A widget user agent <em class="ct">must</em> search for an icon&#8217;s file name based on the order they appear in the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#default-icons-0">default icons</a> table (from top to bottom).</p>
<ol>
<li>Search for any of the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#default-icons-0">default icons</a> that reside in the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#base-folder-0"><var>base folder</var></a>.</li>
<li>If the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#base-folder-0"><var>base folder</var></a> is not the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#root-of-the-widget">root of the widget</a>, attempt to     find <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#default-icons-0">default icons</a> at the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#root-of-the-widget">root of the widget</a>.</li>
<li>For each <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#default-icon"><var>default icon</var></a> found, if the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#default-icon"><var>default icon</var></a> file entry does not exist in the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#icons"><var> icons</var></a> list,  then add the file entry to the list of <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#icons"><var> icons</var></a>.</li>
</ol>
<p>A widget user agent <em class="ct">must</em> search for a thumbnail&#8217;s file name based on the order they appear in the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#default-thumbnails">default thumbnails</a> table (from top to bottom).</p>
<ol>
<li>Search for any of the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#default-thumbnails">default thumbnails</a> that reside in the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#base-folder-0"><var>base folder</var></a>.</li>
<li>If the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#base-folder-0"><var>base folder</var></a> is not the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#root-of-the-widget">root of the widget</a>, attempt to     find <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#default-thumbnails">default thumbnails</a> at the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#root-of-the-widget">root of the widget</a>.</li>
<li>If the filename field of a file entry matches one of the file name&#8217;s from the  <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#default-thumbnails">default thumbnails</a> table, then let <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#widget-thumbnail"><var>widget thumbnail</var></a> be the matching file entry.</li>
</ol>
<p><!--</p>
<h2>Displaying Icons</h2>
<p>A <dfn>rendering context</dfn> is a visual context on which graphical objects are rendered.</p>
<p>From the list of <var>icons</var>, select the icon that most closely fits the visual dimensions of the rendering context in CSS pixels. If the dimensions of the rendering context changes, then the widget user agent <i class="ct">should</i> attempt to find an icon from the list of <var>icons</var> that more accurately fits the new dimensions of the display context.</p>
<p>Widget user agents <i class="ct">may</i> proportionally scale icons to fit the dimensions of a display context in which the icon   is to be displayed. Widget user agents <i class="ct">must not</i> disproportionately scale icons to fit   a rendering context.</p>
<p>&#8211;></p>
<h2 id="appendix" class="no-num">Appendix</h2>
<h3 id="embedding-a-widget-resource-into-an-html-document" class="no-num">Embedding a Widget Resource into an HTML Document</h3>
<p><em>This section is non-normative.</em></p>
<p><em>This section only applies to HTML user agents <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#html4">[HTML4]</a> <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#xhtml">[XHTML]</a>.</em></p>
<p><dfn id="auto-discovery">Auto-discovery</dfn> enables a user agent to identify and install a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#widget-resource">widget resource</a> that is associated with an HTML page. When a page points to a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#widget-resource">widget resource</a>, user agents <em class="ct">should</em> expose the presence of the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#widget-resource">widget resource</a> to the end-user and allow the end-user to install the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#the-widget-element">widget</a>.</p>
<p><!-- xxx need to define "install the widget" -->The link type &#8220;<code>widget</code>&#8221; indicates that a link of this type references a document that is a <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#widget-resource">widget resource</a>. In HTML, it <em class="ct">may</em> be specified for the <code>a</code>, <code>area</code> and <code>link</code> elements to create a hyperlink.</p>
<div class="example">
<p>For example:</p>
<pre><code>&lt;a rel="widget"
   href="http://example.org/exampleWidget"&gt;The Example Widget&lt;/a&gt;</code></pre>
</div>
<h3 id="relaxng-schema-for-the-configuration-document" class="no-num"><dfn>RelaxNG Schema for the Configuration Document</dfn></h3>
<p><em>This section is non-normative. </em></p>
<p class="issue"><strong>This schema may be out of date, we only update it prior to publication.</strong> You can get the latest draft from <a href="http://hasather.net/widgets/widgets.rnc">http://hasather.net/widgets/widgets.rnc</a>.</p>
<p>The following is the RelaxNG schema representation of the elements and attributes of the <a href="http://www.w3.org/TR/2008/WD-widgets-20081222/#configuration-document-0">configuration document</a>. Products that check the conformance of widget resources or configuration documents can use this schema to validate configuration documents.</p>
<pre><code># Widgets 1.0 (Working Draft) RELAX NG schema
# Latest draft at http://hasather.net/widgets/widgets.rnc
default namespace widgets = "http://www.w3.org/ns/widgets"
namespace its = "http://www.w3.org/2005/11/its"
namespace local = ""

start = elem.widget

elem.widget = element widget {
  attr.xmllang?,
  attribute id { xsd:anyURI }?,
  attribute version { text }?,
  attribute height { data.positiveNumber }?,
  attribute width { data.positiveNumber }?,
  attribute mode { "application" | "fullscreen" | "floating" | "docked" }?,
  ( elem.name?
  &amp; elem.description?
  &amp; elem.icon*
  &amp; elem.access?
  &amp; elem.author?
  &amp; elem.license?
  &amp; elem.content?
  &amp; elem.update?
  &amp; elem.feature*
  &amp; extension )
}

elem.name = element name {
  attr.xmllang?,
  attr.itsdir?,
  extension
}

elem.description = element description {
  attr.xmllang?,
  attr.itsdir?,
  extension
}

elem.icon = element icon {
  attr.allowed*,
  attribute src { xsd:anyURI },
  attribute height { data.positiveNumber }?,
  attribute width { data.positiveNumber }?,
  empty
}

elem.access = element access {
  attr.allowed*,
  attribute network { data.boolean }?,
  attribute plugins { data.boolean }?,
  attribute files { data.boolean }?,
  empty
}

elem.author = element author {
  attr.xmllang?,
  attr.itsdir?,
  attribute href { xsd:anyURI }?,
  attribute email { xsd:string { pattern=".+@.+" } }?,
  extension
}

elem.license = element license {
  attr.xmllang?,
  attr.itsdir?,
  attribute href { xsd:anyURI }?,
  extension
}

elem.content = element content {
  attr.allowed*,
  attribute src { xsd:anyURI },
  attribute type { text }?,
  attribute charset { text }?,
  empty
}

elem.update = element update {
  attr.allowed*,
  attribute href { xsd:anyURI }?,
  empty
}

elem.feature = element feature {
  attribute name { xsd:anyURI },
  attribute required { data.boolean }?,
  ( elem.feature?
  &amp; extension )
}

extension = ( attr.allowed | anyElement )*
anyElement = ( element * - widgets:* { any } | text )*
any = ( attribute * { text } | anyElement )*

attr.allowed = attribute * - (local:* | xml:lang | its:dir) { text }
attr.xmllang = attribute xml:lang { xsd:language }
attr.itsdir = attribute its:dir { "ltr" | "rtl" | "lro" | "rlo" }

data.positiveNumber = xsd:string { pattern="[1-9]d*" }
data.boolean = ( string "true" | string "false" )</code></pre>
<h2 id="acknowledgements" class="no-num">Acknowledgements</h2>
<p>Special thanks go to Arve Bersvendsen, Anne van Kesteren and Charles McCathieNevile who helped edit the initial version of this specification.</p>
<p>Special thanks also to David Håsäther for creating and maintaining the RelaxNG Schema for the configuration   document.</p>
<p>A huge thanks to Bárbara Barbosa Neves for her patience and for doing last minute proof-reads in the dead of night.</p>
<p>Parts of this document reproduce text and behavior from the <a href="http://www.w3.org/TR/html5/">HTML5</a> specification and from the <a href="http://www.w3.org/TR/xbl/">XBL 2.0 specification</a> (as permitted by both specifications by their copyright statements).</p>
<p>Graphic icons used some examples of this specification were created by <a href="http://www.pinvoke.com/">Yusuke Kamiyamane</a> and are available for use under a <a href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 license</a>.</p>
<p>The editor would also like to thank the following people for their contributions to this specification:</p>
<ul>
<li>Addison Phillips</li>
<li>Alexander Dreiling</li>
<li>Arun Ranganathan</li>
<li>Arthur Barstow</li>
<li>Brian Wilson</li>
<li>Bjoern Hoehrmann</li>
<li>Benoit Suzanne</li>
<li>Bert Bos</li>
<li>Bradford Lassey</li>
<li>Cameron McCormack</li>
<li>Cliff Schmidt</li>
<li>Claudio Venezia</li>
<li>Coach Wei</li>
<li>Corin Edwards</li>
<li>Dan Brickley</li>
<li>David Clarke</li>
<li>Dean Jackson</li>
<li>David Pollington</li>
<li>Doug Schepers</li>
<li>Ed Voas</li>
<li>Felix Sasaki</li>
<li>Gautam Chandna</li>
<li>Geir Pedersen</li>
<li>Gene Vayngrib</li>
<li>Gorm Haug Eriksen</li>
<li>Guido Grassel</li>
<li>Ian Hickson</li>
<li>Jay Sweeney</li>
<li>Jere Kapyaho</li>
<li>Jim Ley</li>
<li>Jon Ferraiolo</li>
<li>Jose Manuel Cantera Fonseca</li>
<li>Jouni Hakala</li>
<li>Joey Bacalhau</li>
<li>Kevin Lawver</li>
<li>Krzysztof Maczyński</li>
<li>Lachlan Hunt</li>
<li>Marc Silbey</li>
<li>Mark Baker</li>
<li>Mikko Pohja</li>
<li>Mohamed Zergaoui</li>
<li>Olli Immonen</li>
<li>Philipp Heltewig</li>
<li>Philip Taylor</li>
<li>Stephen Paul Weber</li>
<li>Tex Texin</li>
<li>Thomas Landspurg</li>
<li>Yang Wong</li>
<li>Zachary Fitz-Walter</li>
</ul>
<h2 id="normative-references" class="no-num">Normative References</h2>
<dl>
<dt><dfn id="abnf">[ABNF]</dfn></dt>
<dd>RFC 5234, <a href="http://www.ietf.org/rfc/rfc5234.txt"><cite>Augmented BNF                  for Syntax Specifications: <abbr title="Augmented                 Backus-Naur Form">ABNF</abbr></cite></a>. D. Crocker  and P. Overell.    January 2008.</dd>
<dt><dfn id="bcp47">[BCP47]</dfn></dt>
<dd><abbr title="Best Current Practice">BCP</abbr> 47, <a href="http://www.rfc-editor.org/rfc/bcp/bcp47.txt"><cite>Tags for                  the Identification of Languages</cite></a>.   A. Phillips (Ed.) and M. Davis (Ed.). September 2006.</dd>
<dt><dfn id="cp437">[CP437]</dfn></dt>
<dd>IBM CPGID 00437.                 <a href="ftp://ftp.software.ibm.com/software/globalization/gcoc/attachments/CP00437.txt">ftp://ftp.software.ibm.com/software/globalization/gcoc/attachments/CP00437.txt</a></dd>
<dt><dfn id="css21">[CSS21]</dfn></dt>
<dd><cite><a href="http://www.w3.org/TR/CSS21/">Cascading Style Sheets,                 level 2 revision 1; CSS 2.1 Specification</a></cite>. Bert Bos, Ian                 Hickson, Tantek Çelik, Håkon Wium Lie. W3C, April 2006.</dd>
<dt><dfn id="deflate">[Deflate]</dfn></dt>
<dd><a href="http://www.faqs.org/rfcs/rfc1951.html">DEFLATE Compressed                 Data Format Specification version 1.3</a>, P. Deutsch, The Internet   Society, May 1996.</dd>
<dt><dfn id="dom3core">[DOM3Core]</dfn></dt>
<dd><a href="http://www.w3.org/TR/DOM-Level-3-Core">Document Object Model                 (DOM) Level 3 Core Specification</a>, A. Le Hors, P. Le Hégaret, L. Wood,                 G. Nicol, J. Robie, M. Champion, S. Byrne, editors. World Wide Web   Consortium, April 2004.</dd>
<dd></dd>
<dt><dfn id="ecmascript">[ECMAScript]</dfn></dt>
<dd><cite><a href="http://www.ecma-international.org/publications/standards/Ecma-262.htm">ECMAScript               Language Specification</a></cite>, Third Edition. ECMA, December 1999.</dd>
<dt><dfn id="html4">[HTML4]</dfn></dt>
<dd><cite><a href="http://www.w3.org/TR/1999/REC-html401-19991224">HTML               4.01 Specification</a></cite>, D. Raggett, A. Le Hors, I. Jacobs, 24               December 1999. <a href="http://www.w3.org/TR/html401">Latest version</a> available at: http://www.w3.org/TR/html401</dd>
<dt><dfn id="gif87">[GIF87]</dfn></dt>
<dd><a href="http://www.w3.org/Graphics/GIF/spec-gif87.txt"><cite>Graphics                Interchange Format</cite></a>. CompuServe Incorporated, June 15, 1987.</dd>
<dt><dfn id="gif89">[GIF89]</dfn></dt>
<dd><a href="http://www.martinreddy.net/gfx/2d/GIF89a.txt">Graphics                Interchange Format (sm)</a>. CompuServe Incorporated, 1990.</dd>
<dt><dfn id="ico">[ICO]</dfn></dt>
<dd><a href="http://www.iana.org/assignments/media-types/image/vnd.microsoft.icon">Vendor               Tree - vnd.microsoft.icon</a>. S Butcher. 3 September, 2003. IANA Media               Type Assignment. <a href="http://www.iana.org/assignments/media-types/image/vnd.microsoft.icon">http://www.iana.org/assignments/media-types/image/vnd.microsoft.icon</a></dd>
<dt><dfn id="its">[ITS]</dfn></dt>
<dd><a href="http://www.w3.org/TR/2007/REC-its-20070403/">Internationalization               Tag Set (ITS) Version 1.0</a>, C. Lieske and F. Sasaki, W3C               Recommendation 03 April 2007. Available at <a href="http://www.w3.org/TR/2007/REC-its-20070403/">http://www.w3.org/TR/2007/REC-its-20070403/</a></dd>
<dt></dt>
<dt><dfn id="jpeg">[JPEG]</dfn></dt>
<dd>ISO/IEC 10918. Information Technology Digital Compression And Coding               Of Continuous-tone Still Images International Organization for               Standardization (ISO).</dd>
<dt><dfn id="http">[HTTP]</dfn></dt>
<dd>RFC 2616, <a href="http://www.ietf.org/rfc/rfc2616.txt"><cite>Hypertext Transfer                Protocol &#8212; HTTP/1.1</cite></a>. R. Fielding, et al. June 1999.</dd>
<dt><dfn id="mime2"></dfn></dt>
<dt>[HTML5]</dt>
<dd><cite><a href="http://www.w3.org/html/wg/html5/">HTML 5</a></cite> (work in               progress), I. Hickson, D. Hyatt, editors. W3C, 2008.</dd>
<dt><dfn id="iana-charsets">[IANA-Charsets]</dfn></dt>
<dd>IANA Character Set Registry, <a href="http://www.iana.org/assignments/character-sets">http://www.iana.org/assignments/character-sets</a></dd>
<dt><dfn id="mime">[MIME]</dfn></dt>
<dd>RFC 2045, <a href="http://www.ietf.org/rfc/rfc2045.txt">Multipurpose Internet Mail                Extensions (MIME) Part One: Format of Internet Message Bodies</a>. N. Freed and               N. Borenstein. November 1996.</dd>
<dt><dfn id="png">[PNG]</dfn></dt>
<dd><a href="http://www.w3.org/TR/PNG/"><cite>Portable Network Graphics (PNG)                Specification (Second Edition)</cite></a>, David               Duce, ed., 10 November 2003.</dd>
<dt><dfn></dfn></dt>
<dt><dfn id="rfc2119">[RFC2119]</dfn></dt>
<dd><a href="http://www.ietf.org/rfc/rfc2119"><cite>Key words for use in                 RFCs to Indicate Requirement Levels</cite></a>, S. Bradner. March   1997.</dd>
<dt><dfn id="rfc2822">[RFC2822]</dfn></dt>
<dd><a href="http://www.faqs.org/rfcs/rfc2822.html">Internet Message   Format</a>. P. Resnick. April 2001.</dd>
<dt><dfn id="rfc3987">[RFC3987]</dfn></dt>
<dd>RFC 3987, <cite><a href="http://www.ietf.org/rfc/rfc3987">Internationalized                 Resource Identifiers (IRIs)</a></cite>. M. Duerst, M. Suignard.    January 2005.</dd>
<dt><dfn></dfn></dt>
<dt><dfn id="rfc2045">[RFC2045]</dfn></dt>
<dd>RFC2045, <a href="http://www.ietf.org/rfc/rfc2045.txt">Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies</a>, N. Freed. November 1996.</dd>
<dt><dfn id="rfc4647">[RFC4647]</dfn></dt>
<dd> RFC4647. <a href="http://www.rfc-editor.org/rfc/rfc4647.txt">Matching of Language Tags</a>, A. Phillips and M. Davis. September 2006.</dd>
<dt><dfn id="svgtiny">[SVGTiny]</dfn></dt>
<dd><a href="http://www.w3.org/TR/SVGMobile/"><cite>Mobile SVG Profiles:                SVG Tiny and SVG Basic</cite></a>. W3C Recommendation 14 January 2003.</dd>
<dt><dfn id="unicode">[Unicode]</dfn></dt>
<dd>The Unicode Consortium. The Unicode Standard, Version 5.0.0, defined by: The Unicode Standard, Version 5.0 (Boston, MA, Addison-Wesley, 2007. ISBN 0-321-48091-0). (See <a href="http://www.unicode.org/unicode/standard/versions">http://www.unicode.org/unicode/standard/versions</a> for the latest version and additional information on versions of the               standard and of the Unicode Character Database).</dd>
<dt><dfn id="uri">[URI]</dfn></dt>
<dd>RFC 3986, <a href="http://www.ietf.org/rfc/rfc3986.txt"><cite>Uniform Resource                Identifier (URI): Generic Syntax</cite></a>. T. Berners-Lee, R. Fielding and L. Masinter.               January 2005.</dd>
<dt><dfn></dfn></dt>
<dt><dfn id="utf-8">[UTF-8]</dfn></dt>
<dd>RFC 3629, <a href="http://www.ietf.org/rfc/rfc3629.txt"><cite>UTF-8, a transformation               format of ISO 10646</cite></a>, F. Yergeau. November 2003.</dd>
<dt><dfn id="widgets-apis">[Widgets-APIs]</dfn></dt>
<dd>Widgets 1.0: API&#8217;s and Events. A. Bersvendsen and M. Caceres.   Forthcoming.</dd>
<dt><dfn id="widgets-digsig">[Widgets-DigSig]</dfn></dt>
<dd><a href="http://www.w3.org/TR/widgets-digsig/">Widgets 1.0: Digital Signature</a>. M. Caceres, Ed. W3C, W3C Working Draft 14 April 2008.</dd>
<dt><dfn id="widgets-security">[Widgets-Security]</dfn></dt>
<dd>&#8230; forthcoming.</dd>
<dt><dfn id="widgets-updates">[Widgets-Updates]</dfn></dt>
<dd><a href="http://www.w3.org/TR/widgets-land/">Widgets 1.0: Updates</a>. M. Caceres. W3C Working Draft 7 October 2008.</dd>
<dt><dfn id="xml">[XML]</dfn></dt>
<dd><cite><a href="http://www.w3.org/TR/REC-xml/">Extensible Markup                 Language (XML) 1.0 (Third Edition)</a></cite>. T. Bray, J. Paoli, C. M.   Sperberg-McQueen, E. Maler, F. Yergeau. W3C, February 2004.</dd>
<dt> </dt>
<dt><dfn id="xmlhttprequest">[XMLHttpRequest]</dfn></dt>
<dd><a href="http://www.w3.org/TR/XMLHttpRequest/"><cite>The XMLHttpRequest                Object</cite></a>. A van Kesteren. W3C Working Draft 15 April 2008. (Work in progress)</dd>
<dt><dfn id="xmlns">[XMLNS]</dfn></dt>
<dd><a href="http://www.w3.org/TR/2006/REC-xml-names-20060816/"><cite>Namespaces in                     XML (Second Edition)</cite></a>, T. Bray, D. Hollander, A. Layman, R.                 Tobin. W3C, August 2006. The latest version of the Namespaces in XML   specification is available at <a href="http://www.w3.org/TR/REC-xml-names/">http://www.w3.org/TR/REC-xml-names/</a></dd>
<dt><dfn id="zip">[ZIP]</dfn></dt>
<dd><a href="http://www.pkware.com/documents/casestudies/APPNOTE.TXT"><cite>.ZIP File   Format Specification</cite></a> (Version 6.3.2, revised September 28, 2007). PKWare Inc.</dd>
</dl>
<h2 id="informative-references" class="no-num">Informative References</h2>
<dl>
<dt><dfn id="widgets-landscape">[Widgets-Landscape]</dfn></dt>
<dd><a href="http://www.w3.org/TR/widgets-land/">Widgets 1.0: The Widget     Landscape (Q1 2008)</a>. M. Caceres. W3C Working Draft. 14 April 2008.</dd>
<dt><dfn id="xml2"></dfn></dt>
<dt><dfn id="widgets-reqs">[Widgets-Reqs]</dfn></dt>
<dd><cite><a href="http://www.w3.org/TR/widgets-reqs/">Widgets 1.0     Requirements</a></cite>, M. Caceres, Ed. W3C, July 2007.</dd>
<dt><dfn id="widgets-test-suite">[Widgets-Test-Suite]</dfn></dt>
<dd>&#8230; forthcoming.</dd>
<dt><dfn id="xhtml">[XHTML]</dfn></dt>
<dd>&#8220;<cite><a href="http://www.w3.org/TR/2000/REC-xhtml1-20000126">XHTML     1.0: The Extensible HyperText Markup Language</a></cite>&#8220;, W3C     Recommendation, S. Pemberton <em>et al.</em>, 26     January 2000.<br />
Available at: http://www.w3.org/TR/2000/REC-xhtml1-20000126</dd>
</dl>
]]></content:encoded>
			<wfw:commentRss>http://cowworking.ru/?feed=rss2&amp;p=44</wfw:commentRss>
		</item>
		<item>
		<title>Виджеты: макетирование</title>
		<link>http://cowworking.ru/?p=41</link>
		<comments>http://cowworking.ru/?p=41#comments</comments>
		<pubDate>Sun, 12 Apr 2009 20:25:10 +0000</pubDate>
		<dc:creator>max</dc:creator>
		
		<category><![CDATA[Виджеты]]></category>

		<guid isPermaLink="false">http://cowworking.ru/?p=41</guid>
		<description><![CDATA[ 
Widgets 1.0: The Widget Landscape (Q1 2008)
W3C Working Draft 14 April 2008

This version:
http://www.w3.org/TR/2008/WD-widgets-land-20080414/
Latest version:
http://www.w3.org/TR/widgets-land/
Latest Editor&#8217;s Draft:
http://dev.w3.org/2006/waf/widgets-land/
Previous version:
none.
Version history:
Twitter messages (non-editorial changes only): http://twitter.com/widgetspecs (RSS)
Editor:
Marcos Caceres, Invited Expert


Copyright © 2008 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C liability, trademark and document use rules apply.


Abstract
This document surveys a group of market-leading widget user agents with [...]]]></description>
			<content:encoded><![CDATA[<div class="head"><!--begin-logo--><a href="http://www.w3.org/"><img src="http://www.w3.org/Icons/w3c_home" alt="W3C" width="72" height="48" /></a> <!--end-logo--></p>
<h1 id="widgets">Widgets 1.0: The Widget Landscape (Q1 2008)</h1>
<h2 id="editors" class="no-num no-toc">W3C Working Draft 14 April 2008</h2>
<dl>
<dt>This version:</dt>
<dd><a href="http://www.w3.org/TR/2008/WD-widgets-land-20080414/">http://www.w3.org/TR/2008/WD-widgets-land-20080414/</a></dd>
<dt>Latest version:</dt>
<dd><a href="http://www.w3.org/TR/widgets-land/">http://www.w3.org/TR/widgets-land/</a></dd>
<dt>Latest Editor&#8217;s Draft:</dt>
<dd><a href="http://dev.w3.org/2006/waf/widgets-land/">http://dev.w3.org/2006/waf/widgets-land/</a></dd>
<dt>Previous version:</dt>
<dd>none.</dd>
<dt>Version history:</dt>
<dd>Twitter messages (non-editorial changes only): <a href="http://twitter.com/widgetspecs">http://twitter.com/widgetspecs</a> (<a href="http://twitter.com/statuses/user_timeline/14349303.rss">RSS</a>)</dd>
<dt>Editor:</dt>
<dd><a href="http://datadriven.com.au/">Marcos Caceres</a>, Invited Expert</dd>
</dl>
<p><!--begin-copyright--></p>
<p class="copyright"><a rel="license" href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> © 2008 <a href="http://www.w3.org/"><acronym title="World Wide Web Consortium">W3C</acronym></a><sup>®</sup> (<a href="http://www.csail.mit.edu/"><acronym title="Massachusetts Institute of Technology">MIT</acronym></a>, <a href="http://www.ercim.org/"><acronym title="European Research Consortium for Informatics and Mathematics">ERCIM</acronym></a>, <a href="http://www.keio.ac.jp/">Keio</a>), All Rights Reserved. W3C <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>, <a href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a> and <a href="http://www.w3.org/Consortium/Legal/copyright-documents">document use</a> rules apply.</p>
<p><!--end-copyright--></div>
<hr />
<h2 id="abstract" class="no-toc no-num">Abstract</h2>
<p>This document surveys a group of market-leading widget user agents with the aim to inform the requirements of the <cite>Widgets 1.0: Requirements</cite> document. The survey exposes commonalities and fragmentation across widget user agents, and discusses how fragmentation currently affects, amongst other things, authoring, security, distribution and deployment, internationalisation and the device-independence of widgets. The document concludes by making a set of recommendations on what aspects of widgets require standardization to reduce fragmentation to ultimately standardize a cross-platform widget solution.</p>
<h2 id="sotd" class="no-num no-toc">Status of this Document</h2>
<p><em>This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the <a href="http://www.w3.org/TR/">W3C technical reports index</a> at http://www.w3.org/TR/.</em></p>
<p>This is the <a href="http://www.w3.org/2005/10/Process-20051014/tr.html#first-wd">W3C First Public Working Draft</a> of the <em>Widgets 1.0: Landscape</em>. Once all the comments about this document will have been addressed, the Working Group intends to publish a final version of this document as a <a href="http://www.w3.org/2005/10/Process-20051014/tr.html#q75">W3C Working Group Note</a>.</p>
<p>The W3C Membership and other interested parties are invited to send comments to <a href="mailto:public-appformats@w3.org">public-appformats@w3.org</a>, the W3C&#8217;s public email list for issues related to Web Application Formats. <a href="http://lists.w3.org/Archives/Public/public-appformats/">Archives</a> of the list are available.</p>
<p>This document is produced by the <a href="http://www.w3.org/2006/appformats/">Web Application Formats WG</a>, part of the <a href="http://www.w3.org/2006/rwc/Activity">Rich Web Clients Activity</a> in the W3C <a href="http://www.w3.org/Interaction/">Interaction Domain</a>. It is expected that this document will become a Working Group Note. Publication as a Working Draft does not imply endorsement by the W3C Membership. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.  <!-- Several Working Drafts for this Note were available for review; the material in this document was subject to a public last call. At the time of publication, the Working Group has no specific plans to further revise this document. --></p>
<p>This document was produced by a group operating under the <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5 February 2004 W3C Patent Policy</a>. W3C maintains a <a rel="disclosure" href="http://www.w3.org/2004/01/pp-impl/38483/status">public list of any patent disclosures</a> made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential">Essential Claim(s)</a> must disclose the information in accordance with <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">section 6 of the W3C Patent Policy</a>.</p>
<h2 id="table" class="no-toc no-num">Table of Contents</h2>
<p><!--begin-toc--></p>
<ul class="toc">
<li> <a href="http://www.w3.org/TR/widgets-land/#introduction"><span class="secno">1.</span> Introduction</a>
<ul class="toc">
<li><a href="http://www.w3.org/TR/widgets-land/#purpose"><span class="secno">1.1</span> Purpose</a></li>
</ul>
</li>
<li><a href="http://www.w3.org/TR/widgets-land/#terms"><span class="secno">2.</span> Terms</a></li>
<li> <a href="http://www.w3.org/TR/widgets-land/#widgets0"><span class="secno">3.</span> Widgets and Widget User Agents</a>
<ul class="toc">
<li><a href="http://www.w3.org/TR/widgets-land/#differences"><span class="secno">3.1</span> Differences from Web Widgets</a></li>
<li><a href="http://www.w3.org/TR/widgets-land/#differences0"><span class="secno">3.2</span> Differences from Java Applets</a></li>
</ul>
</li>
<li> <a href="http://www.w3.org/TR/widgets-land/#packaging"><span class="secno">4.</span> Packaging for Distribution and Deployment</a>
<ul class="toc">
<li><a href="http://www.w3.org/TR/widgets-land/#packaging0"><span class="secno">4.1</span> Packaging Formats, file extensions and Media Types</a></li>
</ul>
</li>
<li> <a href="http://www.w3.org/TR/widgets-land/#metadata"><span class="secno">5.</span> Metadata and Configuration</a>
<ul class="toc">
<li> <a href="http://www.w3.org/TR/widgets-land/#metadata0"><span class="secno">5.1</span> Metadata</a>
<ul class="toc">
<li><a href="http://www.w3.org/TR/widgets-land/#fragmentation"><span class="secno">5.1.1</span> Fragmentation Issues</a></li>
</ul>
</li>
</ul>
</li>
<li> <a href="http://www.w3.org/TR/widgets-land/#authoring"><span class="secno">6.</span> Authoring and Scripting</a>
<ul class="toc">
<li><a href="http://www.w3.org/TR/widgets-land/#apis"><span class="secno">6.1</span> APIs</a></li>
<li><a href="http://www.w3.org/TR/widgets-land/#widget"><span class="secno">6.2</span> Widget object: properties and events</a></li>
</ul>
</li>
<li><a href="http://www.w3.org/TR/widgets-land/#user-interface"><span class="secno">7.</span> User interface and Accessibility</a></li>
<li><a href="http://www.w3.org/TR/widgets-land/#instantiation"><span class="secno">8.</span> Instantiation</a></li>
<li><a href="http://www.w3.org/TR/widgets-land/#i18n"><span class="secno">9.</span> Internationalization and Localization</a></li>
<li><a href="http://www.w3.org/TR/widgets-land/#digital"><span class="secno">10.</span> Digital Signatures</a></li>
<li><a href="http://www.w3.org/TR/widgets-land/#automatic"><span class="secno">11.</span> Automatic Updates</a></li>
<li><a href="http://www.w3.org/TR/widgets-land/#device"><span class="secno">12.</span> Device Independence</a></li>
<li><a href="http://www.w3.org/TR/widgets-land/#security"><span class="secno">13.</span> Security Models</a></li>
<li><a href="http://www.w3.org/TR/widgets-land/#icons"><span class="secno">14.</span> Icons</a></li>
<li><a href="http://www.w3.org/TR/widgets-land/#standardizable"><span class="secno">15.</span> Standardizable Aspects of Widgets</a></li>
<li class="no-num"><a href="http://www.w3.org/TR/widgets-land/#acknowledgments">Acknowledgments</a></li>
<li class="no-num"> <a href="http://www.w3.org/TR/widgets-land/#references">References</a>
<ul class="toc">
<li class="no-num"><a href="http://www.w3.org/TR/widgets-land/#related">Related Sources</a></li>
</ul>
</li>
</ul>
<p><!--end-toc--></p>
<h2 id="introduction"><span class="secno">1.</span> Introduction</h2>
<p>This document surveys the widget landscape by examining how <a href="http://www.w3.org/TR/widgets-land/#market-leading">market-leading widget user agents</a> address issues around:</p>
<ul>
<li>distribution and deployment,</li>
<li>metadata and configuration,</li>
<li>user interface and accessibility,</li>
<li>authoring,</li>
<li>internationalization and localization,</li>
<li>device-independence,</li>
<li>Initialization,</li>
<li>automatic updates,</li>
<li>and security.</li>
</ul>
<p>The <span><dfn id="market-leading">market-leading widget user agents</dfn></span> that are included in the survey are listed below. The <a href="http://www.w3.org/TR/widgets-land/#widget2">widget user agent</a>s were subjectively chosen because of their perceived prevalence in the <span>market place. This survey was conducted independently of any vendor</span> and no vendor explicitly requested they be included in the survey.</p>
<table border="0" cellspacing="0">
<caption> Market-Leading Widget User Agents </caption>
<thead>
<tr>
<th>Widget User Agent</th>
<th>Vendor</th>
<th>Version</th>
<th>Platform</th>
</tr>
</thead>
<tfoot>
<tr>
<th>Widget User Agent</th>
<th>Vendor</th>
<th>Version</th>
<th>Platform</th>
</tr>
</tfoot>
<tbody>
<tr>
<td><dfn id="konfabulator">Konfabulator</dfn></td>
<td>Yahoo!</td>
<td>4.5</td>
<td>Windows XP, Windows Vista, MacOS</td>
</tr>
<tr>
<td><dfn id="windows">Windows Sidebar</dfn></td>
<td>Microsoft</td>
<td>1.0</td>
<td>Windows Vista</td>
</tr>
<tr>
<td><dfn id="google">Google Desktop Gadgets</dfn></td>
<td>Google</td>
<td>1.x</td>
<td>Windows XP, Windows Vista</td>
</tr>
<tr>
<td><dfn id="opera">Opera Widgets</dfn></td>
<td>Opera</td>
<td>9.5 Beta</td>
<td>Mac OS 10.5, Windows XP, Windows Vista</td>
</tr>
<tr>
<td><dfn id="dashboard">Dashboard</dfn></td>
<td>Apple</td>
<td>1.1</td>
<td>Mac OS 10.5</td>
</tr>
<tr>
<td><dfn id="web-runtime">Web-Runtime</dfn></td>
<td>Nokia</td>
<td>1.0 Beta</td>
<td>S60 3rd Edition, Feature Pack 2 (emulator)</td>
</tr>
<tr>
<td><dfn id="joost">Joost Widgets</dfn></td>
<td>Joost</td>
<td>1.0 Beta</td>
<td>Mac OS 10.5, Windows XP, Windows Vista</td>
</tr>
</tbody>
</table>
<p class="redNote"><strong>The inclusion of the widget user agents in this survey does not indicate endorsement of the standardization process by any particular vendor (in other words, just because a widget user agent appears should not be taken to mean that they will implement any part of the Widgets 1.0 specifications).</strong></p>
<h3 id="purpose"><span class="secno">1.1</span> Purpose</h3>
<p>The purpose of this document is to provide a holistic overview of the <dfn id="widget0">widget space</dfn> and provide information to aid in standardization process of widgets by the <a href="http://www.w3.org/2006/appformats/">Web Application Formats Working Group</a>. As such, this document provides:</p>
<ul>
<li>A consistent set of terms that can be used throughout the standardization process, including in specifications.</li>
<li>A definition of what constitutes a widget and a widget user agent for the sake of standardization (and what does not constitute a widget).</li>
<li>A discussion of what role various technologies play in the lifecycle of a widget.</li>
<li>Comparison matrices that clearly demonstrate fragmentation and interoperability across the widget landscape.</li>
<li>A list of standardizable aspects of widgets.</li>
</ul>
<h2 id="terms"><span class="secno">2.</span> Terms</h2>
<p>This section defines some of the key terms related to widgets.</p>
<dl>
<dt><dfn id="widget1">Widget</dfn>:</dt>
<dd>For the purpose of this standardization process, a widget is an end-user&#8217;s conceptualization of an interactive single purpose application for displaying and/or updating local data or data on the Web, packaged in a way to allow a single download and installation on a user&#8217;s machine or mobile device. A widget may run as a stand alone application (meaning it can run outside of a Web browser), or may be embedded into a Web document. In this document, the runtime environment on which a widget is run is referred to as a widget user agent and a running widget is referred to as an instantiated widget. Prior to instantiation, a widget exists as a widget resource.</dd>
<dt><dfn id="widget2">Widget user agent</dfn>:</dt>
<dd>The user agent (software application) that hosts an instantiated widget. Generally speaking, widget user agents are either directly built on, or provide similar functionality to a Web browser. An increasing number are actually built directly on top of Web browsers so they are able to process/render <cite><a href="http://www.w3.org/TR/widgets-land/#html">HTML</a></cite> documents, while others incorporate Web browser components like ECMAScript interpreters. widget user agents are built for many different software platforms and devices, including Microsoft&#8217;s Windows, Apple&#8217;s MacOS, Symbian, Linux, and so on; and some widget user agents, such as the Konfabulator and Opera Widgets, run on multiple platforms.</dd>
<dt><dfn id="instantiated">Instantiated widget</dfn>:</dt>
<dd>The runtime manifestation of a decompressed widget resource whose start file has been instantiated on a widget user agent. The instantiated widget may have been configured through a configuration document. The ability for an instantiated widget to be programmed and behave interactively is provided via a widgets API.</dd>
<dt><dfn id="icon">Icon</dfn>:</dt>
<dd>An image or symbolic representation of an instantiated widget. Icons are usually used to represent the widget in non-running context, such as menus and docks. Some widget user agents, such as Konfabulator, allow authors to dynamically change the icon at runtime. For example, a weather widget might update its icon as the weather or time of day changes.</dd>
<dt><dfn id="widget3">Widget resource</dfn>:</dt>
<dd>A resource created from some packaging format that encapsulates the resources of a widget for the purposes of distribution and deployment. On the wire, a widget resource is identified by an arbitrary widget media type.</dd>
<dt><dfn id="media">Media type</dfn>:</dt>
<dd>An <cite><a href="http://www.w3.org/TR/widgets-land/#media">media type</a></cite> that formally associates a widget resource with some proprietary widget user agent. For example, Joost&#8217;s widget engines requires that widgets be served over HTTP with a <code>application/vnd.joost.joda-archive</code> media type.</dd>
<dt><dfn id="packaging1">Packaging format</dfn>:</dt>
<dd>The physical data format used to create a widget resource. For example, the flat-file format described in the <cite><a href="http://www.w3.org/TR/widgets-land/#konfabulator0">Konfabulator Reference</a></cite> or the <cite><a href="http://www.w3.org/TR/widgets-land/#zip">Zip</a></cite> file format supported by Opera Widgets and Microsoft&#8217;s Vista Sidebar.</dd>
<dt><dfn id="resource">Resource:</dfn></dt>
<dd>Any file or directory used by an instantiated widget that resides either inside a widget resource or is accessible over <cite><a href="http://www.w3.org/TR/widgets-land/#http"><abbr title="Hyper Text Transfer Protocol">HTTP</abbr></a></cite>. In a widget resource, resources may be organized in directories and may have versions of those directories tailored for localization purposes. Examples of resources include images, text, markup, style sheets, executable scripts, and sounds.</dd>
<dt><dfn id="start">Start file</dfn>:</dt>
<dd>A resource either inside the widget resource or on the Web that when instantiated represents the widget. If an instantiated widget contains a configuration document, the widget user agent may configure the start file through that configuration document.</dd>
<dt><dfn id="configuration0">Configuration document</dfn>:</dt>
<dd>A distinguished resource where authors can declare metadata and/or configuration parameters for a widget. A widget user agent uses a configuration document to configure a widget upon instantiation. The configuration document may also define the relationship between resources in the widget resource. The configuration document usually takes the form of an <cite><a href="http://www.w3.org/TR/widgets-land/#xml"><abbr title="eXtensible Markup Language">XML</abbr></a></cite> file; for example, the <code>config.xml</code> resource bundled with an Opera widget.</dd>
<dt><dfn id="metadata1">Metadata:</dfn></dt>
<dd>Data declared in the configuration document about a widget that relates to authorship or classification, but does not affect the behavior of the widget at runtime (eg. the author&#8217;s name and email).</dd>
<dt><dfn id="configuration1">Configuration parameter</dfn>:</dt>
<dd>Any declaration in the configuration document that affords the widget with functionality beyond its default behavior (eg. declaring that the widget will require network access).</dd>
<dt> </dt>
<dt><dfn id="bootstrap">Bootstrap</dfn>:</dt>
<dd>A mechanism that either declaratively or automatically finds the start file in an instantiated widget.</dd>
<dt><dfn id="widget4">Widget API</dfn>:</dt>
<dd>A set of programming interfaces that provide functionality specific to and instantiated widget. Current APIs range extensively in the level of functionality they provide an author; see for example Microsoft&#8217;s <abbr title="Application Programming Interface">API</abbr> for accessing the operating system in the <cite><a href="http://www.w3.org/TR/widgets-land/#sidebar">Sidebar Reference</a></cite>.</dd>
</dl>
<h2 id="widgets0"><span class="secno">3.</span> Widgets and Widget User Agents</h2>
<p>Since around 2003, a relatively new kind of application has seen significant proliferation onto desktop computers and, more recently, web-enabled portable devices like mobile phones. This kind of application is generally referred to by developers as a <em>widget engine</em>: a piece of software that is able to run other smaller applications known as <em>widgets</em> or <em>gadgets</em>. On the user&#8217;s desktop, widgets have gradually taken the place of some traditional single-purpose applications. Typical examples of widgets range from simple clocks, CPU gauges, post-it notes, games, battery-life indicators, to more sophisticated web-enabled widgets like weather forecasters, news readers, email checkers, photo albums and currency converters.</p>
<p>There are literally thousands of unique widgets available for download on the web, which users generally collect to create personal widget inventories. These widget inventories provide users with access to online services that they commonly use. This means that, in a lot of instances, users don&#8217;t need to open up a web browser to get the information that they want (eg. to check the weather). This is an aspect of widgets that makes them particularly attractive on mobile devices, where the monetary cost of downloading web pages is currently an issue for many users.</p>
<p>For developers, some widgets differ from traditional binary applications in that they are created using the same open technologies used to create web pages. Widget engines mimic, in many ways, the behavior of web browsers: an increasing number are actually built directly on top of web browsers so they are able to render web pages, while others incorporate web browser components such as ECMAScript interpreters. To developers and vendors, this means that most widgets are significantly easier to create than applications developed with lower-level programming languages such as Java and C#.</p>
<p>Amidst the popular rise of widgets and widget engines lay a number of issues for users, developers, current vendors and new vendors wanting to enter the market. By surveying various aspects that pertain to widget user agents, this document discusses these issues so they may be resolved through the W3C standardization process.</p>
<p>As shown in figure 1, a widget is instantiated on a widget user agent and can make use of a number of technologies that serve a different role (eg. distribution and deployment, etc). However, some of those technologies have not yet been formally standardized (items marked with an asterisk), which has contributed to fragmentation across the widget space.</p>
<div class="figure">
<p><img src="http://www.w3.org/TR/widgets-land/figures/widget_arch.png" alt="Widget technology stack" width="883" height="384" /></p>
<p><dfn id="figure">Figure 1</dfn>. A typical widget technology stack and aspects that have require standardization. Please note that this technology stack is intended as a guide, and does not represent the technology stack of any particular user agent.</div>
<h3 id="differences"><span class="secno">3.1</span> Differences from Web Widgets</h3>
<p><dfn id="web-widgets">Web widgets</dfn> (also known as <em>modules</em> or <em>badges</em>) are fragments of <abbr title="HyperText Markup Language"><cite><a href="http://www.w3.org/TR/widgets-land/#html">HTML</a></cite></abbr>, <abbr title="Cascading Style Sheets"><cite><a href="http://www.w3.org/TR/widgets-land/#css">CSS</a></cite></abbr>, and <cite><a href="http://www.w3.org/TR/widgets-land/#ecmascript">ECMAScript</a></cite> (or possibly an Adobe Flash movie) that are either declaratively or dynamically included into a Web document. A common example of Web widgets is one that downloads a set of icon-sized images from a photo-sharing Web site and displays those images as a slide-show based on a set of user preferences (eg. the images tagged &#8216;vacation Italy&#8217;); such Web widgets are commonly seen embedded into social networking Web sites and blogs. Popular providers of Web widgets include:</p>
<ul>
<li><a href="http://www.google.com/apis/gadgets/">Google Homepage Gadgets</a> (<a href="http://www.google.com/ig">iGoogle Gadgets</a>),</li>
<li><a href="http://widgets.wordpress.com/">WordPress Widgets</a>,</li>
<li>and <a href="http://microsoftgadgets.com/">Microsoft Live Gadgets</a>.</li>
</ul>
<p>Unlike widgets, Web widgets a hosted on the server-side and are embedded into HTML documents prior to being served to the client. The creation of a Web widget usually involves having an author specify, in XML or some other format (eg. PHP), what the widget does and which APIs the Web widget depends on. This document is then uploaded to a server, where when it is served to a client, it is transformed into HTML, CSS, and ECMAScript. For example, the input column of the table below shows a typical iGoogle gadget specification:</p>
<table border="0">
<caption> iGoogle Gadget Transformation Example </caption>
<thead>
<tr>
<th>Input</th>
<th>Output</th>
</tr>
</thead>
<tfoot>
<tr>
<th>Input</th>
<th>Output</th>
</tr>
</tfoot>
<tbody>
<tr>
<td>
<pre>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;Module&gt;
&lt;ModulePrefs title="hello world example" /&gt;
&lt;Content type="html"&gt;&lt;![CDATA[
&lt;h1&gt;Hello, world!&lt;/h1&gt;
]]&gt;&lt;/Content&gt;
&lt;/Module&gt;</pre>
</td>
<td>
<h1 id="hello" class="no-toc no-num c1">Hello World!</h1>
</td>
</tr>
</tbody>
</table>
<p>After being processed on the server-side, the code in the input column is transformed to HTML, CSS, and ECMAScript and inserted into the served document as either an <code>iframe</code> or as HTML elements (see the the Output column above). The actual code that Google generates from the example is too large to be included in this document.</p>
<h4 id="functional" class="no-toc no-num">Functional Differences</h4>
<p>Because Web widgets and a widget have a reliance of Web technologies, their offer much of the same functionality. However, differences exist in:</p>
<ul>
<li>the packaging format,</li>
<li>the security model,</li>
<li>and the APIs.</li>
</ul>
<p>In relation to the packaging format , Web widgets are generally not packaged or downloaded as a single file (except in the case of Adobe Flash movies). Instead, Web widgets are commonly dynamically instantiated through a mix of <cite><a href="http://www.w3.org/TR/widgets-land/#ecmascript">ECMAScript</a></cite>, <abbr title="HyperText Markup Language"><cite><a href="http://www.w3.org/TR/widgets-land/#html">HTML</a></cite></abbr> elements, and <abbr title="Cascading Style Sheets"><cite><a href="http://www.w3.org/TR/widgets-land/#css">CSS</a></cite></abbr>. However, similar to a widget as described in this document, some Web widgets make use of a dynamically loaded RSS file or <abbr title="JavaScript Object Notation"><cite><a href="http://www.w3.org/TR/widgets-land/#json">JSON</a></cite></abbr> as a configuration document format.</p>
<p>In relation to security models, unlike a widget, Web widgets are generally part of a <abbr title="HyperText Markup Language"><cite><a href="http://www.w3.org/TR/widgets-land/#html">HTML</a></cite></abbr> document&#8217;s <abbr title="Document Object Model">DOM</abbr> and so are bound to all the security constraints imposed by Web browsers.This means that Web widgets cannot make cross-domain requests, cannot autonomously access resources on an end-user&#8217;s device, access system-level properties like the make, model, or usage percentage of the <abbr title="central processing unit">CPU</abbr>, or execute system level commands like creating or deleting files, while widgets that run on most market-leading widget user agents generally can. In other words, some widget user agents provide a more relaxed security model than the one afforded to Web widgets by Web browsers.</p>
<p>The ability for a widget to perform actions beyond the security scope of Web widgets is partially afforded by widget-specific APIs. For example, on Windows Vista&#8217;s Sidebar, a widget can be scripted to create a new folder on the end-user&#8217;s hard drive by calling <code>'System.Shell.Folder.newFolder(strNewFolderName)'</code>. See Microsoft&#8217;s <cite><a href="http://www.w3.org/TR/widgets-land/#sidebar">Sidebar Reference</a></cite> or <cite><a href="http://www.w3.org/TR/widgets-land/#konfabulator0">Konfabulator Reference</a></cite> for more examples of API functionality that is beyond the scope of Web widgets.</p>
<p>Another difference is how widget user agents handle internationalization when compared to Web widgets (Web Browsers). On the Web, internationalization is sometimes handled through <cite><a href="http://www.w3.org/TR/widgets-land/#http">HTTP</a></cite>&#8217;s <code>Accept-Language</code> header: this works by allowing the Web Browser to send the end-user&#8217;s preferred language to a server (eg. <code>Accept-Language: en-us</code>). If the server contains a version of the desired resource in the end-user&#8217;s language of choice, then the localized resource may be returned to the end-user. A widget, on the other hand, may sometimes contained all localized resources inside the widget resource in folders named using the common language-region pattern (eg. /en-us/). When the widget is instantiated, the widget user agent attempts to match one of these specially named folders to user&#8217;s language preferences. See the <a href="http://www.w3.org/TR/widgets-land/#i18n">Internationalization and Localization</a> section for more information.</p>
<h3 id="differences0"><span class="secno">3.2</span> Differences from Java Applets</h3>
<p>Widgets and Java applets share many commonalities. For instance, both widgets and applets rely on a pre-installed runtime engine for execution: java applets rely on the presence of the Java Runtime Environment (JRE), while widgets rely on the presence of their target widget engine. Widget and Java applets also share many similar functional aspects, like being able to do asynchronous HTTP requests to download resources from the Web.</p>
<p>It is argued that the most notable difference between them is that widgets are easier for authors to create than Java applets. This argument is made because widgets are created using HTML, CSS, and ECMAScript, which have very forgiving error handling and a short learning curve compared to Java. Another difference is that Java Applets are intended to run inside Web pages, while widgets as described in this document generally serve the purpose of stand-alone applications that run outside of a Web browser.</p>
<h2 id="packaging"><span class="secno">4.</span> Packaging for Distribution and Deployment</h2>
<p><dfn id="packaging2">Packaging</dfn> refers to encapsulating all the necessary resources and metadata required by the widget into a single file for the purpose of distribution and deployment. <dfn id="distribution">Distribution and deployment</dfn> refers to getting a widget from the Web to run on an user&#8217;s device as easily as possible.</p>
<h3 id="packaging0"><span class="secno">4.1</span> Packaging Formats, file extensions and Media Types</h3>
<p>The <em>de facto</em> standard for packaging widgets is the Zip file format, but with vendors requesting that their developers use a vendor specified file extension (ie. not .zip, but .widget, or .gadget, etc) when packaging their widgets.</p>
<p>Once a widget has been packaged for distribution, it is put onto a web server and served with an appropriate media type. The purpose of a media type is to allow a browser, for instance, to automatically associate a widget resource with the appropriate widget user agent. For example, widgets served for Operas widget engine are served with the <code>application/x-opera-widgets</code> media type and associated with the Opera browser. If a widget engine has correctly registered itself with the operatig system to be the program of choice to deal with a particular media type media type and/or file extension with, the web browser should automatically pass widgets to the widget engine without the end-user having to select the widget resource manually.</p>
<p>End-users generally acquire widget resources directly from vendors (eg. Apple, Yahoo!) who often host dedicated online galleries where users can search for widgets and where developers can submit or update widgets they have created. However, authors are free to distribute their widgets from their own web sites.</p>
<dl>
<dt>Packaging Format</dt>
<dd>The <a href="http://www.w3.org/TR/widgets-land/#packaging1">packaging format</a> is supported <a href="http://www.w3.org/TR/widgets-land/#widget2">widget user agent</a>.</dd>
<dt>Compression</dt>
<dd>The compressions algorithm supported by the widget user agent.</dd>
<dt>File extension</dt>
<dd>The file extensions that associates a widget with a widget user agent.</dd>
<dt>Media type</dt>
<dd><span class="backMatter">As widgets are generally distributed via the Web, vendors usually assign them an arbitrary MIME type. The MIME type, which is usually used in conjunction with the file extension, helps a <a href="http://www.w3.org/TR/widgets-land/#widget2">widget user agent</a> associate the a widget with the appropriate <a href="http://www.w3.org/TR/widgets-land/#widget2">widget user agent</a>.</span></dd>
</dl>
<table border="0" cellspacing="0">
<caption> Packaging Formats, file extensions and Media Types </caption>
<thead>
<tr>
<th>Widget User Agent</th>
<th>Packaging Format</th>
<th>Compression</th>
<th>File Extension</th>
<th>Media type</th>
</tr>
</thead>
<tfoot>
<tr>
<th>Widget User Agent</th>
<th>Packaging Format</th>
<th>Compression</th>
<th>File Extension</th>
<th>Media type</th>
</tr>
</tfoot>
<tbody>
<tr>
<td>Konfabulator</td>
<td>Proprietary flat-file, Zip</td>
<td>Deflate (Zip)</td>
<td>.widget (not enforced)</td>
<td><code>application/vnd.yahoo.widget</code></td>
</tr>
<tr>
<td>Windows Sidebar</td>
<td>Zip, Cab, directory</td>
<td>Deflate</td>
<td>.gadget</td>
<td><code>application/x-windows-gadget</code></td>
</tr>
<tr>
<td>Google Desktop</td>
<td>Zip</td>
<td>Deflate</td>
<td>.gg</td>
<td><code>app/gg</code></td>
</tr>
<tr>
<td>Opera Browser</td>
<td>Zip</td>
<td>Deflate</td>
<td>.zip</td>
<td><code>application/x-opera-widgets</code></td>
</tr>
<tr>
<td>Apple Dashboard</td>
<td>Zip</td>
<td>Deflate</td>
<td>.wdgt or .zip</td>
<td><code>application/x-macbinary</code></td>
</tr>
<tr>
<td>Nokia Web-Runtime</td>
<td>Zip</td>
<td>Deflate</td>
<td>.wgz</td>
<td><code>application/x-nokia-widgets</code></td>
</tr>
<tr>
<td>Joost Widgets</td>
<td>Zip</td>
<td>Deflate</td>
<td>.joda (not enforced)</td>
<td><code>application/vnd.joost.joda-archive</code></td>
</tr>
</tbody>
</table>
<p class="disclaimer"><small>*Although care has been take to ensure the accuracy of the information contained in this table, there is no guarantee that the information is complete, correct, or up-to-date. To obtain authoritative information about any particular widget user agent, please visit the vendor&#8217;s web site.</small></p>
<h4 id="interoperable" class="no-toc no-num">Interoperable Aspects</h4>
<ul>
<li>Zip format</li>
<li>Deflate compression</li>
</ul>
<h4 id="fragmentation0" class="no-toc no-num">Fragmentation Issues</h4>
<ul>
<li>There is no consistent file extension for widgets; each vendor uses their own unique file extension.</li>
<li>Nowhere is it defined exactly which parts of the Zip specification should be supported by a widget user agent. Zip is a large specification that is constantly evolving. Zip supports multiple compression algorithms and features. If a widget is packaged using the wrong compression algorithm, it might not be interoperable with another widget engine or device. Although the issue of compression is not currently a major issue, it has the potential to become one as widgets become more prevalent on mobile devices and computers start to work natively in 64-bit.</li>
<li>There is no standardized Media Type, which results in widgets served over HTTP being associated with only one kind of widget engine. One media type per widget engine results in vendor lock-in.</li>
</ul>
<h2 id="metadata"><span class="secno">5.</span> Metadata and Configuration</h2>
<p>A widget resource will typically include a configuration document, in which an author declares metadata and/or some configuration parameters that a widget user agent may use to configure a widget upon instantiation. All market leading widget engines use XML as the preferred format for storing metadata.</p>
<dl>
<dt>XML vocabulary</dt>
<dd>The proprietary specification that defines the semantics of the elements and attributes that authors should use when marking up a configuration document.</dd>
<dt>File name</dt>
<dd>The name of the file as</dd>
<dt>Required?</dt>
<dd>Is the configuration document required for the widget user agent to instantiate the widget. This was tested by attempting to instantiate a widget without a configuration document present inside the widget resource.</dd>
<dt>Uses XMLNS</dt>
<dd>Does the configuration document require authors to declare a namespace. Also tested using a bogus namespace on the root element xmlns=&#8221;"</dd>
<dt>Conforming Parser?</dt>
<dd>Is the XML parser used by the widget user agent conformant to the XML specification and XMLNS aware?</dd>
</dl>
<table border="0" cellspacing="0">
<caption> Configuration documents </caption>
<thead>
<tr>
<th>Widget User Agent</th>
<th>XML vocabulary</th>
<th>File Name</th>
<th>Required?</th>
<th>Uses XMLNS?</th>
<th>Conforming Parser?</th>
</tr>
</thead>
<tfoot>
<tr>
<th>Widget User Agent</th>
<th>XML vocabulary</th>
<th>File Name</th>
<th>Required?</th>
<th>Uses XMLNS?</th>
<th></th>
</tr>
</tfoot>
<tbody>
<tr>
<td>Konfabulator</td>
<td>Konfabulator Reference</td>
<td>widget.xml</td>
<td>no</td>
<td>no</td>
<td></td>
</tr>
<tr>
<td>Windows Sidebar</td>
<td>Microsoft Gadgets</td>
<td>gadget.xml</td>
<td>yes</td>
<td>no</td>
<td></td>
</tr>
<tr>
<td>Google Desktop</td>
<td>Google Gadgets</td>
<td>gadget.gmanifest</td>
<td></td>
<td>no</td>
<td></td>
</tr>
<tr>
<td>Opera Widgets</td>
<td>Opera Spec</td>
<td>config.xml</td>
<td>yes</td>
<td>yes, but not required. If a bogus namespace is given, the widget will not work.</td>
<td></td>
</tr>
<tr>
<td>Apple Dashboard</td>
<td>Apple plist</td>
<td>Info.plist</td>
<td>Yes</td>
<td>no</td>
<td></td>
</tr>
<tr>
<td>Nokia Web-Runtime</td>
<td>Apple plist</td>
<td>Info.plist</td>
<td>Yes</td>
<td>no</td>
<td></td>
</tr>
<tr>
<td>Joost Widgets</td>
<td><cite>Joost Joda</cite></td>
<td>config.xml</td>
<td>yes</td>
<td>yes, but not required (will work with any given namespace).</td>
<td></td>
</tr>
</tbody>
</table>
<p class="disclaimer"><small>*Although care has been take to ensure the accuracy of the information contained in this table, there is no guarantee that the information is complete, correct, or up-to-date. To obtain authorities information about any particular widget user agent, please visit the vendor&#8217;s web site.</small></p>
<h4 id="interoperable0" class="no-toc no-num">Interoperable Aspects</h4>
<ul>
<li>XML is the preferred format for structuring metadata.</li>
</ul>
<h4 id="fragmentation1" class="no-toc no-num">Fragmentation Issues</h4>
<ul>
<li>The XML dialects are all different.</li>
<li>XML parsers are generally non-conforming to the XML and XMLNS specifications.</li>
</ul>
<h3 id="metadata0"><span class="secno">5.1</span> Metadata</h3>
<p>Metadata refers to how authors store information about their widget inside the widget, and how that data is made accessible to people or machines.</p>
<p>In practice, the inclusion of any metadata elements is generally considered optional but is nonetheless recommended by vendors. Widget user agents generally make use of metadata elements in different application contexts such as menus, lists, and about-boxes. The most common metadata elements captured in configuration documents include:</p>
<dl>
<dt>Root element:</dt>
<dd>The element found at the root of each configuration document, which contains all other elements in the document.</dd>
<dt>Name:</dt>
<dd>The human readable name of the widget as it appears in menus or other contexts.</dd>
<dt>Unique identifier:</dt>
<dd>An author assigned unique identifier for the widget.</dd>
<dt>Version identifier:</dt>
<dd>Some string that identifies the version of the widget.</dd>
<dt>Description:</dt>
<dd>A human readable description of the widget, generally describing what it does.</dd>
<dt>Copyright:</dt>
<dd>Copyright information.</dd>
<dt>Authorship:</dt>
<dd>information about the authorship of the widget, including the author&#8217;s name, email, and the organization that they may be affiliated with</dd>
<dt> </dt>
</dl>
<table border="0" cellspacing="0">
<caption> Metadata elements and their roles </caption>
<thead>
<tr>
<th>Widget User Agent</th>
<th>Root Element</th>
<th>Name</th>
<th>Unique Identifier</th>
<th>Version Identifier</th>
</tr>
</thead>
<tfoot>
<tr>
<th>Widget User Agent</th>
<th>Root Element</th>
<th>Name</th>
<th>Unique Identifier</th>
<th>Version Identifier</th>
</tr>
</tfoot>
<tbody>
<tr>
<td>Konfabulator</td>
<td><code>&lt;metadata&gt;</code></td>
<td><code>&lt;name&gt;text&lt;/name&gt;</code></td>
<td><code>&lt;identifier&gt;<abbr title="universaly unique identifier">UUID</abbr> or <abbr title="reverse domain format">RD</abbr>&lt;/identifier&gt;</code></td>
<td><code>&lt;version&gt;text&lt;/version&gt;</code></td>
</tr>
<tr>
<td>Windows Vista Sidebar</td>
<td><code>&lt;gadget&gt;</code></td>
<td><code>&lt;name&gt;text&lt;/name&gt;</code></td>
<td>Uses <code>&lt;name&gt;</code> and <code>&lt;version&gt;</code>.</td>
<td><code>&lt;version&gt;text(n.n.n.n)&lt;/version&gt;</code></td>
</tr>
<tr>
<td>Google Desktop</td>
<td><code>&lt;gadget&gt;</code></td>
<td><code>&lt;name&gt;text&lt;/name&gt;</code></td>
<td><code>&lt;id&gt;UUID&lt;/id&gt;</code></td>
<td><code>&lt;version&gt;text(n.n.n.n)&lt;/version&gt;</code></td>
</tr>
<tr>
<td>Opera Widgets</td>
<td><code>&lt;widget&gt;</code></td>
<td><code>&lt;widgetname&gt;text&lt;/widgetname&gt;</code></td>
<td><code>&lt;id&gt;&lt;host&gt;URI&lt;/host&gt; &lt;name&gt;text&lt;/name&gt;&lt;id&gt;</code></td>
<td><code>&lt;id&gt;&lt;revised&gt;W3CDTF&lt;/revised&gt;&lt;/id&gt;</code></td>
</tr>
<tr>
<td>Apple Dashboard</td>
<td><code>&lt;plist version="1.0"&gt;</code></td>
<td><code>&lt;key&gt;CFBundleDisplayName&lt;/key&gt; &lt;string&gt;text&lt;/string&gt;</code></td>
<td><code>&lt;key&gt;CFBundleIdentifier&lt;/key&gt;<br />
&lt;string&gt;<abbr title="reverse domain format">RD</abbr>&lt;/string&gt;</code></td>
<td><code>&lt;key&gt;CFBundleVersion&lt;/key&gt;&lt;string&gt;string&lt;/string&gt;</code></td>
</tr>
<tr>
<td>Nokia Web-Runtime</td>
<td><code>&lt;plist version="1.0"&gt;</code></td>
<td><code>&lt;key&gt;CFBundleDisplayName&lt;/key&gt; &lt;string&gt;text&lt;/string&gt;</code></td>
<td><code>&lt;key&gt;Identifier&lt;/key&gt;<br />
&lt;string&gt;<abbr title="reverse domain format">RD</abbr>&lt;/string&gt;</code></td>
<td><code>&lt;key&gt;Version&lt;/key&gt;&lt;string&gt;string&lt;/string&gt;</code></td>
</tr>
<tr>
<td>Joost Widgets</td>
<td><code>&lt;widget-manifest&gt;</code></td>
<td><code>&lt;name&gt;text&lt;/name&gt;</code></td>
<td><code>&lt;id&gt;URI&lt;/id&gt;</code></td>
<td>none.</td>
</tr>
</tbody>
</table>
<p class="disclaimer"><small>*Although care has been take to ensure the accuracy of the information contained in this table, there is no guarantee that the information is complete, correct, or up-to-date. To obtain authoritative information about any particular widget user agent, please visit the vendor&#8217;s web site.</small></p>
<table border="0" cellspacing="0">
<caption> Metadata elements and their roles (continued) </caption>
<thead>
<tr>
<th>Widget User Agent</th>
<th>Description</th>
<th>Authorship</th>
<th>Copyright</th>
</tr>
</thead>
<tfoot>
<tr>
<th>Widget User Agent</th>
<th>Description</th>
<th>Authorship</th>
<th>Copyright</th>
</tr>
</tfoot>
<tbody>
<tr>
<td>Konfabulator</td>
<td><code>&lt;description&gt;Text&lt;/description&gt;</code></td>
<td><code>&lt;author name="" organization="" href=""/&gt;</code></td>
<td><code>&lt;copyright&gt;text&lt;/copyright&gt;</code></td>
</tr>
<tr>
<td>Windows Vista Sidebar</td>
<td><code>&lt;description&gt;Text&lt;/description&gt;</code></td>
<td><code>&lt;author name=""&gt; &lt;info url="URL"/&gt; &lt;logo src="rel-path"/&gt; &lt;/author&gt;</code></td>
<td><code>&lt;copyright&gt;text&lt;/copyright&gt;</code></td>
</tr>
<tr>
<td>Google Desktop</td>
<td><code>&lt;description&gt;Text&lt;/description&gt;</code></td>
<td><code>&lt;author&gt;text&lt;/author&gt; &lt;authorEmail&gt;text&lt;/authorEmai&gt; &lt;authorWebsite&gt;URL &lt;/authorWebsite&gt;</code></td>
<td><code>&lt;copyright&gt;text&lt;/copyright&gt;</code></td>
</tr>
<tr>
<td>Opera Widgets</td>
<td><code>&lt;description&gt;Text&lt;/description&gt;</code></td>
<td><code>&lt;author&gt; &lt;name&gt;text&lt;/name&gt; &lt;email&gt;text&lt;/email&gt; &lt;link&gt;text&lt;/link&gt; &lt;organization&gt;text&lt;/organization&gt; &lt;/author&gt;</code></td>
<td>none.</td>
</tr>
<tr>
<td>Apple Dashboard</td>
<td>none.</td>
<td>none.</td>
<td>none.</td>
</tr>
<tr>
<td>Nokia Web-Runtime</td>
<td>none.</td>
<td>none.</td>
<td>none.</td>
</tr>
<tr>
<td>Joost Widgets</td>
<td>none.</td>
<td><code>&lt;web site.&gt;URI&lt;/web site.&gt;</code></td>
<td>none. Often included as an xml comment inside the configuration document.</td>
</tr>
</tbody>
</table>
<p class="disclaimer"><small>*Although care has been take to ensure the accuracy of the information contained in this table, there is no guarantee that the information is complete, correct, or up-to-date. To obtain authoritative information about any particular widget user agent, please visit the vendor&#8217;s web site.</small></p>
<h4 id="interoperable1" class="no-toc no-num">Interoperable Aspects</h4>
<ul>
<li>Although element names differ, the semantics captured by elements is relatively consistent.</li>
</ul>
<h4 id="fragmentation"><span class="secno">5.1.1</span> Fragmentation Issues</h4>
<ul>
<li>There some fragmentation in regards to recording the description, authorship information and copyright.</li>
</ul>
<h3 id="configuration" class="no-toc no-num">Configuration parameters</h3>
<p>The most common configuration parameters include:</p>
<dl>
<dt>Bootstrap:</dt>
<dd>A way to identify the start file (or main content), including a way to identify the content type of the start file (eg. type=&#8221;HTML&#8221;).</dd>
<dd> </dd>
<dt>Network:</dt>
<dd>The need for a widget to access the network.</dd>
<dt>Width and height:</dt>
<dd>The initial rendering dimensions (width, height).</dd>
<dd> </dd>
<dt>Plugins:</dt>
<dd>The intention to use plugins (eg. Flash and Java).</dd>
<dt>Platform:</dt>
<dd>The minimum version of the widget user agent required to run the widget.</dd>
</dl>
<p>Please note that some configuration parameters have a close relationship to the security model of widgets.</p>
<table border="0" cellspacing="0">
<caption> Configuration documents </caption>
<thead>
<tr>
<th>Widget User Agent</th>
<th>Bootstrap</th>
<th>Width and Height</th>
<th>Network</th>
<th>Plugins</th>
<th>Platform</th>
</tr>
</thead>
<tfoot>
<tr>
<th>Widget User Agent</th>
<th>Bootstrap</th>
<th>Width and Height</th>
<th></th>
<th></th>
<th></th>
</tr>
</tfoot>
<tbody>
<tr>
<td>Konfabulator</td>
<td>Not declared. First *.kon file encountered is treated as the start file.</td>
<td>none.</td>
<td><code>&lt;security&gt;<br />
&lt;http name="someSite"&gt;exemple.com&lt;/http&gt;<br />
&lt;/security&gt;</code></td>
<td>none.</td>
<td><code>&lt;platform minVersion="n.n" os="macintosh|windows"/&gt;</code></td>
</tr>
<tr>
<td>Windows Sidebar</td>
<td><code>&lt;host&gt; &lt;base type="HTML" src="rel-path/file" /&gt; &lt;/host&gt;</code></td>
<td>none.</td>
<td>none. Allowed by default.</td>
<td>none. Allowed by default.</td>
<td><code>&lt;host name="sidebar"&gt; &lt;platform minPlatformVersion ="n.n" /&gt;&lt;/host&gt;</code></td>
</tr>
<tr>
<td>Google Desktop</td>
<td>Not declared. Root of container must have a &#8220;main.xml&#8221; file which serves as the start file.</td>
<td>none.</td>
<td>none. Allowed by default.</td>
<td>none.</td>
<td><code>&lt;gadget minimumGoogleDesktopVersion="n.n.n.n"&gt;<br />
&lt;platform&gt;<br />
&lt;windows minimumGadgetHostVersion="n.n.n.n"/&gt;<br />
&lt;mac minimumGadgetHostVersion="n.n.n.n"/&gt;<br />
&lt;/platform&gt;<br />
&lt;/gadget&gt;</code></td>
</tr>
<tr>
<td>Opera Widgets</td>
<td>None. The start file must be called &#8220;index.html&#8221; and must be at the root of the archive.</td>
<td><code>&lt;width&gt;n&lt;/width&gt; &lt;height&gt;n&lt;/height&gt;</code></td>
<td><code>&lt;security&gt; &lt;access&gt;&lt;protocol&gt;http|ftp&lt;/protocol&gt; &lt;host&gt;IP Address|domain name&lt;/host&gt; &lt;port&gt;integer|integer-range(eg 1200-1500)&lt;/port&gt;&lt;/access&gt; &lt;/security&gt;</code></td>
<td><code>&lt;content&gt;&lt;plugins&gt;yes|no&lt;/plugins&gt; &lt;java&gt;yes|no&lt;/java&gt;&lt;/content&gt;</code></td>
<td></td>
</tr>
<tr>
<td>Apple Dashboard</td>
<td><code>&lt;key&gt;MainHTML&lt;/key&gt; &lt;string&gt;rel-path/any.html&lt;/string&gt;</code></td>
<td><code>&lt;key&gt;Width&lt;/key&gt; &lt;integer&gt;n&lt;/integer&gt; &lt;key&gt;Height&lt;/key&gt; &lt;integer&gt;n&lt;/integer&gt;</code></p>
<p>When not present, the width and height of Default.png is used.</td>
<td></td>
<td><code>&lt;key&gt;AllowFullAccess&lt;/key&gt; &lt;true|false/&gt;</code></td>
<td></td>
</tr>
<tr>
<td>Nokia Web-Runtime</td>
<td><code>&lt;key&gt;MainHTML&lt;/key&gt; &lt;string&gt;rel-path/any.html&lt;/string&gt;</code></td>
<td></td>
<td><code>&lt;key&gt;AllowNetworkAccess&lt;/key&gt; &lt;true|false/&gt; &lt;key&gt;AllowFullAccess&lt;/key&gt; &lt;true|false/&gt;</code></td>
<td>none.</td>
<td></td>
</tr>
<tr>
<td>Joost Widgets</td>
<td><code>&lt;main-file&gt;rel-path/a.[jwl,html,svg]&lt;/main-file&gt;</code></td>
<td></td>
<td><code>&lt;key&gt;AllowNetworkAccess&lt;/key&gt; &lt;true|false/&gt;</code></td>
<td><code>&lt;key&gt;AllowInternetPlugins&lt;/key&gt; &lt;true|false/&gt;</code></td>
<td></td>
</tr>
</tbody>
</table>
<p class="disclaimer"><small>*Although care has been take to ensure the accuracy of the information contained in this table, there is no guarantee that the information is complete, correct, or up-to-date. To obtain authoritative information about any particular widget user agent, please visit the vendor&#8217;s web site.</small></p>
<h4 id="interoperable2" class="no-toc no-num">Interoperable Aspects</h4>
<p class="todo">TBW</p>
<h4 id="fragmentation2" class="no-toc no-num">Fragmentation Issues</h4>
<p class="todo">TBW</p>
<h2 id="authoring"><span class="secno">6.</span> Authoring and Scripting</h2>
<p><dfn id="authoring0">Authoring</dfn> refers to how widgets are created, marked-up and scripted. In terms of authoring, there is a fairly congruent set of commonalities that most widget user agents share, and which authors exploit when authoring a widget: mainly their reliance on Web standards and protocols, and a strong focus on rapid development. Most widget user agents will typically support <cite><abbr title="Hyper Text Transfer Protocol"><a href="http://www.w3.org/TR/widgets-land/#http">HTTP</a></abbr></cite>, <cite><abbr title="Internationalized Resource Identifier"><a href="http://www.w3.org/TR/widgets-land/#iri">IRI</a></abbr></cite>s, and <cite><a href="http://www.w3.org/TR/widgets-land/#unicode">Unicode</a></cite>, as well as <cite><a href="http://www.w3.org/TR/widgets-land/#ecmascript">ECMAScript</a></cite>, the <abbr title="Document Object Model">DOM</abbr>, and the ability to render markup languages, like <abbr title="HyperText Markup Language"><cite><a href="http://www.w3.org/TR/widgets-land/#html">HTML</a></cite></abbr> and <abbr title="Cascading Style Sheets"><cite><a href="http://www.w3.org/TR/widgets-land/#css">CSS</a></cite></abbr>. Widget user agents also generally support multimedia resources, such as images, sounds, and some even video.</p>
<p>To make authoring of widgets possible, widget user agents provide authors with Application Programming Interfaces (<abbr title="application programming interfaces">APIs</abbr>) that are mostly identical to those found in Web browsers, as well as <abbr title="application programming interfaces">APIs</abbr> that provide functionality that is specific to widgets. Also, because of the rise in popularity of <cite><a href="http://www.w3.org/TR/widgets-land/#ajax">Ajax</a></cite>-style development, many widget user agents now implement the <cite><a href="http://www.w3.org/TR/widgets-land/#xmlhttprequest">XMLHttpRequest</a></cite> object or some similar mechanism for making asynchronous data requests over <cite><abbr title="Hyper Text Transfer Protocol"><a href="http://www.w3.org/TR/widgets-land/#http">HTTP</a></abbr></cite>.</p>
<table border="0" cellspacing="0">
<caption> Supported technologies </caption>
<thead>
<tr>
<th>Widget User Agent</th>
<th>png</th>
<th>gif87</th>
<th>gif89</th>
<th>jpeg</th>
<th>png</th>
<th>svg</th>
<th>mp3</th>
<th>wav</th>
<th>swf</th>
<th>css</th>
<th>js</th>
<th>html4</th>
<th>canvas</th>
<th>XHR</th>
</tr>
</thead>
<tfoot>
<tr>
<th>Widget User Agent</th>
<th>png</th>
<th>gif87</th>
<th>gif89</th>
<th>jpeg</th>
<th>png</th>
<th>svg</th>
<th>mp3</th>
<th>wav</th>
<th>swf</th>
<th>css</th>
<th>js</th>
<th>html4</th>
<th>canvas</th>
<th>XHR</th>
</tr>
</tfoot>
<tbody>
<tr>
<td>Konfabulator</td>
<td>yes</td>
<td>yes</td>
<td>yes</td>
<td>yes</td>
<td>yes</td>
<td>no</td>
<td>yes</td>
<td>yes</td>
<td>yes</td>
<td>yes</td>
<td>yes</td>
<td>yes</td>
<td>yes</td>
<td>yes</td>
</tr>
<tr>
<td>Windows Vista Sidebar</td>
<td>yes</td>
<td>yes</td>
<td>yes</td>
<td>yes</td>
<td>yes</td>
<td>no</td>
<td></td>
<td></td>
<td>yes</td>
<td>yes</td>
<td>yes</td>
<td>yes</td>
<td>no</td>
<td>yes</td>
</tr>
<tr>
<td>Google Desktop</td>
<td>yes</td>
<td>yes</td>
<td>yes</td>
<td>yes</td>
<td>yes</td>
<td>no</td>
<td>yes</td>
<td></td>
<td>no</td>
<td>no</td>
<td>yes</td>
<td>no</td>
<td>no</td>
<td>yes</td>
</tr>
<tr>
<td>Opera Widgets</td>
<td>yes</td>
<td>yes</td>
<td>yes</td>
<td>yes</td>
<td>yes</td>
<td>yes</td>
<td></td>
<td></td>
<td>yes</td>
<td>yes</td>
<td>yes</td>
<td>yes</td>
<td>yes</td>
<td>yes</td>
</tr>
<tr>
<td>Apple Dashboard</td>
<td>yes</td>
<td>yes</td>
<td>yes</td>
<td>yes</td>
<td>yes</td>
<td>yes</td>
<td></td>
<td></td>
<td>yes</td>
<td>yes</td>
<td>yes</td>
<td>yes</td>
<td>yes</td>
<td>yes</td>
</tr>
<tr>
<td>Nokia Web Runtime</td>
<td>yes</td>
<td>yes</td>
<td>yes</td>
<td>yes</td>
<td>yes</td>
<td>no</td>
<td></td>
<td></td>
<td>no</td>
<td>yes</td>
<td>yes</td>
<td>yes</td>
<td>no</td>
<td>yes</td>
</tr>
<tr>
<td>Joost Widgets</td>
<td>yes</td>
<td>yes</td>
<td>yes</td>
<td>yes</td>
<td>yes</td>
<td>yes</td>
<td></td>
<td></td>
<td>?</td>
<td>yes</td>
<td>yes</td>
<td>yes</td>
<td>yes</td>
<td>yes</td>
</tr>
</tbody>
</table>
<p class="disclaimer"><small>*Although care has been take to ensure the accuracy of the information contained in this table, there is no guarantee that the information is complete, correct, or up-to-date. To obtain authoritative information about any particular widget user agent, please visit the vendor&#8217;s web site.</small></p>
<p class="todo">explain functionality exclusively available to widgets (run programs, cross domain requests)</p>
<h4 id="interoperable3" class="no-toc no-num">Interoperable Aspects</h4>
<ul>
<li>All widget user agents support XMLHttpRequest.</li>
<li>All but one support HTML and CSS as layout</li>
</ul>
<h4 id="fragmentation3" class="no-toc no-num">Fragmentation Issues</h4>
<ul>
<li>There is some limited fragmantation is regards to support of proprietary technologies, such as Flash.</li>
</ul>
<h3 id="apis"><span class="secno">6.1</span> APIs</h3>
<p class="todo">TBW</p>
<dl>
<dt>Open page in browser</dt>
<dd>Open a web document in the standard system browser</dd>
<dt>Preferences</dt>
<dd>Get, set and delete user preferences</dd>
<dt>Close widget</dt>
<dd>Destroy instance of currently running widget</dd>
</dl>
<table border="0" cellspacing="0">
<caption> Supported technologies </caption>
<thead>
<tr>
<th>Widget User Agent</th>
<th>Open page in browser</th>
<th>Preferences</th>
<th>Close widget</th>
</tr>
</thead>
<tfoot>
<tr>
<th>Widget User Agent</th>
<th></th>
<th></th>
<th></th>
</tr>
</tfoot>
<tbody>
<tr>
<td>Konfabulator</td>
<td><code>void openURL(url)</code></td>
<td></td>
<td></td>
</tr>
<tr>
<td>Windows Vista Sidebar</td>
<td>no method, use &lt;a href=&#8221;"&gt; element,<br />
or using javascript within the document: <code>window.open(url)</code></td>
<td><code>System.Gadget.Settings.write(String name, Object Value)<br />
System.Gadget.Settings.writeString(String name, String Value)<br />
System.Gadget.Settings.read(strName)<br />
System.Gadget.Settings.readString(strName)</code></td>
<td><code>System.Gadget.close()</code></td>
</tr>
<tr>
<td>Google Desktop</td>
<td>no method, use &lt;a href=&#8221;"&gt; element</td>
<td></td>
<td></td>
</tr>
<tr>
<td>Opera Widgets</td>
<td><code>openURL(String url)</code></td>
<td><code>widget.setPreferenceForKey(preference, key)<br />
widget.preferenceForKey(key)<br />
setPreferenceForKey(String preference, null)</code></td>
<td></td>
</tr>
<tr>
<td>Apple Dashboard</td>
<td><code>openURL(String url)</code></td>
<td><code>widget.setPreferenceForKey(preference, key)<br />
widget.preferenceForKey(key)<br />
setPreferenceForKey(String preference, null)</code></td>
<td></td>
</tr>
<tr>
<td>Nokia Web Runtime</td>
<td><code>openURL(String url)</code></td>
<td><code>widget.setPreferenceForKey(preference, key)<br />
widget.preferenceForKey(key)<br />
</code> <code>setPreferenceForKey(String preference, null)</code></td>
<td></td>
</tr>
<tr>
<td>Joost Widgets</td>
<td><code>navigate(String url);</code></td>
<td>widget.setString(String name, String vlaue);</td>
<td></td>
</tr>
</tbody>
</table>
<p class="disclaimer"><small>*Although care has been take to ensure the accuracy of the information contained in this table, there is no guarantee that the information is complete, correct, or up-to-date. To obtain authoritative information about any particular widget user agent, please visit the vendor&#8217;s web site.</small></p>
<h4 id="interoperable4" class="no-toc no-num">Interoperable Aspects</h4>
<p class="todo">TBW</p>
<h4 id="fragmentation4" class="no-toc no-num">Fragmentation Issues</h4>
<p class="todo">TBW</p>
<h3 id="widget"><span class="secno">6.2</span> Widget object: properties and events</h3>
<h4 id="properties" class="no-toc"><span class="secno">6.2.1</span> Properties of the Widget object</h4>
<table border="0" cellspacing="0">
<caption> Properties of the widget object </caption>
<thead>
<tr>
<th scope="col">Property</th>
<th scope="col">Konfabulator</th>
<th scope="col">Windows Sidebar</th>
<th scope="col">Google Desktop</th>
<th scope="col">Opera Widgets</th>
<th scope="col">Apple Dashboard</th>
<th scope="col">Nokia Web-Runtime</th>
<th scope="col">Joost Widgets</th>
</tr>
</thead>
<tbody>
<tr>
<td>locale information</td>
<td>locale</td>
<td></td>
<td></td>
<td>window.navigator.language</td>
<td></td>
<td></td>
<td>window.navigator.language</td>
</tr>
<tr>
<td>Engine version needed to run</td>
<td>requiredEngineVersion</td>
<td>System.Gadget.platformVersion</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>If the widget is visible</td>
<td>visible</td>
<td>System.Gadget.visible</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>The version of the widget as specified in the configuration document</td>
<td>version</td>
<td>System.Gadget.version</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>The name of the widget as specified in the configuration document</td>
<td>name</td>
<td>System.Gadget.name</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td height="25">The details of the author as specified in the configuration document</td>
<td>widget.author</p>
<p>widget.company</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>The copyright declaration as in the configuration document</td>
<td>widget.copyright</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>Access the unique identifier for the widget</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td><strong>String widget.identifier</strong></p>
<p>This read-only property contains a string value that is unique among all of the instances of a single widget. This value is assigned by Dashboard and persists between instantiations of each widget instance.</td>
<td>string widget.identifier;</td>
<td></td>
</tr>
<tr>
<td></td>
<td>requiredPlatform</td>
<td>Document, opacity, path, settingsUI, docked, background</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
<p class="disclaimer"><small>*Although care has been take to ensure the accuracy of the information contained in this table, there is no guarantee that the information is complete, correct, or up-to-date. To obtain authoritative information about any particular widget user agent, please visit the vendor&#8217;s web site.</small></p>
<h4 id="events" class="no-toc"><span class="secno">6.2.2</span> Events</h4>
<p class="todo">TBW</p>
<table border="0" cellspacing="0">
<caption> Events of the widget object </caption>
<thead>
<tr>
<th scope="col">Event</th>
<th scope="col">Konfabulator</th>
<th scope="col">Windows Sidebar</th>
<th scope="col">Google Desktop</th>
<th scope="col">Opera Widgets</th>
<th scope="col">Apple Dashboard</th>
<th scope="col">Nokia Web-Runtime</th>
<th scope="col">Joost Widgets</th>
</tr>
</thead>
<tbody>
<tr>
<td>Widget has loaded</td>
<td>widget.onLoad</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>WUA has focus</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>widget.onshow</td>
<td></td>
<td></td>
</tr>
<tr>
<td>WUA lost focus</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>widget.onhide</td>
<td></td>
<td></td>
</tr>
<tr>
<td>Widget focus</td>
<td>widget.onGainFocus</td>
<td></td>
<td></td>
<td></td>
<td>window.onfocus</td>
<td></td>
<td></td>
</tr>
<tr>
<td>Widget lost focus</td>
<td>widget.onLoseFocus</td>
<td></td>
<td></td>
<td></td>
<td>window.onblur</td>
<td></td>
<td></td>
</tr>
<tr>
<td>Widget drag start</td>
<td>widget.onMouseDrag</td>
<td></td>
<td></td>
<td></td>
<td>widget.ondragstart</td>
<td></td>
<td></td>
</tr>
<tr>
<td height="25">Widget is being dragged</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td height="25">Widget drag end</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>widget.ondragend</td>
<td></td>
<td></td>
</tr>
<tr>
<td>Widget is removed from WUA</td>
<td>widget.onUnload</td>
<td></td>
<td></td>
<td></td>
<td>widget.onremove</td>
<td></td>
<td></td>
</tr>
<tr>
<td>Cross widget communication</td>
<td>widget.onTellWidget = function(){ }</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>Other</td>
<td>dockOpen onDockClosed onDockOpened onPreferencesChanged onRunCommandInBgComplete onScreenChanged onTellWidget onWakeFromSleep onWillChangePreferences</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
<p class="disclaimer"><small>*Although care has been take to ensure the accuracy of the information contained in this table, there is no guarantee that the information is complete, correct, or up-to-date. To obtain authoritative information about any particular widget user agent, please visit the vendor&#8217;s web site.</small></p>
<h4 id="accessing" class="no-toc no-num">Accessing the file system</h4>
<p class="todo">TBW</p>
<p>Execute system level commands or open applications.</p>
<pre><code>//If no callbackHandler is present, the command is executed synchronously.
//If callbackHandler is present, command is executed asynchronously. callbackHandler needs to except an argument.
CommandObject widget.system(String command, [Function callbackHandler])

interface CommandObject{
        String property outputString; //the standard out
        String errorString; //any error that was thrown
        String status. //the command's exit status

        // allows handler to receive incremental output (eg ping.)
        EventListener onreadoutput(function handler);
        function cancel(); // cancel the command
        function write(String value); //write a string to standard in
        function close(); //send (EOF) to standard in
}</code></pre>
<pre><code>
void widget.openApplication(HexNum Uid, String param)

opens an S60 application in stand-alone mode. Values cannot passed back from the opened application to the widget. A widget cannot open another widget using this method.
</code></pre>
<h4 id="interoperable5" class="no-toc no-num">Interoperable Aspects</h4>
<p class="todo">TBW</p>
<h4 id="fragmentation5" class="no-toc no-num">Fragmentation Issues</h4>
<p class="todo">TBW</p>
<h2 id="user-interface"><span class="secno">7.</span> User interface and Accessibility</h2>
<p><dfn id="accessibility">Accessibility</dfn> refers to how end-users, and those with special needs, can access the content and use the interactive elements of an instantiated widget. Most market-leading widget user agents allow widgets to be authored using <cite><a href="http://www.w3.org/TR/widgets-land/#html">HTML</a></cite>, <cite><a href="http://www.w3.org/TR/widgets-land/#css">CSS</a></cite>, and <cite><a href="http://www.w3.org/TR/widgets-land/#ecmascript">ECMAScript</a></cite>. <cite><a href="http://www.w3.org/TR/widgets-land/#html">HTML</a></cite>, when authored with care, is generally regarded to be an accessible technology whose structure and semantics are generally well understood and correctly implemented by most market-leading widget user agents. To extend It is also therefore theoretically possible for authors to make their widgets fairly accessible by applying, for example, the relevant sections of the <em>Web Content Accessibility Guidelines</em> (<cite><a href="http://www.w3.org/TR/widgets-land/#wcag"><abbr title="Web Content Accessibility Guidelnes">WCAG</abbr></a></cite>).</p>
<table border="0" cellspacing="0">
<caption> Language used to declare the user interface of a widget </caption>
<thead>
<tr>
<th>Widget User Agent</th>
<th>UI Markup</th>
<th>HTML Renderer</th>
</tr>
</thead>
<tfoot>
<tr>
<th>Widget User Agent</th>
<th><abbr title="User Interface">UI</abbr> Markup</th>
<th></th>
</tr>
</tfoot>
<tbody>
<tr>
<td>Konfabulator</td>
<td><abbr title="HyperText Markup Language">HTML</abbr> + CSS (through Webkit), Proprietary <abbr title="Extensible Markup Language">XML</abbr></td>
<td>webkit</td>
</tr>
<tr>
<td>Windows Vista Sidebar</td>
<td><abbr title="HyperText Markup Language">HTML</abbr> + CSS + Proprietary <abbr title="Extensible Markup Language">XML</abbr></td>
<td>Internet Explorer</td>
</tr>
<tr>
<td>Google Desktop</td>
<td>Proprietary <abbr title="Extensible Markup Language">XML</abbr></td>
<td>none</td>
</tr>
<tr>
<td>Opera Widgets</td>
<td><abbr title="HyperText Markup Language">(X)HTML</abbr> + <abbr title="Cascading Style Sheets">CSS + SVG</abbr></td>
<td>Opera</td>
</tr>
<tr>
<td>Apple Dashboard</td>
<td><abbr title="HyperText Markup Language">HTML</abbr> + <abbr title="Cascading Style Sheets">CSS + SVG</abbr></td>
<td>Webkit/safari</td>
</tr>
<tr>
<td>Nokia Web Runtime</td>
<td><abbr title="HyperText Markup Language">HTML</abbr> + <abbr title="Cascading Style Sheets">CSS</abbr></td>
<td>Webkit</td>
</tr>
<tr>
<td>Joost Widgets</td>
<td><abbr title="HyperText Markup Language">XHTML</abbr> + CSS + SVG + Proprietary <abbr title="Extensible Markup Language">XML</abbr></td>
<td>Gecko</td>
</tr>
</tbody>
</table>
<p class="disclaimer"><small>*Although care has been take to ensure the accuracy of the information contained in this table, there is no guarantee that the information is complete, correct, or up-to-date. To obtain authoritative information about any particular widget user agent, please visit the vendor&#8217;s web site.</small></p>
<h4 id="interoperable6" class="no-toc no-num">Interoperable Aspects</h4>
<p class="todo">TBW</p>
<h4 id="fragmentation6" class="no-toc no-num">Fragmentation Issues</h4>
<p class="todo">TBW</p>
<h2 id="instantiation"><span class="secno">8.</span> Instantiation</h2>
<p><strong>What addressing mechanism does the widget user agent support at runtime to get to resources inside the package? (ie. how does a developer address and include things like images or sounds in their widget?)</strong></p>
<table border="0" cellspacing="0">
<caption> The details of configuration document </caption>
<thead>
<tr>
<th>Widget User Agent</th>
<th>Other expected files</th>
</tr>
</thead>
<tfoot>
<tr>
<th>Widget User Agent</th>
<th>Other expected files</th>
</tr>
</tfoot>
<tbody>
<tr>
<td>Konfabulator</td>
<td>at least one *.kon somewhere in the archive</td>
</tr>
<tr>
<td>Windows Sidebar</td>
<td>at least one html file somewhere in the archive</td>
</tr>
<tr>
<td>Google Desktop</td>
<td></td>
</tr>
<tr>
<td>Opera Widgets</td>
<td>(any folder)* index.html. The folder is selected in alphabetical order, not by the order in which it appears physically in the archive.</td>
</tr>
<tr>
<td>Apple Dashboard</td>
<td>some [name].html file identified as the start file by the <code>MainHTML</code> key in the Info.plist file. Icon.png and Default.png. Icon.png is used in the Dashboard bar. Default.png is shown while the widget loads and used to set the render context of the widget if width and height keys were not set in Info.plist.</td>
</tr>
<tr>
<td>Nokia Web-Runtime</td>
<td>some [name].html file identified as the start file by the <code>MainHTML</code> key in the Info.plist file. Icon.png is optional.</td>
</tr>
<tr>
<td>Joost Widgets</td>
<td></td>
</tr>
</tbody>
</table>
<p class="disclaimer"><small>*Although care has been take to ensure the accuracy of the information contained in this table, there is no guarantee that the information is complete, correct, or up-to-date. To obtain authoritative information about any particular widget user agent, please visit the vendor&#8217;s web site.</small></p>
<p class="todo">TBW: discusses different ways that the start file of widget is located: 1. having a preset name (eg. index.html ala Opera Widgets). Having it declared in the configuration document (ala Joost), Having it match a search pattern (ala Konfabulator)</p>
<h4 id="interoperable7" class="no-toc no-num">Interoperable Aspects</h4>
<p class="todo">TBW</p>
<h4 id="fragmentation7" class="no-toc no-num">Fragmentation Issues</h4>
<p class="todo">TBW</p>
<h2 id="i18n"><span class="secno">9.</span> Internationalization and Localization</h2>
<p><dfn id="internationalization">internationalization</dfn> refers to the technical aspects that allow a widget to work in <q>multilingual contexts without requiring an author to make significant engineering changes to a widget.</q> <dfn id="localization">Localization</dfn> is the processes where by a widget is adapted to use the local conventions of particular end-users (eg. using a particular dialect)<q>.</q> To allow authors to distribute a widget to multiple locales, the majority of vendors provide guidelines explain to authors how to make effective use of internationalization mechanisms built into widget user agents. When authors follow localization guidelines, a widget user agent can use automated mechanisms to select the appropriate localized resources for a widget based on a system&#8217;s locale information; thus making it easier for authors to create localized widgets.</p>
<p>In the widget space, internationalization is commonly achieved in one of two ways:</p>
<ul>
<li>One way is to have authors place localized resources into specifically named folders that identify the language and region (eg. &#8220;<code>/en-au/</code>&#8221; for English Australian) of localized content. If the widget user agent can identify the end-user&#8217;s locale, and the widget package contains matching localized content, then a localized widget will be presented to the end-user.</li>
<li>Another way is to have authors place localized textual content inside a specifically named text file, which is in turn placed inside specially named folders (eg. &#8220;<code>/en-au/Localizable.strings</code>&#8220;). Inside the text file, localized strings are identified by an unique identifier and must be formatted using a special syntax. For instance, Konfabulator uses a special syntax for localizing strings, for example:</li>
</ul>
<pre><code>"greeting" = "g'day mate!";</code>
<code>"greeting_gfx" = "/en-au/images/greet.png";</code></pre>
<p>Note that this method only localizes textual content, but can be used to also identify the path or URI to localized resources. At runtime, the widget user agent makes those localized strings available via a scripting interface:</p>
<pre><code>//would set the button's label to "g'day mate!"
myButton.label = widget.getLocalizedString("greeting");</code>

<code>myButton.style.background = widget.getLocalizedString("greeting_gfx");</code></pre>
<p>When automated internationalization is not provided by a widget user agent, authors usually result to using arbitrary solutions to achieve localization. Such is the case for Opera widgets.</p>
<table border="0" cellspacing="0">
<caption> Localization strategies </caption>
<tbody>
<tr>
<th>Widget User Agent</th>
<th>Localization Strategy</th>
<th>Automatic</th>
<th>Convention followed</th>
<th>Example</th>
<th>Comments</th>
</tr>
<tr>
<td>Konfabulator</td>
<td>Directory-based + <abbr title="JavaScript">JS</abbr></td>
<td>yes</td>
<td></td>
<td><code>/en-au/Localizable.strings</code></td>
<td></td>
</tr>
<tr>
<td>Windows Sidebar</td>
<td>Directory-based + <abbr title="JavaScript">JS</abbr></td>
<td>yes</td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>Google Desktop</td>
<td>Directory-based + <abbr title="JavaScript">JS</abbr></td>
<td>yes</td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>Opera Widgets</td>
<td>none</td>
<td>no</td>
<td>none</td>
<td></td>
<td>Does not support any automated localization strategies.</td>
</tr>
<tr>
<td>Apple Dashboard</td>
<td>Directory-based + <abbr title="JavaScript">JS</abbr></td>
<td>yes</td>
<td></td>
<td>/en-au/</td>
<td></td>
</tr>
<tr>
<th>Widget User Agent</th>
<th>Localization Strategy</th>
<th>Automatic</th>
<th>Convention followed</th>
<th>Example</th>
<th>Comments</th>
</tr>
</tbody>
</table>
<p class="disclaimer"><small>*Although care has been take to ensure the accuracy of the information contained in this table, there is no guarantee that the information is complete, correct, or up-to-date. To obtain authoritative information about any particular widget user agent, please visit the vendor&#8217;s web site.</small></p>
<h4 id="interoperable8" class="no-toc no-num">Interoperable Aspects</h4>
<p class="todo">TBW</p>
<h4 id="fragmentation8" class="no-toc no-num">Fragmentation Issues</h4>
<p class="todo">TBW</p>
<h2 id="digital"><span class="secno">10.</span> Digital Signatures</h2>
<p>A <dfn id="digital0">digital signature</dfn> is the product of applying a secret numeric key (known as a <em>private key</em>) and an encryption algorithm over some data to produce a unique <em>hash value</em>. The only way to validate a digital signature is to use a corresponding <em>public key</em> in a process known as <em>asymmetric</em> <em>cryptography</em>.</p>
<p>Although not widely supported by market-leading widget user agents, some widget user agents allow an author to digitally sign a widget resource. Digitally signing a widget resource involves calculating the hash values of all the resources inside the widget resource and encrypting those values using a unique private key that is known only to the author. The resulting data is bundled inside the widget resource with a digital certificate, which an author can obtain from a certification authority (such as <a href="http://www.verisign.com/">VeriSign</a>) for a charge.</p>
<p>A digital certificate is therefore a trust mechanism intended to verify to a user that an author really did sign the widget resource. A widget user agent can use the digital certificate to verify the authenticity and data integrity of the widget resource. In the rare case where a widget damages the end-user&#8217;s device, the digital certificate provides a user with a legal means to prove that a widget resource was signed by a particular author or publisher.</p>
<p>Because digital certificates can come from untrusted sources, widget user agents will include <em>root certificates</em> from sources that it trusts. Root certificates are explicitly trusted and are considered impossible to forge. For example, the Konfabulator is bundled with the Yahoo! root certificate which it uses to verify widgets signed by Yahoo! Inc. are in fact signed by Yahoo! Inc.</p>
<table border="0" cellspacing="0">
<caption> Digital Signatures </caption>
<tbody>
<tr>
<th>Widget User Agent</th>
<th>Signature</th>
<th>Certificate Format</th>
</tr>
<tr>
<td>Konfabulator</td>
<td>yes</td>
<td>x509</td>
</tr>
<tr>
<td>Windows Sidebar</td>
<td>yes</td>
<td>x509</td>
</tr>
<tr>
<td>Google Desktop</td>
<td>no</td>
<td>-</td>
</tr>
<tr>
<td>Opera Widgets</td>
<td>no</td>
<td>-</td>
</tr>
<tr>
<td>Apple Dashboard</td>
<td>no</td>
<td>-</td>
</tr>
<tr>
<td>Nokia Web Runtime</td>
<td>Planned</td>
<td>-</td>
</tr>
<tr>
<td>Joost</td>
<td>Planned</td>
<td>-</td>
</tr>
<tr>
<th>Widget User Agent</th>
<th>Signature</th>
<th>Certificate Format</th>
</tr>
</tbody>
</table>
<p class="disclaimer"><small>*Although care has been take to ensure the accuracy of the information contained in this table, there is no guarantee that the information is complete, correct, or up-to-date. To obtain authoritative information about any particular widget user agent, please visit the vendor&#8217;s web site.</small></p>
<h4 id="interoperable9" class="no-toc no-num">Interoperable Aspects</h4>
<ul>
<li>The use of X509 certificates.</li>
</ul>
<h4 id="fragmentation9" class="no-toc no-num">Fragmentation Issues</h4>
<ul>
<li>General lack of support for digital signatures.</li>
</ul>
<h2 id="automatic"><span class="secno">11.</span> Automatic Updates</h2>
<p><dfn id="automatic0">Automatic updates</dfn> refers to a service that allows a widget user agent to automatically check if a new or different version of an installed widget resource has become available, and somehow acquire the new version and install it. Automatic updates models work by allowing authors to assign a unique identifier and version identifier to a widget resource (eg. <code>id="http://example.com/my.wdgt" version="1.2"</code>).</p>
<p>To keep a widget resource up to date, the widget user agent periodically checks if a different version of a widget resource has become available on a remote server. In the case of the Konfabulator, it does this by sending an <cite><a href="http://www.w3.org/TR/widgets-land/#xml"><abbr title="eXtensible Markup Language">XML</abbr></a></cite> document that identifies the widget via an unique identifier, and what version the end-user currently has installed. If a new version of the widget resource is available on the server, the server sends back an <cite><a href="http://www.w3.org/TR/widgets-land/#xml"><abbr title="eXtensible Markup Language">XML</abbr></a></cite> file that contains a URL from where the widget user agent can acquire the latest version. The widget user agent then informs the end-user that an update to a widget has become available and if they want to perform the update. If the end-user agrees, then the widget user agent downloads the latest version of the widget resource, archives the old version, installs the new one in its place. The updated widget is re-instantiated with its preexisting preferences (eg. an updated weather forecaster widget will generally not require the end-user to re-input their preferred city after an update).</p>
<h4 id="interoperable10" class="no-toc no-num">Interoperable Aspects</h4>
<p class="todo">TBW</p>
<h4 id="fragmentation10" class="no-toc no-num">Fragmentation Issues</h4>
<ul>
<li>General lack of support for automatic updates.</li>
</ul>
<h2 id="device"><span class="secno">12.</span> Device Independence</h2>
<p class="todo">Need to read up on how Nokia Web Runtime recommends authors deal with migration of Dashboard widgets, etc.</p>
<h4 id="interoperable11" class="no-toc no-num">Interoperable Aspects</h4>
<p class="todo">TBW</p>
<h4 id="fragmentation11" class="no-toc no-num">Fragmentation Issues</h4>
<p class="todo">TBW</p>
<h2 id="security"><span class="secno">13.</span> Security Models</h2>
<p><dfn id="security0">Security model</dfn> refers to the security policies under which a widget user agent operates that either prevents or allows an instantiated widget from performing particular actions (eg. accessing the network or reading/writing files). When compared to Web browsers, some market-leading widget user agents have a comparatively relaxed security model that allows an instantiated widget to read, write, modify, and/or delete files, automatically upload files, automatically download files, execute local applications, and even perform cross-domain request to &#8220;mash-up&#8221; data from multiple different sources. All without the end-user having any indication that their privacy and security might be at risk.</p>
<p>The ability to perform most of the aforementioned actions is strictly forbidden in documents running in Web Browsers. Such a relaxed security model has been generally positive in the widget space with very useful and powerful widgets being developed. However, this has created an environment where users are left extremely vulnerable to malicious attacks, and serious security risks have been demonstrated. Some market-leading widget user agents, such as Opera Widgets, have a much tighter security model that adheres more closely to the security model of a Web Browser; as such, they may be less prone to serious security issues.</p>
<p class="todo">Need to discuss how security declarations are made using pInfo list or Opera&#8217;s security element.</p>
<h4 id="interoperable12" class="no-toc no-num">Interoperable Aspects</h4>
<p class="todo">TBW</p>
<h4 id="fragmentation12" class="no-toc no-num">Fragmentation Issues</h4>
<p class="todo">TBW</p>
<h2 id="icons"><span class="secno">14.</span> Icons</h2>
<table border="0" cellspacing="0">
<caption> Icons </caption>
<thead>
<tr>
<th>Widget User Agent</th>
<th>Element in configuration file</th>
<th>Supported Types</th>
<th>Preferred</th>
<th>Comments</th>
</tr>
</thead>
<tfoot>
<tr>
<th>Widget User Agent</th>
<th>Element</th>
<th>Supported Types</th>
<th></th>
<th>Comments</th>
</tr>
</tfoot>
<tbody>
<tr>
<td>Konfabulator</td>
<td><code>&lt;image usage="dock|security" src="images/some.png"/&gt;</code></td>
<td>GIF, PNG.</td>
<td></td>
<td>Two images may be declared, depending on the <code>usage</code> attribute. The <code>usage</code> attribute allows either values <code>dock</code>|<code>security</code> to indicate where the image should be used. Security image is shown as part of the widget security warning when the widget is instantiated.</td>
</tr>
<tr>
<td>Windows Vista Sidebar</td>
<td>&lt;icons&gt; &lt;icon src=&#8221;rel-path&#8221; [width="" height=""]&gt; &lt;/icons&gt;</p>
<p>&lt;hosts&gt; &lt;host&gt; &lt;defaultImage src=&#8221;"/&gt; &lt;/host&gt;</td>
<td>any GDI+ 1.0 supported format.</td>
<td></td>
<td>Having multiple icon elements allows the engine to select the icon most appropriate for communication based on size. Preferred size is 64px*64px, but any size is ok.</p>
<p class="todo">The documentation contradicts itself in regards to icon and defaultImage. Need to verify which one is actually used!</p>
</td>
</tr>
<tr>
<td>Google Desktop</td>
<td>&lt;small-icon&gt;rel-path/some.png&lt;small-icon&gt;</p>
<p>&lt;icon&gt;rel-path/some.png&lt;small-icon&gt;</td>
<td>PNG</td>
<td>PNG</td>
<td>
<p class="todo">Need to test other formats</p>
</td>
</tr>
<tr>
<td>Opera Widgets</td>
<td>&lt;icon&gt;relative-path/some.png&lt;/icon&gt;</td>
<td>GIF, PNG.</td>
<td></td>
<td></td>
</tr>
<tr>
<td>Apple Dashboard</td>
<td>none.</td>
<td>PNG</td>
<td></td>
<td>Not declared. An optional icon must appear in the root of the archive and must be called icon.png. If the icon is missing, then the runtime will use a default icon.</td>
</tr>
<tr>
<td>Nokia Web-Runtime</td>
<td>none.</td>
<td>PNG</td>
<td>PNG</td>
<td>include an &#8220;icon.png&#8221; file at the root of the widget.</td>
</tr>
<tr>
<td>Joost Widgets</td>
<td>&lt;icon&gt;relative-path/some.svg&lt;/icon&gt;</td>
<td>SVG, PNG, JPEG, GIF</td>
<td></td>
<td>SVG or PNG are preferred.</td>
</tr>
</tbody>
</table>
<p class="disclaimer"><small>*Although care has been take to ensure the accuracy of the information contained in this table, there is no guarantee that the information is complete, correct, or up-to-date. To obtain authoritative information about any particular widget user agent, please visit the vendor&#8217;s web site.</small></p>
<p class="todo">This section will describe how icons are used by different widget engines. It will discuss static icons (images, pngs), and dynamic icons, such as Yahoo!&#8217;s icons. Might also talk briefly about iPod/Phone icons here too, as they are dynamic.</p>
<h4 id="interoperable13" class="no-toc no-num">Interoperable Aspects</h4>
<p>PNG, GIF87/89</p>
<p class="todo">TBW</p>
<h4 id="fragmentation13" class="no-toc no-num">Fragmentation Issues</h4>
<p class="todo">TBW</p>
<h2 id="standardizable"><span class="secno">15.</span> Standardizable Aspects of Widgets</h2>
<p>The following list represents the aspects of a widget that members of the working group have identified as requiring standardization to reduce fragmentation in the widget space. Aspects that are currently outside the scope of the working group charter are proceeded by the text &#8220;<strong><dfn id="out-of">out of scope</dfn></strong>&#8220;. To address aspects beyond the scope of the working group, the working group will require liaison with other working groups at the <abbr title="World Wide Web Consortium"><a href="http://w3.org/">W3C</a></abbr> and possibly other related consortia such as the <abbr title="Open Mobile Alliance">OMA</abbr> and the <abbr title="Open Ajax Alliance">OAA</abbr>.</p>
<p><dfn id="standardizable0">Standardizable aspects of widgets</dfn> include:</p>
<ul>
<li>Finding a suitable packaging format capable of encapsulating and structuring resources for distribution and deployment, including:
<ul>
<li>The relevant technical aspects of the physical packaging format that make the format interoperable across multiple platforms and mobile devices.</li>
<li>The abstract container, including required parts and hierarchies (eg. required files and folders, if any).</li>
<li>The model by which the internal structure of a widget resource can be exploited by an instantiated widget for localization purposes in internationalized contexts.</li>
<li>A means for an instantiated widget to address resources in a widget resource at runtime.</li>
<li>A file extension.</li>
<li>A MIME type to formally denote that a widget resource distributed over <cite><a href="http://www.w3.org/TR/widgets-land/#http"><abbr title="Hyper Text Transfer Protocol">HTTP</abbr></a></cite> conforms to the Widgets 1.0: Packaging specification.</li>
<li>A widely supported digital signature format that adequately provides data security, authenticity and non-repudiation.</li>
</ul>
</li>
<li>The configuration document language including:
<ul>
<li>The structure, semantics, and processing model for a vocabulary that would make up the configuration document format.</li>
<li>Metadata elements pertaining to authorship (eg. author&#8217;s name, email, etc).</li>
<li>Metadata elements pertaining to the widget (eg. id, title, description, etc).</li>
<li>Configuration parameters (eg. width, height, network access, etc).</li>
<li>A bootstrap mechanism that allows the widget user agent to find the start file of a widget resource.</li>
<li>A model for finding a start file of a widget resource when a bootstrap is unavailable or is in error.</li>
<li>A means for distinguishing the configuration document from other resources.</li>
<li>A means to declare an alternative representation of a widget (eg. an image icon) for when a widget has not been instantiated.</li>
</ul>
</li>
<li>A widgets API that could be implemented by a widget user agent and made available to an instantiated widget that would allow authors to:
<ul>
<li>Access preferences particular to each instantiated widget.</li>
<li>Access runtime configuration properties and other relevant platform properties (<strong><a href="http://www.w3.org/TR/widgets-land/#out-of">out of scope</a></strong>).</li>
<li>Access to services particular to the device on which the widget has been instantiated (eg. camera, short message service, address book, etc) (<strong><a href="http://www.w3.org/TR/widgets-land/#out-of">out of scope</a></strong>).</li>
<li>The ability to instantiate other applications on an end-user&#8217;s device (<strong><a href="http://www.w3.org/TR/widgets-land/#out-of">out of scope</a></strong>).</li>
<li>Access metadata values that the author declared in the configuration document.</li>
<li>Capture events and access properties that are particular to each instantiated widget.</li>
<li>Control alternative runtime representations of a widget (eg. the docked representation).</li>
</ul>
</li>
<li>The security model/policies that determines what an instantiated widget can access while running on a end-user&#8217;s device.</li>
<li>A pre-existing language to declare the user interface in an accessible manner (eg. mandating the use of <abbr title="HyperText Markup Language"><cite><a href="http://www.w3.org/TR/widgets-land/#html">HTML</a></cite></abbr> or some other <cite><a href="http://www.w3.org/TR/widgets-land/#xml"><abbr title="eXtensible Markup Language">XML</abbr></a></cite> vocabulary).</li>
<li>A <cite><a href="http://www.w3.org/TR/widgets-land/#http"><abbr title="Hyper Text Transfer Protocol">HTTP</abbr></a></cite>-based model for a widget user agent to check if an updated version of a widget resource has become available for download.</li>
</ul>
<p><dfn id="standardizable1">Standardizable aspects of widget engines</dfn> include:</p>
<ul>
<li>
<p class="todo">TBW</p>
</li>
</ul>
<h2 id="acknowledgments" class="no-num">Acknowledgments</h2>
<p>The editor would particularly like to thank Corin Edwards for his help on improving the design on of <a href="http://www.w3.org/TR/widgets-land/#figure">figure 1</a>.</p>
<p>The editor would like to thank to the following people who have contributed to this document (ordered by first name):</p>
<ul>
<li>Alexander Dreiling</li>
<li>Anne van Kesteren</li>
<li>Arthur Barstow</li>
<li>Arun Ranganathan</li>
<li>Benoit Suzanne</li>
<li>Bert Bos</li>
<li>Bradford Lassey</li>
<li>Cameron McCormack</li>
<li>Cliff Schmidt</li>
<li>Claudio</li>
<li>Coach Wei</li>
<li>Corin Edwards</li>
<li>Dan Brickley</li>
<li><span>David Pollington</span></li>
<li>Dean Jackson</li>
<li>Debra Polson</li>
<li>Doug Schepers</li>
<li>Ed Voas</li>
<li>Gene Vayngrib</li>
<li>Guido Grassel</li>
<li>Jay Sweeney</li>
<li>Jim Ley</li>
<li>Jose Manuel Cantera Fonseca</li>
<li>Kevin Lawver</li>
<li>Krzysztof Maczyński</li>
<li>Lachlan Hunt</li>
<li>Marc Silbey</li>
<li>Mark Baker</li>
<li>Mikko Pohja</li>
<li>Philipp Heltewig</li>
<li>Stephen Paul Weber</li>
<li>Thomas Landspurg</li>
<li>Yang Wong</li>
<li>Zachary Fitz-Walter</li>
</ul>
<h2 id="references" class="no-num">References</h2>
<dl class="references">
<dt><dfn id="ajax">Ajax</dfn></dt>
<dd><a href="http://www.adaptivepath.com/publications/essays/archives/000385.php">Ajax: A New Approach to Web Applications</a>. J. J. Garrett. February 18, 2005. Adaptive Path. Available at <a href="http://www.adaptivepath.com/publications/essays/archives/000385.php">http://www.adaptivepath.com/publications/essays/archives/000385.php</a></dd>
<dt><dfn id="apple">Apple pList</dfn></dt>
<dd><a href="http://developer.apple.com/documentation/CoreFoundation/Conceptual/CFPropertyLists/index.html"> Introduction to Property List Programming Topics for Core Foundation</a>, Apple Computer Inc, 7 February 2006. Available at <a href="http://developer.apple.com/documentation/CoreFoundation/Conceptual/CFPropertyLists/index.html"> http://developer.apple.com/documentation/CoreFoundation/Conceptual/CFPropertyLists/index.html</a></dd>
<dt><dfn id="css">CSS</dfn></dt>
<dd><a href="http://www.w3.org/TR/CSS21/">Cascading Style Sheets, level 2, revision 1</a>, B. Bos, T. Çelik, I. Hickson, and H. Wium Lie. W3C Candidate Recommendation 19 July 2007. Available at <a href="http://www.w3.org/TR/CSS21/">http://www.w3.org/TR/CSS21</a></dd>
<dt><dfn id="dom">DOM</dfn></dt>
<dd><a href="http://www.w3.org/TR/REC-DOM-Level-1/">Document Object Model (DOM) Level 1 Specification</a>, L. Wood et al., 1 October 1998. Available at <a href="http://www.w3.org/TR/REC-DOM-Level-1/">http://www.w3.org/TR/REC-DOM-Level-1</a></dd>
<dt><dfn id="dashboard0">Dashboard Reference</dfn></dt>
<dd><a href="http://developer.apple.com/documentation/AppleApplications/Reference/Dashboard_Ref/index.html"> Dashboard Reference</a>, Apple Computer, Inc, May 2006. Available at <a href="http://developer.apple.com/documentation/AppleApplications/Reference/Dashboard_Ref/index.html"> http://developer.apple.com/documentation/AppleApplications/Reference/Dashboard_Ref/index.html</a></dd>
<dt><dfn id="google0">Google Gadgets</dfn></dt>
<dd><a href="http://desktop.google.com/script.html">Google Desktop Sidebar Scripting <abbr title="Application Programming Interface">API</abbr></a>, Google Inc., 2006. Available at <a href="http://desktop.google.com/script.html">http://desktop.google.com/script.html</a></dd>
<dt><dfn id="json">JSON</dfn></dt>
<dd><a href="http://www.ietf.org/rfc/rfc4627.txt">The application/json media type for ECMAScript Object Notation</a>. D. Crockford. July 2006. Available at <a href="http://www.ietf.org/rfc/rfc4627.txt">http://www.ietf.org/rfc/rfc4627.txt</a></dd>
<dt> </dt>
<dt><dfn id="opera0">Opera Spec</dfn></dt>
<dd><a href="http://oxine.opera.com/widgets/documentation/widget-configuration.html">Opera Widgets Specification 1.0</a>, A. Bersvendsen (Editor), Opera Software, 30 Apr, 2007. Available at <a href="http://oxine.opera.com/widgets/documentation/widget-configuration.html">http://oxine.opera.com/widgets/documentation/widget-configuration.html</a></dd>
<dt><dfn id="sidebar">Sidebar Reference</dfn></dt>
<dd><a href="http://windowssdk.msdn.microsoft.com/en-us/library/ms722795.aspx">Windows Sidebar Reference</a>, Microsoft Corporation, 2006. Available at <a href="http://msdn2.microsoft.com/en-us/library/aa965853.aspx">http://msdn2.microsoft.com/en-us/library/aa965853.aspx</a></dd>
<dt><dfn id="xml-internationalization">XML Internationalization and Localization</dfn></dt>
<dd><a class="booktitle" href="http://www.w3.org/TR/widgets-land/#xml-internationalization">XML Internationalization and Localization</a>. Savourel, Y. Sams Publishing, Indiana. June 2001.</dd>
<dt><dfn id="konfabulator0">Konfabulator Reference</dfn></dt>
<dd><a href="http://widgets.yahoo.com/gallery/dl_item.php?item=WidgetEngineReference_3.1.1.pdf">Konfabulator Reference 4.5 Reference Manual</a> Yahoo! Inc., April 14, 2006. Available at <a href="http://widgets.yahoo.com/gallery/dl_item.php?item=WidgetEngineReference_3.1.1.pdf">http://Widgets.yahoo.com/gallery/dl_item.php?item=WidgetEngineReference_3.1.1.pdf</a></dd>
<dt><dfn id="wcag">WCAG</dfn></dt>
<dd><a href="http://www.w3.org/TR/WAI-WEBCONTENT/">Web Content Accessibility Guidelines 1.0</a>. W. Chisholm, G. Vanderheiden, and I. Jacobs. W3C Recommendation, 5 May 1999. Available at <a href="http://www.w3.org/TR/WAI-WEBCONTENT/">http://www.w3.org/TR/WAI-WEBCONTENT/</a></dd>
<dt><dfn id="ecmascript">ECMAScript</dfn></dt>
<dd><a href="http://www.ecma-international.org/publications/standards/Ecma-262.htm">ECMAScript Language Specification</a>, Third Edition. <abbr title="European Computer Manufacturers Association">ECMA</abbr>, December 1999. Available at <a href="http://www.ecma-international.org/publications/standards/Ecma-262.htm">http://www.ecma-international.org/publications/standards/Ecma-262.htm</a></dd>
<dt><dfn id="html">HTML</dfn></dt>
<dd><a href="http://www.w3.org/TR/html401/">HTML 4.01 Specification</a>, D. Raggett, A. Le Hors, I. Jacobs, 24 December 1999. Available at <a href="http://www.w3.org/TR/html401/">http://www.w3.org/TR/html401/</a></dd>
<dt><dfn id="http">HTTP</dfn></dt>
<dd><a href="http://www.ietf.org/rfc/rfc2616.txt">Hypertext Transfer Protocol &#8212; HTTP/1.1</a>, R. Fielding, J. Gettys, J. Mogul, H. Frystyk Nielsen, L. Masinter, P. Leach and T. Berners-Lee, June 1999. Available at <a href="http://www.ietf.org/rfc/rfc2616.txt">http://www.ietf.org/rfc/rfc2616.txt</a></dd>
<dt><dfn id="mime-type">MIME Type</dfn></dt>
<dd><a href="http://www.ietf.org/rfc/rfc2046.txt">Multipurpose Internet Mail Extensions (MIME) Part Two: media types</a>, N. Freed and N. Borenstein, November 1996. Available at <a href="http://www.ietf.org/rfc/rfc2046.txt">http://www.ietf.org/rfc/rfc2046.txt</a>.</dd>
<dt><dfn id="unicode">Unicode</dfn></dt>
<dd><em>The Unicode Standard</em>, The Unicode Consortium, Version 5.</dd>
<dt><dfn id="xml">XML</dfn></dt>
<dd><a href="http://www.w3.org/TR/2000/REC-xml-20001006">Extensible Markup Language (XML) 1.0 Specification (Second Edition)</a>, T. Bray, J. Paoli, C. M. Sperberg-McQueen, E. Maler, 6 October 2000. Available at <a href="http://www.w3.org/TR/REC-xml/">http://www.w3.org/TR/REC-xml/</a></dd>
<dt><dfn id="xmlhttprequest">XMLHttpRequest</dfn></dt>
<dd><a href="http://www.w3.org/TR/XMLHttpRequest/">The XMLHttpRequest object</a>. A. van Kesteren. 2006. W3C Working Draft, Available at <a href="http://www.w3.org/TR/XMLHttpRequest/">http://www.w3.org/TR/XMLHttpRequest/</a></dd>
<dt><dfn id="x.509">X.509</dfn></dt>
<dd>CCITT, <em>Recommendation X.509: The Directory Authentication Framework</em>, 1988.</dd>
<dt><dfn id="iri">IRI</dfn></dt>
<dd><a href="http://www.ietf.org/rfc/rfc3987">Internationalized resource Identifiers (IRIs)</a>, M. Duerst, M. Suignard. IETF, January 2005. RFC3987 is Available at <a href="http://www.ietf.org/rfc/rfc3987">http://www.ietf.org/rfc/rfc3987</a></dd>
<dt><dfn id="zip">Zip</dfn></dt>
<dd><a href="http://www.pkware.com/documents/casestudies/APPNOTE.TXT">.ZIP File Format Specification</a>. PKWare Inc., September 2007. Available at <a href="http://www.pkware.com/documents/casestudies/APPNOTE.TXT">http://www.pkware.com/documents/casestudies/APPNOTE.TXT</a></dd>
</dl>
<h3 id="related" class="no-num">Related Sources</h3>
<dl class="references">
<dt> </dt>
<dt><dfn id="light">Light Web Applications</dfn></dt>
<dd><a href="http://www.w3.org/People/Bos/webapps.html">Setting the scope for light-weight Web-based applications</a>. B. Bos. Work in Progress. 26 Feb 2004. Available at <a href="http://www.w3.org/People/Bos/Webapps.html">http://www.w3.org/People/Bos/Webapps.html</a></dd>
<dt><dfn id="xml-packaging">XML Packaging</dfn></dt>
<dd><a href="http://www.w3.org/XML/2000/07/xml-packaging-charter.html"><abbr title="Extensible Markup Language">XML</abbr> Packaging Working Group Charter</a>, J. Nava. W3C. Available at <a href="http://www.w3.org/XML/2000/07/xml-packaging-charter.html">http://www.w3.org/XML/2000/07/xml-packaging-charter.html</a></dd>
<dt><dfn id="semantic">Semantic Webapps</dfn></dt>
<dd><a href="http://www.w3.org/2001/sw/Europe/talks/200409-svgopen/slide1-0.html">Semantic Webapps? Lightweight RDF interfaces for SVG</a>. Sept 7, SVGOpen 2004, Japan. Available from: <a href="http://www.w3.org/2001/sw/Europe/talks/200409-svgopen/slide1-0.html">http://www.w3.org/2001/sw/Europe/talks/200409-svgopen/slide1-0.html</a></dd>
</dl>
]]></content:encoded>
			<wfw:commentRss>http://cowworking.ru/?feed=rss2&amp;p=41</wfw:commentRss>
		</item>
		<item>
		<title>Виджеты: API и события</title>
		<link>http://cowworking.ru/?p=36</link>
		<comments>http://cowworking.ru/?p=36#comments</comments>
		<pubDate>Sun, 12 Apr 2009 20:20:04 +0000</pubDate>
		<dc:creator>max</dc:creator>
		
		<category><![CDATA[Виджеты]]></category>

		<guid isPermaLink="false">http://cowworking.ru/?p=36</guid>
		<description><![CDATA[
Widgets 1.0: APIs and Events
W3C Working Draft 5 February 2009 

This Version:
http://www.w3.org/TR/2009/WD-widgets-apis-20090205/
Latest Version:
http://www.w3.org/TR/widgets-apis/
Previous Version:
none.
Editors:
Arve Bersvendsen, Opera Software ASA
Marcos Caceres, W3C Invited Expert


Copyright © 2009 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C liability, trademark and document use rules apply.


Abstract
This specification defines a set of APIs and events for the Widgets 1.0 Family of Specifications that [...]]]></description>
			<content:encoded><![CDATA[<div class="head"><!--begin-logo--><a href="http://www.w3.org/"><img src="http://www.w3.org/Icons/w3c_home" alt="W3C" width="72" height="48" /></a><!--end-logo--></p>
<h1 class="head">Widgets 1.0: APIs and Events</h1>
<h2 id="editor-s-draft-date" class="no-num no-toc">W3C Working Draft 5 February 2009 <!--W3C Working Draft--></h2>
<dl>
<dt>This Version:</dt>
<dd><a href="http://www.w3.org/TR/2009/WD-widgets-apis-20090205/">http://www.w3.org/TR/2009/WD-widgets-apis-20090205/</a></dd>
<dt>Latest Version:</dt>
<dd><a href="http://www.w3.org/TR/widgets-apis/">http://www.w3.org/TR/widgets-apis/</a></dd>
<dt>Previous Version:</dt>
<dd>none.</dd>
<dt>Editors:</dt>
<dd><a href="http://virtuelvis.com/">Arve Bersvendsen</a>, <a href="http://www.opera.com/">Opera Software ASA</a></dd>
<dd><a href="http://datadriven.com.au/">Marcos Caceres</a>, W3C Invited Expert</dd>
</dl>
<p><!--begin-copyright--></p>
<p class="copyright"><a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> © 2009 <a href="http://www.w3.org/"><acronym title="World Wide Web Consortium">W3C</acronym></a><sup>®</sup> (<a href="http://www.csail.mit.edu/"><acronym title="Massachusetts Institute of Technology">MIT</acronym></a>, <a href="http://www.ercim.org/"><acronym title="European Research Consortium for Informatics and Mathematics">ERCIM</acronym></a>, <a href="http://www.keio.ac.jp/">Keio</a>), All Rights Reserved. W3C <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>, <a href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a> and <a href="http://www.w3.org/Consortium/Legal/copyright-documents">document use</a> rules apply.</p>
<p><!--end-copyright--></div>
<hr />
<h2 id="abstract" class="no-num no-toc">Abstract</h2>
<p>This specification defines a set of APIs and events for the Widgets 1.0 Family of Specifications that enable baseline functionality for widgets. The APIs and Events defined by this specification  defines, amongst other things, the means to:</p>
<ul>
<li>access  the metadata  declared in a widget&#8217;s configuration document,</li>
<li>receive events related to  changes in the view state of a widget,</li>
<li>determine the locale under which a widget is currently running,</li>
<li> be notified of events relating to the widget being updated,</li>
<li>invoke a widget to open a URL on the system&#8217;s default browser,</li>
<li>requests the user&#8217;s attention in a device independent manner,</li>
<li>and check if any additional APIs requested via the configuration document&#8217;s feature element have successfully loaded.</li>
</ul>
<h2 id="sotd" class="no-num no-toc">Status of This Document</h2>
<p><em>This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the <a href="http://www.w3.org/TR/">W3C technical reports index</a> at http://www.w3.org/TR/.</em></p>
<p>First Public Working Draft of the <cite>Widgets 1.0: APIs and Events</cite> specification.This document was produced by a group operating under the <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5 February 2004 W3C Patent Policy</a>. W3C maintains a <a rel="disclosure" href="http://www.w3.org/2004/01/pp-impl/42538/status">public list of any patent disclosures</a> made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential">Essential Claim(s)</a> must disclose the information in accordance with <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">section 6 of the W3C Patent Policy</a>.</p>
<p>This document is produced by the <a href="http://www.w3.org/2008/webapps/">Web Applications WG</a>, part of the <a href="http://www.w3.org/2006/rwc/Activity">Rich Web Clients Activity</a> in the W3C <a href="http://www.w3.org/Interaction/">Interaction Domain</a>. It is expected that this document will progress along the W3C&#8217;s Recommendation track. Publication as a Working Draft does not imply endorsement by the W3C Membership. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.</p>
<p><strong>You can find the latest <a href="http://dev.w3.org/2006/waf/widgets-apis/">Editor&#8217;s Draft</a> of this document in the <a href="http://dev.w3.org/">W3C&#8217;s CVS repository</a>, which is updated on a very regular basis.</strong> Please send comments to <a href="mailto:public-appformats@w3.org">public-appformats@w3.org</a>, the W3C&#8217;s public email list for issues related to Web Application Formats. <a href="http://lists.w3.org/Archives/Public/public-waf/">Archives</a> of the list are available. A detailed <a href="http://dev.w3.org/cvsweb/2006/waf/widgets/">list of changes</a> from the previous version is also available from the W3C&#8217;s CVS server.</p>
<p class="note">Implementers should be aware that this document is not stable. <strong>Implementers who are not taking part in the discussions are likely to find the specification changing out from under them in incompatible ways.</strong> Vendors interested in implementing this document before it eventually reaches the Candidate Recommendation stage should join the aforementioned mailing lists and take part in the discussions.</p>
<p class="note">User agents that wish to extend this specification in any way are encouraged to discuss their extensions on a public forum, such as <a href="mailto:public-webapps@w3.org">public-webapps</a> so their extensions can be considered for standardization.</p>
<h2 id="toc" class="no-num no-toc">Table of Contents</h2>
<p><!--begin-toc--></p>
<ol class="toc">
<li><a href="http://www.w3.org/TR/widgets-apis/#introduction"><span class="secno">1 </span>Introduction</a>
<ol class="toc">
<li><a href="http://www.w3.org/TR/widgets-apis/#the-widget-family-of-specifications"><span class="secno">1.1 </span>The Widget Family of Specifications</a></li>
</ol>
</li>
<li><a href="http://www.w3.org/TR/widgets-apis/#conformance"><span class="secno">2 </span>Conformance</a></li>
<li><a href="http://www.w3.org/TR/widgets-apis/#user-agents"><span class="secno">3 </span>User Agents</a>
<ol class="toc">
<li><a href="http://www.w3.org/TR/widgets-apis/#dependencies-on-other-specifications"><span class="secno">3.1 </span>Dependencies on Other Specifications</a></li>
</ol>
</li>
<li><a href="http://www.w3.org/TR/widgets-apis/#global-definitions"><span class="secno">4 </span>Global Definitions</a></li>
<li><a href="http://www.w3.org/TR/widgets-apis/#resolving-dom-nodes"><span class="secno">5 </span>Resolving DOM Nodes</a></li>
<li><a href="http://www.w3.org/TR/widgets-apis/#the-windowwidget-interface"><span class="secno">6 </span>The <code title="windowwidget-interface">WindowWidget</code> Interface</a>
<ol class="toc">
<li><a href="http://www.w3.org/TR/widgets-apis/#the-widget-attribute"><span class="secno">6.1 </span>The <code>Widget</code> Attribute</a></li>
</ol>
</li>
<li><a href="http://www.w3.org/TR/widgets-apis/#the-widget-interface"><span class="secno">7 </span>The <code>Widget</code> Interface</a>
<ol class="toc">
<li><a href="http://www.w3.org/TR/widgets-apis/#the-currentmode-attribute"><span class="secno">7.1 </span>The <code>currentMode</code> Attribute</a></li>
<li><a href="http://www.w3.org/TR/widgets-apis/#the-locale-attribute"><span class="secno">7.2 </span>The <code>locale</code> Attribute</a></li>
<li><a href="http://www.w3.org/TR/widgets-apis/#the-identifier-attribute"><span class="secno">7.3 </span>The <code>identifier</code> Attribute</a></li>
<li><a href="http://www.w3.org/TR/widgets-apis/#the-currenticon-attribute"><span class="secno">7.4 </span>The <code>currentIcon</code> Attribute</a></li>
<li><a href="http://www.w3.org/TR/widgets-apis/#the-authorname-attribute"><span class="secno">7.5 </span>The <code>authorName</code> Attribute</a></li>
<li><a href="http://www.w3.org/TR/widgets-apis/#the-authoremail-attribute"><span class="secno">7.6 </span>The <code>authorEmail</code> Attribute</a></li>
<li><a href="http://www.w3.org/TR/widgets-apis/#the-authorurl-attribute"><span class="secno">7.7 </span>The <code>authorURL</code> Attribute</a></li>
<li><a href="http://www.w3.org/TR/widgets-apis/#the-name-attribute"><span class="secno">7.8 </span>The <code>name</code> Attribute</a></li>
<li><a href="http://www.w3.org/TR/widgets-apis/#the-description-attribute"><span class="secno">7.9 </span>The <code>description</code> Attribute</a></li>
<li><a href="http://www.w3.org/TR/widgets-apis/#the-version-attribute"><span class="secno">7.10 </span>The <code>version</code> Attribute</a></li>
<li><a href="http://www.w3.org/TR/widgets-apis/#the-width-attribute"><span class="secno">7.11 </span>The <code>width</code> Attribute</a></li>
<li><a href="http://www.w3.org/TR/widgets-apis/#the-height-attribute"><span class="secno">7.12 </span>The <code>height</code> Attribute</a></li>
<li><a href="http://www.w3.org/TR/widgets-apis/#the-preferences-attribute"><span class="secno">7.13 </span>The <code>preferences</code> Attribute</a></li>
<li><a href="http://www.w3.org/TR/widgets-apis/#the-setpreference-method"><span class="secno">7.14 </span>The <code>setPreference()</code> Method</a></li>
<li><a href="http://www.w3.org/TR/widgets-apis/#the-getpreference-method"><span class="secno">7.15 </span>The <code>getPreference()</code> Method</a></li>
<li><a href="http://www.w3.org/TR/widgets-apis/#the-hide-method"><span class="secno">7.16 </span>The <code>hide()</code> Method</a></li>
<li><a href="http://www.w3.org/TR/widgets-apis/#the-show-method"><span class="secno">7.17 </span>The <code>show()</code> Method</a></li>
<li><a href="http://www.w3.org/TR/widgets-apis/#the-onmodechange-callback"><span class="secno">7.18 </span>The <code>onmodechange</code> Callback</a></li>
<li><a href="http://www.w3.org/TR/widgets-apis/#the-onbeforeupdate-callback"><span class="secno">7.19 </span>The <code>onbeforeupdate</code> Callback</a></li>
<li><a href="http://www.w3.org/TR/widgets-apis/#the-onafterupdate-callback"><span class="secno">7.20 </span>The <code>onafterupdate</code> Callback</a></li>
<li><a href="http://www.w3.org/TR/widgets-apis/#the-hasfeature-method"><span class="secno">7.21 </span>The <code>hasFeature()</code> Method</a></li>
<li><a href="http://www.w3.org/TR/widgets-apis/#the-icons-attribute"><span class="secno">7.22 </span>The <code>icons</code> Attribute</a></li>
<li><a href="http://www.w3.org/TR/widgets-apis/#the-seticon-method"><span class="secno">7.23 </span>The <code>setIcon()</code> Method</a></li>
<li><a href="http://www.w3.org/TR/widgets-apis/#the-openurl-method"><span class="secno">7.24 </span>The <code>openURL()</code> Method</a></li>
<li><a href="http://www.w3.org/TR/widgets-apis/#the-getattention-method"><span class="secno">7.25 </span>The <code>getAttention()</code> Method</a></li>
<li><a href="http://www.w3.org/TR/widgets-apis/#the-shownotification-method"><span class="secno">7.26 </span>The <code>showNotification()</code> Method</a></li>
</ol>
</li>
<li><a href="http://www.w3.org/TR/widgets-apis/#the-widgeticon-interface"><span class="secno">8 </span>The <code>WidgetIcon</code> interface</a>
<ol class="toc">
<li><a href="http://www.w3.org/TR/widgets-apis/#the-src-attribute"><span class="secno">8.1 </span>The <code>src</code> Attribute </a></li>
<li><a href="http://www.w3.org/TR/widgets-apis/#the-width-attribute-0"><span class="secno">8.2 </span>The <code>width</code> Attribute</a></li>
<li><a href="http://www.w3.org/TR/widgets-apis/#the-height-attribute-0"><span class="secno">8.3 </span>The <code>height</code> Attribute</a></li>
</ol>
</li>
<li><a class="no-num" href="http://www.w3.org/TR/widgets-apis/#acknowledgements">Acknowledgements</a></li>
<li><a class="no-num" href="http://www.w3.org/TR/widgets-apis/#normative-references">Normative References</a></li>
<li><a class="no-num" href="http://www.w3.org/TR/widgets-apis/#informative-references">Informative References</a></li>
</ol>
<p><!--end-toc--></p>
<h2 id="introduction"><span class="secno">1 </span>Introduction</h2>
<p>This specification defines a set of APIs and events for widgets that enable baseline functionality for widgets. Widgets are full-fledged client-side applications that are authored using Web standards. They are typically downloaded and installed on a client machine or device where they typically run as stand-alone applications outside of a Web browser. Examples range from simple clocks, stock tickers, news casters, games and weather forecasters, to complex applications that pull data from multiple sources to be &#8220;mashed-up&#8221; and presented to a user in some interesting and useful way (see <a href="http://www.w3.org/TR/widgets-apis/#widgets-landscape">[Widgets-Landscape]</a> for more information). The runtime environment in which a widget runs is referred to as a <em>widget user agent</em>.</p>
<h3 id="the-widget-family-of-specifications"><span class="secno">1.1 </span>The Widget Family of Specifications</h3>
<p><em>This section is non-normative.</em></p>
<p>This specification is part of the Widgets 1.0 family of specifications, which   together standardize widgets as a whole. The Widgets 1.0: Packaging and   Configuration <a href="http://www.w3.org/TR/widgets-apis/#widgets-packaging">[Widgets-Packaging]</a> standardizes a Zip-based packaging format, an XML-based   configuration document format and a series of steps that user agents follow when   processing and verifying various aspects of widgets. The Widgets 1.0: Digital   Signature <a href="http://www.w3.org/TR/widgets-apis/#widgets-digsig">[Widgets-DigSig]</a> specification defines a means for widgets to be   digitally signed using a custom profile of the XML-Signature Syntax and   Processing Specification. The Widgets: 1.0: Automatic Updates <a href="http://www.w3.org/TR/widgets-apis/#widgets-updates">[Widgets-Updates]</a> specification defines a version control   model that allows widgets to be kept up-to-date over <a href="http://www.w3.org/TR/widgets-apis/#http">[HTTP]</a>.</p>
<h2 id="conformance"><span class="secno">2 </span>Conformance</h2>
<p>As well as sections marked as non-normative, all diagrams, examples, and notes in this specification are non-normative. Everything else in this specification is normative.</p>
<p>The key words <em class="ct">must</em>, <em class="ct">must not</em>, <em class="ct">required</em>, <em class="ct">should</em>, <em class="ct">should not</em>, <em class="ct">recommended</em>, <em class="ct">may</em> and <em class="ct">optional</em> in this specification are to be interpreted as described in <a href="http://www.w3.org/TR/widgets-apis/#rfc2119">[RFC2119]</a>.</p>
<p>This specification describes the conformance criteria for user agents (relevant to implementers) and various resource types (relevant to authors and authoring tool implementers).</p>
<p>There is only one class of product that can claim conformance to this specification: a <a href="http://www.w3.org/TR/widgets-apis/#user-agent"> user agent</a>.</p>
<h2 id="user-agents"><span class="secno">3 </span>User Agents</h2>
<p>A <dfn id="user-agent"> user agent</dfn> is an implementation that attempts to support this   specification.</p>
<p class="note">Note: The user agent described in this specification does not denote a &#8220;widget user agent&#8221; at large. That is, a user agent that implements all the specifications, and dependencies, defined in the Widgets 1.0: Family of Specifications. The user agent described is this specification is only concerned with the behavior of programming interfaces and what causes events to be fired.</p>
<p>A user agent <em class="ct">must</em> behave as described by this specification in order to claim conformance.</p>
<h3 id="dependencies-on-other-specifications"><span class="secno">3.1 </span>Dependencies on Other Specifications</h3>
<p>This specification relies on several other specifications. A specification is said to be <dfn id="supported">supported</dfn> by a  user agent if the user agent attempts to implement that specification.</p>
<p>A  user agent <em class="ct1">MUST</em> support the <a href="http://www.w3.org/TR/widgets-apis/#widgets-packaging">[Widgets-Packaging]</a> specification and <a href="http://www.w3.org/TR/widgets-apis/#dom3core">[DOM3Core]</a>.</p>
<p class="issue">Need to clarify dependency of HTML5&#8217;s window object (or reference the Window spec). Need to talk to HTML-WG about having the spec moved outside of HTML5.</p>
<p class="ta">In addition to this specification, a  user agent <em class="ct">SHOULD</em> support the following specifications:</p>
<ul>
<li><a href="http://www.w3.org/TR/widgets-apis/#xmlhttprequest">[XMLHttpRequest]</a></li>
<li> <a href="http://www.w3.org/TR/widgets-apis/#widgets-updates">[Widgets-update]</a></li>
</ul>
<h2 id="global-definitions"><span class="secno">4 </span>Global Definitions</h2>
<p>The following definitions are used globally throughout this specification. Please note that other terms are given throughout this document and defined where they are used.</p>
<dl>
<dt><dfn id="widget-context" title="widget-context">Widget context</dfn></dt>
<dd>A environment in which a <code>Widget</code> object is presented to the user. When a user agent instantiates a <dfn id="start-file">start file</dfn>,  as defined by <a href="http://www.w3.org/TR/widgets-apis/#widgets-packaging">[Widgets-Packaging]</a>, the content of the     start file is said to be running in a widget context.</dd>
<dt><dfn id="widget-view-mode" title="widget-view-mode">Widget view mode</dfn></dt>
<dd> A distinct means of presenting a widget in a      user agent. Such modes may include rendering the widget without any     user interface constructs (default), fullscreen, or as any other     application on the operating system on which the  user agent runs, with     native user interface controls for maximizing, minimizing, restoring and     closing windows (application).</dd>
<dt><dfn id="valid-uri">Valid URI</dfn></dt>
<dd>A valid URI is one that     matches the URI token of <a href="http://www.w3.org/TR/widgets-apis/#uri">[URI]</a> or the IRI token of <a href="http://www.w3.org/TR/widgets-apis/#rfc3987">[RFC3987]</a>.</dd>
</dl>
<h2 id="resolving-dom-nodes"><span class="secno">5 </span>Resolving DOM Nodes</h2>
<p class="issue">Need to define what URI scheme we are going to use for widgets.</p>
<h2 id="the-windowwidget-interface"><span class="secno">6 </span>The <code title="windowwidget-interface">WindowWidget</code> Interface</h2>
<p>Objects implementing <a href="http://www.w3.org/TR/widgets-apis/#html5">[HTML5]</a>&#8217;s  <code>Window</code> interface <em class="ct"> MUST</em> also implement the <code title="dom-WindowWidget"><a href="http://www.w3.org/TR/widgets-apis/#dom-WindowWidget">WindowWidget</a></code> interface. The <code>WindowWidget</code> interface provides access to <a href="http://www.w3.org/TR/widgets-apis/#dom3core">[DOM3Core]</a> <code>Document</code> objects  in a <span>widget context</span>.</p>
<pre class="idl">interface <dfn id="dom-WindowWidget" title="dom-WindowWidget">WindowWidget</dfn> {
  readonly attribute <a title="dom-Widget" href="http://www.w3.org/TR/widgets-apis/#dom-widget">Widget</a> <a title="dom-WindowWidget-widget" href="http://www.w3.org/TR/widgets-apis/#dom-windowwidget-widget">widget</a>;
}</pre>
<h3 id="the-widget-attribute"><span class="secno">6.1 </span>The <code>Widget</code> Attribute</h3>
<p>The read only <dfn id="dom-windowwidget-widget" title="dom-WindowWidget-widget"><code>widget</code></dfn> attribute <em class="ct">MUST</em> contain a  <code title="dom-Widget"><a href="http://www.w3.org/TR/widgets-apis/#dom-widget">Widget</a></code> object.</p>
<p><!-- h3>Interfaces defined in other specifications</h3>
<p>Some of the interfaces required by a conforming widget implementation are defined in other specifications, such as [HTML5]</p>
<dl>
<dt>The Storage interface</dt>
<dd>A conforming widget <i class="ct">SHOULD</i> implement the Storage   interface from the HTML5 specification.</p>
<p>In addition, a conforming implementation <i class="ct">SHOULD</i> implement both the <code>localStorage</code> attribute of the Window   interface, and the storage event.</p>
<p>An implementation that implements the Storage interface, <i   class="ct">MUST</i> treat individual widget instances as having a separate   origin, meaning such an implementation <i class="ct">MUST NOT</i> allow   separate widgets to share data contained in the storage.</p>
</dd>
</dl -->
<h2 id="the-widget-interface"><span class="secno">7 </span>The <code id="widget-interface">Widget</code> Interface</h2>
<p>Within the <span>widget context</span>, the <code title="dom-widget"><a href="http://www.w3.org/TR/widgets-apis/#dom-widget">Widget</a></code> interface provides the following attributes and methods.</p>
<pre class="idl">interface <dfn id="dom-widget" title="dom-widget">Widget</dfn> {

  readonly attribute dom::DOMString <a title="widget-currentmode" href="http://www.w3.org/TR/widgets-apis/#the-currentmode-attribute">currentMode</a>;
  readonly attribute dom::DOMString <a title="widget-locale" href="http://www.w3.org/TR/widgets-apis/#the-locale-attribute">locale</a>;
  readonly attribute dom::DOMString <a title="widget-identifier" href="http://www.w3.org/TR/widgets-apis/#the-identifier-attribute">identifier</a>;
  readonly attribute <span>WidgetIcon</span>     <a title="widget-currenticon" href="http://www.w3.org/TR/widgets-apis/#the-currenticon-attribute">currentIcon</a>;
  readonly attribute dom::DOMString <a title="widget-authorname" href="http://www.w3.org/TR/widgets-apis/#the-authorname-attribute">authorName</a>;
  readonly attribute dom::DOMString <a title="widget-authoremail" href="http://www.w3.org/TR/widgets-apis/#the-authoremail-attribute">authorEmail</a>;
  readonly attribute dom::DOMString <a title="widget-authorurl" href="http://www.w3.org/TR/widgets-apis/#the-authorurl-attribute">authorURL</a>;
  readonly attribute dom::DOMString <a title="widget-name" href="http://www.w3.org/TR/widgets-apis/#the-name-attribute">name</a>;
  readonly attribute dom::DOMString <a title="widget-description" href="http://www.w3.org/TR/widgets-apis/#the-description-attribute">description</a>;
  readonly attribute dom::DOMString <a title="widget-version" href="http://www.w3.org/TR/widgets-apis/#the-version-attribute">version</a>;
  readonly attribute unsigned short <a title="widget-width" href="http://www.w3.org/TR/widgets-apis/#the-width-attribute">width</a>;
  readonly attribute unsigned short <a title="widget-height" href="http://www.w3.org/TR/widgets-apis/#the-height-attribute">height</a>;

           attribute Array          <a title="widget-preferences" href="http://www.w3.org/TR/widgets-apis/#the-preferences-attribute">preferences</a>;
  DOMString <a title="widget-setpreference" href="http://www.w3.org/TR/widgets-apis/#the-setpreference-method">setPreference</a>(in DOMString <var>name</var>, in DOMString <var>value</var>);
       void <a title="widget-getpreference" href="http://www.w3.org/TR/widgets-apis/#the-getpreference-method">getPreference</a>(in DOMString <var>name</var>);

  void <a title="widget-hide" href="http://www.w3.org/TR/widgets-apis/#the-hide-method">hide</a>();
  void <a title="widget-show" href="http://www.w3.org/TR/widgets-apis/#the-show-method">show</a>();
           attribute Function <span title="widget-onchange">onmodechange</span>;

           attribute Function <a title="widget-onbeforeupdate" href="http://www.w3.org/TR/widgets-apis/#the-onbeforeupdate-callback">onbeforeupdate</a>;
           attribute Function <a title="widget-onafterupdate" href="http://www.w3.org/TR/widgets-apis/#the-onafterupdate-callback">onafterupdate</a>;

  boolean <a title="widget-hasfeature" href="http://www.w3.org/TR/widgets-apis/#the-hasfeature-method">hasFeature</a>(in DOMString <var>url</var>);

  readonly attribute Array          <a title="widget-icons" href="http://www.w3.org/TR/widgets-apis/#the-icons-attribute">icons</a>;
  void <a title="widget-seticon" href="http://www.w3.org/TR/widgets-apis/#the-seticon-method">setIcon</a>(in DOMString <var>url</var>);
  void <a title="widget-seticon" href="http://www.w3.org/TR/widgets-apis/#the-seticon-method">setIcon</a>(in WidgetIcon <var>icon</var>);

  void <span title="widget-openurl">openURL</span>(DOMString <var>url</var>);

  void <a title="widget-getattention" href="http://www.w3.org/TR/widgets-apis/#the-getattention-method">getAttention</a>();
  void <a title="widget-shownotification" href="http://www.w3.org/TR/widgets-apis/#the-shownotification-method">showNotification</a>(in DOMString <var>title</var>, in DOMString <var>message</var>, in Function onclick);
}</pre>
<h3 id="the-currentmode-attribute"><span class="secno">7.1 </span>The <dfn title="widget-currentmode"><code>currentMode</code></dfn> Attribute</h3>
<p>The <code>currentMode</code> attribute contains a representation of one <a href="http://dev.w3.org/2006/waf/widgets/#valid-window-mode">valid window mode</a>, as defined in <a href="http://www.w3.org/TR/widgets-apis/#widgets-packaging">[Widgets-Packaging]</a>. Upon instantiation, this attribute <em class="ct">MUST</em> be set to the value of <var>widget window mode</var>, which is derived from the Steps for Processing a Widget Resource in <a href="http://www.w3.org/TR/widgets-apis/#widgets-packaging">[Widgets-Packaging]</a>.</p>
<h3 id="the-locale-attribute"><span class="secno">7.2 </span>The <dfn title="widget-locale"><code>locale</code></dfn> Attribute</h3>
<p>The <code>locale</code> attribute represents the current locale for the running widget. Upon instantiation, this attribute <em class="ct">MUST</em> be set to the value of <var>widget locale</var>, which is derived from the Steps for Processing a Widget Resource in <a href="http://www.w3.org/TR/widgets-apis/#widgets-packaging">[Widgets-Packaging]</a>.</p>
<h3 id="the-identifier-attribute"><span class="secno">7.3 </span>The <dfn title="widget-identifier"><code>identifier</code></dfn> Attribute</h3>
<p>The <code>identifier</code> attribute represents a unique <span>instance identifier</span> for the widget. The instance     identifier <em class="ct">MUST</em> be unique on for each widget instance on the device or machine it is installed.</p>
<p class="issue">Issue: how does an author access the widget&#8217;s id as declared in the config document? Also, what happens if this is not unique? How is uniqueness assured?</p>
<h3 id="the-currenticon-attribute"><span class="secno">7.4 </span>The <dfn title="widget-currenticon"><code>currentIcon</code></dfn> Attribute</h3>
<p>The <code>currentIcon</code> attribute <em class="ct">MUST</em> contain a <code>WidgetIcon</code> object that represents the         current icon for the widget.</p>
<p class="issue">Issue: need to define how this icon is initially derived. This was in the Packaging spec, but no more. The above definition seems incomplete, what does &#8220;current&#8221; mean in this context.</p>
<h3 id="the-authorname-attribute"><span class="secno">7.5 </span>The <dfn title="widget-authorname"><code>authorName</code></dfn> Attribute</h3>
<p>The <code>authorName</code> attribute represents the name of the person who authored the widget. Upon instantiation, this attribute <em class="ct">MUST</em> be set to the value of <var>author name</var>, which is derived from the Steps for Processing a Widget Resource in <a href="http://www.w3.org/TR/widgets-apis/#widgets-packaging">[Widgets-Packaging]</a>.</p>
<h3 id="the-authoremail-attribute"><span class="secno">7.6 </span>The <dfn title="widget-authoremail"><code>authorEmail</code></dfn> Attribute</h3>
<p>The <code>authorEmail</code> attribute represents an e-mail address associated with the author of a         widget. Upon instantiation, this attribute <em class="ct">MUST</em> be set to the value of <var>author email</var>, which is derived from the Steps for Processing a Widget Resource in <a href="http://www.w3.org/TR/widgets-apis/#widgets-packaging">[Widgets-Packaging]</a>.</p>
<h3 id="the-authorurl-attribute"><span class="secno">7.7 </span>The <dfn title="widget-authorurl"><code>authorURL</code></dfn> Attribute</h3>
<p>The <code>authorURL</code> attribute represents a URI associated with the author of a         widget. Upon instantiation, this attribute <em class="ct">MUST</em> be set to the value of <var>author href</var>, which is derived from the Steps for Processing a Widget Resource in <a href="http://www.w3.org/TR/widgets-apis/#widgets-packaging">[Widgets-Packaging]</a>.</p>
<h3 id="the-name-attribute"><span class="secno">7.8 </span>The <dfn title="widget-name"><code>name</code></dfn> Attribute</h3>
<p>The <code>name</code> attribute         represents the name of the widget. Upon instantiation, this attribute <em class="ct">MUST</em> be set to the value of <var>widget name</var>, which is derived from the Steps for Processing a Widget Resource in <a href="http://www.w3.org/TR/widgets-apis/#widgets-packaging">[Widgets-Packaging]</a>.</p>
<p class="issue">Wondering if we should rename this <code>widgetname</code> to avoid confusion with <code>window.name</code>.</p>
<h3 id="the-description-attribute"><span class="secno">7.9 </span>The <dfn title="widget-description"><code>description</code></dfn> Attribute</h3>
<p>The <code>description</code> represents  the description given to the widget. Upon instantiation, this attribute <em class="ct">MUST</em> be set to the value of <var>widget description</var>, which is derived from the Steps for Processing a Widget Resource in <a href="http://www.w3.org/TR/widgets-apis/#widgets-packaging">[Widgets-Packaging]</a>.</p>
<h3 id="the-version-attribute"><span class="secno">7.10 </span>The <dfn title="widget-version"><code>version</code></dfn> Attribute</h3>
<p>The <code>version</code> attribute represents the version tag assigned to the widget. Upon instantiation, this attribute <em class="ct">MUST</em> be set to the value of <var>widget version</var>, which is derived from the Steps for Processing a Widget Resource in <a href="http://www.w3.org/TR/widgets-apis/#widgets-packaging">[Widgets-Packaging]</a>.</p>
<h3 id="the-width-attribute"><span class="secno">7.11 </span>The <dfn title="widget-width"><code>width</code></dfn> Attribute</h3>
<p>The <code><a href="http://www.w3.org/TR/widgets-apis/#the-width-attribute-0"><code>width</code></a></code> attribute represents the  width of the widget measured in <a href="http://www.w3.org/TR/widgets-apis/#css21">[CSS21]</a> pixels.  Upon instantiation, this attribute <em class="ct">SHOULD</em> be set to the value of <var>widget width</var>, which is derived from the Steps for Processing a Widget Resource in <a href="http://www.w3.org/TR/widgets-apis/#widgets-packaging">[Widgets-Packaging]</a>.</p>
<p class="issue">Issue: need to define cases where the has been implicitly resized by the user agent, or explicitly resized by other means.</p>
<h3 id="the-height-attribute"><span class="secno">7.12 </span>The <dfn title="widget-height"><code>height</code></dfn> Attribute</h3>
<p>The <code><a href="http://www.w3.org/TR/widgets-apis/#the-height-attribute-0"><code>height</code></a></code> attribute <em class="ct">MUST</em> provide the  height of the widget measured in <a href="http://www.w3.org/TR/widgets-apis/#css21">[CSS21]</a> pixels.   Upon instantiation, this attribute <em class="ct">SHOULD</em> be set to the value of <var>widget height</var>, which is derived from the Steps for Processing a Widget Resource in <a href="http://www.w3.org/TR/widgets-apis/#widgets-packaging">[Widgets-Packaging]</a>.</p>
<p class="issue">Issue: need to define cases where the has been implicitly resized by the user agent, or explicitly resized by other means.</p>
<h3 id="the-preferences-attribute"><span class="secno">7.13 </span>The <dfn title="widget-preferences"><code>preferences</code></dfn> Attribute</h3>
<p>The <code>preferences</code> attribute holds either no preferences, or any preferences that have previously been stored   in the widget using the <code>setPreference</code> method.</p>
<p>The values held in <code>preferences</code> <em class="ct">MUST</em> be preserved across instantiations of the widget.</p>
<p class="issue">This feature is at Risk. We are still discussing if we should use HTML5&#8217;s Storage to achieve this. Please send us feedback.</p>
<h3 id="the-setpreference-method"><span class="secno">7.14 </span>The <dfn title="widget-setpreference"><code>setPreference()</code></dfn> Method</h3>
<p>The <code>setPreference()</code> method     accepts two arguments, both of which <em class="ct">MUST</em> be present. The first argument <em class="ct">MUST</em> be a    <code>DOMString</code> providing the name of the preference to be stored. The     second argument <em class="ct">MUST</em> be     either a <code>DOMString</code>, or <code>null</code>.</p>
<p>When correctly invoked, the <code>setPreference()</code> method     <em class="ct">MUST</em> store the value from the second argument, in a preference with     the value  from the first argument.</p>
<p>If <code>setPreference()</code> is invoked with <code>null</code> as the second argument, and a preference     with the name from the first argument exists, the preference <em class="ct">MUST</em> be deleted.</p>
<p>If either argument to <code>setPreference()</code> is     invalid, a user agent <em class="ct">MUST</em> throw an     <code>INVALID_ARGUMENT_ERR</code>.</p>
<p class="issue">Issue: INVALID_ARGUMENT_ERR is not defined as extending DOM3Core&#8217;s DOMException interface. Need to define it here or throw a predefined exception type.</p>
<p class="issue">This feature is at risk. We are still discussing if we should use HTML5&#8217;s Storage to achieve this. Please send us feedback.</p>
<h3 id="the-getpreference-method"><span class="secno">7.15 </span>The <dfn title="widget-getpreference"><code>getPreference()</code></dfn> Method</h3>
<p>The <code>getPreference()</code> method accepts one argument, a <code>DOMString</code> containing the name of a preference to be retrieved from the preference   storage.</p>
<p>Upon  invocation of the method, a user agent <em class="ct">MUST</em> attempt to retrieve the value of the preference with the   name given from the first argument, and return the value as a   <code>DOMString</code>. If a preference with the given name does not exist, the   user agent MUST instead return <code>null</code>.</p>
<h3 id="the-hide-method"><span class="secno">7.16 </span>The <code><dfn title="widget-hide">hide</dfn>()</code> Method</h3>
<p>If the widget is visible, a user agent <em class="ct">MAY</em> hide the widget from the user&#8217;s view. When a widget is         hidden, it <em class="ct">MUST</em> stop accepting input events.</p>
<p class="issue">Issue: Does hiding change the window mode? Need to define &#8220;input event&#8221;.</p>
<h3 id="the-show-method"><span class="secno">7.17 </span>The <code><dfn title="widget-show">show</dfn>()</code> Method</h3>
<p>Upon invocation of the method,          the <code>show()</code> the widget is visible, a user agent <em class="ct">SHOULD</em> ensure that if the widget is         invisible, should be made visible.</p>
<p class="issue">Issue: Does showing change the window mode or cause onmodechange to fire? This is under-defined. What happens if the widget is visible but off screen?</p>
<h3 id="the-onmodechange-callback"><span class="secno">7.18 </span>The <code><dfn title="widget-onmodechange">onmodechange</dfn></code> Callback</h3>
<p>The <code>onmodechange</code> attribute <em class="ct">MAY</em> hold a reference to a function that is to     be executed when a widget&#8217;s <a title="widget-view-mode" href="http://www.w3.org/TR/widgets-apis/#widget-view-mode">view mode</a> changes, meaning that the value of the <code>currentMode</code> attribute     changes.  Its initial value is <code>null</code>.</p>
<p>When a valid function is assigned to the attribute, a user agent <em class="ct">MUST</em> invoke this function whenever the view mode     has changed, without passing any arguments to the function. A conformant     implementation <em class="ct">MUST</em> further first set the value of the      <code>currentMode</code> attribute to the new view mode prior to invoking the function.</p>
<h3 id="the-onbeforeupdate-callback"><span class="secno">7.19 </span>The <code><dfn title="widget-onbeforeupdate">onbeforeupdate</dfn></code> Callback</h3>
<p>The <code>onbeforeupdate</code> attribute <em class="ct">MAY</em> hold a reference to a function that is to     be executed before a widget is updated, prior to the widget shutting down to     prepare for the update. Its initial value is <code>null</code>.</p>
<p>When a user agent is about to update the widget update, the     function assigned to this attribute is invoked prior to the widget instance     shutting down, to allow the widget to perform a clean shutdown, and possibly     prepare the widget for the next startup.</p>
<p class="issue">Should we add a checkForUpdate() method? which requests that the widget engine check if an update is available by using the Widget Update spec?</p>
<h3 id="the-onafterupdate-callback"><span class="secno">7.20 </span>The <code><dfn title="widget-onafterupdate">onafterupdate</dfn></code> Callback</h3>
<p>The <code>onafterupdate</code> attribute <em class="ct">MAY</em> hold a reference to a function that is to     be executed after a widget is updated. Its initial value is <code>null</code>.</p>
<p>On startup of a widget, the value of this attribute will always be <code>null</code>. If the widget then assigns a function to this attribute, a user agent <em class="ct">MUST</em> immediately invoke the function after it has been assigned.</p>
<h3 id="the-hasfeature-method"><span class="secno">7.21 </span>The <code><dfn title="widget-hasfeature">hasFeature()</dfn></code> Method</h3>
<p>The <code>hasFeature()</code> method accepts a valid <code>DOMString</code> as argument. This argument   represents a URI reference identifying an API. If this API is recognized and   available to the widget, the user agent <em class="ct">MUST</em> return   <var>true</var>. In all other cases, for example if the API not being recognized, or   access has been prohibited, the user agent <em class="ct">MUST</em> return <var>false</var>.</p>
<h3 id="the-icons-attribute"><span class="secno">7.22 </span>The <code><dfn title="widget-icons">icons</dfn></code> Attribute</h3>
<p>The <code>icons</code> <em class="ct">MUST</em> hold an array of icon objects, each icon representing an icon from the widget&#8217;s manifest file.</p>
<h3 id="the-seticon-method"><span class="secno">7.23 </span>The <code><dfn title="widget-seticon">setIcon()</dfn></code> Method</h3>
<p>The <code>setIcon</code> method       accepts exactly one argument. This argument <em class="ct">MUST</em> be either       a a <a href="http://www.w3.org/TR/widgets-apis/#valid-uri">valid URI</a> pointing to an image file inside the widget package,       or it must be a valid instance of a <code>WidgetIcon</code> object. When invoked, the       <code>setIcon()</code> method <em class="ct">MAY</em> change the application icon associated with the widget.</p>
<h3 id="the-openurl-method"><span class="secno">7.24 </span>The <code><dfn>openURL</dfn>()</code> Method</h3>
<p>The <code>openURL(<var>url</var>)</code> method takes a   <a href="http://www.w3.org/TR/widgets-apis/#valid-uri">valid URI</a> as argument. When invoked, the <var>url</var> <em class="ct">should</em> be opened in the default browser of the operating   system on which the <span>widget</span> runs. If there is no such browser or   the <var>url</var> is not a <a href="http://www.w3.org/TR/widgets-apis/#valid-uri">valid URI</a>, then the user agent <em class="ct">must</em> act as if the method was not invoked.</p>
<h3 id="the-getattention-method"><span class="secno">7.25 </span>The <code><dfn title="widget-getattention">getAttention</dfn>()</code> Method</h3>
<p>When the <code>getAttention()</code> method is     invoked, a user agent <em class="ct">MAY</em> use a     system-specific method of alerting the user that the widget requires     attention. The user agent <em class="ct">SHOULD NOT</em> focus the widget.     This specification does not impose requirements for the user interface for     such a mechanism, but examples may include flashing a task-bar entry,     highlighting or animating the application icon for the widget.</p>
<h3 id="the-shownotification-method"><span class="secno">7.26 </span>The <code><dfn title="widget-shownotification">showNotification</dfn>()</code> Method</h3>
<p>The <code>showNotification()</code> method accepts two arguments. The first argument is a     <code>DOMString</code> containing an informative message to be displayed to     the end-user. The second argument is an optional reference to a function     that is to be invoked if the user acknowledges the notification message, for     instance by clicking on it.</p>
<h2 id="the-widgeticon-interface"><span class="secno">8 </span>The <code>WidgetIcon</code> interface</h2>
<pre class="idl">interface <dfn id="dom-widget-icon" title="dom-widget-icon">WidgetIcon</dfn> {
  readonly attribute DOMString <span title="wi-src">src</span>;
  readonly attribute unsigned long <span title="wi-width">width</span>;
  readonly attribute unsigned long <span title="wi-height">height</span>;
}</pre>
<p><!-- dt><code><dfn>active</dfn></code>, readonly of type Boolean</dt>
<dd>The <code>active</code> attribute, of type Boolean has the value <code>true</code> if the current icon is the active icon</dd -->
<h3 id="the-src-attribute"><span class="secno">8.1 </span>The <code><dfn>src</dfn></code> Attribute</h3>
<p>The <code><a href="http://www.w3.org/TR/widgets-apis/#the-src-attribute">src</a></code> attribute represents a <a href="http://www.w3.org/TR/widgets-apis/#valid-uri">valid URI</a> to an image file inside the widget package that represents an iconic representation of the widget.</p>
<h3 id="the-width-attribute-0"><span class="secno">8.2 </span>The <code><dfn>width</dfn></code> Attribute</h3>
<p>The <code><a href="http://www.w3.org/TR/widgets-apis/#the-width-attribute-0">width</a></code> represents the width of the icon in <a href="http://www.w3.org/TR/widgets-apis/#css21">[CSS21]</a> pixels.</p>
<h3 id="the-height-attribute-0"><span class="secno">8.3 </span>The <code><dfn>height</dfn></code> Attribute</h3>
<p>The <code><a href="http://www.w3.org/TR/widgets-apis/#the-height-attribute-0">height</a></code> represents the height of the icon in <a href="http://www.w3.org/TR/widgets-apis/#css21">[CSS21]</a> pixels.</p>
<h2 id="acknowledgements" class="no-num">Acknowledgements</h2>
<p class="issue">This section will be completed as the document matures.</p>
<h2 id="normative-references" class="no-num">Normative References</h2>
<dl>
<dt><dfn id="css21">[CSS21]</dfn></dt>
<dd><cite><a href="http://www.w3.org/TR/2007/CR-CSS21-20070719">Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification</a>,</cite> Bert Bos, Ian       Hickson, Tantek Çelik, Håkon Wium Lie. W3C Candidate Recommendation 19 July 2007.</dd>
<dt><dfn id="dom3core">[DOM3Core]</dfn></dt>
<dd><a href="http://www.w3.org/TR/DOM-Level-3-Core"><cite>Document Object Model       (DOM) Level 3 Core Specification</cite></a>, A. Le Hors, P. Le Hégaret, L. Wood,       G. Nicol, J. Robie, M. Champion, S. Byrne, editors. World Wide Web       Consortium, April 2004.</dd>
<dt><dfn id="ecmascript">[ECMAScript]</dfn></dt>
<dd><cite><a href="http://www.ecma-international.org/publications/standards/Ecma-262.htm">ECMAScript               Language Specification</a></cite>, Third Edition. ECMA, December 1999.</dd>
<dt><dfn id="html5">[HTML5]</dfn></dt>
<dd><cite><a href="http://www.w3.org/html/wg/html5/">HTML 5</a></cite>, I. Hickson, D. Hyatt, editors. W3C Working Draft, 2008.</dd>
<dt><dfn id="http">[HTTP]</dfn></dt>
<dd><a href="http://www.ietf.org/rfc/rfc2616.txt"><cite>Hypertext Transfer        Protocol &#8212; HTTP/1.1</cite></a>. RFC 2616, R. Fielding, et al. June 1999.</dd>
<dt><dfn id="rfc2119">[RFC2119]</dfn></dt>
<dd><a href="http://www.ietf.org/rfc/rfc2119"><cite>Key words for use in       RFCs to Indicate Requirement Levels</cite></a>, RFC2119, S. Bradner. March       1997.</dd>
<dt><dfn id="rfc3987">[RFC3987]</dfn></dt>
<dd><cite><a href="http://www.ietf.org/rfc/rfc3987">Internationalized       Resource Identifiers (IRIs)</a></cite>. RFC3987, M. Duerst, M. Suignard.        January 2005.</dd>
<dt><dfn id="uri">[URI]</dfn></dt>
<dd><a href="http://www.ietf.org/rfc/rfc3986.txt"><cite>Uniform Resource        Identifier (URI): Generic Syntax</cite></a>.RFC 3986, T. Berners-Lee, R. Fielding and L. Masinter.       January 2005.</dd>
<dt> </dt>
<dt><dfn id="widgets-packaging">[Widgets-Packaging]</dfn></dt>
<dd><a href="http://www.w3.org/TR/2008/WD-widgets-20081222/"><cite>Widgets 1.0: Packaging and Configuration</cite></a>. M. Caceres, Ed. W3C Working Draft 31 January 2009. (Work in progress)</dd>
<dt><dfn id="widgets-updates">[Widgets-Updates]</dfn></dt>
<dd><a href="http://www.w3.org/TR/widgets-land/"><cite>Widgets 1.0: Updates</cite></a>. M. Caceres, Ed. W3C, W3C Working Draft 7 October 2008. (Work in progress)</dd>
<dt><dfn id="xmlhttprequest">[XMLHttpRequest]</dfn></dt>
<dd><a href="http://www.w3.org/TR/XMLHttpRequest/"><cite>The XMLHttpRequest                Object</cite></a>. A van Kesteren. W3C Working Draft 15 April 2008. (Work in progress)</dd>
</dl>
<h2 id="informative-references" class="no-num">Informative References</h2>
<dl>
<dt><dfn id="widgets-landscape">[Widgets-Landscape]</dfn></dt>
<dd><a href="http://www.w3.org/TR/widgets-land/"><cite>Widgets 1.0: The Widget       Landscape (Q1 2008)</cite></a>. M. Caceres. W3C Working Draft. 14 April 2008.</dd>
<dt><dfn id="widgets-digsig">[Widgets-DigSig]</dfn></dt>
<dd><a href="http://www.w3.org/TR/widgets-digsig/"><cite>Widgets 1.0: Digital Signature</cite></a>. M. Caceres, Ed. W3C, W3C Working Draft 14 April 2008.</dd>
</dl>
]]></content:encoded>
			<wfw:commentRss>http://cowworking.ru/?feed=rss2&amp;p=36</wfw:commentRss>
		</item>
	</channel>
</rss>
