Oracle8i Application Developer's Guide - XML
Release 3 (8.1.7)

Part Number A86030-01

Library

Solution Area

Contents

Index

Go to previous page Go to beginning of chapter Go to next page

Using interMedia Text to Search and Retrieve Data from XML Documents, 18 of 22


2 Set the Preference's Attributes

To set the preference's attributes for XML_SECTION_GROUP, use the following procedures:

To set the preference's attributes for AUTO_SECTION_GROUP, use the following procedures:

There are corresponding CTX_DDL.drop sections and CTX_DDL.remove section syntax.

2.1 Using CTX_DDL.add_zone_section

The syntax for CTX_DDL.add_zone_section follows:

CTX_DDL.Add_Zone_Section (
 group_name      => 'my_section_group' /* whatever you called it above */
 section_name    => 'author' /* what you want to call this section */
 tag             => 'my_tag' /* what represents it in XML */ );

where 'my_tag' implies opening with <my_tag> and closing with </my_tag>.

add_zone_section Guidelines

add_zone_section guidelines are listed here:

2.2 Using CTX_DDL.Add_Attr_Section

The syntax for CTX_DDL.add_attr_section follows:

CTX_DDL.Add_Attr_Section ( /* call this as many times as you need to describe
                             the attribute sections */
 group_name      => 'my_section_group' /* whatever you did call it above */
 section_name    => 'author' /* what you want to call this section */
 tag             => 'my_tag' /* what represents it in XML */ );

where 'my_tag' implies opening with <my_tag> and closing with </my_tag>.

add_attr_section Guidelines

add_attr_section guidelines are listed here:

The more sections you add to your index, the longer your search will take.

add_attr_section adds an attribute section to an XML section group. This procedure is useful for defining attributes in XML documents as sections. This allows you to search XML attribute text with the WITHIN operator.

The section_name:

The tag specifies the name of the attribute in tag@attr format. This is case-sensitive.


Note:

In the add_attr_section procedure, you can have many tags all represented by the same section name at query time. Explained in another way, the names used as the arguments of the keyword WITHIN can be different from the actual XML tag names. That is many tags can be mapped to the same name at query time. This feature enhances query usability. 


2.3 Using CTX_DDL.add_field_section

The syntax for CTX_DDL.add_field_section follows:

CTX_DDL.Add_Field_Section (
 group_name     => 'my_section_group' /* whatever you called it above */
 section_name   => 'qq' /* what you want to call this section */
 tag            => 'my_tag' /* what represents it in XML */ );
 visible        => TRUE or FALSE );

add_field_section Guidelines

add_field_section guidelines are listed here:

How Attr_Section Differs From Field_Section

Attribute section differs from field section in the following ways:

2.4 Using CTX_DDL.add_special_section

The syntax for CTX_DDL.add_special_section follows:

CTX_DDL.Add_Special_Section (
 group_name     => 'my_section_group' /* whatever you called it above */
 section_name   => 'qq' /* what you want to call this section */ );

add_special_section Guidelines

add_special_section guidelines are listed here:

Here the tag option is not present. A section not defined with an open and close tag has an implicit definition.Use this section when your document is composed, for example, of mostly non-tagged sentences and paragraphs that you need to search. These are explicitly defined.

For example, if your query could be "... CONTAINS cat and dog WITHIN sentence"...

2.5 Using CtX_DDL.Add_Stop_Section

CtX_DDL.Add_Stop_Section (
 group_name     => 'my_section_group' /* whatever you called it above */
 section_name   => 'qq' /* what you want to call this section */ );

Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1996-2000, Oracle Corporation.

All Rights Reserved.

Library

Solution Area

Contents

Index