<?xml version="1.0" encoding="UTF-8"?>
<!--
altova_sps d:\documentacion\DDWG\APIDocumentEdition\DIWG-xmlspec.sps
-->
<?xml-stylesheet type="text/xsl" href="xmlspec.xsl"?>
<spec xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xl="http://www.w3.org/1999/xlink" xmlns:h="http://www.w3.org/1999/xhtml" xsi:noNamespaceSchemaLocation="xmlspec.xsd" status="int-review" w3c-doctype="wd" role="editors-copy">
	<header>
		<title>Device Description</title>
		<subtitle>Structures, groups and clustering</subtitle>
		<version>1a</version>
		<w3c-designation/>
		<w3c-doctype role="placeholder">Editors' Draft</w3c-doctype>
		<pubdate>
			<day>31</day>
			<month>October</month>
			<year>2007</year>
		</pubdate>
		<publoc role="placeholder">
			<loc href="http://www.w3.org/2005/MWI/DDWG/drafts/structures/071031" xl:show="replace" xl:actuate="onRequest">http://www.w3.org/2005/MWI/DDWG/drafts/api/071031</loc>
		</publoc>
		<latestloc>
			<loc href="http://www.w3.org/2005/MWI/DDWG/drafts/structures/latest" xl:show="replace" xl:actuate="onRequest">http://www.w3.org/2005/MWI/DDWG/drafts/structures/latest</loc>
		</latestloc>
		<prevlocs role="placeholder">
			<loc href="http://www.w3.org/2005/MWI/DDWG/drafts/structures/071031" xl:show="replace" xl:actuate="onRequest">http://www.w3.org/2005/MWI/DDWG/drafts/api/071031</loc>
		</prevlocs>
		<authlist>
			<author>
				<name>José Manuel Cantera Fonseca</name>
				<affiliation>Telefónica I+D</affiliation>
			</author>
		</authlist>
		<abstract>
			<p>
The MWI-DDWG is charterted to the simplification and standardization of issues around device description for content adaptation. In this scenario one specific problem that arise is the definition of portable mechanisms for defining groups of devices that share common characteristics. This Note is devoted to different technical approaches for solving this problem. Additionally, it is defined an standard API that can be used in the development of applications that exploit device structure information for adaptation or other purposes.
</p>
		</abstract>
		<status>
			<p>
				<emph>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 <loc href="http://www.w3.org/TR/" xl:show="replace" xl:actuate="onRequest">W3C technical reports index</loc> at http://www.w3.org/TR/. </emph>
			</p>
			<p>This is <phrase role="placeholder">an Editorial Draft</phrase> of a possible future W3C Note</p>
			<p>Publication as <phrase role="placeholder">an Editorial Draft</phrase> does not imply endorsement by the <phrase role="placeholder">Device Description Working Group or the W3C Membership</phrase>. 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>This document is published as part of the W3C <loc href="http://www.w3.org/Mobile/" xl:show="replace" xl:actuate="onRequest">Mobile Web Initiative</loc> (MWI) by the <loc href="http://www.w3.org/2005/MWI/DDWG/" xl:actuate="onRequest" xl:show="replace">Device Description Working Group</loc>. It is a deliverable as defined in the <loc xl:actuate="onRequest" xl:show="replace" href="http://www.w3.org/2006/09/mwi-ddwg2-charter">Charter</loc> of that group.</p>
			<p>Please send comments to <loc href="mailto:public-ddwg@w3.org" xl:show="replace" xl:actuate="onRequest">public-ddwg@w3.org</loc>. This list is archived at <loc href="http://lists.w3.org/Archives/Public/public-ddwg" xl:show="replace" xl:actuate="onRequest">http://lists.w3.org/Archives/Public/public-ddwg/</loc>.</p>
			<p>This document was produced by a group operating under the <loc href="http://www.w3.org/Consortium/Patent-Policy-20040205/" xl:show="replace" xl:actuate="onRequest">5 February 2004 W3C Patent Policy</loc>. W3C maintains a <loc href="http://www.w3.org/2004/01/pp-impl/32080/status#specs" xl:show="replace" xl:actuate="onRequest">public list of any patent disclosures</loc> 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 <loc href="http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential" xl:show="replace" xl:actuate="onRequest">Essential Claim(s)</loc> must disclose the information in accordance with <loc href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure" xl:show="replace" xl:actuate="onRequest">section 6 of the W3C Patent Policy</loc>.</p>
		</status>
		<langusage>
			<language id="en-US"/>
		</langusage>
		<revisiondesc>
			<p>First draft</p>
		</revisiondesc>
	</header>
	<body>
		<div1 id="sec-introduction">
			<head>Introduction</head>
			<p role="ednote">JMCF: To be revised</p>
			<p>The mobile handset market is very innovative and dynamic, offering tons of devices made by different manufacturers. However, it is noteworthy that most of these devices share common characteristics, and, as a result, there is a tendency towards device grouping into families to capture sets of devices that share common characteristics. Two specific examples, are the 'Nokia Series 60' family  or the 'Smartphone devices'. Device grouping is useful as it provides a level of abstraction (in an specific context) that avoids in thinking on specific models or particularities. 
