[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Erste korrigierte DTD



Hallo,
hier kommt eine DTD, die ein erstes Parsen ueberlebt hat.
Schoenen Gruss

<!-- dritte noch unvollstaendige DTD-Version -->



<!ENTITY % Boolean 	"(true|false|0|1)">     <!-- Boolean    -->
<!ENTITY % UByte 	"CDATA"> <!-- unsigned number between 0 and 255 -->
<!ENTITY % Float  	"CDATA"> <!-- Float -->
<!ENTITY % Float01      "CDATA"> <!-- Float between 0 and 1 -->
<!ENTITY % UFloat	"CDATA"> <!-- unsigned Float -->
<!ENTITY % Float0Pi	"CDATA"> <!-- Float between 0 and 3.14159 -->
<!ENTITY % UInt         "CDATA"> <!-- unsigned integer -->


<!ELEMENT Scene (WorldInfo?, Background, Group+)> <!-- root-tag -->
<!ATTLIST Scene
	ambientLight   %Float01;    "0.1">  <!-- "Scenelight" -->

<!ELEMENT WorldInfo EMPTY> <!-- contains title and informations about the scene -->
<!ATTLIST WorldInfo
	title  CDATA  #IMPLIED
        info   CDATA  #IMPLIED>

<!ELEMENT Background (color?)>   <!-- color for a simple background-->
                               <!-- This element can be extented. -->

<!ELEMENT Group (Group|Shape|Transform|Viewpoint|DirectionalLight|Spotlight|PointLight)*>
<!ATTLIST Group
	DEF    ID      #IMPLIED
        USE    IDREF   #IMPLIED>


<!ELEMENT Shape (Material?, Geometry+)+ >
<!ATTLIST Shape
	DEF    ID      #IMPLIED
        USE    IDREF   #IMPLIED>


<!ELEMENT Geometry (Sphere|PointSet|IndexedLineSet|IndexedFaceSet)>


<!ELEMENT Color (color*)>     <!-- vector of RGB-Colors -->
<!ELEMENT color EMPTY>	      <!-- one RGB-Color --> 	
<!ATTLIST color
        r    %UByte;   #REQUIRED
	g    %UByte;   #REQUIRED
	b    %UByte;   #REQUIRED
	DEF    ID      #IMPLIED
        USE    IDREF   #IMPLIED> <!-- RGB-Color-Values between 0 and 255 -->


<!ELEMENT Coordinate (point*)> <!-- Vector of 3D-Coordinates of floats -->
<!ELEMENT point EMPTY>         <!-- one coordinate of floats -->
<!ATTLIST point
        x  %Float;   #REQUIRED
        y  %Float;   #REQUIRED
        z  %Float;   #REQUIRED>


<!ELEMENT Material (diffuseColor?, specularColor?)>
<!ATTLIST Material
	ambientIntensity %Float01; "0.2"
        DEF    ID      #IMPLIED
        USE    IDREF   #IMPLIED>

<!ELEMENT diffuseColor EMPTY>  <!--diffuseColor includes coefficient of diffuse reflection -->
<!ATTLIST diffuseColor
        r   %UByte;  "204"
	g   %UByte;  "204"
        b   %UByte;  "204">

<!ELEMENT specularColor EMPTY> <!-- specularColor includes coefficient of specular reflection -->
			       <!-- ,shininess and wave angle --> 		
<!ATTLIST specularColor
 	r   %UByte;  "255"
	g   %UByte;  "255"
        b   %UByte;  "255">

<!ELEMENT Normal (normal*)> <!-- Vector of 3D-normals of floats -->
<!ELEMENT normal EMPTY>         <!-- one normal of floats -->
<!ATTLIST normal
        x  %Float;   #REQUIRED
        y  %Float;   #REQUIRED
        z  %Float;   #REQUIRED>


<!ELEMENT PointSet (Color?, Coordinate)>   <!-- a set of 3D points with color and size -->
<!ATTLIST PointSet
	pointsize   %UInt;   "1">

<!ELEMENT CoordIndex (polyline*)>   <!-- Vector of polylines -->

<!ELEMENT polyline (#PCDATA)>       <!-- polyline defined by pointindices -->
                                    <!-- for example: 0 2 1 6 -->

<!ELEMENT IndexedLineSet (Color?, Coordinate, CoordIndex)>   <!-- 3D geometry formed by polylines -->
<!ATTLIST IndexedLineSet
        linesize %UInt; "1"
	DEF    ID     #IMPLIED
        USE    IDREF  #IMPLIED>


<!ELEMENT IndexedFaceSet (Color?, Coordinate, CoordIndex, Normal?)>  <!-- 3D shape formed by polylines -->
                                                      <!-- coordinates orientated against counterclockwise -->
<!ATTLIST IndexedFaceSet
	 DEF    ID     #IMPLIED
         USE    IDREF  #IMPLIED>

<!ELEMENT Sphere EMPTY>                     <!-- defaulted coordinates of the center: (0|0|0) -->
<!ATTLIST Sphere
	radius 		%UFloat; "1"
	longitude 	%UInt;   #IMPLIED
	latitude 	%UInt; 	 #IMPLIED
  	DEF    		ID       #IMPLIED
        USE    		IDREF    #IMPLIED>
				
<!ELEMENT Viewpoint (Position, Orientation, Description?)>
<!ATTLIST Viewpoint
         fieldOfView  %Float0Pi;  "0.785398">  <!-- angle between [0;3.14159] -->

<!ELEMENT Description (#PCDATA)> <!-- gives a name to the viewpoint/camera -->

<!ELEMENT Position EMPTY> <!--in default-position and orientation the viewer is on the -->
			  <!-- Z-axis looking down the -Z-axis -->	
<!ATTLIST Position
        x  %Float;   "0"
        y  %Float;   "0"
        z  %Float;   "10">

<!ELEMENT Transformgroup (Transform+,Group+)>
<!ATTLIST Transformgroup
	DEF    ID      #IMPLIED
        USE    IDREF   #IMPLIED>

<!ELEMENT Transform (Rotation|Scale|Translation|ScaleOrientation)?>

<!ELEMENT Orientation EMPTY>   <!--orientation specifies a rotation of the camera -->
<!ATTLIST Orientation
        x  %Float;   "0"
        y  %Float;   "0"
        z  %Float;   "1"
	rad  %Float; "0">

<!ELEMENT Rotation EMPTY>    <!-- (0,0,0) and (x,y,z) define the axis, rad is a radian of the rotation -->
<!ATTLIST Rotation
	x  %Float;	#REQUIRED			
        y  %Float;	#REQUIRED
	z  %Float;	#REQUIRED
	rad  %Float;	#REQUIRED>

<!ELEMENT Scale EMPTY>
<!ATTLIST Scale
        x  %UFloat;   #REQUIRED
        y  %UFloat;   #REQUIRED
        z  %UFloat;   #REQUIRED>

<!ELEMENT Translation EMPTY>
<!ATTLIST Translation
        x  %Float;   #REQUIRED
        y  %Float;   #REQUIRED
        z  %Float;   #REQUIRED>

<!ELEMENT ScaleOrientation EMPTY>     <!-- shear:specifies scales in arbitrary orientation>-->
 <!ATTLIST ScaleOrientation
	x  %Float;	#REQUIRED			
        y  %Float;	#REQUIRED
	z  %Float;	#REQUIRED
	rad  %Float;	#REQUIRED>


<!ELEMENT DirectionalLight (lightColor?, Direction)>
<!ATTLIST DirectionalLight
	ambientIntensity  %Float01;  "0.0"
        intensity         %Float01;  "1">

<!ELEMENT PointLight (point, Attenuation?, lightColor?)>
<!ATTLIST PointLight
	ambientIntensity %Float01;  "0.0"
	intensity        %Float01;  "1"
	radius           %UFloat;   "100">
         <!-- radius: maximum distance from location that may be illuminated by the light source -->

<!ELEMENT SpotLight (point, Attenuation?, lightColor?, Direction)>
<!ATTLIST SpotLight
	ambientIntensity %Float01;  "0.0"
	beamWidth        %Float0Pi; "1.570796"
	cutOffAngle      %Float0Pi; "0.785398"
	intensity        %Float01;  "1"
	radius           %UFloat;   "100">
		<!-- radius: maximum distance from location that may be illuminated by the light source -->
		<!-- beamWidth specifies the inner solid angle -->
                <!-- cutOffAngle specifies the outer bound of the solid angle -->

<!ELEMENT Attenuation EMPTY>
<!ATTLIST Attenuation
        a   %UFloat;   "1"
        b   %UFloat;   "0"
	c   %UFloat;   "0">

<!ELEMENT lightColor EMPTY>
<!ATTLIST lightColor
        r   %UByte;  "255"
	g   %UByte;  "255"
        b   %UByte;  "255">

<!ELEMENT Direction EMPTY>
<!ATTLIST Direction
        x   %Float;   #REQUIRED
        y   %Float;   #REQUIRED
        z   %Float;   #REQUIRED>