logo
WXT, a Web and Xml Tool
from Ostfold College
: Introduction > Documentation > The Script >Option

Script: option-element

An option element may appear anywhere in a script, and effects all pagebuilding within its scope.

  <option name="" value=""/>
  

At the moment these options are reckognized by WXT:

  <option name="encoding" value=""/>
  <option name="logfile" value=""/>
  <option name="fetch_absolutes" value=""/>
  <option name="color_code" value=""/>
  <option name="replace_divider" value=""/>
  <option name="expand_all" value=""/>
  

A option element may have no children.

encoding

Where UTF-8 is the default value.

When WXT sets encoding for pages it tries to determine what encoding is set in the template for that page. There are some situations where this is ambigiuos or impossible. If WXT fails, it will use the value of the encoding option as a last resort. This option will not override encoding found in the files.

Example:

  <option name="encoding" value="ISO-8859-1"/>

logfile

WXT can be set to accumulate reports from each parse, build or control on a logfile. You may set a logfile by the logfile option. The value of a logfile option is a location which is absolute or is interpreted as relative to the script. The logfile is reset, emptied, when it reaches a size of 100KB.

A option/logfile-element must be placed as direct child of the script-element to have any effect.

Example:

  <option name="logfile" value="local_work_log.txt"/>

fetch_absolutes

When WXT encounters an absolute http-reference to any of the resources mentioned in the addressing-element, you may ask it to download a copy of this element to a local catalog and change the reference accordingly. You do this by setting this option to 'yes'. Default is 'no'.

NOTE: that this is implemented for images only at the present.

This may slow down the building process considerably, and is usefull only when the source (content) that refer to the resource is unstable.

Example:

  <option name="fetch_absolutes" value="yes"/>

color_code

When this option is set with value yes, WXT will identify all programcode-segments which are included as: <pre class="nncode">..</pre> and attempt to colorcode the textcontent as programcode. nn may have values: java, c, cpp, csharp, python or xslt. The effect of this is dependant of the exsistence of following style-classes: code, nncode, nnword, nnliteral and nncomment.

When this option is set with value no, WXT will ignore colorcoding. It is still possible to use color coding of programcode as a possibility in the processing instruction: import-text, by using the attribute type. See import-text

Default is no.

Example:

  <option name="color_code" value="yes"/>

replace_divider

Used in attribute replace in PI:import-text and in script element textcontent. Default value is |. See import-text and textcontent

Example:

  <option name="replace_divider" value=";"/>

expand_all

All AJAX-expansions are expanded on build. Possible values are yes | no. no is default. See PI's request and import-text

Example:

  <option name="expand_all" value="yes"/>

WXT, a Web and Xml Tool from Ostfold College: http://www.ia.hiof.no/~borres/wxtdoc/


Bygget med WXT : 11.jan.2009