From d9e0521c5810e4214f20f0a2ebe737316fb5757d Mon Sep 17 00:00:00 2001 From: bringert Date: Fri, 16 Feb 2007 21:29:01 +0000 Subject: [PATCH] VoiceXML generation: the grammar file name should be based on the concrete syntax module name rather than the abstract. --- src/GF/Speech/GrammarToVoiceXML.hs | 7 ++++--- 1 file 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 : '?' }"]]