sel:select

Purpose

Container for one or more sel:when elements and an optional sel:otherwise element. The expr attributes on the sel:select and sel:when elements control the conditions for processing.

Contains

Attributes

Attribute Description Type Default Options Use
expr Determines whether or not the content is selected for processing. If the expression evaluates to 'true', the content is selected, otherwise it is not processed. If you omit the attribute the content is selected for processing by default. xs:string     optional 
precept Determines whether only the first or every matching sel:when element is selected for processing.   matchfirst  matchfirst, matchevery  optional 

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>sel:select</title>
  </head>
  <body>
    <sel:select>
      <sel:when expr="device:policy-value('supports.client.framework')='true'">
        <p>This device supports the Client Framework 1.</p>
      </sel:when>
      <sel:otherwise>
        <p>This device does not support the Client Framework 1.</p>
      </sel:otherwise>
    </sel:select>
  </body>
</html>

Related topics