Interstage Shunsaku Data Manager Application Development Guide - Microsoft(R) Windows(R) 2000/ Microsoft(R) Windows Server(TM) 2003 - - UNIX -
Contents Index PreviousNext

Appendix B Format of Search, Return and Sort Expressions> B.3 Search Expressions

B.3.4 Patterns

This method searches for documents where the value of the element node, the value of the text node, or the value of the attribute node matches the various conditions represented by patterns. Searches can be made by specifying complex conditions, such as partial match searches and single-word searches.

mark1Patterns

The following figure shows the definition for patterns.

[Figure B-11 Pattern Definition]

mark2Character String Searches

The following figure shows the definition for character string searches.

Characters that are ignored during searches can be changed using the SkipChar execution parameter.

Refer to Execution Parameters in the System Environment File and Execution Parameters in the Director Environment File in the Operator's Guide for more information on the SkipChar execution parameter.

[Figure B-12 String Search Definition]

mark2Word Searches

The following figure shows the definition for word searches.

The delimiter between individual words can be changed using the SeparateChar execution parameter.

The characters that can be used in word searches are all ASCII characters except for control characters and the characters used to separate words.

Refer to Execution Parameters in the System Environment File and Execution Parameters in the Director Environment File in the Operator's Guide for more information on the SkipChar execution parameter.

[Figure B-14 Word Search Definition]

mark1Logical Conjunction

Find out whether the value of element nodes specified by path expressions, the value of text nodes specified by text expressions, or the value of attribute nodes specified by attribute expressions includes all the specified patterns.

Example

/root/text = 'fast&search'

Evaluates to TRUE if the value of the element node represented by '/root/text' includes both the string "fast" and the string "search".

mark1Logical Disjunction

Find out whether the value of element node specified by path expression, the value of text node specified by text expression, or the value of attribute node specified by attribute expression includes any of the specified patterns.

Example

/root/text = 'fast|search'

Evaluates to TRUE if the value of the element node represented by '/root/text' includes either the string "fast" or the string "search".

mark1Negation

Find out whether the value of element node specified by path expression, the value of text node specified by text expression, or the value of attribute node specified by attribute expression includes none of the specified patterns.

Example

/root/text = '~(fast|search)'

Evaluates to TRUE if the value of the element node represented by '/root/text' includes neither the string "fast" nor the string "search".

For pattern searches, logical conjunction, logical disjunction and negation can be used in combination. In this case, the order of evaluation is as follows:
  1. Negation
  2. Logical conjunction
  3. Logical disjunction
Parentheses can also be used to specify the order of evaluation. Conditions in parentheses are evaluated preferentially.

mark1String Match Specification

Find out whether the value of the element node, the value of the text node, or the value of the attribute node includes the specified keyword.

Example

/root/text = 'Fujitsu'

Evaluates to TRUE if the value of the element node represented by '/root/text' includes the string "Fujitsu".

mark1Prefix Match Specification

Find out whether the specified keywords exist at the start of the value of the element node, the value of the text node, or the value of the attribute node.

Example

/root/text = '^Fujitsu'

Evaluates to TRUE if the value of the element node represented by '/root/text' starts with the string "Fujitsu".

mark1Suffix Match Specification

Find out whether the specified keywords exist at the end of the value of the element node, the value of the text node, or the value of the attribute node.

Example

/root/text = 'Fujitsu$'

Evaluates to TRUE if the value of the element node represented by '/root/text' ends with the string "Fujitsu".

mark1Free Character Specification

Find out whether the value of the element node, the value of the text node, or the value of the attribute node includes a keyword that contains free characters.

Free characters included in keywords can be specified in four ways, as shown in the following table.

[Table B-5 Free Characters]

Symbol

Meaning

Can be used consecutively

.

Any one arbitrary character

.?

Zero or one arbitrary character

.+

One or more arbitrary characters

x

.*

Zero or more arbitrary characters

x

: Yes
x : No

Example

/root/text = 'Fujitsu.*company'

