|Oracle8i interMedia Text Reference
Release 2 (8.1.6)
Part Number A77063-01
CTX_DDL Package, 2 of 24
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.
Specify the name of the XML section group.
Specify the name of the attribute section. This is the name used for WITHIN queries on the attribute text.
The section name you specify cannot contain the colon (:) or dot (.) characters. The section name must also be unique within group_name. Section names are case-insensitive.
Attribute section names can be no more than 64 bytes long.
Specify the name of the attribute in tag@attr form. This parameter is case-sensitive.
Consider an XML file that defines the BOOK tag with a TITLE attribute as follows:
To define the title attribute as an attribute section, create an XML_SECTION_GROUP and define the attribute section as follows:
ctx_ddl_create_section_group('myxmlgroup', 'XML_SECTION_GROUP'); ctx_ddl.add_attr_section('myxmlgroup', 'booktitle', 'book@title'); end;
When you define the TITLE attribute section as such and index the document set, you can query the XML attribute text as follows:
You can add attribute sections only to XML section groups.
When you use AUTO_SECTION_GROUP, attribute sections are created automatically. Attribute sections created automatically are named in the form tag@attribute.