Home > Contents > Index >
STRINGLIST
Constructs a one-column list from a string separated by a delimiter.
Syntax
<STRINGLIST NAME="LIST_NAME" STR="STR_VALUE" DELIM="DELIMITER"/>Parameters
NAME (required)
- Name of the string list.
STR (required)
- Values to include in the string.
DELIM (required)
- Delimiter to use. To use a blank as a delimiter, you must use space character; for example, %20.
Description
The
STRINGLIST
tag constructs a one-column list from a string separated by a delimiter. The list created always contains the column ITEM. The following delimiters are some of the more common ones supported:
%22 quotecstr (") %20 emptystr (nothing) %0a newline (n) %09 tab (t) %0d carriage return (r) %3c less than sign (<) %3e greater than sign (>) %26 ampersand (&) %25 percent (%)The column values of the current row in a list can be obtained using the syntax,
List.colname
whereList
is the name of the list andcolname
is the name of the column in the list.
Note
In the case of StringLists, the values can be obtained by using List.Item.
You can use the following attributes to return information about the list using the syntax,
List.attname
, whereattname
can be one of the following attributes:
#numRows
Number of rows in this list#curRow
Current row in this list.#moreRows
Boolean (true/false) to indicate whether there are more rows following the current row.#numCols
Number of columns in this list.@<colname>
Only used on lists that contain resultsets. Contents of the file in the specified column if the colname begins with "url".For example,
MyList.#numRows
returns the number of rows in the listMyList
.MyList.@urlheader
retrieves the contents of the file specified by the column urlheader.The value of a list is maintained during the processing of a page request. If the list contains a resultset, the resultset is maintained independently of a list that uses it.
Error Numbers
The possible values of
errno
include:
Value Description -16 Output list is empty.Example
This example constructs a list called
tablenames
using the values inVariables.list
and a blank as the delimiter. The loop iterates through the list of names in the table, displaying each item in the list.
<SETVAR NAME="errno" VALUE="0"/> The Tables are: <br/> <STRINGLIST NAME="tablenames" STR="Variables.list" DELIM="%20"/> <LOOP LIST="tablenames"> <CSVAR NAME="tablenames.ITEM"/><br/> </LOOP> <IF COND="IsError.Variables.errno=true"> <THEN> <!--Handle error--> </THEN> </IF>This example constructs a list called
somelist
using the valueserin
,alli
, andann
and a comma as the delimiter. The loop iterates through the list of names and displays them.
<SETVAR NAME="errno" VALUE="0"/> <STRINGLIST NAME="somelist" STR="erin,alli,ann" DELIM=","/> NAMES:<br/> <LOOP LIST = "somelist"> <CSVAR NAME="somelist.ITEM"/> </LOOP> <IF COND="IsError.Variables.errno=true"> <THEN> <!--Handle error--> </THEN> </IF>See Also
Home > Contents > Index > ![]()
Oracle XML Tag Reference
Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.