[x3d-public] TextSpecialCharactersIndex.html bug

Andreas Plesch andreasplesch at gmail.com
Sat May 6 16:00:45 PDT 2017


Hi Don,

On Sat, May 6, 2017 at 4:23 PM, Don Brutzman <brutzman at nps.edu> wrote:

> Again thanks for this valuable report.
>
> As it turns out, I think that really careful inspection shows that the
> pretty-print is OK, even if it is slightly different.
>
> Sorry, I do not think it is ok and only slightly different. Not sure how
it could be considered adequate.


> This is because the XML encoding cannot always be converted literally.
> Multiple equivalent character-entity representations for the same character
> exist.
>


> Emblematic of this issue is difference between & (character) and &
> (XML character entity) and &amp; (HTML source to represent the XML
> character entity).
>

Ok. This is a good example. Here is what I think should exist:

[character]: &
[XML character entity]: &
[X3D code fragment]: <Text string=' " ampersand & : use &&" '>
[HTML fragment to display X3D code fragment]: <span class="value"> "
ampersand &amp; : use &amp;amp;" </span>
[rendered HTML on web page, pretty print]: " ampersand & : use
&&"

The current web page is misleading since it ends up displaying (pretty
printed) X3D code which is inconsistent with the original X3D and what
cobweb and x3dom use for the scene.

Since plain text can be confusing (and inadvertently converted) I've tried
> to illustrate the equivalence with the two attached figures.  Attached and
> online at
>
> http://x3dgraphics.com/examples/X3dForWebAuthors/Chapter02Ge
> ometryPrimitives/TextSpecialCharactersScreenshotPrettyPrintHtml.png
>

Misleading. I do not think the shown X3D could be used as the actual X3D.
For example, "ampersand & is &" would be rendered as |ampersand & is
&| . It should be replaced by HTML which results in:


> http://x3dgraphics.com/examples/X3dForWebAuthors/Chapter02Ge
> ometryPrimitives/TextSpecialCharactersScreenshotXmlSource.png
>
>
which is the correct XML source.


> Also added further explanation to scene description:
>
>         "See figures and conversions to note that multiple equivalences in
> XML character representations lead to consistent results despite slight
> differences in source."
>
>



> Please do ask if you think that this can be improved or corrected further.
>
>
I am not sure why the existing web page may be considered adequate but I do
not think I am missing anything.


>
> On 4/28/2017 8:43 AM, Andreas Plesch wrote:
>
>> http://x3dgraphics.com/examples/X3dForWebAuthors/Chapter02Ge
>> ometryPrimitives/TextSpecialCharacters.html does not display the correct
>> x3d xml on the web page.
>>
>> The .x3d itself is correct.
>>
>> Here is a fixed version:
>>
>> https://insidious-twister.glitch.me/
>>
>> CTRL-u for source or here:
>>
>> https://glitch.com/edit/#!/insidious-twister
>>
>> or here:
>>
>> <span class="value">
>>      "Character entity substitutions:"
>>      "empty string \"\" skips a line:"
>>      ""
>>      "apostrophe &apos; is &amp;apos;"
>>      "ampersand &amp; is &amp;amp;"
>>      "quote mark  \"  is &amp;quot;"
>>      "backslash \\ is X3D escape character"
>>      "double backslash \\\\ is X3D backslash \\ character"
>>      "Pi &#928 is &amp;#928; XML character entity"
>>   </span>
>>
>> BTW, glitch.com <http://glitch.com> came up with the subdomain name by
>> itself ...
>>
>> Not sure, if or how to teach this x3d to html-display translation to a
>> style sheet (or something else).
>>
>> -Andreas
>>
>
> all the best, Don
> --
> Don Brutzman  Naval Postgraduate School, Code USW/Br
> brutzman at nps.edu
> Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA
> +1.831.656.2149
> X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzma
> n
>



-- 
Andreas Plesch
39 Barbara Rd.
Waltham, MA 02453
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20170506/1630fffd/attachment-0001.html>


More information about the x3d-public mailing list