4 ms·
Your example (and all the SEML documentation it seems) is missing marked-up text. For example, how would you represent: <p>This is a <b>really cool</b> se
by nfoz 7y ago
Your example (and all the SEML documentation it seems) is missing marked-up text. For example, how would you represent:
<p>This is a <b>really cool</b> sentence.</p>
Your solution will probably have to splice the text segments around the embedded markup, something like:
(p nil (text "This is a " (b nil "really cool") " sentence."))
In particular, notice the careful whitespace at the edges of the strings.
IMO this Sexpr is now more obtuse than the XML, and the more markup you have within text-spans (e.g. nested markup), the worse it gets. This is also a major difference between XML (markup language) vs JSON (data-structure notation).
Maybe you don't need the (text ...) thing, but either way you're changing the grammar. How do SEML and SXML handle this?
- undersuit 7y agoThe issue is the spaces, so let's get rid of them! (p nil (text (string-join '("This" "is "a" '(b nil "really") '(b nil "cool") "sentence.") " "))) No more wondering if the space between 'really' and 'cool' should be bold and no need to have awkward preceding and trailing padding.
- zeveb 7y agoI think that's mostly an artifact of SEML. In SXML that would be: (p "This is a " (b "really cool") " sentence.") Which seems a-okay to me.