You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Paul Libbrecht <pa...@activemath.org> on 2004/10/05 21:31:08 UTC

[jelly] XMLOutput.data(Object)

Dear Jellyers,

I'd like to propose an addition to the XMLOutput class, used throughout 
Jelly:
   a method called data() (or object) accepting any object.

By default... take the toString and call characters...
Actually, this is the way it is done with the return value of a Jexl 
expression as part of a text node.

But the interesting comes in the non-default case:
- a math library could return a polynomial or numerical type... and 
this could then be further evaluated by parents
- the arg element of jelly could actually avoid special treatment as it 
has currently
- most of my interest applies for jelly-swing: the components would 
then want to call data(component) on the xmlOutput. The latter could be 
filtered by constraint-tags to call data(component-with-constraints). 
Finally, container tags could, also, filter, and receive the resulting 
data and add it.

I would look forward to comments !

paul


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


Re: [jelly] XMLOutput.data(Object)

Posted by Paul Libbrecht <pa...@activemath.org>.
Le 8 oct. 04, à 02:08, Dion Gillard a écrit :

> On Thu, 7 Oct 2004 11:40:27 +0200, Paul Libbrecht 
> <pa...@activemath.org> wrote:
>> More precisely, it's "passing objects around".
>> I see no other mechanism for a tag to pass an object to a tag that
>> called it... (which is not always a parent tag).
> In keeping with the XMLOutput class and it's API, how about naming it
> write(Object) instead of data(Object) having a method called data just
> doesn't seem right to me.

Ok with write(Object), I think this isn't so appropriate since all 
methods of XMLOutput do write something... I was imitating 
startElement() or characterData() (all coming from SAX).
Maybe best would be objectData().

paul

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


Re: [jelly] XMLOutput.data(Object)

Posted by Dion Gillard <di...@gmail.com>.
Now that's making some sense.


On Thu, 7 Oct 2004 11:40:27 +0200, Paul Libbrecht <pa...@activemath.org> wrote:
> More precisely, it's "passing objects around".
> I see no other mechanism for a tag to pass an object to a tag that
> called it... (which is not always a parent tag).


In keeping with the XMLOutput class and it's API, how about naming it
write(Object) instead of data(Object) having a method called data just
doesn't seem right to me.
-- 
http://www.multitask.com.au/people/dion/

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


Re: [jelly] XMLOutput.data(Object)

Posted by Paul Libbrecht <pa...@activemath.org>.
More precisely, it's "passing objects around".
I see no other mechanism for a tag to pass an object to a tag that 
called it... (which is not always a parent tag).

paul


Le 7 oct. 04, à 08:54, Paul Libbrecht a écrit :

> That's not really reading or writing, it's just catching!


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


Re: [jelly] XMLOutput.data(Object)

Posted by Paul Libbrecht <pa...@activemath.org>.
Le 7 oct. 04, à 02:23, Dion Gillard a écrit :

> On Wed, 6 Oct 2004 15:18:50 +0200, Paul Libbrecht 
> <pa...@activemath.org> wrote:
>> Gee... I was really thinking this was obvious... hence the relatively
>> undetailed descriptions.
> Obviously it isn't for me. It seems to me that you want to use
> XMLOutput to pass data around, even though it's currently a
> 'write-only' object, i.e. there's no way of getting of data back out
> of it.

