summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbringert <bringert@cs.chalmers.se>2007-02-16 21:29:01 +0000
committerbringert <bringert@cs.chalmers.se>2007-02-16 21:29:01 +0000
commitd9e0521c5810e4214f20f0a2ebe737316fb5757d (patch)
tree713802e160cbe0f5fb56cfc4f81e1f0e2f6f63fd /src
parent70eb2d2ace82a826db7e129b7c5d5e019b71787d (diff)
VoiceXML generation: the grammar file name should be based on the concrete syntax module name rather than the abstract.
Diffstat (limited to 'src')
-rw-r--r--src/GF/Speech/GrammarToVoiceXML.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/GF/Speech/GrammarToVoiceXML.hs b/src/GF/Speech/GrammarToVoiceXML.hs
index 2924f0513..5415c8184 100644
--- a/src/GF/Speech/GrammarToVoiceXML.hs
+++ b/src/GF/Speech/GrammarToVoiceXML.hs
@@ -47,7 +47,8 @@ import Debug.Trace
-- | the main function
grammar2vxml :: Options -> StateGrammar -> String
grammar2vxml opt s = showsXMLDoc (skel2vxml name language startcat gr' qs) ""
- where (name, gr') = vSkeleton (stateGrammarST s)
+ where (_, gr') = vSkeleton (stateGrammarST s)
+ name = prIdent (cncId s)
qs = catQuestions s (map fst gr')
opts = addOptions opt (stateOptions s)
language = fmap (replace '_' '-') $ getOptVal opts speechLanguage
@@ -119,11 +120,11 @@ getCatQuestion c qs =
-- * Generate VoiceXML
--
-skel2vxml :: VIdent -> Maybe String -> VIdent -> VSkeleton -> CatQuestions -> XML
+skel2vxml :: String -> Maybe String -> VIdent -> VSkeleton -> CatQuestions -> XML
skel2vxml name language start skel qs =
vxml language ([startForm] ++ concatMap (uncurry (catForms gr qs)) skel)
where
- gr = grammarURI (prid name)
+ gr = grammarURI name
startForm = Tag "form" [] [subdialog "sub" [("src", "#"++catFormId start)]
[param "old" "{ name : '?' }"]]