SLAX Functions string slax:base64-decode(string, non-xml?) Decode a BASE64 encoded string. Replace non-xml characters with non-xml (empty string will remove them).

string slax:base64-encode(string) Encode a string into a BASE64 encoded string.

node-set slax:break-lines(node-set) Break a string (or a node set containing a string) into a set of elements, one per line of text.

boolean slax:dampen(name, max, time-period) Return true if dampen() has been called with name more than max times within time-period minutes.

string slax:document(filename-or-url, opts?) Read the contents of a local file or URL. Optional node-set can contain , , and values.

object slax:evaluate(expression) Evaluate a SLAX expression, returning the results.

object slax:first-of(object+) Return the first argument that is not empty.

string slax:get-command(prompt) Prompt the user for input (with readline's history).

string slax:get-input(prompt) Prompt the user for input.

string slax:get-secret(prompt) Prompt the user for an input string but do not echo their response. Suitable for passwords.

boolean slax:is-empty(object) Return true if the argument is empty.

string slax:printf(format, string*) Format string output as printf(3) with %j modifiers: "%jcs" Capitalize first letter "%jt{TAG}s" Prepend TAG if string is not empty "%j1s" Skip field if value has not changed

node-set slax:regex(pattern, string, opts?) Match a regex, returning a node set of the full string matched plus any parenthesized matches. Options include "b", "i", "n", "^", and "$", for boolean results, ICASE, NEWLINE, NOTBOL, and NOTEOL.

void slax:sleep(seconds, milliseconds) Sleep for a given time period.

node-set slax:split(pattern, string, limit) Break a string into a set of elements, up to the limit times, at the pattern.

string slax:sysctl(name, format) Retrieve a sysctl variable. Format is "i" or "s".

node-set slax:string-to-xml(string+) Return parsed XML of concatenated arguments.

void slax:syslog(priority, string+) Syslog the concatenation of set of arguments.

string slax:xml-to-string(node-set+) Return stringified XML hierarchies.

The slaxproc Command slaxproc is a command line tool can run scripts, convert between XSLT and SLAX formats, and check syntax.

slaxproc [options] [script] [input] [output] Modes: --run, –r Runs a SLAX script (the default mode)

--slax-to-xslt, –x Converts SLAX scripts into XSLT

--xslt-to-slax, –s

Phil Shafer http://code.google.com/p/libslax

Converts XSLT scripts into SLAX

--check, –c Checks syntax and content of script

--format, –F Format script contents

File options: --name filename, -n filename Gives the script file name

--input filename, -I filename Gives the input file name

--output filename, -o filename

SLAX is an alternative encoding for XSLT, the W3C standard XML transformation language. Since SLAX encodes the same informationas XSLT, scripts can be easily converted between the two formats. The SLAX syntax is similar to C and Perl. Scripts are simpler to write, easier to debug, more maintainable, and programmers are more productive. The SLAX distribution includes a debugger with a profiler, a call flow monitor, and much more.

# An Example SLAX Script version 1.1;

Gives the output file name

param $name = "Poe";

Common options: --debug, -d Enables the SLAX/XSLT debugger

--empty, –E Provides an empty document as input

--exslt, –e Enables the EXSLT library

--include dir, –I dir Search directory for includes/imports

--indent, –g Indents script output

--lib dir, –L dir Search directory for extension libraries

--param name value, -a name value

var $favorites := { "Doyle";

SLAX Functions The slaxproc Command

the two formats. The SLAX syntax is similar to .... $res[2] = Address family, "inet4" or "inet6". $res[3] = Prefix length .... function. output-method [ xml | text | html ] {.

179KB Sizes 2 Downloads 336 Views

Recommend Documents

The Greatest Command
At Home Study Guide. For the week of March 22, 2015. Mark 12:28-34. Quick Review. As a modern reader of Mark 12 we may miss the common language ...

The Greatest Command
is yours in Christ as you remember His love for you and those you encounter in your realm of influence. Dr. Matthew R. St. John. Bethel Church. March 22, 2015. Things That Are God's. The Greatest Command. Mark 12:28-34. The Greatest Command. Notes: F

command - TooFatLardies
hesitant command roll results, until the order is completed, changed or a Faltering Brigade command roll changes the situation. (p31). 2. Redeploy Order. Definition: Either a) Retire a front line brigade back into reserve. The brigade falls back behi

Command-line Arguments
What is argc? 2. What is argv[0]?. 3. What is argv[1]?. 4. What is argv[2]?. 5. What is argv[3]?. 6. What is argv[4]?. Page 3. Mario Revisited jharvard@appliance (~): ./mario 10. Page 4. int main(int argc, string argv[]). { if (argc != 2). { printf("

Functions of the Cranial Nerves
Glosso-pharyngeal Taste (Pharyngeal). Pharyngeal muscles. X. Vagus. Viscero-sensation. (including taste) + somaticsensory from head. Visceral motor:.

MISSILE COMMAND
requests for attention or service on a demand basis. When the interrupt ... of the programmable device produces a CALL to a .... which is analogous to a CCD in a video camera. .... Systems”,International Conference on Signal Processing.

AUTOCAD COMMAND MENU.pdf
... as Block Pastes objects from the Clipboard as a block: PASTEBLOCK. Paste as Hyperlink Pastes a hyperlink to the selected object: PASTEASHYPERLINK.

Notification_Naval Command Recruitment.pdf
Sign in. Page. 1. /. 2. Loading… Page 1 of 2. Page 1 of 2. Page 2 of 2. Page 2 of 2. Notification_Naval Command Recruitment.pdf. Notification_Naval Command ...

Configuration for "Command" Phone
SMS Fail. Event - SMS Failure. %REMOTE. SMSfail. 5. SMS Received .... Text: Sent command to enable battery save mode. 6 ..... 45 Phone - Send SMS.

davechild_linux-command-line.pdf
Screen Shortcuts. screen. Start a screen session. ... http://www.gnu.org/software/screen/. File Permissions ... Page 2 of 2. davechild_linux-command-line.pdf.

The Derivatives of Some Functions - IJRIT
Inquiring through an online support system provided by Maple or browsing .... ba , (iii) ∑. ∞. =0. )( k k xg dx d is uniformly convergent on ),( ba . Then ∑. ∞ ...... problem of two types of functions,” International Journal of Computer Sci

THE FERMAT CUBIC, ELLIPTIC FUNCTIONS ...
... to Dixonian functions can be read combinatorially through the glasses of a .... The only direct references that I have come across elsewhere are certain pas-.

command block minecraft.pdf
command block minecraft.pdf. command block minecraft.pdf. Open. Extract. Open with. Sign In. Main menu. Displaying command block minecraft.pdf. Page 1 of ...

linux-command-line.pdf
PDF version created by Hy Bao Tuan. Page 1 of 10 ..... hdparm -i /dev/hda displays the characteristics of a hard-disk ... Displaying linux-command-line.pdf.

The primitive recursive functions
14 Jan 2014 - relation p −→ q over the sets PRF and N as an inductive definition in figure 8. ... (f.fs)[t] =⇒ k.ks. Figure 4: Operational semantics. 1.4 Denotational semantics. As an alternative way of defining the semantics for a computation

The Command and Control of the Grand Armee: Napoleon as ...
Jun 8, 2009 - objective of this thesis will not be to present another historical recount of Napoleon's many triumphs ..... High attrition rates from Napoleon's campaigns meant that new recruits were constantly .... Eventually, a shortage of adequate

Functions and Equations in Two Variables Functions ...
z = f(x, y). Example:ааEvaluate the function for f(4,ан3). f(x, y) = x. 2. + 4y or ... necessary to solve an equation for a variable. ... Pg 486аа585 x 5, 100, 101, 103.

The Derivatives of Some Functions - IJRIT
Inquiring through an online support system provided by Maple or browsing .... ba , (iii) ∑. ∞. =0. )( k k xg dx d is uniformly convergent on ),( ba . Then ∑. ∞ ...... problem of two types of functions,” International Journal of Computer Sci