We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics

How do I use the <tag> tag in SRGS grammars?

Answers to common Plum DEV questions

Moderators: admin, support

Posts: 6
Joined: Thu Mar 16, 2006 3:47 pm
Location: London, UK

More info on <tag> tag

Post by kmanley »

Hi could you provide a bit more information and perhaps an example of how to use the <tag/> tag in SRGS grammars. There doesn't seem to be any info on this in the docs.

Specifically I'm looking for ways to include ECMAScript in the grammar so that I can add properties to the result object returned to the <filled/> tag. I've tried using $ to represent the result object but it doesn't seem to work.


Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA

Post by support »

If I understand your question correctly, you're attempting to create member variables for the result object returned to the <filled> block. This is not possible with <tag>. <tag> tags are used for mixed initiative applications. Instead, use a <script> block within your <filled> block if you wish to run arbitrary ECMAscript code in response to data entered by a caller.

However, if you are still interested, you can find one example of how <tag> can be used here:
http://support.plumgroup.com/viewtopic.php?p=927#927. However it should be noted that mixed initiative VoiceXML applications are difficult to write and often confusing for callers to use.