- From: Yahn Teisseire <yahn@ukibi.com>
- Date: Thu, 24 Oct 2002 18:23:19 +0200
- To: <www-voice@w3.org>
- Message-ID: <100f01c27b79$b5365010$e9020a0a@paris.ukibi.com>
Hi, I'd like a grammar able to return 3 spelled letters to my application like : <grammar root="command"> <rule id="command" scope="public"> <item> <ruleref uri="#firstletter"/> <ruleref uri="#secondletter"/> <ruleref uri="#thirdletter"/> </item> </rule> <rule id="firstletter"> <item><ruleref uri="#alphabet"/><tag>firstletter=$alphabet</tag></item> </rule> <rule id="secondletter"> <item><ruleref uri="#alphabet"/><tag>secondletter=$alphabet</tag></item> </rule> <rule id="thirdletter"> <item><ruleref uri="#alphabet"/><tag>thirdletter=$alphabet</tag></item> </rule> <rule id="alphabet"> <one-of> <item>a<tag>alphabet="a"</tag></item> <item>b<tag>alphabet="b"</tag></item> <item>c<tag>alphabet="c"</tag></item> <item>d<tag>alphabet="d"</tag></item> <item>e<tag>alphabet="e"</tag></item> <item>f<tag>alphabet="f"</tag></item> <item>g<tag>alphabet="g"</tag></item> <item>h<tag>alphabet="h"</tag></item> <item>i<tag>alphabet="i"</tag></item> <item>j<tag>alphabet="j"</tag></item> <item>k<tag>alphabet="k"</tag></item> <item>l<tag>alphabet="l"</tag></item> <item>m<tag>alphabet="m"</tag></item> <item>n<tag>alphabet="n"</tag></item> <item>o<tag>alphabet="o"</tag></item> <item>p<tag>alphabet="p"</tag></item> <item>q<tag>alphabet="q"</tag></item> <item>r<tag>alphabet="r"</tag></item> <item>s<tag>alphabet="s"</tag></item> <item>t<tag>alphabet="t"</tag></item> <item>u<tag>alphabet="u"</tag></item> <item>v<tag>alphabet="v"</tag></item> <item>w<tag>alphabet="w"</tag></item> <item>x<tag>alphabet="x"</tag></item> <item>y<tag>alphabet="y"</tag></item> <item>z<tag>alphabet="z"</tag></item> </one-of> </rule> </grammar> ----------------------------------------------------------------------------------- The problem is i don't know how to take the value returned by the "alphabet" rule into my "firstletter", "secondletter" and "thirdletter" rules. if the user say "a....b.....c" i have to store "abc" into a variable. How could i do ? Maybe it is possible to make like : <rule id="letters"> <item repeat="3"><ruleref uri="#alphabet"/><tag>xxxxxxxxx</tag></item> </rule> but what code as to be placed instead of the "xxxxxxxx" to make (result returned by alphabet) + (result returned by alphabet) + (result returned by alphabet) -> String Thanks for your help Yahn Teisseire
Received on Thursday, 24 October 2002 12:23:17 UTC