</p>
			<p>
			Device grouping is not only useful for abstraction purposes. There also different situations regarding adaptation of content in the mobile web where it is needed to group different kind of devices to create categories, families, hierarchies or clusters of devices. For example, "The customer wants to include an extra link in a page for those devices that belong to the Nokia Series 60" family. This kind of functionality is currently available in different content adaptation solutions in the commercial and open source space. The problem with the existing approaches is that none of them is standardized and, as a result, it is not feasible to share families of devices between different device description repositories. Therefore, it would be desirable to define standard mechanisms and APIs that enable the definition of portable mechanisms for grouping devices.
			</p>
			<p>
 This W3C Note describes the situations where device grouping is useful and proposes techniques, formalisms and extended DDR-APIs for solving in a standard way the problem of device grouping. 			
	 </p>		
			
		</div1>
		<div1 id="sec-rel-other-specs">
			<head>Relationship with other specifications</head>
			<p></p>
			<ulist>
				<item>
					<p>Delivery Context Ontology</p>
				</item>
				<item>
					<p>DDR-API</p>
				</item>
			</ulist>
		</div1>
		<div1 id="sec-terminology">
			<head>Terminology</head>
		</div1>
		<div1 id="sec-conventions">
			<head>Conventions</head>
			<div2>
				<head>Documentation Conventions</head>
				<p/>
				<div3>
					<head>Bindings</head>
					<p>This specification provides a  definition of an interface based on OMG IDL <bibref ref="ref-IDL"/>.</p>
					<p>In addition, it also provides a WSDL <bibref ref="ref-WSDL"/> binding.</p>
				</div3>
			</div2>
			<div2>
				<head>Naming Conventions</head>
			</div2>
			<div2>
				<head>Examples</head>
				<p role="ednote">review</p>
				<p>Examples given in this specification are informational. The programming language used in examples are Java and PHP.</p>
			</div2>
		</div1>
		<div1 id="sec-use-cases">
			<head>Use Cases</head>
			<div2 id="use-case-1">
				<head>Use Case 1 : Mobile Web content adaptation for a family of devices</head>
				<p>John is a developer in charge of designing and deploying a new mobile web site. As a requirement the site must be accesible from a myriad of devices including mobile phones, smartphones and different kind of PDAs (Palm, Blackberry, Pocket PC). The customer is expecting a good experience in all the devices addressed, exploiting all device features at a maximum.
</p><p>
There are some requirements that has to do with the presentation of different information in tabular format. Initially John starts designing all the tables to have only two columns, restricting the amount of information of each entity to the two most important data fields. This design is suitable for the majority of mobile phones but when he tests on a PDA device, John realizes that two columns provide a very poor result on a PDA device. He realizes that space is wasted and decides to add an additional column that will be only displayed for those devices that are PDAs.
</p><p>
To overcome that issue, John creates a new device family called 'PDADevice' using a tool provided by a W3C-compliant device description solution. This family of devices will be characterized by a set conditions on the device capabilities, such as screen dimensions, supported markup code, available memory, etc. Once the device family is created and uploaded to the DDR, John uses the DDR API in his favourite programming language to generate the markup table accordingly to the established requirements.</p>
			</div2>
			<div2>
				<head>Use case 2 : Device family reuse in mobile web content adaptation</head>
				<p>Company A wants to develop a new mobile web application and would like to provide different layout and content to different groups of devices. As company A doesn't like reinventing the wheel, instead of creating a new device family, queries the DDR, and realizes that there is a device family that suits its needs as defined by company B who is working in the same space. Company A can consistently reuse that family of devices and references it in his own application.</p>
			</div2>
			<div2>
				<head>Use case 3 : Formal definition of groups of devices</head>
				<p> It is common to hear names such as "Smartphone", "Musicphone", "Featurephone", but does anyone know what they mean in detail? Is a Smartphone a device to make calls, synchronize your calendar and provide a fully featured address book? If so, what is the difference between a Smartphone and a PDA? When does a mobile phone "turn" into a Smartphone? When isn't it a Smartphone anymore and become a PDA?
