> ## Documentation Index
> Fetch the complete documentation index at: https://docs.arc.cdata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# arc:exists

> 指定したアイテムにアトリビュートの値があることをチェックし、アトリビュートが存在して非null の場合にのみボディブロックを実行します。

export const siteNameShort = "Arc";

`arc:exists` キーワードを使用して、指定したアイテムにアトリビュートの値があることをチェックします。[arc:notnull](./op-arc-not-null) キーワードは、`arc:exists` のシノニムです。

## パラメータ

* **item**：チェックするアイテム。指定されていない場合は、デフォルトのアイテムが使われます。
* **attr**：チェックするアトリビュートの名前。
* **action**：エクスプレッションがtrue と判断された場合に実行されるアクション。使用できる値は、`break` または`continue` です。

## アトリビュートの制御

None

## 例

ファイルのフィードの欠けているタイトルアトリビュートを定義します：

```xml theme={null}
<arc:call op="fileListDir" output="out">
  <arc:exists attr="filename">
    <arc:set attr="title" value="[filename]"/>
    <arc:else>
      <arc:set attr="title" value="Unnamed File"/>
    </arc:else>
  </arc:exists>
  <arc:push title="[title]">
  [out.file:*] 
  </arc:push>
</arc:call> 
```

## 関連項目

* [arc:else](./op-arc-else)：条件が充足されない場合に実行されるブロックを作成する。
