Text and Name tags in XML

From SuperMemopedia
Jump to navigation Jump to search

Question

What's the difference between the Text and Name tags in XML. As far as I remember, there was no Text tag before (in older SuperMemos).

Answer

For sound components, there is a sound registry member name (NAME) and the text in the sound component (TEXT).

For example:

        <Sound>
            <Text>public domain (software)</Text>
            <URL>[SecondaryStorage]\2\5\21\19714.wav</URL>
            <Name>Public Domain software</Name>
            <Answer>T</Answer>
        </Sound>


In Advanced English, the Text and the Name are usually the same, but the same sound may be used in two items with different texts (e.g. heterographs ion vs. iron (UK)).

For example, instead of storing two sounds for "row" and "rho", Advanced English saves space by keeping just one sound:


<SuperMemoElement>
  <ID>59302</ID>
  <Type>Item</Type>
  <Ordinal>39087.64</Ordinal>
  <Content>
      <Question>
            
          rho (P)(in Greek alphabet)

      </Question>
      <Answer>

          rəʊ

      </Answer>
      <Sound>
      <Text>

          rho

      </Text>
      <URL>[SecondaryStorage]\1\22\17\15773.wav</URL>
      <Name>

          row (line)(also: rho)

      </Name><Answer>T</Answer></Sound></Content></SuperMemoElement>