Appendix A - Dictionary Definition Documents
Element Definition Document
The XML syntax given below is used to define an element in the dictionary
collection.
<xflaim:element
xmlns:xflaim="http://www.novell.com/XMLDatabase/Schema"
xflaim:name="name of the element"
xflaim:DictNumber="element number"
xflaim:targetNameSpace="namespace of the element"
xflaim:type="string, integer,
binary, or nodata"
xflaim:State="checking, unused, purge,
or active"
xflaim:UniqueSubElements="yes, true, on, 1,
enable or no, false, off, 0, disable"
/>
Explanation:
- xflaim:element - This is the root element of an element definition document.
It is the only element in an element definition document. Everything
else about an element definition is specified in attributes of the xflaim:element
element.
- xflaim:name - This attribute declares a name for the newly defined element.
- xflaim:DictNumber - This attribute defines the element number
to be assigned to this element. If omitted, or set to zero, XFLAIM will
assign one. NOTE: The xflaim:DictNum attribute cannot be modified once
it is set.
- xflaim:targetNameSpace - This attribute defines the
namespace URI for the element. It may be omitted, in which case there is
no namespace for the element.
- xflaim:type - This attribute defines the data type of the element. Valid data
types are shown.
-
xflaim:State - This attribute defines the current
state of the element. If omitted, XFLAIM will create an xflaim:State
attribute and give it a value of "active". NOTE: This
attribute cannot be modified directly once it has been set. It can only
be modified by calling the changeItemState
method on an IF_Db object.
-
xflaim:UniqueSubElements - This attribute, if set to yes,
true, on, 1, or enable, specifies that all child elements of this element
must be unique. That is, they must all have unique names - no
duplicates allowed. Furthermore, only element nodes will be allowed as
child nodes of this element - no data nodes or other kinds of nodes.
This allows XFLAIM to optimize the storage and lookups of child elements for
this element.
Example:
<xflaim:element xmlns:xflaim="http://www.novell.com/XMLDatabase/Schema" xflaim:name="age" xflaim:type="integer" />
Attribute Definition Document
The XML syntax given below is used to define an attribute in the dictionary
collection.
<xflaim:attribute
xmlns:xflaim="http://www.novell.com/XMLDatabase/Schema"
xflaim:name="name of the attribute"
xflaim:DictNumber="attribute number"
xflaim:targetNameSpace="namespace of the attribute"
xflaim:type="string, integer, or
binary"
xflaim:State="checking, unused, purge,
or active"
/>
Explanation:
- xflaim:attribute - This is the root element of an attribute definition
document. It is the only element in a attribute definition document.
Everything else about an attribute definition is specified in attributes of
the xflaim:attribute element.
- xflaim:name - This attribute declares a name for the newly defined
attribute.
- xflaim:DictNumber - This attribute defines the attribute number
to be assigned to this attribute. If omitted, or set to zero, XFLAIM
will assign one. NOTE: This attribute cannot be modified
once it is set.
- xflaim:targetNameSpace - This attribute defines the
namespace URI for the attribute. It may be omitted, in which case there
is no namespace for the attribute.
- xflaim:type - This attribute defines the data type of the attribute. Valid data
types are shown.
-
xflaim:State - This attribute defines the current
state of the attribute. If omitted, XFLAIM will create an xflaim:State
attribute and give it a value of "active". NOTE: The xflaim:State
attribute cannot be modified directly once it has been set. It can only
be modified by calling the changeItemState
method on an IF_Db object.
Example:
<xflaim:attribute xmlns:xflaim="http://www.novell.com/XMLDatabase/Schema"
xflaim:name="color" xflaim:type="string"/>
Collection Definition Document
The XML syntax given below is used to define a collection in the dictionary
collection.
<xflaim:Collection
xmlns:xflaim="http://www.novell.com/XMLDatabase/Schema"
xflaim:name="name of the collection"
xflaim:DictNumber="collection number"
/>
Explanation
- xflaim:Collection - This is the root element of a collection definition
document. It is the only element in a collection definition document.
Everything else about a collection definition is specified in attributes of
the xflaim:Collection element.
- xflaim:name - This attribute declares a name for the newly defined
collection.
- xflaim:DictNumber - This attribute defines the collection
number to be assigned to this collection. If omitted, or set to zero,
XFLAIM will assign one. NOTE: This attribute cannot be
modified once it is set.
Example
<xflaim:Collection xmlns:xflaim="http://www.novell.com/XMLDatabase/Schema"
xflaim:name="Sales" />
Prefix Definition Document
The XML syntax given below is used to define a namespace prefix in the
dictionary collection.
<xflaim:Prefix
xmlns:xflaim="http://www.novell.com/XMLDatabase/Schema"
xflaim:name="name of the prefix"
xflaim:DictNumber="prefix number"
/>
Explanation
- xflaim:Prefix - This is the root element of a prefix definition document.
It is the only element in a prefix definition document. Everything else
about a prefix definition is specified in attributes of the xflaim:Prefix
element.
- xflaim:name - This attribute declares a name for the newly defined
prefix.
- xflaim:DictNumber - This attribute defines the prefix number to
be assigned to this prefix. If omitted, or set to zero, XFLAIM will
assign one. NOTE: This attribute cannot be modified once
it is set.
Example
<xflaim:Prefix xmlns:xflaim="http://www.novell.com/XMLDatabase/Schema" xflaim:name="alpha" />
Encryption Definition Document
The XML syntax given below is used to define a namespace prefix in the
dictionary collection.
<xflaim:EncDef
xmlns:xflaim="http://www.novell.com/XMLDatabase/Schema"
xflaim:name="name of the encryption definition
scheme"
xflaim:DictNumber="encryption definition
number"
xflaim:type="aes
or des3"
xflaim:keySize="256,
192, 168, or 128"
/>
Explanation
- xflaim:EncDef - This is the root element of a encryption definition document.
It is the only element in an encryption definition document. Everything else
about an encryption definition is specified in attributes of the xflaim:EncDef
element.
- xflaim:name - This attribute declares a name for the newly defined
encryption scheme.
- xflaim:DictNumber - This attribute defines the encryption number to
be assigned to this encryption scheme. If omitted, or set to zero,
XFLAIM will assign one. NOTE: This attribute cannot be modified once
it is set.
- xflaim:type - This attribute defines the type of encryption for this
encryption scheme. Valid types are shown. NOTE: This attribute
must be specified, and cannot be modified once set.
- xflaim:keySize - This attribute defines the key size (in bits) for this
encryption scheme. Valid sizes are shown. NOTE: The key sizes of
256, 192, and 128 only apply to the aes keys. The size of 168 must be
specified for des3 keys. This attribute is optional. If not
specified, the maximum key size allowed for the chosen type will be
selected. For aes, the key size chosen will depend on what is
supported by the NICI installation.
Example
<xflaim:EncDef xmlns:xflaim="http://www.novell.com/XMLDatabase/Schema" xflaim:name="aes256"
xflaim:type="aes" xflaim:keySize="256" />
Index Definition Document
The XML syntax given below is used to define an index in the dictionary
collection.
<xflaim:Index
xmlns:xflaim="http://www.novell.com/XMLDatabase/Schema"
xflaim:name="name of the index"
xflaim:DictNumber="index number"
xflaim:CollectionName="name of collection to be
indexed"
xflaim:CollectionNumber="number of collection to be
indexed"
xflaim:Language="collation language of the index"
xflaim:IndexOptions="abspos">
<xflaim:ElementComponent
xflaim:name="element name of element component"
xflaim:targetNameSpace="namespace of element
component (only used if
element name given)"
xflaim:DictNumber="element number of element
component"
xflaim:KeyComponent="order of this component in the
key (must be non-zero)"
xflaim:DataComponent="order of this component in
data part (must be non-zero)"
xflaim:IndexOn="value, substring, eachword,
metaphone, or
presence"
xflaim:Required="yes, true, on, 1, enable
or no, false, off, 0, disable"
xflaim:Limit="limit in bytes or characters for
string or binary type"
xflaim:CompareRules="comparison rules"
> ...
<xflaim:AttributeComponent
xflaim:name="name of attribute to be
indexed"
xflaim:targetNameSpace="namespace of attribute
(only used if
attribute name given)"
xflaim:DictNumber="attribute number of
attribute to be indexed"
xflaim:KeyComponent="order of this component in the
key (must be non-zero)"
xflaim:DataComponent="order of this component in
data part (must be non-zero)"
xflaim:IndexOn="value, substring, eachword,
metaphone, or
presence"
xflaim:Required="yes, true, on, 1, enable or
no, false, off, 0, disable"
xflaim:Limit="limit in bytes or characters for
string or binary type"
xflaim:CompareRules="comparison rules"
/> ...
</xflaim:Index>
Explanation
The <xflaim:Index> element. This is the root element of an index
definition document. It may have the following attributes:
- xflaim:name - The xflaim:name attribute declares a name for the newly defined index.
- xflaim:DictNumber - This attribute defines the index number to
be assigned to this index. If omitted, or set to zero, XFLAIM will
assign one. NOTE: This attribute cannot be modified once
it is set.
- xflaim:CollectionName - This attribute specifies the name of the collection that this index
is associated with.
- xflaim:CollectionNumber - This attribute specifies
the number of the collection that this index is associated with. Note
that it is not necessary to specify both the xflaim:CollectionName and
xflaim:CollectionNumber attributes. However, if both are specified, they
must refer to the same collection.
- xflaim:Language - This attribute specifies the collation language of the
index. String components of the index will be collated according to the
collation rules for this language.
- xflaim:IndexOptions - This attribute specifies indexing
options for the index.
Valid options are shown.
The <xflaim:ElementComponent> and <xflaim:AttributeComponent> elements.
These elements specify an element or attribute that is a component of the index.
An element component (xflaim:ElementComponent) may be a key component,
a data component, a path component, or some
combination of the three component types. An attribute component (xflaim:AttributeComponent)
may be a key component, data component, or both a key and data component.
A key component is used in generating an index key. A data component is
used to associate additional data with the index key. A path component is
one that must be in the hierarchy of components to get to another component.
Only xflaim:ElementComponent elements may be path components. This means
that they are allowed to have child elements that are either
xflaim:ElementComponent elements or xflaim:AttributeComponent elements. An
xflaim:AttributeComponent is not allowed to have xflaim:ElementComponent or
xflaim:AttributeComponent child elements, and hence cannot be a path component.
The hierarchy of xflaim:ElementComponent elements and
xflaim:AttributeComponent elements within an index definition document specifies
the relationship that must exist between the specified elements and/or
attributes in a document in order for them to be used to build a key in an
index.
The attributes of an xflaim:ElementComponent element or
xflaim:AttributeComponent element are as follows:
- xflaim:name - This attribute specifies the name of the
element/attribute that is to be used in this particular index component.
- xflaim:targetNameSpace - This attribute specifies the namespace URI of the
element/attribute that is to be used in this particular index component.
Note that this attribute is only used
if the xflaim:name attribute is used to specify the name of the element/attribute.
- xflaim:DictNumber - This attribute specifies the element number
or attribute number of the element or attribute that is to be used in this
particular index component. Note that it is only necessary to specify
the element/attribute name and namespace (i.e., xflaim:name and xflaim:targetNameSpace)
or the element/attribute number (i.e., xflaim:DictNumber). However, if both
are specified, they must refer to the same element/attribute.
- xflaim:KeyComponent - This attribute specifies the ordinal position of
this element/attribute within a key in the index. If this attribute is omitted, this component is not used as part
of keys in the index. If this attribute is specified,
it must be a positive number. The first key component in an index
definition will have a value of 1, the second a value of 2, etc. The
components of an index definition that have this attribute
constitute the set of element/attribute components that will be used to build
index keys. Their values must all be unique, and
must represent an unbroken sequence of positive integers starting from 1.
There must always be at least one index component that has this attribute.
- xflaim:DataComponent - This attribute specifies the ordinal position of
this element/attribute within the data portion that is associated with a key
in the index. If this attribute is omitted, this
component is not used in the data portion of keys in the index. If this attribute is specified, it must be a positive number.
The first data component in an index definition will have a value of 1, the
second a value of 2, etc. The components of an index definition that have this attribute constitute the set of element/attribute
components that will be used to build the data portion associated with index
keys. Their values must all be unique, and must represent an unbroken
sequence of positive integers starting from 1. Note that it is not
necessary that an index definition have any components with this attribute.
- xflaim:IndexOn - This attribute specifies how a key component is
to be indexed. This attribute is ignored if the component is not a key
component (i.e., it does not have an xflaim:KeyComponent attribute).
This attribute must be one of the following values:
- value. Index the component's entire value.
- presence. Index the component's element/attribute number.
This type of key simply indicates that the element/attribute is present in
the document being indexed.
- substring. Index substrings of the component's value.
Note that this option is only valid for components whose data type is
string.
- metaphone. Index each word of the component's value.
The generated key for each word will be the metaphone number that
corresponds to that word. Note that this option is only valid for
components whose data type is string.
- eachword. Index each word of the component's value.
Note that this option is only valid for components whose data type is
string.
- xflaim:Required - This attribute, if used, specifies whether or not
this component is a required key component. Its value must be yes,
true, on, 1, enable or no, false, off, 0, disable. This attribute is ignored if
the component is not a key component (i.e., it does not have an xflaim:KeyComponent attribute). A required key component is one that
must be present in the document being indexed in order for it to be used to
generate a key. If any required key component is missing from a
document, no key will be generated for that document.
- xflaim:Limit - This attribute specifies a limit on the number
of bytes (for elements/attributes whose data type is binary) or characters
(for elements/attributes whose data type is string) that will be indexed.
This attribute is ignored if the component is not a key component (i.e., it
does not have an xflaim:KeyComponent attribute). If omitted, a default
value of 128 is used for components that are indexed on value (xflaim:IndexOn="value")
or 48 for components that are indexed on substring (xflaim:IndexOn="substring").
- xflaim:CompareRules - This attribute specifies comparison rules for
key components whose data type is string. This attribute is ignored if
the component is not a key component (i.e., it does not have an
xflaim:KeyComponent attribute). Comparison rules are ignored if the
xflaim:IndexOn attribute is set to presence, because they would be
irrelevant. Comparison rules may be any combination of the following
(note that if no comparison rules are specified, the default behavior is to do
case sensitive comparisons):
- caseinsensitive. Don't compare case.
- whitespaceasspace. Treat whitespace as space (is applied
before minspaces, ignoreleadingspaces, ignoretrailingspaces, or nospaces)
- minspaces. Remove extra spaces between words and remove
leading and trailing white space.
- ignoreleadingspaces. Remove leading spaces.
- ignoretrailingspaces. Remove trailing spaces.
- nospaces. Remove all white space. Note that if
minspaces is also specified, this rule takes precedence.
- nounderscore. Change all underscores to spaces. Note
that this rule is applied before applying the minspaces, ignoreleadingspaces,
ignoretrailingspaces, or nospaces rule.
- nodashes. Remove all dashes.
- sortdescending. Sort in descending order.
- sortmissinghigh. Sort missing values high.
Example
<xflaim:Index
xmlns:xflaim="http://www.novell.com/XMLDatabase/Schema"
xflaim:name="Title+Index+Offset"
xflaim:DictNumber="1">
<xflaim:ElementComponent
xflaim:name="title"
xflaim:KeyComponent="1"
xflaim:IndexOn="value"/>
<xflaim:ElementComponent
xflaim:name="track"
xflaim:IndexOn="value">
<xflaim:AttributeComponent
xflaim:name="index"
xflaim:KeyComponent="2"
xflaim:IndexOn="value"/>
<xflaim:AttributeComponent
xflaim:name="offset"
xflaim:KeyComponent="3"
xflaim:IndexOn="value"/>
</xflaim:ElementComponent>
</xflaim:Index>