I'm new to flowscript work in Cocoon, but I've gotten to this point from
a number of variable manipulations which are just a whole lot easier
(theoretically) with regular expressions than in XSLT. The following is
a simple variation that illustrates the problem. There are 40 or so
other pieces to the whole puzzle.
Some of you will be familiar with the error message:
org.mozilla.javascript.EvaluatorException: "file:/D:/Program
Files/Apache Software Foundation/Tomcat
5.5/webapps/dist/ROOT/Test/flow/searchTest.js", line 10: Cannot convert
/\s*((\S+\s*)*)/ to java.lang.Character
It was discussed at length in May 2005, but I would appreciate a simple
statement of the conclusions. I don't see anything like them in play in
the schema.js flowscript for the linotype block, which pattern is echoed
below.
Clues?
Walter
=== the ProcessParameters.js script ============
function main() {
/* collect the possible parameters from the search screens*/
var q = cocoon.request.get("q");
/* trim extra spaces and break q into words */
LTrim(q);
}
// Removes leading whitespaces
function LTrim( value ) {
value = value.replace(/\s*((\S+\s*)*)/, "$1");
return value;
}
=== extracts from the Sitemap =================
<map:pipeline>
<map:match pattern="style/*">
<map:generate type="jx" src="style/{1}.xml"/>
<map:serialize/>
</map:match>
</map:pipeline>
<map:pipeline>
<map:match pattern="results">
<map:call function="main"/>
<map:serialize type="xml"/>
</map:match>
</map:pipeline>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]