Script: textcontent-element
A page page is populated by content. A page may have any number of content-, textcontent- or dbcontent elements.
A textcontent file can be any textfile, and must thus not be wellformed XML. See the processing instruction PI:import-text for a further explanation of how the actual import-command may be taylored.
<textcontent location=""/>
A textcontent element have the following attributes:
location | An URI which may be absolute (file or http) or a relative to the owning groups location. The textcontent will be read from this location. |
backup(optional) | An URI which will serve as an alternative location if the URI in location is unavalable. |
leftpar(optional) | A string determining the start of the text that should be imported |
rightpar(optional) | A string determining the end of the text that should be imported |
select (optional) | Has only meaning when leftpar and rightpar is set.
Select describes which of possibly many text fragments that should be included.
Possible values are:
all is default. random picks
one fragment at random fromr the available textfragments.
n and m are integers describing low and hi index of the fragments we want to use.
Indexing starts at 1. select="1" use the first fragment.
Negative numbers start counting in the right end, select="-1" selects the last fragment.
select="1:3" select the three first fragments.
|
replace (optional) | Will do a simple replace in the collected string, before possible codeformatting or parsing. Format is replace="old|new". Will replace "old" with "new". The divider, |, may be changed by option: replace_divider in script. | is default. You may have many replaces: replace, replace1,replace2 etc. Not suitable for large replace operations, just for simple masking of addresses, passwords etc. |
transformation(optional) | A transformation that should be applied to the source before the text is extracted |
leftpar, rightpar and transformation may also be specified in the actual import PI, see: PI:import-text, and overrides the specification given here in the script-element.
A textcontent element can not have any children.
Example:
<textcontent location="../../myprograms/prog1.c"/>