IBM Books
(C) IBM Corp. 2000

Net Search Extender 管理およびユーザーズ・ガイド


構造化プレーン・テキストの場合の文書モデルの定義

以下に汎用パーサー (GPP) 構造化プレーン・テキスト文書の例を示します。

[head]Handling structured documents
[/head]
[year]2002
[/year]
[abstract]This document describes the concept of structured documents
and the use of document models to...
[/abstract]

以下に GPP 文書モデルの例を示します。

<?xml version="1.0"?>
<GPPModel>
 
  <GPPFieldDefinition
  name="Head"
  start="[head]"
  end="[/head]"
  exclude="YES" />
 
  <GPPFieldDefinition                  - This is the start of text field
  name="Abstract"
  start="[abstract]"
  end="[/abstract]"
  exclude="NO" />                     - This is the end of a text field
 
  <GPPAttributeDefinition              - This is the start of a document
  name="year"                                   attribute
  start="[year]"
  end="[/year]"
  type="NUMBER" />                    - This is the end of a document
                                            attribute
</GPPModel> 

1 行目の <?xml version="1.0"?> は、文書モデルが XML タグを使用して書かれていることを示しています。このモデルは XML フォーマット文書用には書かれていないことに注意してください。

各フィールドは、エレメント・パラメーターを含む GPPFieldDefinition タグまたは GPPAttributeDefinition タグ内で定義されます。

すべての定義は、<GPPModel> タグ内に含まれる必要があります。


[ ページのトップ | 前ページ | 次ページ | 目次 | 索引 ]