Project | WXT | Basics | Download | Documentation | Samples

PI: popup

The purpose of an popup PI is to allow popup windows from a module.

<?_wxt popup location="" title="" text=""?>

Note that this depends on a simple javascript function: simplepopup(). See: Javascript

The parameters are:

location (mandatory) The URI of the file we want to pop up.
title (optional) The title attribute of the produced element. Will also serve as title of the popped window. Default is popup.
text (optional) A string that will be shown as clickable. If omitted the location will be shown.
The following parameters may be used when you want to read a file, do something with it and save the modified file in location (above).
sourcelocation (mandatory if one of the following is set) Where we find the original text. This text will be read, changed in some way, see below, and written to location (above).
transformation (optional) A transformation identifier (see: Transformation ). This transformation may have parameters: T(name='ole' address='halden'). This transformation is applied before we attempt to extract text. The transformation used here will normally produce text.
leftpar (optional) A string that serves as left parenthesis of the text we want to extract
rightpar (optional) A string that serves as right parenthesis of the text we want to extract
select (optional) Will select which of the occurances of the marked (leftpar, rightpar) textpieces we want to use. Default is all. Possible values are: _all, _random, commaseparated list of integers or "slice":
[a:b]-> [a..b>
[a:]-> [a..limit>
[:b]-> [0..b>
[:-b] [limit-b..limit>
replace (optional) Replaces text. We may have any number of replaces: replace, replace1, replace2, etc. The form is replace="out|in".
encoding (optional) The encoding of the text we import.
The following parameters make XML from the extracted text.
lang (optional) The text will be colorcoded. Mainly used for programming languages. The value of lang may be any value supported by the stylesheet and the involved javascript. The basic encoding is based on Google's prettyprint. The module Code describes the setup and values supported..
When WXT prepares material with option preformat-language=yes, WXT's own colorencoding is used. This is mainly to prepare for PDF. WXT's encoding supports the following codetypes:
  • lang-j (java)
  • lang-js (javascript)
  • lang-c (c)
  • lang-cpp (c++)
  • lang-csh (c#)
  • lang-css (Cascading Style Sheets)
  • lang-xml (XML)
  • lang-sql (SQL)
  • lang-aspx (ASPX)
  • lang-cs3 (actionscript)
  • lang-mal (matlab)
  • lang-py (python)
  • lang (generic without colorencoding. All encoding defaults to this on failure on others)
parse (optional) If set to yes the extracted text is supposed to be a XML-fragment and an attempt is done to parse it and return it as a documentfragment. parse is ignored if lang is set.

Styleclass describing this PI is: wxtpopup. See distributed std styles.

Examples:

<div>
<?_wxt popup location="myfile.html" text="popme" ?>
</div>