device:getAncestorRelationship

Purpose

Checks whether the named device is an ancestor of the current device. It is equivalent to the getAncestorRelationShip method of the MarinerRequestContext class. The return codes from that method are mapped to one of the returned values.

unknown

The device is unknown or there is no current device - normally only returned when the device repository is not correctly initialized or configured

unrelated

The device is not an ancestor

ancestor

The device is an ancestor of the current device

device

The two devices are the same

Signature

device:getAncestorRelationship(device as xs:string) as xs:string

Alias

device:relationship(device as xs:string) as xs:string

Parameter

Name Description Type Use
device As a called value, 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:getAncestorRelationship</title>
  </head>
  <body>
    <p sel:expr="device:getAncestorRelationship('PC') = 'ancestor'
      or device:getAncestorRelationship('PC') = 'device'">
      This message is for PC users only.
    </p>
  </body>
</html>

Related topics