You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-dev@jakarta.apache.org by Shane Smith <sa...@gmail.com> on 2005/08/23 21:07:00 UTC

RDC:Template - why is grammar attribute required?

Hey Folks,

Using RDC's, I am wondering why the template for "rapid atomic
development" requires the grammar attribute?

http://jakarta.apache.org/taglibs/sandbox/doc/rdc-doc/index.html#template

I like many others prefer to use inline grammars, and in this case
would like to load my grammars in with my config file.  Would it be
possible to add another rdc:get-configuration xpath expansion in
fsm-input.tag?  I would recommend it goes right before the expansion
for your prompt list:

  <rdc:expand>
    <rdc:get-configuration xml="${model.configuration}"
     locator="/config/${stateNode}/grammar-list/grammar"/> 
  </rdc:expand>

This way, inside the <input></input> tags of my config file, I can
specify the grammar to use for that rdc, without having to have a
seperate grxml file.  If there is grammar listed in the configs, it
would add it to the list.  I believe that you could still specify
another grammar in the template grammar attribute and have them both
active, when necessary.

Thoughts?

Shane Smith

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


Re: RDC:Template - why is grammar attribute required?

Posted by Rahul P Akolkar <ak...@us.ibm.com>.
Shane Smith <sa...@gmail.com> wrote on 08/24/2005 03:59:08 PM:
> > I am definitely not keen on doing this for first class components i.e.
> > fsm-input all out, but it might be worthwhile to make an exception for 
the
> > rdc:template (given it is a rapid prototyping tool).
> 
> I agree as well, but if we allow it for one, we should allow it for
> all of them, at least for consistency.  As a developer, I would
> scratch my head in bewilderment if grammar-list only worked as a
> config element for one rdc.  The best we can do is encourage best
> practices when it comes to this type of development, and leave it to
> the developer to learn from his mistakes.  (some of us never learn)
<snip/>

The rdc:template was moved out of the "component" sections of the tag docs 
a couple of weeks ago (you'll notice the change on the new link I sent in 
my last email). I thought it was important to stress that a rdc:template 
instance is not a first class RDC. There truly is an important distinction 
between component tags and the rdc:template - the latter is a higher order 
function of sorts, if the atomic RDCs are a first order function. Template 
instances give us more freedom, along with handing us more responsibility. 
So in my mind, there is no breach of consistency. But I do value your 
opinion, and that is possibly how other developers and users think as 
well. In which case, from a framework perspective, we're better off doing 
nothing here.

-Rahul

Re: RDC:Template - why is grammar attribute required?

Posted by Shane Smith <sa...@gmail.com>.
> I am definitely not keen on doing this for first class components i.e.
> fsm-input all out, but it might be worthwhile to make an exception for the
> rdc:template (given it is a rapid prototyping tool).

I agree as well, but if we allow it for one, we should allow it for
all of them, at least for consistency.  As a developer, I would
scratch my head in bewilderment if grammar-list only worked as a
config element for one rdc.  The best we can do is encourage best
practices when it comes to this type of development, and leave it to
the developer to learn from his mistakes.  (some of us never learn)

