Suppose I have some SSML:
<speak>
<p>Now I will read some numbers.</p>
<p>
<say-as interpret-as="digits">369148034</say-as>,
<p>
</speak>
When I send this as the text of a voice message with AWS PinpointSMSVoice (via the AWS JS SDK), the message fails with "Bad Request". However, if I combine everything to one line and convert double quotes to single quotes, AWS accepts it and it works.
In reading more about SSML in general, I see the following warning:
Don't forget to use double quotes around attribute values. Standards for well-formed, valid XML require attribute values to be enclosed in double quotation marks.
My hunch is that there is a bug in the AWS JS SDK which is preventing the proper encoding of a multiline string with double quotes. I don't think it's escaping properly, but I don't know for sure.
The question is... is this just a quirk of AWS? Or in practice, should SSML use single quotes for attributes? Or, double quotes?