concat

Dieser Ausdruck erstellt eine lokalisierbare Nachricht (siehe Lokalisierungsunterstützung), indem eine Liste von Werten verkettet wird.

Der Ausdruck concat erstellt eine Zeichenfolge der Werte ohne zusätzliche Leerzeichen oder weiteren Text. Falls Sie eine komplexere Formatierung oder einen lokalisierbaren Text benötigen, verwenden Sie stattdessen den Ausdruck "ResourceMessage" (siehe ResourceMessage).

<?xml version="1.0" encoding="UTF-8"?>
<RuleSet name="Example_concat"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:noNamespaceSchemaLocation=
"http://www.curamsoftware.com/CreoleRulesSchema.xsd">
  <Class name="Person">

    <Attribute name="firstName">
      <type>
        <javaclass name="String"/>
      </type>
      <derivation>
        <specified/>
      </derivation>
    </Attribute>

    <Attribute name="surname">
      <type>
        <javaclass name="String"/>
      </type>
      <derivation>
        <specified/>
      </derivation>
    </Attribute>

    <Attribute name="dateOfBirth">
      <type>
        <javaclass name="curam.util.type.Date"/>
      </type>
      <derivation>
        <specified/>
      </derivation>
    </Attribute>

    <!-- An identifier for a person, including
     first name, surname and date of birth, e.g.
     John Smith (03 Oct 1970).

     First name and surname are plain Strings,
     but date of birth will be localized
     according to the user's locale.
     -->
    <Attribute name="personIdentifier">
      <type>
        <javaclass name="curam.creole.value.Message"/>
      </type>
      <derivation>
        <concat>
          <fixedlist>
            <listof>
              <!-- Note we use Object, as we have a
                   mixture of String and Date items
                   in the list. -->
              <javaclass name="Object"/>
            </listof>
            <members>
              <reference attribute="firstName"/>
              <!-- space separator between names -->
              <String value=" "/>
              <reference attribute="surname"/>
              <String value=" ("/>
              <reference attribute="dateOfBirth"/>
              <String value=")"/>
            </members>
          </fixedlist>
        </concat>
      </derivation>
    </Attribute>

  </Class>

</RuleSet>