A protocol implementation for sending SMS messages.
It's features are to be:
- Outputs tag body content with whitespace normalised.
- Uses text fallbacks for non-text components if available.
- Simulates some simple markup layout (see below).
The markup simulated is as follows:
- Trims all linefeeds and unecessary spaces from tag contents (apart from PRE).
- Ensures there is a line break in the output text before and after most block level tags (P, Hn, UL, OL, LI, DL, DT, DD, PRE, DIV, BLOCKQUOTE, HR, TABLE, ADDRESS), BR and TR
- Adds whitespace around text for TD, TH and DT
- Emulates ordered and unordered lists as appropriate, but only the most simple cases, the attributes of these elements are ignored.
Some other features that should be noted are:
- Elements which create newlines (such as P) tend to break the emulated formatting; there is not much we can (simply) do about this.
- Character encoding and trimming to size is handled by the SMS channel adapter.
- All theme/style information is ignored.
- All form content is ignored.
- It doesn't provide support for inclusion.
- It doesn't provide support for dissecting panes.
- It doesn't provide support for segments or fragments.
- Any HTML entities in the content will be ignored/passed through(!)
- It doesn't use very much VolantisProtocol implementation!
SMS output is quite different to "normal" HTML/XML markup output in that whitespace is significant, so we have to take input which has effectively random whitespace and normalise it so that it looks good in an SMS message.
This is handled by special writers provided by {@link SMS_DOMOutputBuffer}.