validation of a cgm graphic against the web cgm profile stuart galt the boeing company
Embed Size (px)
TRANSCRIPT
- Slide 1
Validation of a CGM Graphic Against the Web CGM Profile Stuart Galt The Boeing Company Slide 2 Agenda What is the WebCGM profile The process Hard parts Slide 3 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. Slide 4 WebCGM History 1987 - ISO approved CGM as a Standard 1995 - CGM became a registered mime type 1996 - W3C published Scalable Graphics Requirements 1997 - W3C published Use of CGM as a Scalable Graphic Format 1999 - WebCGM 1.0 approved in January Slide 5 WebCGM is intelligent Contains graphic primitives Lines, polylines, polygons Rectangles, circles, ellipses, arcs Graphical text Non graphical content Metadata Hierarchies objects Links Slide 6 The Process Slide 7 CGM to XML CGM graphic primitives are converted directly Containers are used to represent internal state changes Slide 8 CGM primitives Circle centered (4252, 2385) radius 150 Binary CGM 41 86 10 9c 09 51 00 96 XML Slide 9 CGM primitives (contd) Restricted Text NOTE: Slide 10 CGM primitives (contd) Polygon Slide 11 CGM States Container elements used to mark state changes Metafile defaults defaults go here Slide 12 CGM States (contd) Picture Descriptor and Picture Open State Picture Description Picture descriptor data here Picture data here Slide 13 Computer Graphics Metafile BegMF Picture EndMF Picture BegPic Picture Body EndPic Picture Body BegPicBody Metafile Descriptor Picture Descriptor Picture Open CGMStates Slide 14 Metafile Decsriptor MFVersion MFDescVDCType FontList IntegerPrec CharSetList RealPrec CharCoding IndexPrec NamePrec ColrPrec MaxVDCExt ColrIndexPrecMaxColrIndexColrValueExtMFElemlist SetPriExtColrModel ColrCalibFontProp GlyphMapSymLibList opt rep MetafileDescriptor Slide 15 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 Slide 16 The Schema Some elements are easy to represent Some are hard Slide 17 Metafile Version ...other required elements go here... Slide 18 Non Graphical Text String Slide 19 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 Slide 20 The Hard Part Branching logic If (condition a) then foo else bar Slide 21 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. Slide 22 Whats Ahead Complete mapping CGM binary to XML Finish WebCGM schema Work to continue in CGM Open Consortium: http://www.cgmopen.org