"sub" Element
<sub>
Description
The sub element is employed to indicate that the text in the alias attribute value replaces the contained text for pronunciation. This allows a document to contain both a spoken and written form. The required alias attribute specifies the string to be spoken instead of the enclosed string.
Syntax
<sub alias = โstringโ > text </sub> |
Attributes
Attribute | Description |
alias | The word in the text to be replaced by the string in quotes. mandatory field |
Parent
<audio>, <emphasis>, <p>, <prosody>, <s>, <speak>, <voice>
Children
#TEXT, #CDATA-SECTION
Limitations/Restrictions
The <sub> element cannot include any other elements. The maximum length of the text and alias values, including null characters, is 512 bytes. Any string longer than that will be truncated.
Example
<?xml version="1.0"?> <speak version="1.0" xmlns="http://www.w3.org/2001/10/synthesis" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3.org/2001/10/synthesis http://www.w3.org/TR/speech-synthesis/synthesis.xsd" xml:lang="en-US"> <sub alias="World Wide Web Consortium">W3C</sub> <!-- World Wide Web Consortium --> </speak> |