X3D Model Documentation: TextSpecialCharacters.x3d

  1  <?xml version="1.0" encoding="UTF-8"?>
  2  <!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.3//EN" "https://www.web3d.org/specifications/x3d-3.3.dtd">
  3  <X3D profile='Immersive' version='3.3 xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='https://www.web3d.org/specifications/x3d-3.3.xsd'>
  4       <head>
  5            <!-- note quotes in comment and meta reference: "https://en.wikipedia.org/wiki/Hello,_World!_program" -->
  6            <meta name='titlecontent='TextSpecialCharacters.x3d'/>
  7            <meta name='descriptioncontent='Text node demonstration of quotation, apostrophe, ampersand and backslash characters using X3D MFString escaping for XML character entities.'/>
  8            <meta name='creatorcontent='Don Brutzman'/>
  9            <meta name='createdcontent='12 July 2008'/>
 10            <meta name='modifiedcontent='20 October 2019'/>
 11            <meta name='infocontent='See screenshot figures and various encoding conversions to note that multiple equivalences in XML character representations lead to consistent results despite slight differences in source.'/>
 12            <meta name='referencecontent='TextSpecialCharactersScreenshotXmlSource.png'/>
 13            <meta name='referencecontent='TextSpecialCharactersScreenshotPrettyPrintHtml.png'/>
 14            <meta name='referencecontent='Character entity references in HTML 4, http://www.w3.org/TR/REC-html40/sgml/entities.html'/>
 15            <meta name='referencecontent='"https://en.wikipedia.org/wiki/Hello,_World!_program"'/>
 16            <meta name='rightscontent='Copyright (c) Don Brutzman and Leonard Daly, 2008'/>
 17            <meta name='identifiercontent='https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter02GeometryPrimitives/TextSpecialCharacters.x3d'/>
 18            <meta name='generatorcontent='X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit'/>
 19            <meta name='licensecontent='../license.html'/>
 20       </head>
<!--

<!-- -->

<!-- to top Index for DEF nodes: CenteredFontStyle, DefaultMaterial, DefaultText

Index for Viewpoint node: Viewpoint_1
-->
 21       <Scene>
 22            <WorldInfo title='TextSpecialCharacters.x3d'/>
 23            <Background skyColor='1 1 1'/>
 24            <Viewpoint description='Default Viewposition='0 0 15'/>
 25            <Shape>
 26                 <!-- Empty string "" means to skip a line -->
 27                 <!-- The ampersand escape characters are based on XML rules -->
 28                 <!-- apostrophe ' is &apos; and needs to be escaped in single-quote delimiters used for string='value' attribute -->
 29                 <!-- ampersand & is &amp; and needs to be escaped -->
 30                 <!-- quotation mark " is &quot; and isn't needed if single-quote delimiters used for string='value' attribute -->
 31                 <!-- quotation mark " character can be used within an X3D string value if escaped with backslash \ as \" -->
 32                 <!-- backslash \ is used as escape character for " (and itself) in X3D -->
 33                 <!-- character entities are listed in HTML specification and are good for any XML -->
 34                 <Text DEF='DefaultTextstring='"Character entity substitutions:" "empty string \"\" skips a line:" "" "apostrophe ' is &apos;" "ampersand & is &" "quote mark \" is &quot;" "backslash \\ is X3D escape character" "double backslash \\\\ is X3D backslash \\ character" "Pi Π is &#928; XML character entity"'>
 35                      <FontStyle DEF='CenteredFontStylejustify='"MIDDLE" "MIDDLE"'/>
 36                 </Text>
 37                 <Appearance>
 38                      <Material DEF='DefaultMaterialdiffuseColor='0.2 0.2 0.2'/>
 39                 </Appearance>
 40            </Shape>
 41       </Scene>
 42  </X3D>
<!--

<!-- -->

<!-- to top Index for DEF nodes: CenteredFontStyle, DefaultMaterial, DefaultText

Index for Viewpoint node: Viewpoint_1
-->
X3D Tooltips element index: Appearance, Background, FontStyle, head, Material, meta, Scene, Shape, Text, Viewpoint, WorldInfo, X3D, accessType and type, XML data types, field types

-->
<!-- Online at
https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter02GeometryPrimitives/TextSpecialCharactersIndex.html -->
<!-- Version control at
https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter02GeometryPrimitives/TextSpecialCharacters.x3d -->

<!-- Color legend: X3D terminology <X3dNode DEF='idName' field='value'/> matches XML terminology <XmlElement DEF='idName' attribute='value'/>
(Light-blue background: event-based behavior node or statement) (Grey background inside box: inserted documentation) (Magenta background: X3D Extensibility)
-->

to top <!-- For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources, and X3D Scene Authoring Hints. -->