[x3d-public] TextSpecialCharactersIndex.html bug
andreasplesch at gmail.com
Sat May 6 16:00:45 PDT 2017
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
> Emblematic of this issue is difference between & (character) and &
> (XML character entity) and & (HTML source to represent the XML
> character entity).
Ok. This is a good example. Here is what I think should exist:
[XML character entity]: &
[X3D code fragment]: <Text string=' " ampersand & : use &&" '>
[HTML fragment to display X3D code fragment]: <span class="value"> "
ampersand & : use &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
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:
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:
>> ometryPrimitives/TextSpecialCharacters.html does not display the correct
>> x3d xml on the web page.
>> The .x3d itself is correct.
>> Here is a fixed version:
>> CTRL-u for source or here:
>> or here:
>> <span class="value">
>> "Character entity substitutions:"
>> "empty string \"\" skips a line:"
>> "apostrophe ' is &apos;"
>> "ampersand & is &amp;"
>> "quote mark \" is &quot;"
>> "backslash \\ is X3D escape character"
>> "double backslash \\\\ is X3D backslash \\ character"
>> "Pi Π is &#928; XML character entity"
>> 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).
> 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
> X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzma
39 Barbara Rd.
Waltham, MA 02453
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the x3d-public