summaryrefslogtreecommitdiff
path: root/src/GF/Speech/PrSRGS.hs
diff options
context:
space:
mode:
authorbringert <bringert@cs.chalmers.se>2007-01-21 16:33:44 +0000
committerbringert <bringert@cs.chalmers.se>2007-01-21 16:33:44 +0000
commit169659c096a38f8fc0cf48e3054efbdf30a96c8c (patch)
treebaf3f08f571514fe113055ce7dfd321e746b1f44 /src/GF/Speech/PrSRGS.hs
parentb974ab06cdd64ba1db9278516fbd5803f236d5ee (diff)
Get speechLanguage flag from both command-line and grammar. Reformat it to RFC3066 format (- instead of _) and use it in SRGS, VoiceXML and JSGF.
Diffstat (limited to 'src/GF/Speech/PrSRGS.hs')
-rw-r--r--src/GF/Speech/PrSRGS.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/GF/Speech/PrSRGS.hs b/src/GF/Speech/PrSRGS.hs
index e0754f389..b6af82d32 100644
--- a/src/GF/Speech/PrSRGS.hs
+++ b/src/GF/Speech/PrSRGS.hs
@@ -125,15 +125,15 @@ oneOf = Tag "one-of" []
grammar :: Maybe SISRFormat
-> String -- ^ root
- -> String -- ^language
+ -> Maybe String -- ^language
-> [XML] -> XML
-grammar sisr root l =
- Tag "grammar" $ [("xml:lang", l),
- ("xmlns","http://www.w3.org/2001/06/grammar"),
+grammar sisr root ml =
+ Tag "grammar" $ [("xmlns","http://www.w3.org/2001/06/grammar"),
("version","1.0"),
("mode","voice"),
("root",root)]
++ (if isJust sisr then [("tag-format","semantics/1.0")] else [])
+ ++ maybe [] (\l -> [("xml:lang", l)]) ml
meta :: String -> String -> XML
meta n c = Tag "meta" [("name",n),("content",c)] []