commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Philippe Poulard <philippe.poul...@sophia.inria.fr>
Subject Re: [jelly] certain way to evaluate a document (usecase)
Date Wed, 12 Dec 2007 10:44:44 GMT
Hi,

Here is an alternate tool that can work in the way you want without 
hacking the engine :
http://reflex.gforge.inria.fr/

it looks like Jelly in some points (it can run XML scripts in the order 
of the tags), but it has also many differences :

-it doesn't rely on the UEL for referring variable but rather on XPath, 
which allows you to cross XML documents and use XPath functions ; XPath 
is also used for accessing some other non-XML objects such as a file 
system : thus, if you use "//*" on a directory, you'll get the files 
within the subtree

-it can be used for implementing declarative XML languages, that won't 
be necessarily run in order, and additionally (if you are smart enough), 
you can mix your declarative language with imperative constructs ; there 
is an example of that concept in a schema language named ASL (the Active 
Schema Language) ; it was presented at extreme markup language last 
summer, and you might get the picture by browsing the slides and reading 
the paper : http://reflex.gforge.inria.fr/eml2007.html

-it embeds lots of XML tools, such as SAX and DOM parsers (that you can 
use transparently), an XPath-based filter that you can run on 
extra-large XML inputs ; you can also use it to query various 
datasources with SQL, XQuery, LDAP and map raw text to XML

-if your project deals with XML datas, there is a tool called XUnit that 
works like JUnit that allows you to write and run test suites

etc, etc, etc

If you are interested, perhaps you could tell me more about your 
project, then I could give you some tips for exposing your java classes 
inside the XML tags of your declarative language with RefleX


Evaldas Taroza a écrit :
> Hi,
> Actually I already have a solution that works (i.e. I have some sort of 
> executable XML which has the needed logic), however, for me it is very 
> important to answer the question, would it be better to refactor that 
> solution in the way that it would use Jelly.
> 
> What I have is an engine (coincides with the Jelly script engine) that 
> is able to evaluate the XML documents with embedded executable parts. 
> These parts are simply XML tags in a special namespace. So for me it 
> looks completely like Jelly. The thing is that my engine is:
> 1. can only understand my tags in my namespace
> 2. can execute those tags in the order that I predefine (possibly inside 
> the tags)
> 3. during the execution of tags some new data can appear next to those 
> tags as a result of execution
> 
> Now the question: in order to transition to Jelly will I need to develop 
> taglibs only, or I will end up extending and modifying the jelly script 
> engine? I would really like it to be the former case:) do you think it 
> is reasonable?
> 
> Evaldas
> 
> Paul Libbrecht wrote:
>> Evaldas,
>>
>> the jelly script is loaded in memory then the doTag methods are called.
>> So, of course, it could not scale to kilometers of source, but, 
>> indeed, then a fancy branching logic of doTag is doable.
>>
>> hope it helps.
>>
>> paul
>>
>>
>> Le 10 déc. 07 à 09:42, Evaldas Taroza a écrit :
>>
>>> Hi,
>>> Yes, I think I would need to implement something similar to the 
>>> thread taglib. Because I will need something like:
>>> 1. There is a dedicated thread for every tag
>>> 2. Some threads are blocked by other threads (waiting to end)
>>> 3. Unblocked threads can run
>>>
>>> I haven't looked deep into Jelly yet, nor available taglibs, but what 
>>> worries me is that the script engine is like SAX, so will I be able 
>>> to construct a difficult "execution plan" with only one-pass parsing?
>>>
>>> Evaldas
>>>
>>> Paul Libbrecht wrote:
>>>> Evaldas,
>>>> I believe that the answer to your question is that it is flexible.
>>>> Jelly's default follows Ant and SAX: most tag's doTag call 
>>>> invokeBody which produces a depth-first execution. The thread taglib 
>>>> does it differently though.
>>>> You might be well served with Jelly although it still has some rough 
>>>> edges.
>>>> paul
>>>> Le 9 déc. 07 à 17:16, Evaldas Taroza a écrit :
>>>>> Hi,
>>>>> I have a very specific usecase to program. Specifically, I need to 
>>>>> be able to execute the tags in a certain order. For instance, I 
>>>>> should be able to say that this tag is executing after another, 
>>>>> others can execute in parallel etc.
>>>>>
>>>>> So I am considering Jelly as already implementing the execution of 
>>>>> the tags but what about the ordering? In what order are the tags 
>>>>> executed now? Is it at all feasible to use Jelly for such a usecase 
>>>>> or I will end up implementing a completely new Jelly script 
>>>>> evaluation engine?
>>>>>
>>>>> Evaldas
>>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>>> For additional commands, e-mail: user-help@commons.apache.org
>>>
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org


-- 
Cordialement,

               ///
              (. .)
  --------ooO--(_)--Ooo--------
|      Philippe Poulard       |
  -----------------------------
  http://reflex.gforge.inria.fr/
        Have the RefleX !

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message