ProcessSsmlTag()
Note the line in readclause.c:
if ((c2 == '/') || iswalpha(c2) || c2 == '!' || c2 == '?') {
It might be enough to pass everything to ProcessSsmlTag. What are the
cases that are skipped because of this?
master
| if ((c1 <= 0x20) && ((sayas_mode == SAYAS_SINGLE_CHARS) || (sayas_mode == SAYAS_KEY))) | if ((c1 <= 0x20) && ((sayas_mode == SAYAS_SINGLE_CHARS) || (sayas_mode == SAYAS_KEY))) | ||||
| c1 += 0xe000; // move into unicode private usage area | c1 += 0xe000; // move into unicode private usage area | ||||
| } else if ((c1 == '<') && (ssml_ignore_l_angle != '<')) { | } else if ((c1 == '<') && (ssml_ignore_l_angle != '<')) { | ||||
| if ((c2 == '!') || (c2 == '?')) { | if ((c2 == '/') || iswalpha(c2) || c2 == '!' || c2 == '?') { | ||||
| // a comment, ignore until closing '<' (or <?xml tag ) | |||||
| while (!Eof() && (c1 != '>')) | |||||
| c1 = GetC(); | |||||
| c2 = ' '; | |||||
| } else if ((c2 == '/') || iswalpha(c2)) { | |||||
| // check for space in the output buffer for embedded commands produced by the SSML tag | // check for space in the output buffer for embedded commands produced by the SSML tag | ||||
| if (ix > (n_buf - 20)) { | if (ix > (n_buf - 20)) { | ||||
| // Perhaps not enough room, end the clause before the SSML tag | // Perhaps not enough room, end the clause before the SSML tag |
| PARAM_STACK *sp; | PARAM_STACK *sp; | ||||
| SSML_STACK *ssml_sp; | SSML_STACK *ssml_sp; | ||||
| // don't process comments and xml declarations | |||||
| if (wcsncmp(xml_buf, (wchar_t *) "!--", 3) == 0 || wcsncmp(xml_buf, (wchar_t *) "?xml", 4) == 0) { | |||||
| return 0; | |||||
| } | |||||
| // these tags have no effect if they are self-closing, eg. <voice /> | // these tags have no effect if they are self-closing, eg. <voice /> | ||||
| static char ignore_if_self_closing[] = { 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0 }; | static char ignore_if_self_closing[] = { 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0 }; | ||||