select

Purpose

Container for conditional markup elements. The content consists of one or more when elements and an optional otherwise element.

Contained by

Contains

Attributes

Attribute Description Type Default Options Use
expr An MCS expression xs:string none    optional 
precept Determines whether only the first, or every matching when element is selected for processing xs:string matchfirst  matchfirst, matchevery  optional 

Example

The welcome.mlyt layout can be found in the MCS/repository/xml-repository directory.

<?xml version="1.0" encoding="UTF-8"?>
<canvas layoutName="/welcome.mlyt" pageTitle="select">
  <pane name="background">
    <select precept="matchevery">
      <when expr="device:policy-value('supports.client.framework')='true'">
        <p>This device supports the Client Framework 1.</p>
      </when>
      <otherwise>
        <p>This device does not support the Client Framework 1.</p>
      </otherwise>
    </select>
  </pane>
</canvas>

Related topics