Skip to main content

This is documentation for Caché & Ensemble. See the InterSystems IRIS version of this content.Opens in a new tab

For information on migrating to InterSystems IRISOpens in a new tab, see Why Migrate to InterSystems IRIS?

DTL <annotation>

DTL 要素についての詳しいコメントを指定します。

Synopsis

<annotation>    患者データを研究室から CRM システムに送信します。  </annotation>

説明

<annotation> 要素により、DTL 要素に詳しいコメントを関連付けることができます。<annotation> は、注釈の対象となる要素の最初の子として挿入する必要があります。以下に例を示します。

<transform targetClass='Demo.DTL.ExampleTarget'
           sourceClass='Demo.DTL.ExampleSource'
           create='new'
           language='objectscript'>
  <annotation>
    Implement current naming conventions.
  </annotation>
  <trace value='"Convert from lowercase to uppercase"'/>
  <assign property='target.UpperCase'
          value='$ZCONVERT(source.LowerCase,"U")'
          action='set'>
   <annotation>This is a comment for the assign element</annotation>
  </assign>
</transform>

上の例では、注釈テキストの前後に CDATA 構文を使用しています。この規則はオプションですが、これによって、XML エスケープ・シーケンスに影響されずに、アポストロフィ (') などの特殊文字を入力したり、改行を挿入したりできます。<annotation> 文字列の最大長は、CDATA エスケープ文字も含めて 32,767 文字です。

また、assign 要素に関する注釈が開始 assign タグの直後の子として挿入されている点にも注目してください。

DTL 内のほとんどの要素が <annotation> を子要素としてサポートしています。これにより、DTL 要素に詳しいコメントを関連付けることができます。すべての要素に対して位置属性を提供する BPL とは異なり、<annotation> は、ほとんどの DTL 要素が共通して持つ、唯一の子要素または属性です。<annotation> 要素を使用する場合は、注釈の対象となる要素の最初の子として挿入する必要があります。

FeedbackOpens in a new tab