If you have a more complex markup it becomes apparent, for example, if you selected something inside <p><span></span><strong><em>Text</em></strong></p> it would look like 0-1-0-0
The last part is exactly what you suggested, it's just the dom content substring.
Another thing that it's not evident is that the selected text can transverse trough html elements, for example, start inside a span and end outside that span.
Sadly that blog is not under my control, maybe i should try to blow the dust off that code and make a sample page.