On 8/24/05, Rahul P Akolkar <ak...@us.ibm.com> wrote:
> Shane Smith <sa...@gmail.com> wrote on 08/23/2005 03:07:00 PM:
> > Hey Folks,
> >
> > Using RDC's, I am wondering why the template for "rapid atomic
> > development" requires the grammar attribute?
> >
> >
> http://jakarta.apache.org/taglibs/sandbox/doc/rdc-doc/index.html#template
> <snip/>
> 
> Hi Shane -
> 
> We have moved, the current version of the above URL is [
> http://jakarta.apache.org/taglibs/doc/rdc-doc/index.html#template ] -
> notice the lack of the path fragment "sandbox/". Heads up, the older
> version will soon disappear. Now to your question ... :-)
> 
> >
> > I like many others prefer to use inline grammars, and in this case
> > would like to load my grammars in with my config file. Would it be
> > possible to add another rdc:get-configuration xpath expansion in
> > fsm-input.tag?  I would recommend it goes right before the expansion
> > for your prompt list:
> >
> >   <rdc:expand>
> >     <rdc:get-configuration xml="${model.configuration}"
> >      locator="/config/${stateNode}/grammar-list/grammar"/>
> >   </rdc:expand>
> >
> > This way, inside the <input></input> tags of my config file, I can
> > specify the grammar to use for that rdc, without having to have a
> > seperate grxml file.  If there is grammar listed in the configs, it
> > would add it to the list.  I believe that you could still specify
> > another grammar in the template grammar attribute and have them both
> > active, when necessary.
> >
> > Thoughts?
> <snap/>
> 
> The downside:
> 1) The config file has growing responsibilities
> 2) Grammars can range from miniscule to large, and some may be of the
> opinion that non-trivial grammars are best maintained standalone
> 3) You take away from the grammar author the ability to use grammar
> editors and grammar testing tools out of the box
> 
> I am definitely not keen on doing this for first class components i.e.
> fsm-input all out, but it might be worthwhile to make an exception for the
> rdc:template (given it is a rapid prototyping tool).
> 
> If you want to push on this for the rdc:template, please create a bugzilla
> [ http://issues.apache.org/bugzilla/ ] ticket, attaching a patch if you
> have one. Oh, is there anything I can help with as far as creating a
> ticket for the earlier patch you authored about the rdc:select1 options
> (if you have a svn client, you're all set). I'd like to get that in before
> I (we) forget.
> 
> -Rahul
> 
>

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


Re: RDC:Template - why is grammar attribute required?

Posted by Rahul P Akolkar <ak...@us.ibm.com>.
Shane Smith <sa...@gmail.com> wrote on 08/23/2005 03:07:00 PM:
> Hey Folks,
> 
> Using RDC's, I am wondering why the template for "rapid atomic
> development" requires the grammar attribute?
> 
> 
http://jakarta.apache.org/taglibs/sandbox/doc/rdc-doc/index.html#template
<snip/>

Hi Shane -

We have moved, the current version of the above URL is [ 
http://jakarta.apache.org/taglibs/doc/rdc-doc/index.html#template ] - 
notice the lack of the path fragment "sandbox/". Heads up, the older 
version will soon disappear. Now to your question ... :-)

> 
> I like many others prefer to use inline grammars, and in this case
> would like to load my grammars in with my config file. Would it be
> possible to add another rdc:get-configuration xpath expansion in
> fsm-input.tag?  I would recommend it goes right before the expansion
> for your prompt list:
> 
>   <rdc:expand>
>     <rdc:get-configuration xml="${model.configuration}"
>      locator="/config/${stateNode}/grammar-list/grammar"/> 
>   </rdc:expand>
> 
> This way, inside the <input></input> tags of my config file, I can
> specify the grammar to use for that rdc, without having to have a
> seperate grxml file.  If there is grammar listed in the configs, it
> would add it to the list.  I believe that you could still specify
> another grammar in the template grammar attribute and have them both
> active, when necessary.
> 
> Thoughts?
<snap/>

The downside:
1) The config file has growing responsibilities
2) Grammars can range from miniscule to large, and some may be of the 
opinion that non-trivial grammars are best maintained standalone
3) You take away from the grammar author the ability to use grammar 
editors and grammar testing tools out of the box

I am definitely not keen on doing this for first class components i.e. 
fsm-input all out, but it might be worthwhile to make an exception for the 
rdc:template (given it is a rapid prototyping tool).

If you want to push on this for the rdc:template, please create a bugzilla 
[ http://issues.apache.org/bugzilla/ ] ticket, attaching a patch if you 
have one. Oh, is there anything I can help with as far as creating a 
ticket for the earlier patch you authored about the rdc:select1 options 
(if you have a svn client, you're all set). I'd like to get that in before 
I (we) forget.

-Rahul