<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;
      charset=windows-1252">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    The open discussion this week is what to do about SFString and
    MFString encodings. This is for V4 of the X3D Standard as V3.3 is
    already set and there is no planned work on >V3.3.<br>
    <br>
    The major discussion is for the XML/HTML (including XHTML) encoding
    as neither the ClassicVRML not Compressed Binary encodings have not
    generated discussions on any of the lists. There is also application
    of the (currently not standardized) JSON encoding.<br>
    <br>
    I am publishing this ahead of time so people can think about this
    proposal and contributed even if they cannot make the call on
    Wednesday.<br>
    <br>
    <br>
    For the purposes of this discussion, text is a field either of type
    SFString or MFString.<br>
    <br>
    New Syntax:<br>
    <br>
    1: <br>
    <Node text="entity-encoded text"></Node><br>
    <br>
    OR<br>
    <br>
    2:<br>
    <Node><br>
        <text>text-string</text><br>
        <text>text-string</text><br>
        <text>text-string</text><br>
        <text>text-string</text><br>
        <text>text-string</text><br>
    </Node><br>
    <br>
    In (1) "entity-encoded text" is a single-valued string that is
    either SFString of the first (and only) element of MFString.<br>
    <br>
    In (2) the element content of <text> is character string that
    conforms to the rules of HTML/XHTML/XML (uses HTML-entities). These
    may be CDATA sections (see
    <a class="moz-txt-link-freetext" href="https://www.w3.org/TR/html5/syntax.html#cdata-sections">https://www.w3.org/TR/html5/syntax.html#cdata-sections</a> for
    justification for HTML) to support cross-document type compatibility
    (between HTML, XHTML, and XML). If 'text' is an SFString only the
    first child is allowed (in XML) or considered (in HTML). If 'text'
    is an MFString, then each <text> child contains one element
    and the elements are used in order.<br>
    <br>
    If both an attribute and child elements are provided, the child
    element has precedence.<br>
    <br>
    <br>
    <br>
    Examples (using MetadataString node)<br>
    <br>
    These five examples produce the same result<br>
    <tt>    <MetadataString name='SimpleName' value='Single value'
      /></tt><tt><br>
    </tt><tt>
          <MetadataString name='SimpleName' value="Single value"
      /></tt><tt><br>
    </tt><tt>    <MetadataString name='SimpleName'></tt><tt><br>
    </tt><tt>
               <value>Single value</value></tt><tt><br>
    </tt><tt>
          </MetadataString></tt><tt><br>
    </tt><tt>
          <MetadataString></tt><tt><br>
    </tt><tt>
               <name>SimpleName</name></tt><tt><br>
    </tt><tt>
               <value>Single value</value></tt><tt><br>
    </tt><tt>
          </MetadataString></tt><tt><br>
    </tt><tt>
          <MetadataString></tt><tt><br>
    </tt><tt>
               <name>SimpleName</name></tt><tt><br>
    </tt><tt>
               <value></tt><code data-anolis-xref=""><![CDATA[</code><tt>Single
      value]]></value></tt><tt><br>
    </tt><tt>
          </MetadataString></tt><br>
    <br>
    Multi-valued 'value' field examples<br>
    <tt>    <MetadataString name='SimpleName'></tt><tt><br>
    </tt><tt>
               <value></tt><code data-anolis-xref=""><![CDATA</code><code
      data-anolis-xref="">[First element</code><tt>]]></value></tt><tt><br>
    </tt><tt>
          </MetadataString></tt><tt><br>
    </tt><tt>    <MetadataString></tt><tt><br>
    </tt><tt>
               <value></tt><code data-anolis-xref=""><![CDATA</code><code
      data-anolis-xref="">[First element</code><tt>]]></value></tt><tt><br>
    </tt><tt>
               <name>SimpleName</name></tt><tt><br>
    </tt><tt>
               <value></tt><code data-anolis-xref=""><code
        data-anolis-xref=""><![CDATA</code>[Second element</code><tt>]]></value></tt><tt><br>
    </tt><tt>
          </MetadataString></tt><tt><br>
    </tt><tt>    <MetadataString></tt><tt><br>
    </tt><tt>
               <name><![CDATA["C'mplx
      \Element]]></name></tt><tt><br>
    </tt><tt>
               <value>Easy String</value></tt><code
      data-anolis-xref=""></code><code data-anolis-xref=""> </code><tt><br>
    </tt><tt>
               <value></tt><code data-anolis-xref=""><![CDATA</code><code
      data-anolis-xref="">[A string with "'s ''s &'s and <> in
      it.]]></value> </code><tt><br>
    </tt><tt>
          </MetadataString></tt><tt><br>
    </tt><tt>
    </tt><br>
    <br>
    I made all of the node examples in fixed-width font to help ensure
    things are correctly represented. Many of the element values use
    CDATA sections.<br>
    <br>
    Why:<br>
    1) This brings the representation in line with HTML and XML
    representations of structure elements. For example the HTML element
    'table' uses 'tr' and 'td' to ground information by rows and cells
    within the row, the structure of a table is not contained in
    attributes of 'table'.<br>
    2) It is clear how to properly encode multi-element strings.<br>
    3) Strings containing characters that are normally thought of as
    meta-characters (e.g., backslash, ampersand, angle-brackets, etc.)
    have a straight-forward representation.<br>
    <br>
    Summary:<br>
    1) Provide an attribute value for simple entry for either SFString
    of the first and only element of an MFSting.<br>
    2) Multi-valued MFString are represented using child elements<br>
    3) Complex strings (either SFString or MFString) are entered using
    child elements <br>
    <br>
    I do not advocate the approach of creating a separate child for each
    element of a numeric data types (e.g., PixelTexture, Coordinate,
    etc.); however, I do think that moving all the attribute string to
    the value of a single child element is a good idea. For example<br>
    <br>
    <tt><Coordinate></tt><tt><br>
    </tt><tt>  <point>x1 y1 z1[,] x2 y2 z2[,] ...[,] xN yN
      zN</point></tt><tt><br>
    </tt><tt></Coordinate></tt><tt><br>
    </tt><tt>
    </tt><br>
    <br>
    <div class="moz-signature">-- <br>
      <font class="tahoma,arial,helvetica san serif" color="#333366">
        <font size="+1"><b>Leonard Daly</b></font><br>
        3D Systems & Cloud Consultant<br>
        LA ACM SIGGRAPH Chair<br>
        President, Daly Realism - <i>Creating the Future</i>
      </font></div>
  </body>
</html>