device:isInstanceOf

Purpose

Returns a boolean value indicating if the current device is an instance of the named device or one of its descendants in the hierarchy.

Signature

device:isInstanceOf(device as xs:string) as xs:boolean

Alias

device:is-instance-of(device as xs:string) as xs:boolean

Parameter

Name Description Type Use
device The name of the device to compare against xs:string required 

Example

<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/2002/06/xhtml2"
  xmlns:sel="http://www.w3.org/2004/06/diselect">
  <head>
    <title>device:isInstanceOf</title>
  </head>
  <body>
    <p sel:expr="device:isInstanceOf('PC')"> This message is for PC users. </p>
  </body>
</html>

Related topics