IBM Books
(C) IBM Corp. 2000, 2003.

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>                             

第一行 <?xml version="1.0"?> 指定使用 XML 标记编写文档模型。注意,此模型不是为 XML 格式文档编写的。

每个字段都是在 GPPFieldDefinitionGPPAttributeDefinition 标记内定义的,该标记包含元素参数。

所有定义都必须包含在 <GPPModel> 标记内。


[ 页的顶部 | 上一页 | 下一页 | 目录 | 索引 ]