Evaluates to TRUE if the value of the element node represented by '/root/text' includes the strings "Fujitsu" and "company" AND there are zero or more characters between these two strings.

A syntax error will occur if a symbol that cannot be used consecutively is used consecutively.

Free character specifications can be combined. The following table shows examples of how combinations of free character specifications evaluate to TRUE or FALSE for different data. These results assume that "=" has been specified as the relational operator.

[Table B-6 Free Character Combinations]

Keyword example

Data example

AB

AXB

AYYB

AZZZB

'A.'

'A.B'

x

x

x

'A.?B'

x

x

'A.+B'

x

'A.*B'

'A..?B'

x

x

'A..+B'

x

x

'A..*B'

x

'A.?.+B'

x

'A.?.*B'

: TRUE
x: FALSE

mark1Character Interval Specification

Finds out whether the two keywords specified appear in succession in the value of the element node, the value of text node, or the value of attribute node within an interval of the specified number of characters.

The numeric value for character interval specifications must be between 0 and 1024 inclusive.

Example

/root/text = 'alcohol,10C,concentration'

Evaluates to TRUE if the value of the element node represented by '/root/text' includes both "alcohol" and "concentration" in that order AND there are 10 or less characters between these two strings.

mark1Partial Character Specification

Finds out whether the value of the element node, the value of text node, or the value of attribute node contains the specified keyword. Part of the keyword consists of one of multiple strings.

Example

/root/text = 'Jo(n|hn|nathon)Smith'

Evaluates to TRUE if the value of the element node represented by '/root/text' includes any of the strings "Jon Smith", "John Smith" or "Jonathan Smith".

mark1Character Range Specification

Finds out whether the value of the element node, the value of text node, or the value of attribute node includes the specified keyword, where part of the keyword consists of any character in a specified range.

Both the start character (character 1) and the end character (character 2) must be single ASCII characters and must not be control characters. Do not add escape characters when making this specification. Also, the character code value of the start character must be smaller than the character code value of the end character.

Example

/root/text = 'class[A-C]'

Evaluates to TRUE if the value of the element node represented by '/root/text' includes any of the strings "classA", "classB" or "classC".

When character range specification searches are executed, searchers may consume a lot of memory.
Refer to Partial Character Specification for more information on the amount of memory used.

mark1Numeric Range Specification

Finds out whether the value of the element node, the value of text node, or the value of attribute node includes the specified keyword, where part of the keyword consists of any numeric value in a specified range.

The start numeric value (numeric value 1) and the end numeric value (numeric value 2) must be specified using single-byte numbers. The start and end numeric values must be between 0 and 999 inclusive. Also, the start numeric value must be smaller than the end numeric value.

Example

/root/text = 'alcohol [9,11]%'

Evaluates to TRUE if the value of the element node represented by '/root/text' includes any of the strings "alcohol 9%", "alcohol 10%", or "alcohol 11%".

Correct search results can be obtained if characters are specified before and after the numeric value.

When numeric range specification searches are executed, searchers may consume a lot of memory.
Refer to Partial Character Specification for more information on the amount of memory used.

mark1Word Match Specification

Find out whether the value of the element node, the value of the text node, or the value of the attribute node contains any individual words that match the specified keyword. For word searches, strings separated by the delimiter are distinguished as individual words.

Example

/root/text = '\<the\>'

Evaluates to TRUE if the value of the element node represented by '/root/text' includes the individual word "the". The string "the" in "mother", for example, will evaluate to FALSE because it occurs within a larger word.

mark1Word Interval Specification

Find out whether the two keywords specified appear in succession in the value of the element node, the value of the text node, or the value of the attribute node within an interval of the specified number of words.

Numeric values specified for word interval specifications must be between 0 and 1024.

Example

/root/text = '\<search\>,10W,\<shunsaku\>'

Evaluates to TRUE if the value of the element node represented by '/root/text' includes both "search" and "shunsaku" in that order AND there are 10 or less words between these two words.

Word interval specifications can be used only once in word searches.

Contents Index PreviousNext

All Rights Reserved, Copyright(C) FUJITSU LIMITED 2006