Presentation on theme: "Validation of a CGM Graphic Against the Web CGM Profile Stuart Galt The Boeing Company."— Presentation transcript:
Validation of a CGM Graphic Against the Web CGM Profile Stuart Galt The Boeing Company
Agenda What is the WebCGM profile The process Hard parts
WebCGM CGM (ISO 8632) vector and composite vector/raster graphic format. WebCGM is a profile used to specify the subset of the CGM standard that will be used to exchange data on the web.
WebCGM History ISO approved CGM as a Standard CGM became a registered mime type W3C published Scalable Graphics Requirements W3C published Use of CGM as a Scalable Graphic Format WebCGM 1.0 approved in January
WebCGM is intelligent Contains graphic primitives –Lines, polylines, polygons –Rectangles, circles, ellipses, arcs –Graphical text Non graphical content –Metadata –Hierarchies objects –Links
CGM to XML CGM graphic primitives are converted directly Containers are used to represent internal state changes
CGM primitives Circle centered (4252, 2385) radius 150 Binary CGM c XML
CGM primitives (contd) Restricted Text NOTE:
CGM primitives (contd) Polygon
CGM States Container elements used to mark state changes –Metafile defaults …defaults go here …
CGM States (contd) –Picture Descriptor and Picture Open State Picture Description …Picture descriptor data here… …Picture data here…
Computer Graphics Metafile BegMF Picture EndMF Picture BegPic Picture Body EndPic Picture Body BegPicBody Metafile Descriptor Picture Descriptor Picture Open CGMStates
Validating WebCGM Current state: –Profile validation tool exists for WebCGM in binary encoding Metacheck –With a WebCGM schema defined General purpose tools would be available
The Schema Some elements are easy to represent Some are hard
Metafile Version ...other required elements go here...
Non Graphical Text String
The Hard Some elements are restricted (or required based on the value of the metafile version –If version == 3 then a RestrictedTextType element must appear before the first RestrictedText element –If ColorSelectionMode is indexed color is index value, else color is RGB values
The Hard Part Branching logic –If (condition a) then foo else bar
Conclusion Creation of a schema that enforces WebCGM profile allows simple XML schema validator to validate conformance of CGM graphics. This approach could also be used to simplify validation of other binary structured formats.
Whats Ahead Complete mapping CGM binary to XML Finish WebCGM schema Work to continue in CGM Open Consortium: