Toggle navigation
+1 216-820-2200
+1 216-820-2200
Toggle navigation
Products
Solutions
How to Buy
Support
Contact Us
News
About
Vortex: Texis Web Script Reference Manual Version 8.01
Thunderstone Software Expansion Programs International, Inc.
Contents
Texis Web Script
Overview
Technical Details
Directives
Functions
Script Functions
User Functions
Builtin Functions
Statements
Variables
Variable Values
Variable Types
Variable Scope: Global vs. Local
Variable Precedence and Initialization
Variables from Multi-part File Uploads
Variable Debug Syntax
Variable HTML Escape Syntax
Variable Count Syntax
Execution
URL Syntax
CGI Mapping by Directory
CGI Mapping by File Extension
Full Syntax
Examples
Vortex Statements
A
- function definition
Function Scope
Function Parameters
Pass-by-Value Arguments
Pass-by-Reference Arguments
Start Functions with Parameters
IF
,
ELSE
,
ELSEIF
- conditional execution
SWITCH
- multi-choice branch
Variable assignment - assign values to variables
LOCAL
- declare local variables
LOOP
- iterate through variables
SQL
- execute SQL statement
Parameter Substitution
$null Behavior
Dynamic Parameters
SQL Command Construction
Multi-value Variables
Complex Field Names
Special SQL Variables
DB
- set database path
USER
,
PASS
- set SQL user and password
WHILE
- conditional loop
READLN
- read file a line at a time
WRITE
- write to file
EXEC
- execute program
CAPTURE
- capture output
TIMPORT
- general purpose data import
BREAK
- exit loop
CONTINUE
- continue loop
RETURN
- return from current function
VERB
- raw output
Vortex Directives
TIMEOUT
- set timeout
EXPORT
- retain variables across invocations
EXPORT Types
Flags
PUTMSG
- set error message actions
ENTRYFUNC
,
EXITFUNC
- set entry/exit functions
USES
- use a module
SCHEDULE
- schedule periodic execution of script
COOKIES
- control cookie import
STACK
- set stack limit
TRACESQL
- trace SQL calls
SQLCACHE
- control SQL handle caching
TRAP
- trap signals
ADDTRAILINGSLASH
- add trailing slash to "directory" URLs
pragma
- inline compiler directive
Special Variables
$cmd
$cmdlnargs
$date
$errnum
,
$errscript
,
$errline
etc.
$indexcount
$rows.min
,
$rows.max
$sqlresult.
... vars
$loop
$next
$null
$pathroot
$ret
$ret.count
$ret.seq
$ret.off
$ret.err
,
$ret.ownerid
,
$ret.owner
,
$ret.groupid
,
$ret.group
,
$ret.size
, etc.
$ret.code
,
$ret.token
,
$ret.msg
$sourcepath
$url
$urlfunc
,
$urlext
$urlq
$urlroot
$userpath
$__FILE__
$__LINE__
$__SCRIPT__
$__FUNCTION__
$__OSTYPE__
$__OSNAME__
Builtin Functions
sum
- return sum of variable values
fmt
,
strfmt
- formatted output
Escape Sequences
Standard Formats
Standard Flags
Printing Date/Time Values
Printing Latitude, Longitude or Location/Geocode Values
Other Format Codes
Extended Flags
Metamorph Hit Mark-up
Automatic Typecasting
fmtcp
- set fmt control parameters
fmtinfo
- get fmt control parameters
mm
- enable/disable automatic hit markup
sb
- enable/disable automatic search and replace
apicp
- modify Metamorph query control parameters
Query Protection
Query Processing
apiinfo
- get current Metamorph query control parameters
sqlcp
- modify low-level SQL control parameters
pagelinks
- paginate SQL results
Callback Parameter Initialization
flush
- flush output
header
- print HTTP header
rex
,
split
- regular expression search
Expressions
Repetition Operators
RE2 Syntax
\<nomatch\> Syntax
REX Caveats and Commentary
Some Useful REX Expressions
sandr
- regular expression search and replace
REX Replace Syntax
strstr
,
strstri
- find substring in string
substr
- extract substring from string
strcmp
,
strcmpi
- compare strings
strncmp
,
strnicmp
- compare strings, fixed length
strlen
- length of string
strrev
- reverse string
upper
- convert to upper case
lower
- convert to lower case
strfold
- fold string by case
strfoldcmp
- compare strings folded by case
sort
- sort variables
uniq
,
uniqcount
- produce unique list of values
count
- return number of variable values
strtonum
- convert string to number
rand
- generate pseudo-random number
randpick
- return pseudo-random value of a variable
srand
- seed the pseudo-random number generator
exit
- exit program
fetch
- fetch URLs
submit
- submit HTML form
urlinfo
- get detailed page info
urltext
,
urllinks
- get formatted text, URL links
urlcp
- modify URL control parameters
Resource Limits
Page Fetching
Server Authentication
SSL/HTTPS
Formatted Text
Links
Headers
JavaScript
Cookies
Hostname Resolution
Informational/Trace
Miscellaneous
urlutil
- URL/network utility
nslookup
- domain name and IP address lookup
nsinfo
- get info from last name lookup
options
- print options list
radiobutton
- print radio buttons list
checkbox
- print checkbox list
doctype
- print DOCTYPE declaration
cal
- print a calendar with links
calrule
- translate a calendar rule and iterate dates
calendar
- print calendar form
caldate
- create date list from calendar submission
clist
- create comma-separated list
slist
- create Metamorph set list
wordlist
,
wordcount
,
wordoccurrencecounts
- get words and frequencies from index
createdb
- create database
adminsql
- execute arbitrary SQL
loguser
- log user accesses
userstats
- get user statistics
resetstats
- reset user statistics
abstract
- generate an abstract from text
rmcommon
- remove common prefix/suffix from text
pwencrypt
- encrypt/hash password Unix-style
encrypt
- encrypt data
decrypt
- decrypt data
readvars
- read URL-encoded variables
varinfo
- get miscellaneous variable information
getvar
- get variable values
setvar
- set a named variable
push
- push values into a variable
pop
- pop value off a variable
slice
- get sequence of values from a variable
vxcp
- set Vortex control parameters
vxinfo
- get miscellaneous Vortex information
hash
- produce a hash or checksum for data
geo2code
- latitude/longitude encoding for regional search
code2geo
- decode latitude/longitude encoding
pdfxml
- convert Metamorph hit to PDF markup information
xtree
- maintain sorted list of values
profiler
- assist in searching query profiles
read
- read files
send
- print raw data
spew
- print files
sleep
- sleep for a while
sysinfo
- get system-specific information
syscp
- set system-specific information
sysutil
- file and system utilities
stat
- obtain file size and attributes
watchpath
- watch a file or directory for changes
getpid
- get process id
procexists
- see if process exists
kill
- terminate or send a signal to a process
loadavg
- return system load averages
XML API
Overview
Character Encodings
Tree vs. Streaming APIs
The Tree API
The Streaming API
Comparing Features
Memory Usage
Parsing Speed
Which to Use
Data Types
xmlNode
xmlDoc
xmlNs
xmlXPath
xsltStylesheet
xmlReader
xmlWriter
Using the
xmlTree
Opening / Creating a Document
Saving
Traversing the Tree
Creating Nodes
Getting Information
Setting Information
Moving Objects
Deleting Objects
Copying Objects
Using XPath
Using XSL
xmlTree
FAQ
Text Nodes and Children
xmlDoc vs. Root Element
The Concept of Nothing
Returning Arrays
Using Namespaces
XSL Parameter Quoting
DTDs, Entities, and Entity References
Using the
xmlReader
Opening a Reader
Moving the Reader
Document Information
Basic Information
Namespace Information
Attribute Information
Other Information
Using the
xmlWriter
Starting
Finishing
Getting the Contents
Writing Output
xmlReaderGetAllContent
xmlReaderGetAttribute
xmlReaderGetAttributeCount
xmlReaderGetAttributeNumber
xmlReaderGetBytesConsumed
xmlReaderGetColumn
xmlReaderGetContent
xmlReaderGetDepth
xmlReaderGetEncoding
xmlReaderGetLang
xmlReaderGetLine
xmlReaderGetLocalName
xmlReaderGetName
xmlReaderGetNsURI
xmlReaderGetNsPrefix
xmlReaderGetType
xmlReaderGetVersion
xmlReaderIsEmptyElement
xmlReaderMoveToAttribute
xmlReaderMoveToAttributeNumber
xmlReaderMoveToElement
xmlReaderMoveToFirstAttribute
xmlReaderMoveToNextAttribute
xmlReaderNewFromFile
xmlReaderNewFromString
xmlReaderRead
xmlTreeAddChild
xmlTreeAddChildList
xmlTreeAddContent
xmlTreeAddNextSibling
xmlTreeAddPrevSibling
xmlTreeAddSibling
xmlTreeCleanup
xmlTreeClearNs
xmlTreeCopyAttribute
xmlTreeCopyAttributeList
xmlTreeCopyDoc
xmlTreeCopyNode
xmlTreeCopyNodeList
xmlTreeDumpNode
xmlTreeGetAllContent
xmlTreeGetAttributeContent
xmlTreeGetAttributes
xmlTreeGetChildren
xmlTreeGetChildrenContent
xmlTreeGetContent
xmlTreeGetDoc
xmlTreeGetEncoding
xmlTreeGetEntityType
xmlTreeGetExternalID
xmlTreeGetExternalSubset
xmlTreeGetFirstAttribute
xmlTreeGetFirstChild
xmlTreeGetInternalSubset
xmlTreeGetLine
xmlTreeGetName
xmlTreeGetNext
xmlTreeGetNs
xmlTreeGetNsDef
xmlTreeGetNsURI
xmlTreeGetNsPrefix
xmlTreeGetParent
xmlTreeGetPrevious
xmlTreeGetRootElement
xmlTreeGetSystemID
xmlTreeGetType
xmlTreeGetVersion
xmlTreeIsBlankNode
xmlTreeLookupNsURI
xmlTreeLookupNsPrefix
xmlTreeNewAttribute
xmlTreeNewCDATA
xmlTreeNewComment
xmlTreeNewDoc
xmlTreeNewDocFromFile
xmlTreeNewDocFromString
xmlTreeNewElement
xmlTreeNewNs
xmlTreeNewPI
xmlTreeNewText
xmlTreeNewXPath
xmlTreePrintDoc
xmlTreeQuickXPath
xmlTreeSaveDoc
xmlTreeSetContent
xmlTreeSetName
xmlTreeSetNs
xmlTreeSetNsPrefix
xmlTreeSetNsURI
xmlTreeSetRootElement
xmlTreeUnlinkNode
xmlTreeXPathExecute
xmlTreeXPathRegisterNs
xmlTreeXPathSetContext
xmlWriterEndAttribute
xmlWriterEndCDATA
xmlWriterEndComment
xmlWriterEndDocument
xmlWriterEndElement
xmlWriterEndPI
xmlWriterGetContent
xmlWriterNewToFile
xmlWriterNewToString
xmlWriterSetIndent
xmlWriterStartAttribute
xmlWriterStartCDATA
xmlWriterStartComment
xmlWriterStartDocument
xmlWriterStartElement
xmlWriterStartPI
xmlWriterWrite
xmlWriterWriteAttribute
xmlWriterWriteCDATA
xmlWriterWriteComment
xmlWriterWriteElement
xmlWriterWritePI
xmlWriterWriteRaw
xsltApplyStylesheet
xsltParseStylesheetDoc
xsltParseStylesheetFile
xsltParseStylesheetString
MIME API
Overview
Data Types
mimeReader
mimeEntity
Example Script
mimeEntityGetBody
mimeEntityGetChildNumber
mimeEntityGetContentLocation
mimeEntityGetDepth
mimeEntityGetHeaderNames
mimeEntityGetHeaderParameterNames
mimeEntityGetHeaderParameterValues
mimeEntityGetHeaderValues
mimeEntityGetImapSectionSpecification
mimeEntityGetMessageFilename
mimeEntityGetRawBody
mimeEntityGetRawBodyOffset
mimeEntityGetRawBodySize
mimeEntityGetRawHeaderSection
mimeEntityGetRawHeaderSectionOffset
mimeEntityGetRawHeaderSectionSize
mimeEntityGetRawHeaderValues
mimeEntityGetSafeFilename
mimeEntityGetSequenceNumber
mimeEntityGetText
mimeEntityGetTextCharset
mimeEntityGetTextFormatter
mimeEntityIsLastChild
mimeEntityIsReparented
mimeEntityIsStartBodyPart
mimeReaderGetEntity
mimeReaderGetFullEntity
mimeReaderMoveToNextEntity
mimeReaderMoveToNextEntitySibling
mimeReaderOpenEntity
mimeReaderOpenFile
mimeReaderOpenString
headerDecode
headerGetItems
headerItemGetParameterNames
headerItemGetParameterValues
headerMailboxGetAddress
headerMailboxGetDisplayName
mailParseAliases
refInfo
API
Overview
Data Types
Example Script
refInfoGetAttribute
refInfoGetAttributes
refInfoGetDescription
refInfoGetFlags
refInfoGetLinkText
refInfoGetProcessedDocLength
refInfoGetProcessedDocOffset
refInfoGetRawDocLength
refInfoGetRawDocOffset
refInfoGetSourceAttribute
refInfoGetStrBaseUrl
refInfoGetSuppressedReason
refInfoGetTagName
refInfoGetTextLength
refInfoGetTextOffset
refInfoGetTypes
refInfoGetUrl
Vortex Library Modules
Vortex Module Creation
Vortex Module Revision
Using Modules in Scripts
Vortex Library Option Summary
Vortex Scheduling
Listing Scheduled Scripts
Unscheduling Scripts
Schedule Option Summary
Creating User Functions
Declaration and Argument Syntax
I/O
Compiling and Linking
Vortex Command Line Options
Vortex Global Command-line Options
Vortex Action Command-line Options
Vortex Optional Command-line Options
Vortex Command-line SQL Options
Vortex Miscellaneous Command-line Options
Differences Between Vortex,
tsql
and Metamorph API
Vortex
texis.ini
Configuration Settings
Vortex Error Messages
Capturing Vortex Errors
Changing Logging and Printing of Vortex Messages
Avoiding putmsg Side Effects
Capturing Compile-time Error Messages
Fatal Vortex Error Messages
Common Vortex Errors
Texis Web Server
vhttpd
Overview
vhttpd
Configuration File
vhttpd
Log and Path Settings
vhttpd
URL Settings
vhttpd
OS/Resource Settings
vhttpd
Optimization Settings
vhttpd
Miscellaneous Settings
vhttpd
Command Line Options
vhttpd
CGI Environment Variables
SSL Client/Server Certificate Verification
Verification Process
Certificate Presentation
Chain Completion
Finding Issuer Certificates
Extensions Check
Root CA Trust
Chain Expiration and Signature
Common Name Matches Hostname
Tokens and Messages
Trace Vortex
TraceVortex Logging
TraceVortex Visualizer
Overview
Function Calls Panel
Functions by Caller Panel
Tree View Panel
Preferences
Third-Party Software
Antiword
Aspell
Catdoc xls2csv
Cole library
iconv
libpst
libxml2
Libxslt
Libexslt
ppt2html, msg2html
SSL/HTTPS plugin
unrar
unzip
zlib
SpiderMonkey (JavaScript-C) Engine
PDF/anytotx plugin
JANSSON
thttpd - throttling HTTP server
prngd
GNU General Public License
GNU Lesser General Public License
GNU Library General Public License
Netscape Public License
UnixUtils
PuTTY
MIT Kerberos
Cyrus SASL
Texis Version 6 Features and Changes
Overview
Query Handling
Search Results Improvements
URL Fetching and Web Server Changes
Filename Changes
Programming Features
Filename Changes
texis.cnf
Moved -
Caveat
Default Vortex Source File Extension
.vs
ErrorScript, ErrorFile Initialized Differently -
Caveat
SQL and
apicp
Setting Changes
Unicode
textsearchmode
,
stringcomparemode
-
Caveat
tsql apicp
Defaults Same as Vortex
apicp
Defaults Settable in
texis.ini
texisdefaults
Deprecated -
Caveat
apicp
Setting
querysettings
Added
withinmode
Defaults to
word span
wildsingle
On by Default
Programming Features
Multi-Part Abstracts
Hit Highlighting Enhanced
Multi-value SQL Parameters and
strlst
Changes,
arrayconvert
-
Caveat
<sql okvars>
Option
sqlresult...
Variables Returned from
<sql>
Debug Syntax for Vortex Variables
<exec>
Double-quotes Args with Space
XML, XSLT API Added
int64
,
uint64
Types Added
varint
,
int(N)
Support
Post-processing
putmsg
Changes -
Caveat
More XHTML Compliance
indexaccess
Columns Added
REX Set-Subtract Operator
Vortex Scheduler Port Changed
More
anytotx
Headers and Formats
New URL Fetching Settings
urlcp secure
urlcp putmsg
urlcp fetchmeter
urlcp httpversion
urlcp ftprelativepaths
urlcp sslprotocols
urlcp ignoreanchorframes
urlcp charsetconfigfromfile
Web Server Changes
vhttpd AllowExt, ExcludeExt
Defaults Changed -
Caveat
Variables Supported in
vhttpd
Settings
Monitor Web Server SSL Support
Webinator Changes
Meta Search
Maintenance Section
License Updates Applicable via Web Interface
XML Results
SOAP API
Compressed HTML Support
Faster Category Searches
Customizable Thesaurus
Results Authorization
Group by Site
Backup and Restore Settings
Apply/Revert Appearance Changed to Buttons
CSS Admin GUI
Text Search Mode
Language Analysis Module
Extensions
Renamed and Default Changed
Exclusions
Default Changed
Texis Version 7 Features and Changes
Webinator Features -
Caveat
Vortex Features
Script Tracing
REX Does Not Return Redundant Empty Hits -
Caveat
sandr
Infinite Loops Prevented, Matches Like
rex
-
Caveat
sum
Action Determined by Format -
Caveat
fmt %l/
,
%l:
Codes Changed -
Caveat
SQL output=xml
Does Not Consume Entities -
Caveat
Empty-element Statement Tags Allowed -
Caveat
Pragma Stacks -
Caveat
write output
,
flags
,
skiponfail
Options -
Caveat
getvar
,
setvar
Error Messages
vxcp timeouttext
and
exceptiononly
Added
vxcp compatibilityversion
Added
Cookie Acceptance Relaxed -
Caveat
xmlTreeXPathSetContext()
Added to XML API
$ret.size
is
int64
On All Platforms
SQL Features
strlst
/
IN
Changes and New
SUBSET
/
INTERSECT
Operators
IN
behavior change -
Caveat
New operators
SUBSET
and
INTERSECT
-
Caveat
Relational operators with
strlst
changed -
Caveat
stringcomparemode
used with
strlst
-
Caveat
varchartostrlstsep
default is now
create
-
Caveat
Duplicate multi-item
strlst
index results removed -
Caveat
multivaluetomultirow
defaults
off
-
Caveat
ALTER INDEX
Syntax Added
CREATE INDEX ... WITH options
Syntax -
Caveat
Metamorph Index Default Type Is
INVERTED
-
Caveat
byte
/
char
Conversion As-is Without Hexifying -
Caveat
Texis Version 8 Features and Changes
Upgrade Best Practices
General Features
IPv6 Support
Logs Moved -
Caveat
Texis Monitor Controlled By
systemd
Service -
Caveat
Libraries Moved From
bin
To
lib
Two-Arg Long Command Line Options Allowed
Vortex Features
Looping Statements Syntax Changes -
Caveat
Consistent Looping Syntax -
Caveat
No
ROW
Flag -
Caveat
$loop
/
$next
Set By Non-looping Versions of Loopable Statements -
Caveat
Vortex SQL Expression Parser Improvements -
Caveat
$null
Changes Meaning -
Caveat
URL Encoding (
%U
) Behavior Changed -
Caveat
xtree
Behavior Changes -
Caveat
stat
$ret.owner
,
$ret.group
Changes, New Variables -
Caveat
readln
Sets
$ret.off
,
$ret.size
-
Caveat
fmt
Does Not Clear
$ret
-
Caveat
$#var
Syntax Added
$-var
,
$-var
Syntax Added
Literal
$.
,
$[
,
$]
,
$
n
Syntax Added
<SQL>
Return Codes
<return>
Expression May Be SQL or Multi-argument
<watchpath>
Added
<push>
,
<pop>
,
<slice>
Added
Vortex
syntaxversion
,
if
Pragmas Added
--translate-from-version
Option Added
PID, Thread ID, Time Logged
Default Vortex Compiled and Lock Extensions Changed -
Caveat
<SCHEDULE>
Defaults to Mutex
Detailed Link Info
Fetch Defaults Changed
vhttpd
ExcludeExt
Defaults Changed -
Caveat
BindAddress
and
Port
Replaced by
Listen
-
Caveat
SQL Features
refInfo
API for Detailed Link Info
Compressed Blobs (
blobz
)
ORDER BY $rank
-
expression
Sorting is Consistent -
Caveat
Hexadecimal Constants Supported in SQL
Integral Literals are
int64
or
uint64
SQL Mod (
%
) Operator Added
Increased Password Security -
Caveat
Copyright © Thunderstone Software
Last updated: Apr 15 2024
Vortex Manual
Top
Next: Contents
PDF
Contact
Submit Request
Copyright © 2024 Thunderstone Software LLC. All rights reserved.