// +-+ XHTML-Handset (CSS1)
// +-+ Samsung-XHTML (CSS1)
// +-+ Samsung-SprintPCS (CSS1)
// +-+ Samsung-SPH-A600 (CSS2)
final DefaultDevice master = createDevice("Master", "none", null);
final DefaultDevice mobile = createDevice("Mobile", "none", master);
final DefaultDevice handset = createDevice("Handset", "ll ", mobile);
final DefaultDevice xhtmlHandset = createDevice("XHTML-Handset",
DevicePolicyConstants.CSS1, handset);
final DefaultDevice samsungXHTML = createDevice("Samsung-XHTML",
DevicePolicyConstants.CSS1, xhtmlHandset);
final DefaultDevice samsungSprintPCs = createDevice("Samsung-SprintPCS",
DevicePolicyConstants.CSS1, samsungXHTML);
final Map samsungA600Policies = new HashMap();
final String fooExpression = "length(css('width'),'px')";
samsungA600Policies.put(
"x-element.img.attribute.foo.expression", fooExpression);
final String barExpression = "length(css('height'),'px')";
samsungA600Policies.put(
"x-element.img.attribute.bar.expression", barExpression);
samsungA600Policies.put("ssversion", DevicePolicyConstants.CSS2);
final DefaultDevice samsungA600 = createDevice("Samsung-SPH-A600",
samsungA600Policies, samsungSprintPCs);
final CSSSupportConfigurator configurator =
new CSSSupportConfigurator(
INTERNAL_DEVICE_FACTORY.createInternalDevice(samsungA600));