Subject: Re: [xsl] What todo when execution order becomes important? I.e.: with text data and filters From: "Dimitre Novatchev" <dnovatchev@xxxxxxxxx> Date: Tue, 19 Dec 2006 13:56:55 -0800 |
The simplest example of performing processing in a predefined order is that of functional composition:
Using FXSL one can easily and conveniently specify multiple (chain) composition of a *list of functions*. This is done by the function
-- Cheers, Dimitre Novatchev --------------------------------------- Truly great madness cannot be achieved without significant intelligence. --------------------------------------- To invent, you need a good imagination and a pile of junk ------------------------------------- You've achieved success in your field when you don't know whether what you're doing is work or play
Hi Dimitre,
Sorry for being unclear, I indeed found the concept a bit hard to explain, let me try it easier and in a different wording:
IN SHORT: Take any input file, filter out several data (filter on filter), tokenize it, serialize the result as XML.
LONGER: 1. Take an input file, containing some structured data, example CSV (one line): Field 1, "quoted field", /* comments, ignored */ "field with ""quotes"" in it", unquoted field // end of line comment
2. By applying a chain of filters, this (and many other) structured formats can be changed into a node set. In this example: a) replace all comments with nothing b) replace double quotes with special char DQUOT c) replace comma's between quotes with special char COMMA d) remove all quotes e) tokenize the string by normal comma f) on serialization, replace special chars DQUOT and COMMA with their normal counterparts
3. The order of a-f is very important. It is defined in an xsl:variable like in the original example.
If you take this to a higher level, you got a very powerful structured-text-to-xml extractor. Which is what I am after.
You say that you can define the order of execution, can you shed some more light on how to do so?
Cheers, Abel
Dimitre Novatchev wrote: > Hi Abel, > > Could you, please, explain the problem you're trying to solve? > > It is not very clear from the original post. > > > And yes, it is possible to serialize "computations" in XSLT to every > extent desirable. > > I have an unpublished work dated 2003 (actually just an > implementation) on implementing Monads and I even demoed it to Jeni at > XML Europe 2003. > > A simpler example is the "XSLT Calculator"
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] What todo when execution , Abel Braaksma | Thread | Re: [xsl] What todo when execution , David Carlisle |
Re: [xsl] What todo when execution , M. David Peterson | Date | Re: [xsl] What todo when execution , Dimitre Novatchev |
Month |