</p><p>
All these definitions are very important to many individuals and companies. Providing a way to define clearly {*} and formally what they are will help comunication between different individuals and companies.</p>
			</div2>
			<div2>
				<head>Use Case 4 : Application development for a family of devices</head>
				<p>
				When developing an application, for J2ME, Symbian etc, it is often useful to create different builds for different devices or use different API's to exploit the device capabilities, namely 3D hardware acceleration, stereo speakers, bluetooth chips, GPS support and more. In order to do this, developers might have to create one build for each device on the market. Many devices actually share the same functionalities and support the same API's. Developing and testing on a device often means supporting a range of devices. Companies in this space will claim compatibility with device families instead of individual devices. 
				</p><p>An specific instantiation of this use case, relevant to the Mobile Web, is a mobile web browser vendor who wants to express the fact that their browser works in a set of devices. For example, "our MiniBrowser is compatible with all Nokia Series 60 devices". 
				</p>
			</div2>
			<div2>
				<head>Use Case 5 : Common definition and sharing of device family for content provisioning</head>
				<p>Company A is a developer of J2ME applications. Every month its QA team tests the new games against the devices they have in their lab. Devices used for testing are often considered master devices representing a number of other devices that will not be tested directly. Also, every month, the company lab buys new devices, old games are tested against these devices for compatibility. Company A states formally on which devices and device families their games work on.
