[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
DTD und erste TEST-xml vom 27.07.00
Hallo!
Nun ist eine erste fast vollstaendige DTD fertig, zu der wir bereits
eine erste TEST-xml-Datei geschrieben haben.
Viele Gruesse.
<-- 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 % 01Float "CDATA"> <!-- Float between 0 and 1 -->
<!ENTITY % UFloat "CDATA"> <!-- unsigned Float -->
<!ENTITY % 0PiFloat "CDATA"> <!-- Float between 0 and 3.14159 -->
<!ENTITY % UInt "CDATA"> <!-- unsigned integer -->
<!ELEMENT Scene (WorldInfo?, AmbientLight?, Background, Group+)>
<!ELEMENT WorldInfo EMPTY> <!-- contains title and informations about the scene -->
<!ATTLIST WorldInfo
title CDATA
info CDATA>
<!ELEMENT AmbientLight(lightcolor?)>
<!ATTLIST AmbientLight
intensity %01Float; "0.1">
<!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 %01Float; "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 %Int; "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 %Int; "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 Viewpoint (Position, Orientation, Description?)>
<!ATTLIST Viewpoint
fieldOfView %0PiFloat; "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 %01Float; "0.0"
intensity %01Float; "1">
<!ELEMENT PointLight (point, Attenuation?, lightColor?)>
<!ATTLIST PointLight
ambientIntensity %01Float; "0.0"
intensity %01Float; "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 %01Float; "0.0"
beamWidth %0PiFloat; "1.570796"
cutOffAngle %0PiFloat; "0.785398"
intensity %01Float; "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>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE DTD4 SYSTEM "DTD4.txt">
<Scene>
<Background> <color r="255" g="0" b="0"/> </Background>
<Group>
<IndexedFaceSet>
<Coordinate>
<point x="1" y="1" z="0"/>
<point x="1" y="0" z="0"/>
<point x="0" y="1" z="0"/>
<point x="0" y="0" z="0"/>
</Coordinate>
<CoordIndex>
<polyline> 0 1 3 2 </polyline>
</CoordIndex>
</IndexedFaceSet>
</Group>
</Scene>