The read-write paradigm is really old fashioned.
What I have in my component-tag inside the invokeBody(xmlOutput) is 
(with a simplification):

   super.invokeBody(new XmlOutput(xmlOutput) {
     public void objectData(Object b) {
         if(b instanceof Component) {
           addChild(b);
         }
       });

That's not really reading or writing, it's just catching!

>> - XMLoutput objects are exchanged as part of the doTag nested calls.
>> Therefore it is easy for something aimed at "receiving data" to create
>> an XMLOutput object that does something just for the data() call, and
>> passes-through for the rest.
>> This way a tag can receive a return value.
>> There's no way to do so with the context except delicate hacks and
>> fragile naming-conventions.
> Sounds like hand-waving. Obviously tags return values, e.g. the set 
> tag.

Tags don't return values, tag only write values in the context.
A returned value could be used in further functional composition.
Further composition of a value in the context needs to name it (and 
manage its deletion in some way).

> Isn't the context for passing stuff around?

Same.

>> - to me, it makes loads of sense to have tags that transform their
>> output... and that should apply to object-data as well. (so that 
>> adding
>> a constraint in jelly-swing would be simply a transformation)
> Tags that transform their own output? Or output from nested tags?

output of nested tag.

>> At least, to me, it is the only way for a component child, like a 
>> swing button, to talk flexibly to a component container, without 
>> manually walking the hierarchy.
> Hmmm. *Only* way seems to be a little exaggerated. Can't the component
> have it's parent set at some time later?

Well, I really tried hard in all sorts of way and didn't manage it.
The notion of parent is not well defined if you want to re-use 
scripts-snippets...

paul


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


Re: [jelly] XMLOutput.data(Object)

Posted by Dion Gillard <di...@gmail.com>.
On Wed, 6 Oct 2004 15:18:50 +0200, Paul Libbrecht <pa...@activemath.org> wrote:
> Gee... I was really thinking this was obvious... hence the relatively
> undetailed descriptions.

Obviously it isn't for me. It seems to me that you want to use
XMLOutput to pass data around, even though it's currently a
'write-only' object, i.e. there's no way of getting of data back out
of it.

> - XMLoutput objects are exchanged as part of the doTag nested calls.
> Therefore it is easy for something aimed at "receiving data" to create
> an XMLOutput object that does something just for the data() call, and
> passes-through for the rest.
> This way a tag can receive a return value.
> There's no way to do so with the context except delicate hacks and
> fragile naming-conventions.

Sounds like hand-waving. Obviously tags return values, e.g. the set tag.

> - The objects being exchanged aren't meant ot be stored. They are part
> of the process... i.e. when I write
> <math:determinant>
>   <math:product>
>    <math:matrix>xxx</math:matrix>
>    <math:matrix>xxx</math:matrix>
>   </math:product>
> </math:determinant>
> I am not storing the matrix of the product, I'm just passing it around.

Isn't the context for passing stuff around?

> - to me, it makes loads of sense to have tags that transform their
> output... and that should apply to object-data as well. (so that adding
> a constraint in jelly-swing would be simply a transformation)

Tags that transform their own output? Or output from nested tags?

> - another fancy feature: the result of a bsf or beanshell script could
> be fed using this data() function... and thus used (it is currently
> only used when setting a variable)
> 
> At least, to me, it is the only way for a component child, like a swing
> button, to talk flexibly to a component container, without manually
> walking the hierarchy.

Hmmm. *Only* way seems to be a little exaggerated. Can't the component
have it's parent set at some time later?

-- 
http://www.multitask.com.au/people/dion/

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


Re: [jelly] XMLOutput.data(Object)

Posted by Paul Libbrecht <pa...@activemath.org>.
Gee... I was really thinking this was obvious... hence the relatively  
undetailed descriptions.

- XMLoutput objects are exchanged as part of the doTag nested calls.  
Therefore it is easy for something aimed at "receiving data" to create  
an XMLOutput object that does something just for the data() call, and  
passes-through for the rest.
This way a tag can receive a return value.
There's no way to do so with the context except delicate hacks and  
fragile naming-conventions.

- The objects being exchanged aren't meant ot be stored. They are part  
of the process... i.e. when I write
<math:determinant>
  <math:product>
   <math:matrix>xxx</math:matrix>
   <math:matrix>xxx</math:matrix>
  </math:product>
</math:determinant>
I am not storing the matrix of the product, I'm just passing it around.

- to me, it makes loads of sense to have tags that transform their  
output... and that should apply to object-data as well. (so that adding  
a constraint in jelly-swing would be simply a transformation)

- another fancy feature: the result of a bsf or beanshell script could  
be fed using this data() function... and thus used (it is currently  
only used when setting a variable)

At least, to me, it is the only way for a component child, like a swing  
button, to talk flexibly to a component container, without manually  
walking the hierarchy.

paul


Le 6 oct. 04, à 13:19, Dion Gillard a écrit :

> So what's the advantage over this versus the context. XMLOutput is for
> producing output, not storing data. The context is for storing data.
>
> Paul, I must be missing something obvious here.
>
>
> On Wed, 6 Oct 2004 10:37:21 +0200, Paul Libbrecht  
> <pa...@activemath.org> wrote:
>> It does differ only by the fact that you write an >>Object<< and not
>> XML-nodes!
>> Only, this tiny change to be able to invoke the sacred functional  
>> word.
>>
>> paul
>>
>> Le 6 oct. 04, à 10:12, Dion Gillard a écrit :
>>
>>
>>
>>> How does this differ from writing to XMLOutput.
>>>
>>> It seems XMLOutput is being confused with the context...?
>>>
>>>
>>> On Wed, 6 Oct 2004 09:54:11 +0200, Paul Libbrecht
>>> <pa...@activemath.org> wrote:
>>>> Maybe one little quick example:
>>>>
>>>> - currently, jelly-swing's ComponentTag calls, somewhere down in its
>>>> doTag() findAncestorWithClass(ContainerTag.class) to which they call
>>>> addComponent... At least one major drawback: putting such in a  
>>>> defined
>>>> tag does not work unless you go till the top-level container in the
>>>> defined tag (so no re-used swing script-snippets). Many other
>>>> issues...
>>>> - proposed: jelly-swing's ComponentTag should call, in its doTag(),
>>>> xmlOutput.data(myBean)
>>>>    Advantage: works with scripts.
>>>>
>>>> - currently: jelly-sql can only define variables with the current
>>>> result-sets
>>>>    Instead, the result-set could be given as data and the latter be
>>>> transformed by some other tags
>>>>    (e.g. a tag that would merge the fields, or extract the only
>>>> interesting ones).
>>>>
>>>> Overall, the idea is to have the ability for a tag to give "return
>>>> value"  that is not XML.
>>>>
>>>> I could produce many more scenarios. Most probably that should  
>>>> affect
>>>> UseBeanTag... though maybe not at first launch. I would propose to
>>>> enrich XMLOutput class itself (by adding the method doing the  
>>>> default
>>>> toString). This should really bother the release, I believe. Then  
>>>> I'd
>>>> like to concentrate on using this jelly-swing, with the hope to be
>>>> able
>>>> to make a jelly-swing-runner as a browser (maybe for jelly-swing 1.1
>>>> or
>>>> so).
>>>>
>>>> paul
>>>>
>>>> Le 6 oct. 04, à 00:05, Dion Gillard a écrit :
>>>>
>>>>
>>>>
>>>>> I'm not sure I understand what the use of this method is for Tags  
>>>>> and
>>>>> TagLibraries, since it's on XML output.
>>>>>
>>>>> Can you give us an idea?
>>>>>
>>>>>
>>>>> On Tue, 5 Oct 2004 21:31:08 +0200, Paul Libbrecht
>>>>> <pa...@activemath.org> wrote:
>>>>>>
>>>>>> Dear Jellyers,
>>>>>>
>>>>>> I'd like to propose an addition to the XMLOutput class, used
>>>>>> throughout
>>>>>> Jelly:
>>>>>>    a method called data() (or object) accepting any object.
>>>>>>
>>>>>> By default... take the toString and call characters...
>>>>>> Actually, this is the way it is done with the return value of a  
>>>>>> Jexl
>>>>>> expression as part of a text node.
>>>>>>
>>>>>> But the interesting comes in the non-default case:
>>>>>> - a math library could return a polynomial or numerical type...  
>>>>>> and
>>>>>> this could then be further evaluated by parents
>>>>>> - the arg element of jelly could actually avoid special treatment  
>>>>>> as
>>>>>> it
>>>>>> has currently
>>>>>> - most of my interest applies for jelly-swing: the components  
>>>>>> would
>>>>>> then want to call data(component) on the xmlOutput. The latter  
>>>>>> could
>>>>>> be
>>>>>> filtered by constraint-tags to call
>>>>>> data(component-with-constraints).
>>>>>> Finally, container tags could, also, filter, and receive the
>>>>>> resulting
>>>>>> data and add it.
>>>>>>
>>>>>> I would look forward to comments !
>>>>
>>>> -------------------------------------------------------------------- 
>>>> -
>>>> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
>>>> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>>>>
>>>>
>>>
>>>
>>> --
>>> http://www.multitask.com.au/people/dion/
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>>>
>>
>>
>> ---------------------------------------------------------------------
>>
>>
>> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>>
>>
>
>
> -- 
> http://www.multitask.com.au/people/dion/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>


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


Re: [jelly] XMLOutput.data(Object)

Posted by Dion Gillard <di...@gmail.com>.
So what's the advantage over this versus the context. XMLOutput is for
producing output, not storing data. The context is for storing data.

Paul, I must be missing something obvious here.


On Wed, 6 Oct 2004 10:37:21 +0200, Paul Libbrecht <pa...@activemath.org> wrote:
> It does differ only by the fact that you write an >>Object<< and not
> XML-nodes!
> Only, this tiny change to be able to invoke the sacred functional word.
> 
> paul
> 
> Le 6 oct. 04, à 10:12, Dion Gillard a écrit :
> 
> 
> 
> > How does this differ from writing to XMLOutput.
> >
> > It seems XMLOutput is being confused with the context...?
> >
> >
> > On Wed, 6 Oct 2004 09:54:11 +0200, Paul Libbrecht
> > <pa...@activemath.org> wrote:
> >> Maybe one little quick example:
> >>
> >> - currently, jelly-swing's ComponentTag calls, somewhere down in its
> >> doTag() findAncestorWithClass(ContainerTag.class) to which they call
> >> addComponent... At least one major drawback: putting such in a defined
> >> tag does not work unless you go till the top-level container in the
> >> defined tag (so no re-used swing script-snippets). Many other
> >> issues...
> >> - proposed: jelly-swing's ComponentTag should call, in its doTag(),
> >> xmlOutput.data(myBean)
> >>    Advantage: works with scripts.
> >>
> >> - currently: jelly-sql can only define variables with the current
> >> result-sets
> >>    Instead, the result-set could be given as data and the latter be
> >> transformed by some other tags
> >>    (e.g. a tag that would merge the fields, or extract the only
> >> interesting ones).
> >>
> >> Overall, the idea is to have the ability for a tag to give "return
> >> value"  that is not XML.
> >>
> >> I could produce many more scenarios. Most probably that should affect
> >> UseBeanTag... though maybe not at first launch. I would propose to
> >> enrich XMLOutput class itself (by adding the method doing the default
> >> toString). This should really bother the release, I believe. Then I'd
> >> like to concentrate on using this jelly-swing, with the hope to be
> >> able
> >> to make a jelly-swing-runner as a browser (maybe for jelly-swing 1.1
> >> or
> >> so).
> >>
> >> paul
> >>
> >> Le 6 oct. 04, à 00:05, Dion Gillard a écrit :
> >>
> >>
> >>
> >>> I'm not sure I understand what the use of this method is for Tags and
> >>> TagLibraries, since it's on XML output.
> >>>
> >>> Can you give us an idea?
> >>>
> >>>
> >>> On Tue, 5 Oct 2004 21:31:08 +0200, Paul Libbrecht
> >>> <pa...@activemath.org> wrote:
> >>>>
> >>>> Dear Jellyers,
> >>>>
> >>>> I'd like to propose an addition to the XMLOutput class, used
> >>>> throughout
> >>>> Jelly:
> >>>>    a method called data() (or object) accepting any object.
> >>>>
> >>>> By default... take the toString and call characters...
> >>>> Actually, this is the way it is done with the return value of a Jexl
> >>>> expression as part of a text node.
> >>>>
> >>>> But the interesting comes in the non-default case:
> >>>> - a math library could return a polynomial or numerical type... and
> >>>> this could then be further evaluated by parents
> >>>> - the arg element of jelly could actually avoid special treatment as
> >>>> it
> >>>> has currently
> >>>> - most of my interest applies for jelly-swing: the components would
> >>>> then want to call data(component) on the xmlOutput. The latter could
> >>>> be
> >>>> filtered by constraint-tags to call
> >>>> data(component-with-constraints).
> >>>> Finally, container tags could, also, filter, and receive the
> >>>> resulting
> >>>> data and add it.
> >>>>
> >>>> I would look forward to comments !
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> >> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
> >>
> >>
> >
> >
> > --
> > http://www.multitask.com.au/people/dion/
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: commons-dev-help@jakarta.apache.org
> >
> 
> 
> ---------------------------------------------------------------------
> 
> 
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
> 
> 


-- 
http://www.multitask.com.au/people/dion/

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


Re: [jelly] XMLOutput.data(Object)

Posted by Paul Libbrecht <pa...@activemath.org>.
It does differ only by the fact that you write an >>Object<< and not 
XML-nodes!
Only, this tiny change to be able to invoke the sacred functional word.

paul


Le 6 oct. 04, à 10:12, Dion Gillard a écrit :

> How does this differ from writing to XMLOutput.
>
> It seems XMLOutput is being confused with the context...?
>
>
> On Wed, 6 Oct 2004 09:54:11 +0200, Paul Libbrecht 
> <pa...@activemath.org> wrote:
>> Maybe one little quick example:
>>
>> - currently, jelly-swing's ComponentTag calls, somewhere down in its
>> doTag() findAncestorWithClass(ContainerTag.class) to which they call
>> addComponent... At least one major drawback: putting such in a defined
>> tag does not work unless you go till the top-level container in the
>> defined tag (so no re-used swing script-snippets). Many other 
>> issues...
>> - proposed: jelly-swing's ComponentTag should call, in its doTag(),
>> xmlOutput.data(myBean)
>>    Advantage: works with scripts.
>>
>> - currently: jelly-sql can only define variables with the current
>> result-sets
>>    Instead, the result-set could be given as data and the latter be
>> transformed by some other tags
>>    (e.g. a tag that would merge the fields, or extract the only
>> interesting ones).
>>
>> Overall, the idea is to have the ability for a tag to give "return
>> value"  that is not XML.
>>
>> I could produce many more scenarios. Most probably that should affect
>> UseBeanTag... though maybe not at first launch. I would propose to
>> enrich XMLOutput class itself (by adding the method doing the default
>> toString). This should really bother the release, I believe. Then I'd
>> like to concentrate on using this jelly-swing, with the hope to be 
>> able
>> to make a jelly-swing-runner as a browser (maybe for jelly-swing 1.1 
>> or
>> so).
>>
>> paul
>>
>> Le 6 oct. 04, à 00:05, Dion Gillard a écrit :
>>
>>
>>
>>> I'm not sure I understand what the use of this method is for Tags and
>>> TagLibraries, since it's on XML output.
>>>
>>> Can you give us an idea?
>>>
>>>
>>> On Tue, 5 Oct 2004 21:31:08 +0200, Paul Libbrecht
>>> <pa...@activemath.org> wrote:
>>>>
>>>> Dear Jellyers,
>>>>
>>>> I'd like to propose an addition to the XMLOutput class, used
>>>> throughout
>>>> Jelly:
>>>>    a method called data() (or object) accepting any object.
>>>>
>>>> By default... take the toString and call characters...
>>>> Actually, this is the way it is done with the return value of a Jexl
>>>> expression as part of a text node.
>>>>
>>>> But the interesting comes in the non-default case:
>>>> - a math library could return a polynomial or numerical type... and
>>>> this could then be further evaluated by parents
>>>> - the arg element of jelly could actually avoid special treatment as
>>>> it
>>>> has currently
>>>> - most of my interest applies for jelly-swing: the components would
>>>> then want to call data(component) on the xmlOutput. The latter could
>>>> be
>>>> filtered by constraint-tags to call 
>>>> data(component-with-constraints).
>>>> Finally, container tags could, also, filter, and receive the 
>>>> resulting
>>>> data and add it.
>>>>
>>>> I would look forward to comments !
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>>
>>
>
>
> -- 
> http://www.multitask.com.au/people/dion/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>


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


Re: [jelly] XMLOutput.data(Object)

Posted by Dion Gillard <di...@gmail.com>.
How does this differ from writing to XMLOutput.

It seems XMLOutput is being confused with the context...?


On Wed, 6 Oct 2004 09:54:11 +0200, Paul Libbrecht <pa...@activemath.org> wrote:
> Maybe one little quick example:
> 
> - currently, jelly-swing's ComponentTag calls, somewhere down in its
> doTag() findAncestorWithClass(ContainerTag.class) to which they call
> addComponent... At least one major drawback: putting such in a defined
> tag does not work unless you go till the top-level container in the
> defined tag (so no re-used swing script-snippets). Many other issues...
> - proposed: jelly-swing's ComponentTag should call, in its doTag(),
> xmlOutput.data(myBean)
>    Advantage: works with scripts.
> 
> - currently: jelly-sql can only define variables with the current
> result-sets
>    Instead, the result-set could be given as data and the latter be
> transformed by some other tags
>    (e.g. a tag that would merge the fields, or extract the only
> interesting ones).
> 
> Overall, the idea is to have the ability for a tag to give "return
> value"  that is not XML.
> 
> I could produce many more scenarios. Most probably that should affect
> UseBeanTag... though maybe not at first launch. I would propose to
> enrich XMLOutput class itself (by adding the method doing the default
> toString). This should really bother the release, I believe. Then I'd
> like to concentrate on using this jelly-swing, with the hope to be able
> to make a jelly-swing-runner as a browser (maybe for jelly-swing 1.1 or
> so).
> 
> paul
> 
> Le 6 oct. 04, à 00:05, Dion Gillard a écrit :
> 
> 
> 
> > I'm not sure I understand what the use of this method is for Tags and
> > TagLibraries, since it's on XML output.
> >
> > Can you give us an idea?
> >
> >
> > On Tue, 5 Oct 2004 21:31:08 +0200, Paul Libbrecht
> > <pa...@activemath.org> wrote:
> >>
> >> Dear Jellyers,
> >>
> >> I'd like to propose an addition to the XMLOutput class, used
> >> throughout
> >> Jelly:
> >>    a method called data() (or object) accepting any object.
> >>
> >> By default... take the toString and call characters...
> >> Actually, this is the way it is done with the return value of a Jexl
> >> expression as part of a text node.
> >>
> >> But the interesting comes in the non-default case:
> >> - a math library could return a polynomial or numerical type... and
> >> this could then be further evaluated by parents
> >> - the arg element of jelly could actually avoid special treatment as
> >> it
> >> has currently
> >> - most of my interest applies for jelly-swing: the components would
> >> then want to call data(component) on the xmlOutput. The latter could
> >> be
> >> filtered by constraint-tags to call data(component-with-constraints).
> >> Finally, container tags could, also, filter, and receive the resulting
> >> data and add it.
> >>
> >> I would look forward to comments !
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
> 
> 


-- 
http://www.multitask.com.au/people/dion/

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


Re: [jelly] XMLOutput.data(Object)

Posted by Paul Libbrecht <pa...@activemath.org>.
Maybe one little quick example:

- currently, jelly-swing's ComponentTag calls, somewhere down in its 
doTag() findAncestorWithClass(ContainerTag.class) to which they call 
addComponent... At least one major drawback: putting such in a defined 
tag does not work unless you go till the top-level container in the 
defined tag (so no re-used swing script-snippets). Many other issues...
- proposed: jelly-swing's ComponentTag should call, in its doTag(), 
xmlOutput.data(myBean)
   Advantage: works with scripts.

- currently: jelly-sql can only define variables with the current 
result-sets
   Instead, the result-set could be given as data and the latter be 
transformed by some other tags
   (e.g. a tag that would merge the fields, or extract the only 
interesting ones).


Overall, the idea is to have the ability for a tag to give "return 
value"  that is not XML.

I could produce many more scenarios. Most probably that should affect 
UseBeanTag... though maybe not at first launch. I would propose to 
enrich XMLOutput class itself (by adding the method doing the default 
toString). This should really bother the release, I believe. Then I'd 
like to concentrate on using this jelly-swing, with the hope to be able 
to make a jelly-swing-runner as a browser (maybe for jelly-swing 1.1 or 
so).

paul



Le 6 oct. 04, à 00:05, Dion Gillard a écrit :

> I'm not sure I understand what the use of this method is for Tags and
> TagLibraries, since it's on XML output.
>
> Can you give us an idea?
>
>
> On Tue, 5 Oct 2004 21:31:08 +0200, Paul Libbrecht 
> <pa...@activemath.org> wrote:
>>
>> Dear Jellyers,
>>
>> I'd like to propose an addition to the XMLOutput class, used 
>> throughout
>> Jelly:
>>    a method called data() (or object) accepting any object.
>>
>> By default... take the toString and call characters...
>> Actually, this is the way it is done with the return value of a Jexl
>> expression as part of a text node.
>>
>> But the interesting comes in the non-default case:
>> - a math library could return a polynomial or numerical type... and
>> this could then be further evaluated by parents
>> - the arg element of jelly could actually avoid special treatment as 
>> it
>> has currently
>> - most of my interest applies for jelly-swing: the components would
>> then want to call data(component) on the xmlOutput. The latter could 
>> be
>> filtered by constraint-tags to call data(component-with-constraints).
>> Finally, container tags could, also, filter, and receive the resulting
>> data and add it.
>>
>> I would look forward to comments !


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


Re: [jelly] XMLOutput.data(Object)

Posted by Dion Gillard <di...@gmail.com>.
I'm not sure I understand what the use of this method is for Tags and
TagLibraries, since it's on XML output.

Can you give us an idea?


On Tue, 5 Oct 2004 21:31:08 +0200, Paul Libbrecht <pa...@activemath.org> wrote:
> 
> Dear Jellyers,
> 
> I'd like to propose an addition to the XMLOutput class, used throughout
> Jelly:
>    a method called data() (or object) accepting any object.
> 
> By default... take the toString and call characters...
> Actually, this is the way it is done with the return value of a Jexl
> expression as part of a text node.
> 
> But the interesting comes in the non-default case:
> - a math library could return a polynomial or numerical type... and
> this could then be further evaluated by parents
> - the arg element of jelly could actually avoid special treatment as it
> has currently
> - most of my interest applies for jelly-swing: the components would
> then want to call data(component) on the xmlOutput. The latter could be
> filtered by constraint-tags to call data(component-with-constraints).
> Finally, container tags could, also, filter, and receive the resulting
> data and add it.
> 
> I would look forward to comments !
> 
> paul
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
> 
> 


-- 
http://www.multitask.com.au/people/dion/

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