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

|
B.2.4 Single-line Function Specification
If single-line functions are specified, the value specified by the text expression or attribute expression is converted by the function and the results are returned.
The definition format for single-line function specification is shown below.
[Figure B-7 Single-Line Function Specification Definition format]

The rlen Function
The rlen function returns the specified number of characters starting with the first character of the string expressed by the text expression or attribute expression.
- A number of characters between 1 and 2147483647 inclusive can be specified. This number includes control characters (including the linefeed code).
- The string expressed by the text expression or attribute expression will be returned unchanged if it is shorter than the number of characters specified.
- The '//' path operator cannot be specified in the text expression or attribute expression.
- The '*' path element cannot be specified in the text expression or attribute expression.
- The '*' cannot be specified in the attribute name specified by attribute expression.
Example 1
rlen(/company/name/text(),16) |
Example 2
rlen(/company/employee/@position,16) |
The val Function
The val function extracts only numeric values from the string expressed by the text expression or attribute expression.
- The first numeric value that matches the format below is extracted from the string specified by the text expression or attribute expression.
The following figure shows the definition for the val function.
[Figure B-8 val Function Definition]

- Commas in the integer part are ignored. If a decimal point is specified, all digits immediately following the decimal point up to the first non-numeric character are used as the fractional part.
- Strings specified by the text expression or attribute expression that do not contain numbers are handled as 0.
- An error will occur if the integer part except for leading zeros has more than 18 digits.
- The first 18 digits of the decimal part are significant. Any subsequent digits are truncated.
- The '//' path operator cannot be specified in the text expression or attribute expression.
- The '*' path element cannot be specified in the text expression attribute expression.
- The '*' cannot be specified in the attribute name specified by attribute expression.
Example
val(/company/employee/id/text()) |
All Rights Reserved, Copyright(C) FUJITSU LIMITED 2006