<?xml version="1.0" encoding="UTF-8"?> <!-- needed: add containerField, class attributes --> <!-- Instruction steps 1 through 4 are listed in detail within the DOCTYPE declaration internal subset. --> <!-- You must view full source of the DTD declarations (ProtoTagDtdDeclarationExamples.x3d.txt) to fully understand this file. --> <!-- ********************************************************************* --> <!-- ** Step 1: Copy the following DOCTYPE statement in your X3D scene. ** --> <!-- ** Ensure you include the square backet [ on line 32! ** --> <!-- ** Modify INCLUDE/IGNORE to match profiles of interest. ** --> <!-- ********************************************************************* --> <!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.0//EN" "http://www.web3d.org/specifications/x3d-3.0.dtd"[ <!ENTITY % FullProfile "IGNORE"> <!ENTITY % ImmersiveProfile "INCLUDE"> <!ENTITY % InteractiveProfile "IGNORE"> <!ENTITY % InterchangeProfile "IGNORE"> <!ENTITY % DISComponent "INCLUDE"> <!ENTITY % GeoSpatialComponent "INCLUDE"> <!ENTITY % HAnimComponent "INCLUDE"> <!ENTITY % NurbsComponent "INCLUDE"> <!ENTITY % LatticeXvlComponent "INCLUDE"> <!-- caution: do NOT put the DOCTYPE declaration terminator ]> here! --> <!-- Filename: ProtoTagDtdDeclarationExamples.x3d Completed: 26 June 2000 Revised: 17 July 2004 Author: Don Brutzman urls: http://www.web3d.org/x3d/content/examples/development/ProtoTagDtdDeclarationExamples.x3d http://www.web3d.org/x3d/content/examples/development/ProtoTagDtdDeclarationExamples.x3d.txt Description: a complete set of PROTO examples demonstrating how to extend the X3D DTD to accept and validate new nodes, in six steps. X3D authors are encouraged to use this file as a template for defining their own tags corresponding to PROTOs. Precise accuracy is essential or you'll clobber the entire scene by failing XML validation checks. XML Document Type Definitions (DTDs) are gnarly, be careful out there! :) Please note there is a very simple alternative to using customized tags: ignore all of these steps and just use ProtoInstance tags. The benefit of defining new nodes is gaining strong validation of tags and fields at authoring time. You can still get similar error checking by just using ProtoInstance, but it must be performed by a browser at run time. Use of parameter entities (starting with %) is valid XML and a valid extensibility mechanism. If your browser hides Steps 2 through 4, inspect ProtoTagDtdDeclarationExamples.x3d.txt instead. --> <!-- ********************************************************************* --> <!-- ** Step 2: Copy extension declarations for your nodes of interest. ** --> <!-- ** Edit the |-separated PROTO names to match your content. ** --> <!-- ********************************************************************* --> <!ENTITY % AppearanceNodeExtensions "NewAppearanceExample|"> <!ENTITY % AudioClipNodeExtensions "NewAudioClipExample|"> <!ENTITY % BindableNodeExtensions "NewBackgroundExample|NewFogExample|NewNavigationInfoExample|NewViewpointExample|"> <!ENTITY % ColorNodeExtensions "NewColorExample|"> <!ENTITY % CoordinateNodeExtensions "NewCoordinateExample|"> <!ENTITY % FontStyleNodeExtensions "NewFontStyleExample|"> <!ENTITY % GeometryNodeExtensions "NewBoxExample|NewConeExample|NewCylinderExample|NewElevationGridExample|NewExtrusionExample|NewIndexedFaceSetExample|NewIndexedLineSetExample|NewPointSetExample|NewSphereExample|NewTextExample|"> <!ENTITY % GroupingNodeExtensions "NewAnchorExample|NewBillboardExample|NewCollisionExample|NewGroupExample|NewInlineExample|NewLODExample|NewSwitchExample|NewTransformExample|"> <!ENTITY % InterpolatorNodeExtensions "NewColorInterpolatorExample|NewCoordinateInterpolatorExample|NewNormalInterpolatorExample|NewOrientationInterpolatorExample|NewPositionInterpolatorExample|NewScalarInterpolatorExample|"> <!ENTITY % LightNodeExtensions "NewDirectionalLightExample|NewPointLightExample|NewSpotLightExample|"> <!ENTITY % MaterialNodeExtensions "NewMaterialExample|"> <!ENTITY % NormalNodeExtensions "NewNormalExample|"> <!ENTITY % ScriptNodeExtensions "NewScriptExample|"> <!ENTITY % SensorNodeExtensions "NewCylinderSensorExample|NewPlaneSensorExample|NewProximitySensorExample|NewSphereSensorExample|NewTimeSensorExample|NewTouchSensorExample|NewVisibilitySensorExample|"> <!ENTITY % ShapeNodeExtensions "NewShapeExample|"> <!ENTITY % SoundNodeExtensions "NewSoundExample|"> <!-- MovieTexture must appear twice: --> <!ENTITY % MovieTextureNodeExtensions "NewMovieTextureExample|"> <!ENTITY % TextureNodeExtensions "NewImageTextureExample|NewMovieTextureExample|NewPixelTextureExample|"> <!ENTITY % TextureCoordinateNodeExtensions "NewTextureCoordinateExample|"> <!ENTITY % TextureTransformNodeExtensions "NewTextureTransformExample|"> <!ENTITY % WorldInfoNodeExtensions "NewWorldInfoExample|"> <!-- ********************************************************************* --> <!-- *** Step 3: Copy entity declarations for your nodes of interest. *** --> <!-- *** If any of your protos are eligible content, add them. *** --> <!-- *** Substitute ANY for child nodes to avoid validation. *** --> <!-- ********************************************************************* --> <!ELEMENT NewAnchorExample ((fieldValue)*, (children)?)> <!ATTLIST NewAnchorExample description CDATA #IMPLIED parameter CDATA #IMPLIED url CDATA #IMPLIED bboxCenter CDATA "0 0 0" bboxSize CDATA "-1 -1 -1" containerField NMTOKEN "children" DEF ID #IMPLIED USE IDREF #IMPLIED > <!ELEMENT NewAppearanceExample ((fieldValue)*, ((material, ((texture, textureTransform?) | (textureTransform, texture?))?) | (texture, ((material, textureTransform?) | (textureTransform, material?))?) | (textureTransform, ((texture, material?) | (material, texture?))?))?)> <!ATTLIST NewAppearanceExample containerField NMTOKEN "appearance" DEF ID #IMPLIED USE IDREF #IMPLIED > <!ELEMENT NewAudioClipExample (fieldValue)*> <!ATTLIST NewAudioClipExample description CDATA #IMPLIED loop (true | false) "false" pitch CDATA "1.0" startTime CDATA "0" stopTime CDATA "0" url CDATA #IMPLIED duration CDATA "0.0" isActive (true | false) "false" containerField NMTOKEN "source" DEF ID #IMPLIED USE IDREF #IMPLIED > <!ELEMENT NewBackgroundExample (fieldValue)*> <!ATTLIST NewBackgroundExample groundAngle CDATA #IMPLIED groundColor CDATA "0 0 0" backUrl CDATA #IMPLIED bottomUrl CDATA #IMPLIED frontUrl CDATA #IMPLIED leftUrl CDATA #IMPLIED rightUrl CDATA #IMPLIED topUrl CDATA #IMPLIED skyAngle CDATA #IMPLIED skyColor CDATA "0 0 0" bind (true | false) "false" bindTime CDATA "-1" isBound (true | false) "false" nodeType CDATA #FIXED "Background" DEF ID #IMPLIED USE IDREF #IMPLIED > <!ELEMENT NewBillboardExample ((fieldValue)*, (children)?)> <!ATTLIST NewBillboardExample axisOfRotation CDATA "0 1 0" bboxCenter CDATA "0 0 0" bboxSize CDATA "-1 -1 -1" nodeType CDATA #FIXED "Billboard" DEF ID #IMPLIED USE IDREF #IMPLIED > <!ELEMENT NewBoxExample (fieldValue)*> <!ATTLIST NewBoxExample size CDATA "2 2 2" nodeType CDATA #FIXED "Box" DEF ID #IMPLIED USE IDREF #IMPLIED > <!ELEMENT NewCollisionExample ((fieldValue)*, ((children, proxy?) | (proxy, children?))?)> <!ATTLIST NewCollisionExample collide (true | false) "true" bboxCenter CDATA "0 0 0" bboxSize CDATA "-1 -1 -1" collideTime CDATA "0.0" nodeType CDATA #FIXED "Collision" DEF ID #IMPLIED USE IDREF #IMPLIED > <!ELEMENT NewColorExample (fieldValue)*> <!ATTLIST NewColorExample color CDATA #IMPLIED nodeType CDATA #FIXED "Color" DEF ID #IMPLIED USE IDREF #IMPLIED > <!ELEMENT NewColorInterpolatorExample (fieldValue)*> <!ATTLIST NewColorInterpolatorExample fraction CDATA "0" key CDATA #IMPLIED keyValue CDATA #IMPLIED value CDATA "0 0 0" nodeType CDATA #FIXED "ColorInterpolator" DEF ID #IMPLIED USE IDREF #IMPLIED > <!ELEMENT NewConeExample (fieldValue)*> <!ATTLIST NewConeExample bottomRadius CDATA "1" height CDATA "2" side (true | false) "true" bottom (true | false) "true" nodeType CDATA #FIXED "Cone" DEF ID #IMPLIED USE IDREF #IMPLIED > <!ELEMENT NewCoordinateExample (fieldValue)*> <!ATTLIST NewCoordinateExample point CDATA #IMPLIED nodeType CDATA #FIXED "Coordinate" DEF ID #IMPLIED USE IDREF #IMPLIED > <!ELEMENT NewCoordinateInterpolatorExample (fieldValue)*> <!ATTLIST NewCoordinateInterpolatorExample fraction CDATA "0" key CDATA #IMPLIED keyValue CDATA #IMPLIED value CDATA "0 0 0" nodeType CDATA #FIXED "CoordinateInterpolator" DEF ID #IMPLIED USE IDREF #IMPLIED > <!ELEMENT NewCylinderExample (fieldValue)*> <!ATTLIST NewCylinderExample bottom (true | false) "true" height CDATA "2" radius CDATA "1" side (true | false) "true" top (true | false) "true" nodeType CDATA #FIXED "Cylinder" DEF ID #IMPLIED USE IDREF #IMPLIED > <!ELEMENT NewCylinderSensorExample (fieldValue)*> <!ATTLIST NewCylinderSensorExample autoOffset (true | false) "true" diskAngle CDATA "0.262" enabled (true | false) "true" maxAngle CDATA "-1" minAngle CDATA "0" offset CDATA "0" isActive (true | false) "false" rotation CDATA "0 0 1 0" trackPoint CDATA "0 0 0" nodeType CDATA #FIXED "CylinderSensor" DEF ID #IMPLIED USE IDREF #IMPLIED > <!ELEMENT NewDirectionalLightExample (fieldValue)*> <!ATTLIST NewDirectionalLightExample ambientIntensity CDATA "0" color CDATA "1 1 1" direction CDATA "0 0 -1" intensity CDATA "1" on (true | false) "true" nodeType CDATA #FIXED "DirectionalLight" DEF ID #IMPLIED USE IDREF #IMPLIED > <!ELEMENT NewElevationGridExample ((fieldValue)*, ((color, ((normal, texCoord?) | (texCoord, normal?))?) | (normal, ((color, texCoord?) | (texCoord, color?))?) | (texCoord, ((normal, color?) | (color, normal?))?)?))> <!ATTLIST NewElevationGridExample height CDATA #IMPLIED ccw (true | false) "true" colorPerVertex (true | false) "true" creaseAngle CDATA "0" normalPerVertex (true | false) "true" solid (true | false) "true" xDimension CDATA "0" xSpacing CDATA "1.0" zDimension CDATA "0" zSpacing CDATA "1.0" nodeType CDATA #FIXED "ElevationGrid" DEF ID #IMPLIED USE IDREF #IMPLIED > <!ELEMENT NewExtrusionExample (fieldValue)*> <!ATTLIST NewExtrusionExample beginCap (true | false) "true" ccw (true | false) "true" convex (true | false) "true" creaseAngle CDATA "0.0" crossSection CDATA "1 1 1 -1 -1 -1 -1 1 1 1" endCap (true | false) "true" orientation CDATA "0 0 1 0" scale CDATA "1 1" solid (true | false) "true" spine CDATA "0 0 0 0 1 0" nodeType CDATA #FIXED "Extrusion" DEF ID #IMPLIED USE IDREF #IMPLIED > <!ELEMENT NewFogExample (fieldValue)*> <!ATTLIST NewFogExample color CDATA "1 1 1" fogType (LINEAR | EXPONENTIAL) "LINEAR" visibilityRange CDATA "0" bind (true | false) "false" bindTime CDATA "-1" isBound (true | false) "false" nodeType CDATA #FIXED "Fog" DEF ID #IMPLIED USE IDREF #IMPLIED > <!ELEMENT NewFontStyleExample (fieldValue)*> <!ATTLIST NewFontStyleExample family (SERIF | SANS | TYPEWRITER) "SERIF" horizontal (true | false) "true" justify (FIRST | BEGIN | MIDDLE | END) "BEGIN" language CDATA #IMPLIED leftToRight (true | false) "true" size CDATA "1.0" spacing CDATA "1.0" style (PLAIN | BOLD | ITALIC | BOLDITALIC) "PLAIN" topToBottom (true | false) "true" nodeType CDATA #FIXED "FontStyle" DEF ID #IMPLIED USE IDREF #IMPLIED > <!ELEMENT NewGroupExample ((fieldValue)*, (children)?)> <!ATTLIST NewGroupExample bboxCenter CDATA "0 0 0" bboxSize CDATA "-1 -1 -1" nodeType CDATA #FIXED "Group" DEF ID #IMPLIED USE IDREF #IMPLIED > <!ELEMENT NewImageTextureExample (fieldValue)*> <!ATTLIST NewImageTextureExample url CDATA #IMPLIED repeatS (true | false) "true" repeatT (true | false) "true" nodeType CDATA #FIXED "ImageTexture" DEF ID #IMPLIED USE IDREF #IMPLIED > <!-- Complete, ordered version of IndexedFaceSet --> <!ELEMENT NewIndexedFaceSetExample ((fieldValue)*, ((color, ((coord, ((normal, texCoord?) | (texCoord, normal)?)?) | (normal, ((coord, texCoord?) | (texCoord, coord?))?) | (texCoord, ((coord, normal?) | (normal, coord?))?))?) | (coord, ((color, ((normal, texCoord?) | (texCoord, normal)?)?) | (normal, ((color, texCoord?) | (texCoord, color?))?) | (texCoord, ((color, normal?) | (normal, color?))?))?) | (normal, ((color, ((coord, texCoord?) | (texCoord, coord?))?) | (coord, ((color, texCoord?) | (texCoord, color?))?) | (texCoord, ((color, coord?) | (coord, color?))?))?) | (texCoord, ((color, ((coord, normal?) | (normal, coord?))?) | (coord, ((color, normal?) | (normal, color?))?) | (normal, ((color, coord?) | (coord, color?))?))?)?))> <!ATTLIST NewIndexedFaceSetExample ccw (true | false) "true" colorIndex CDATA #IMPLIED colorPerVertex (true | false) "true" convex (true | false) "true" coordIndex CDATA #IMPLIED creaseAngle CDATA "0" normalIndex CDATA #IMPLIED normalPerVertex (true | false) "true" solid (true | false) "true" texCoordIndex CDATA #IMPLIED nodeType CDATA #FIXED "IndexedFaceSet" DEF ID #IMPLIED USE IDREF #IMPLIED > <!ELEMENT NewIndexedLineSetExample ((fieldValue)*, ((color, coord?) | (coord, color?))?)> <!ATTLIST NewIndexedLineSetExample colorIndex CDATA #IMPLIED colorPerVertex (true | false) "true" coordIndex CDATA #IMPLIED nodeType CDATA #FIXED "IndexedLineSet" DEF ID #IMPLIED USE IDREF #IMPLIED > <!ELEMENT NewInlineExample (fieldValue)*> <!ATTLIST NewInlineExample url CDATA #IMPLIED bboxCenter CDATA "0 0 0" bboxSize CDATA "-1 -1 -1" nodeType CDATA #FIXED "Inline" DEF ID #IMPLIED USE IDREF #IMPLIED > <!ELEMENT NewLODExample ((fieldValue)*, (level)?)> <!ATTLIST NewLODExample center CDATA "0 0 0" range CDATA #IMPLIED nodeType CDATA #FIXED "LOD" DEF ID #IMPLIED USE IDREF #IMPLIED > <!ELEMENT NewMaterialExample (fieldValue)*> <!ATTLIST NewMaterialExample ambientIntensity CDATA "0.2" diffuseColor CDATA "0.8 0.8 0.8" emissiveColor CDATA "0 0 0" shininess CDATA "0.2" specularColor CDATA "0 0 0" transparency CDATA "0" nodeType CDATA #FIXED "Material" DEF ID #IMPLIED USE IDREF #IMPLIED > <!ELEMENT NewMovieTextureExample (fieldValue)*> <!ATTLIST NewMovieTextureExample loop (true | false) "true" speed CDATA "1.0" startTime CDATA "0" stopTime CDATA "0" url CDATA #IMPLIED repeatS (true | false) "true" repeatT (true | false) "true" duration CDATA "0.0" isActive (true | false) "false" nodeType CDATA #FIXED "MovieTexture" DEF ID #IMPLIED USE IDREF #IMPLIED > <!ELEMENT NewNavigationInfoExample (fieldValue)*> <!ATTLIST NewNavigationInfoExample avatarSize CDATA "0.25 1.6 0.75" headlight (true | false) "true" speed CDATA "1" type CDATA #IMPLIED visibilityLimit CDATA "0" bind (true | false) "false" bindTime CDATA "-1" isBound (true | false) "false" nodeType CDATA #FIXED "NavigationInfo" DEF ID #IMPLIED USE IDREF #IMPLIED > <!ELEMENT NewNormalExample (fieldValue)*> <!ATTLIST NewNormalExample vector CDATA #IMPLIED nodeType CDATA #FIXED "Normal" DEF ID #IMPLIED USE IDREF #IMPLIED > <!ELEMENT NewNormalInterpolatorExample (fieldValue)*> <!ATTLIST NewNormalInterpolatorExample fraction CDATA "0" key CDATA #IMPLIED keyValue CDATA #IMPLIED value CDATA "0 0 0" nodeType CDATA #FIXED "NormalInterpolator" DEF ID #IMPLIED USE IDREF #IMPLIED > <!ELEMENT NewOrientationInterpolatorExample (fieldValue)*> <!ATTLIST NewOrientationInterpolatorExample fraction CDATA "0" key CDATA #IMPLIED keyValue CDATA #IMPLIED value CDATA "0 0 1 0" nodeType CDATA #FIXED "OrientationInterpolator" DEF ID #IMPLIED USE IDREF #IMPLIED > <!ELEMENT NewPixelTextureExample (fieldValue)*> <!ATTLIST NewPixelTextureExample image CDATA "0 0 0" repeatS (true | false) "true" repeatT (true | false) "true" nodeType CDATA #FIXED "PixelTexture" DEF ID #IMPLIED USE IDREF #IMPLIED > <!ELEMENT NewPlaneSensorExample (fieldValue)*> <!ATTLIST NewPlaneSensorExample autoOffset (true | false) "true" enabled (true | false) "true" maxPosition CDATA "-1 -1" minPosition CDATA "0 0" offset CDATA "0 0 0" isActive (true | false) "false" trackPoint CDATA "0 0 0" translation CDATA "0 0 0" nodeType CDATA #FIXED "PlaneSensor" DEF ID #IMPLIED USE IDREF #IMPLIED > <!ELEMENT NewPointLightExample (fieldValue)*> <!ATTLIST NewPointLightExample ambientIntensity CDATA "0" attenuation CDATA "1 0 0" color CDATA "1 1 1" intensity CDATA "1" location CDATA "0 0 0" on (true | false) "true" radius CDATA "100" nodeType CDATA #FIXED "PointLight" DEF ID #IMPLIED USE IDREF #IMPLIED > <!ELEMENT NewPointSetExample ((fieldValue)*, ((color, coord?) | (coord, color?))?)> <!ATTLIST NewPointSetExample nodeType CDATA #FIXED "Group" DEF ID #IMPLIED USE IDREF #IMPLIED > <!ELEMENT NewPositionInterpolatorExample (fieldValue)*> <!ATTLIST NewPositionInterpolatorExample fraction CDATA "0" key CDATA #IMPLIED keyValue CDATA #IMPLIED value CDATA "0 0 0" nodeType CDATA #FIXED "PointSet" DEF ID #IMPLIED USE IDREF #IMPLIED > <!ELEMENT NewProximitySensorExample (fieldValue)*> <!ATTLIST NewProximitySensorExample center CDATA "0 0 0" size CDATA "0 0 0" enabled (true | false) "true" isActive (true | false) "false" position CDATA "0 0 0" orientation CDATA "0 0 1 0" enterTime CDATA "0" exitTime CDATA "0" nodeType CDATA #FIXED "ProximitySensor" DEF ID #IMPLIED USE IDREF #IMPLIED > <!ELEMENT NewScalarInterpolatorExample (fieldValue)*> <!ATTLIST NewScalarInterpolatorExample fraction CDATA "0" key CDATA #IMPLIED keyValue CDATA #IMPLIED value CDATA "0" nodeType CDATA #FIXED "ScalarInterpolator" DEF ID #IMPLIED USE IDREF #IMPLIED > <!ELEMENT NewScriptExample (field)*> <!ATTLIST NewScriptExample url CDATA #IMPLIED directOutput (true | false) "false" mustEvaluate (true | false) "false" nodeType CDATA #FIXED "Script" DEF ID #IMPLIED USE IDREF #IMPLIED > <!ELEMENT NewShapeExample ((fieldValue)*, ((appearance, geometry?) | (geometry, appearance?)?))> <!ATTLIST NewShapeExample nodeType CDATA #FIXED "Shape" DEF ID #IMPLIED USE IDREF #IMPLIED > <!ELEMENT NewSoundExample (source)?> <!ATTLIST NewSoundExample direction CDATA "0 0 1" intensity CDATA "1" location CDATA "0 0 0" maxBack CDATA "10" maxFront CDATA "10" minBack CDATA "1" minFront CDATA "1" priority CDATA "0" spatialize (true | false) "true" nodeType CDATA #FIXED "Sound" DEF ID #IMPLIED USE IDREF #IMPLIED > <!ELEMENT NewSphereExample (fieldValue)*> <!ATTLIST NewSphereExample radius CDATA "1" nodeType CDATA #FIXED "Sphere" DEF ID #IMPLIED USE IDREF #IMPLIED > <!ELEMENT NewSphereSensorExample (fieldValue)*> <!ATTLIST NewSphereSensorExample autoOffset (true | false) "true" enabled (true | false) "true" offset CDATA "0 1 0 0" isActive (true | false) "false" rotation CDATA "0 1 0 0" trackPoint CDATA "0 0 0" nodeType CDATA #FIXED "SphereSensor" DEF ID #IMPLIED USE IDREF #IMPLIED > <!ELEMENT NewSpotLightExample (fieldValue)*> <!ATTLIST NewSpotLightExample ambientIntensity CDATA "0" attenuation CDATA "1 0 0" beamWidth CDATA "1.570796" color CDATA "1 1 1" cutOffAngle CDATA ".785398" direction CDATA "0 0 -1" intensity CDATA "1" location CDATA "0 0 0" on (true | false) "true" radius CDATA "100" nodeType CDATA #FIXED "SpotLight" DEF ID #IMPLIED USE IDREF #IMPLIED > <!ELEMENT NewSwitchExample ((fieldValue)*, (choice)?)> <!ATTLIST NewSwitchExample whichChoice CDATA "-1" nodeType CDATA #FIXED "SpotLight" DEF ID #IMPLIED USE IDREF #IMPLIED > <!ELEMENT NewTextExample (fontStyle)?> <!ATTLIST NewTextExample string CDATA #IMPLIED length CDATA #IMPLIED maxExtent CDATA "0.0" nodeType CDATA #FIXED "Text" DEF ID #IMPLIED USE IDREF #IMPLIED > <!ELEMENT NewTextureCoordinateExample (fieldValue)*> <!ATTLIST NewTextureCoordinateExample point CDATA #IMPLIED nodeType CDATA #FIXED "Group" DEF ID #IMPLIED USE IDREF #IMPLIED > <!ELEMENT NewTextureTransformExample (fieldValue)*> <!ATTLIST NewTextureTransformExample center CDATA "0 0" rotation CDATA "0" scale CDATA "1 1" translation CDATA "0 0" nodeType CDATA #FIXED "TextureCoordinate" DEF ID #IMPLIED USE IDREF #IMPLIED > <!ELEMENT NewTimeSensorExample (fieldValue)*> <!ATTLIST NewTimeSensorExample cycleInterval CDATA "1.0" enabled (true | false) "true" loop (true | false) "false" startTime CDATA "0" stopTime CDATA "0" cycleTime CDATA "0" fraction CDATA "0" isActive (true | false) "false" time CDATA "0" nodeType CDATA #FIXED "TimeSensor" DEF ID #IMPLIED USE IDREF #IMPLIED > <!ELEMENT NewTouchSensorExample (fieldValue)*> <!ATTLIST NewTouchSensorExample enabled (true | false) "true" hitNormal CDATA "0 0 1" hitPoint CDATA "0 0 0" hitTexCoord CDATA "0 0" isActive (true | false) "false" isOver (true | false) "false" touchTime CDATA "0" nodeType CDATA #FIXED "TouchSensor" DEF ID #IMPLIED USE IDREF #IMPLIED > <!ELEMENT NewTransformExample ((fieldValue)*, (children)?)> <!ATTLIST NewTransformExample center CDATA "0 0 0" rotation CDATA "0 0 1 0" scale CDATA "1 1 1" scaleOrientation CDATA "0 0 1 0" translation CDATA "0 0 0" bboxCenter CDATA "0 0 0" bboxSize CDATA "-1 -1 -1" containerField NMTOKEN "children" DEF ID #IMPLIED USE IDREF #IMPLIED > <!ELEMENT NewViewpointExample (fieldValue)*> <!ATTLIST NewViewpointExample fieldOfView CDATA "0.7854" jump (true | false) "true" orientation CDATA "0 0 1 0" position CDATA "0 0 10" description CDATA #IMPLIED bind (true | false) "false" bindTime CDATA "-1" isBound (true | false) "false" examine CDATA "0 0 0" nodeType CDATA #FIXED "Viewpoint" DEF ID #IMPLIED USE IDREF #IMPLIED > <!-- examine attribute (i.e. point of rotation) is a proposed addition, although maybe belongs in NavigationInfo instead... --> <!ELEMENT NewVisibilitySensorExample (fieldValue)*> <!ATTLIST NewVisibilitySensorExample center CDATA "0 0 0" enabled (true | false) "true" size CDATA "0 0 0" enterTime CDATA "0.0" exitTime CDATA "0.0" isActive (true | false) "false" nodeType CDATA #FIXED "VisibilitySensor" DEF ID #IMPLIED USE IDREF #IMPLIED > <!ELEMENT NewWorldInfoExample (fieldValue)*> <!ATTLIST NewWorldInfoExample info CDATA #IMPLIED title CDATA #IMPLIED nodeType CDATA #FIXED "WorldInfo" DEF ID #IMPLIED USE IDREF #IMPLIED > <!-- ********************************************************************* --> <!-- *** Step 4: Copy ]> terminator to close the internal subset. *** --> <!-- *** Also copy X3D, Header and Scene tag pairs if needed. *** --> <!-- ********************************************************************* --> ]> <X3D profile='Immersive' version='3.0' xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='http://www.web3d.org/specifications/x3d-3.0.xsd'> <head> <meta content='ProtoTagDtdDeclarationExamples.x3d' name='title'/> <meta content='17 April 2000' name='created'/> <meta content='27 November 2015' name='modified'/> <meta content='Don Brutzman' name='creator'/> <meta content='brutzman@nps.navy.mil' name='e-mail'/> <meta content='Provides Prototype XML-tag-definition examples to demonstrate DTD modularization and extensibility in X3D scenes. Also see SpinGroupInternalSubsetDeclaration.x3d' name='description'/> <meta content='You must view full source of the DTD declarations (ProtoTagDtdDeclarationExamples.x3d.txt) to fully understand validation techniques in this file.' name='warning'/> <meta content='internal subset deficiency: nodeType attributes need to be converted to containerField attributes.' name='error'/> <meta content='ProtoTagDtdDeclarationExamples.x3d.txt' name='reference'/> <meta content='SpinGroupInternalSubsetDeclaration.x3d.txt' name='reference'/> <meta content='http://www.web3d.org/x3d/content/examples/Basic/development/ProtoTagDtdDeclarationExamples.x3d' name='identifier'/> <meta content='X3D-Edit 3.1, http://www.web3d.org/x3d/content/README.X3D-Edit.html' name='generator'/> <meta content='../license.html' name='license'/> </head> <Scene> <!-- ********************************************************************* --> <!-- *** Step 5: Copy/edit ProtoDeclare, (optionally ProtoInstance) *** --> <!-- *** and the tagset version for your nodes of interest. *** --> <!-- *** When instantiating field Node/Nodes or field values, *** --> <!-- *** use fieldValue tags to override the initial values. *** --> <!-- *** The following example content instantiates prototype *** --> <!-- *** NewTransformExample using tags and ProtoInstance. *** --> <!-- ********************************************************************* --> <!-- Declaring the NewTransformExample PROTO: --> <ProtoDeclare name='NewTransformExample'> <ProtoInterface> <field accessType='inputOutput' name='translation' type='SFVec3f' value='0 0 0'/> <field accessType='inputOutput' name='rotation' type='SFRotation' value='0 0 1 0'/> <field accessType='inputOutput' name='center' type='SFVec3f' value='0 0 0'/> <field accessType='inputOutput' name='scale' type='SFVec3f' value='1 1 1'/> <field accessType='inputOutput' name='scaleOrientation' type='SFRotation' value='0 0 1 0'/> <field accessType='initializeOnly' name='bboxCenter' type='SFVec3f' value='0 0 0'/> <field accessType='initializeOnly' name='bboxSize' type='SFVec3f' value='-1 -1 -1'/> <field accessType='inputOutput' name='children' type='MFNode'> <WorldInfo info='"overridden at run time"'/> </field> </ProtoInterface> <ProtoBody> <!-- Transform is first node, which determines node type, and encloses children for instances. --> <Transform DEF='InitialTransform'> <IS> <connect nodeField='translation' protoField='translation'/> <connect nodeField='rotation' protoField='rotation'/> <connect nodeField='center' protoField='center'/> <connect nodeField='scale' protoField='scale'/> <connect nodeField='scaleOrientation' protoField='scaleOrientation'/> <connect nodeField='bboxCenter' protoField='bboxCenter'/> <connect nodeField='bboxSize' protoField='bboxSize'/> <connect nodeField='children' protoField='children'/> </IS> </Transform> </ProtoBody> </ProtoDeclare> <!-- Instantiating the NewTransformExample PROTO using a ProtoInstance tag: --> <ProtoInstance name='NewTransformExample'> <fieldValue name='translation' value='0 1.5 0'/> <fieldValue name='children'> <Shape> <Appearance> <Material diffuseColor='0.1 0.8 0.8'/> </Appearance> <Text string='"ProtoTagDtdDeclaration Examples" "using a regular ProtoInstance"'> <FontStyle DEF='FS' justify='"MIDDLE" "MIDDLE"' size='0.7'/> </Text> </Shape> </fieldValue> </ProtoInstance> <!-- Instantiating the NewTransformExample PROTO using a customized tag: --> <NewTransformExample center='0 0 0' rotation='0 0 1 0' scaleOrientation='0 0 1 0' translation='0 -0.5 0'> <fieldValue name='children'> <Shape> <Appearance> <Material diffuseColor='0.1 0.8 0.2'/> </Appearance> <Text string='"plus header-declared XML tag from" "XML document subset declaration"'> <FontStyle USE='FS'/> </Text> </Shape> </fieldValue> </NewTransformExample> <Transform translation='0 -2 0'> <Anchor description='Click to view source (ProtoTagDtdDeclarationExamples.x3d.txt)' parameter='"target=_blank"' url='"ProtoTagDtdDeclarationExamples.x3d.txt" "http://www.web3d.org/x3d/content/examples/development/ProtoTagDtdDeclarationExamples.x3d.txt"'> <Shape> <Appearance> <Material diffuseColor='0.8 0.4 0.1'/> </Appearance> <Text string='"(click to see source)"'> <FontStyle USE='FS'/> </Text> </Shape> </Anchor> </Transform> </Scene> </X3D>