Print

Print


Hi Robert!

[Q: How to encode "yt's", short for "that is"]


While I leave it to others more scholarly inclined than I to decide
whether 
    <choice>
      <abbr>yt</abbr>
      <expan>that</expan>
    </choice>
or
    <choice>
      <orig>yt</orig>
      <reg>that</reg>
    </choice>
is more correct, in either case you have your choice of nesting the
<choice>s as you have done:
    <choice>
      <abbr>
        <choice>
          <abbr>yt</abbr>
          <expan>that</expan>
        </choice>'s</abbr>
      <expan>that is</expan>
    </choice>
or reversing the nesting like so:
    <choice>
      <abbr>yt<choice>
          <abbr>'s</abbr>
          <expan> is</expan>
        </choice>
      </abbr>
      <expan>that is</expan>
    </choice>
or putting them in sequence like so:
    <choice>
      <abbr>yt</abbr>
      <expan>that</expan>
    </choice><choice>
      <abbr>'s</abbr>
      <expan> is</expan>
    </choice>

There are four possible outputs:
 1.  that is
 2.  that's
 3.  yt is
 4.  yt's

* The first nested encoding stores 1, 2, and 4, although extracting 2
  is unnatural;
* the second nested encoding stores 1, 3, and 4 (and therefore might
  be considered a bit silly), although extracting 3 is unnatural;
* the third sequential encoding stores all 4, although extracting 2
  or 3 is unnatural.

By "unnatural" I mean that there's no obvious simple algorithm. The
obvious simple algorithms are "replace each <choice> element with the
contents if its child <abbr>" and "replace each <choice> element with
the contents of its child <expan>".

HTH.