You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Blake Meike <bm...@starbak.com> on 2004/12/28 17:38:42 UTC

XML call-param-rule attribute "from-stack" crippled in Digester?

Hi,
  It looks to me as if, the "from-stack" attribute for the
"call-param-rule" element, used in the XML specification of Digester
rules is unnecessarily crippled.

  It appears that the argument to "from-stack" is expected to be "true"
or "false", and is converted to a boolean.  That means that it is
impossible to specify anything other than the top of the stack ("this"
to the object that is the target of the soon-to-come "call-method-rule")
as a parameter.

  If the argument were, instead, integer, and converted to an int, it
would, much more usefully, allow the specification of an arbitrary
object from the stack, as does its programmatic analogue.

  Is the oversite mine, or in the code? :)

Blake Meike


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


Re: XML call-param-rule attribute "from-stack" crippled in Digester?

Posted by Kris Nuttycombe <Kr...@noaa.gov>.
Looks like you are correct. I've attached the patches.

Kris

Blake Meike wrote:

>Hi,
>  It looks to me as if, the "from-stack" attribute for the
>"call-param-rule" element, used in the XML specification of Digester
>rules is unnecessarily crippled.
>
>  It appears that the argument to "from-stack" is expected to be "true"
>or "false", and is converted to a boolean.  That means that it is
>impossible to specify anything other than the top of the stack ("this"
>to the object that is the target of the soon-to-come "call-method-rule")
>as a parameter.
>
>  If the argument were, instead, integer, and converted to an int, it
>would, much more usefully, allow the specification of an arbitrary
>object from the stack, as does its programmatic analogue.
>
>  Is the oversite mine, or in the code? :)
>
>Blake Meike
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>
>
>  
>

-- 
=====================================================
Kris Nuttycombe
Associate Scientist
Geospatial Data Services Group
CIRES, National Geophysical Data Center/NOAA
(303) 497-6337
Kris.Nuttycombe@noaa.gov
=====================================================


Re: XML call-param-rule attribute "from-stack" crippled in Digester?

Posted by Kris Nuttycombe <Kr...@noaa.gov>.
You mean like this method?

http://jakarta.apache.org/commons/digester/commons-digester-1.6/docs/api/org/apache/commons/digester/Digester.html#addCallParam(java.lang.String,%20int,%20int)

Kris

Blake Meike wrote:

>Hi,
>  It looks to me as if, the "from-stack" attribute for the
>"call-param-rule" element, used in the XML specification of Digester
>rules is unnecessarily crippled.
>
>  It appears that the argument to "from-stack" is expected to be "true"
>or "false", and is converted to a boolean.  That means that it is
>impossible to specify anything other than the top of the stack ("this"
>to the object that is the target of the soon-to-come "call-method-rule")
>as a parameter.
>
>  If the argument were, instead, integer, and converted to an int, it
>would, much more usefully, allow the specification of an arbitrary
>object from the stack, as does its programmatic analogue.
>
>  Is the oversite mine, or in the code? :)
>
>Blake Meike
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>
>
>  
>

-- 
=====================================================
Kris Nuttycombe
Associate Scientist
Geospatial Data Services Group
CIRES, National Geophysical Data Center/NOAA
(303) 497-6337
Kris.Nuttycombe@noaa.gov
=====================================================



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