Being as clickable hyperlink is a kind of formatting attribute similar to italic or underline, but with additional data (hyperlink target). And it is intermixed with other formatting.
Currently in DocLang references are part of a content element header and cannot be mixed with other formatting.
Suppose we have an italic line of text with hyperlink:
Find details at https://disney.com.
The natural way to represent would be
<text><italic>Find details at <href uri="https://disney.com">disney.com</href>.</italic></text>
But DocLang requires <href> to be in a head of a content element. Well, let's add a nested <text>
<text><italic>Find details at <text><href uri="https://disney.com"/>disney.com</text>.</italic></text>
It is still reasonable despite being a bit longer.
But DocLang still rejects is as <text> cannot be inside <italic>. We are forced to split one italic span into three to be conformant:
<text><italic><content>Find details at </content></italic><text><href uri="https://disney.com"/><italic>disney.com</italic></text><italic>.</italic></text>
This variant:
- Is much longer.
- Requires
<content> to preserve boundary space.
- Does nor preserve original semantics as a single italic span is broken in three just due to DocLang limitations. There are no italic boundaries in the original text.
With <rtl> situation is much worse as it cannot bs split. if A, B, C, D, E, F are some characters of RTL bidi category, <rtl>ABCDEF</rtl> will result in a visual-order string FEDCBA, while <rtl>ABC</rtl><rtl>DEF</rtl> will give CBAFED.
Being as clickable hyperlink is a kind of formatting attribute similar to italic or underline, but with additional data (hyperlink target). And it is intermixed with other formatting.
Currently in DocLang references are part of a content element header and cannot be mixed with other formatting.
Suppose we have an italic line of text with hyperlink:
The natural way to represent would be
But DocLang requires
<href>to be in a head of a content element. Well, let's add a nested<text>It is still reasonable despite being a bit longer.
But DocLang still rejects is as
<text>cannot be inside<italic>. We are forced to split one italic span into three to be conformant:This variant:
<content>to preserve boundary space.With
<rtl>situation is much worse as it cannot bs split. if A, B, C, D, E, F are some characters of RTL bidi category,<rtl>ABCDEF</rtl>will result in a visual-order stringFEDCBA, while<rtl>ABC</rtl><rtl>DEF</rtl>will giveCBAFED.