</p><p>
Company B is a content aggregator. Every month receives from different software developers a number of new games. Company B also keeps updates of their device database so every month new devices are added. Every month Company A sends to Company B a list of the games and a list of the devices and group of devices (families) compatible with the games provided.
</p><p>
Company B needs to go back and check the list of devices and games every month for each of the games. The ability of using a common representation of device families between Company B and each of its affiliate games developers would ease the work on a daily basis and make sure that all the devices that are certified to work with a certain game are up-to-date. For example, if Company B has a brand new device in its database and that device belongs to a device family certified by Company A, Company B can automatically state that a certain game works in that new device.</p>
			</div2>
		</div1>
		<div1 id="sec-definition-mechanisms">
			<head id="sec-abstract-dm">Definition Mechanisms</head>
			<div2>
				<head>Device group definition based on expressions</head>
				<p>The most easy way to create device families is to use boolean expressions that denote the conditions that a device
				must satisfy in order to belong to an specific family or cluster of devices. The formal syntax for defining that kind of expressions is (in simple Extended Backus-Naur Form (EBNF) notation):</p>
				<eg role="code"><![CDATA[
[1]     	DeviceGroupExpr  	   ::=     	OrExpr
[2]    	OrExpr 	   ::=    	AndExpr
			| OrExpr 'or' AndExpr
[3]    	AndExpr 	   ::=    	EqualityExpr
			| AndExpr 'and' EqualityExpr
[4]    	EqualityExpr 	   ::=    	RelationalExpr
			| EqualityExpr '=' RelationalExpr
			| EqualityExpr '!=' RelationalExpr
[5]    	RelationalExpr 	   ::=    	AdditiveExpr
			| RelationalExpr '<' AdditiveExpr
			| RelationalExpr '>' AdditiveExpr
			| RelationalExpr '<=' AdditiveExpr
			| RelationalExpr '>=' AdditiveExpr
[6]    	AdditiveExpr 	   ::=    	MultiplicativeExpr
			| AdditiveExpr '+' MultiplicativeExpr
			| AdditiveExpr '-' MultiplicativeExpr
[7]    	MultiplicativeExpr 	   ::=    	UnaryExpr
			| MultiplicativeExprMultiplyOperatorUnaryExpr
			| MultiplicativeExpr 'div' UnaryExpr
			| MultiplicativeExpr 'mod' UnaryExpr
[8]    	MultiplyOperator 	   ::=    	'*'
[9]    	UnaryExpr 	   ::=    	UnionExpr
			| '-' UnaryExpr
[10]    	UnionExpr 	   ::=    	DISelectBasicPathExpr
			| UnionExpr '|' DISelectBasicPathExpr
[11]    	DISelectBasicPathExpr 	   ::=    	FilterExpr
[12]    	FilterExpr 	   ::=    	PrimaryExpr
			| FilterExprPredicate
[13]    	PrimaryExpr 	   ::=    	VariableReference
			| '(' DISelectBasicExpr ')'
			| Literal
			| Number
			| FunctionCall
[14]    	VariableReference 	   ::=    	'$' QName
[15]    	Literal 	   ::=    	'"' [^"]* '"'
			| "'" [^']* "'"
[16]    	Number 	   ::=    	Digits ('.' Digits ?)?
			| '.' Digits
[17]    	Digits 	   ::=    	[0-9]+
[18]    	FunctionCall 	   ::=    	FunctionName '(' ( Argument ( ',' Argument )* )? ')'
[19]    	FunctionName 	   ::=    	BaseFunctionName
			| ExtensionFunctionName
[20]    	BaseFunctionName 	   ::=    	ConvenienceFunctionName
[21]    	Argument 	   ::=    	DISelectBasicExpr
[22]    	NodeType 	   ::=    	'comment'
			| 'text'
			| 'processing-instruction'
			| 'node'
[23]    	Predicate 	   ::=    	'[' PredicateExpr ']'
[24]    	PredicateExpr 	   ::=    	DISelectBasicExpr
				]]></eg>
			</div2>
			<div2>
				<head>Device group definition based on OWL</head>
			</div2>
		</div1>
		<div1 id="sec-extended-api">
			<head>Extended API</head>
			<p>.</p>
		</div1>
		<div1 id="sec-wdslbinding">
			<head>WSDL Language Binding</head>
		</div1>
		<div1>
			<head>Device Family Export</head>
		</div1>
	</body>
	<back>
		<div1 id="idl-definitions" role="Appendix_A">
			<head>Extended IDL Definitions for structures </head>
			<p>This appendix contains the complete OMG IDL <bibref ref="ref-IDL"/> definitions for DDR-API</p>
			<eg role="code">Consolidated IDL</eg>
		</div1>
		<div1 id="sec-normativereferences">
			<head>Normative References</head>
			<blist>
				<bibl xl:show="replace" xl:actuate="onRequest" key="WSDL" id="ref-WSDL" href="#"> "WSDL (tbd)" </bibl>
				<bibl xl:show="replace" xl:actuate="onRequest" key="IETF RFC 2119" id="ref-rfc-2119" href="http://www.ietf.org/rfc/rfc2119.txt"> "Key words for use in RFCs to Indicate Requirement Levels", S. Bradner, March 1997</bibl>
				<bibl xl:show="replace" xl:actuate="onRequest" key="IDL" id="ref-IDL" href="http://www.omg.org/technology/documents/formal/corba_2.htm"> "OMG IDL Syntax and Semantics", Object Management Group.</bibl>
			</blist>
		</div1>
		<div1 id="sec-informativereferences">
			<head>Informative References</head>
			<p>tbd</p>
		</div1>
		<div1 id="sec-javabindings">
			<head>Java API</head>
		</div1>
		<div1 id="sec-examples">
			<head>Example 1</head>
			<p>This section is informative. It provides an illustration of how the DDR-API could operate.</p>
		</div1>
		<div1 id="changes">
			<head>Changes Since the Previous Version</head>
		</div1>
		<div1 id="acknowledgements">
			<head>Acknowledgements</head>
			<p>The editor of the document acknowledge significant written contributions coming from:</p>
			<orglist>
				<member>
					<name>Andrea Trassati, mTLD dotMobi</name>
				</member>
			</orglist>
		</div1>
	</back>
</spec>

