Documentation

Device Capabilities & Vocabulary

Device capability naming is as follows.

Common Vocabulary

The following vocabulary is supported across all device database implementation:

DDR Namepsace

Property nameDescription
cookieSupportThe ability of a client to store cookies and send them when appropriate.
displayColorDepthThe color depth of a display.
displayHeightThe total number of addressable pixels in the vertical direction of a rectangular display when held in its default orientation.
imageFormatSupportSet of image formats a client supports as part of a Web page.
inputModeSupportThe preferred ways of supporting specific formats for input type="text" fields.
inputDevicesThe input devices are available to the user.
displayWidthThe total number of addressable pixels in the horizontal direction of a rectangular display when held in its default orientation.
markupSupportSet of mark-up languages a client supports.
modelThe model name of a device, browser or some other component.
scriptSupportSet of scripting languages supported.
stylesheetSupportSet of Style Sheet languages a client supports.
vendorThe name of the maker (OEM) of a device, browser or some other component (e.g. Mozilla).
versionThe version number of a component.

The vocabulary in the ddr namespace is an implementation of the W3C DDR standard core vocabulary described @ http://www.w3.org/TR/ddr-core-vocabulary.

bemoko Namespace

Property nameDescription
idid of the device (implementation specific).
isMobileIs the device a mobile device?
isRobotIs the device a robot? (i.e. not a human user)
vendorModelConcatenation of the vendor and model
osOperating System
preferredMarkupPreferred markup for the device
preferredHtmlContentTypePreferred content type for HTML page delivery

Device Capabilities Usage Examples

Device capabilities can be used in expressions, e.g.

<ui name="pc" expr="!device.isMobile" fallback="320" />
<ui name="iphone" expr="device.vendor=='Apple'" fallback="ajax" />
<ui name="128" expr="device.displayWidth lt 176" fallback="root" />

in UI templates, e.g.

<span>Display:  ${device.displayWidth} x ${device.displayHeight}</span>

on in plugins, e.g.

if (device.isMobile) ...

More