Please refer to theerratafor this document, which may include some normative corrections.
This document is also available in these non-normative formats:zipfile andsingleHTML file.
See alsotranslations.
Copyright ©2010W3C® (MIT,ERCIM,Keio), All Rights Reserved. W3Cliability,trademarkanddocumentuse rules apply.
Computer Graphics Metafile (CGM) is an ISO standard, defined by ISO/IEC8632:1999, for the interchange of 2D vector and mixed vector/raster graphics.WebCGM is a profile of CGM, which adds Web linking and is optimized for Webapplications in technical illustration, electronic documentation, geophysicaldata visualization, and similar fields. First published (1.0) in 1999, WebCGMunifies potentially diverse approaches to CGM utilization in Web documentapplications. It therefore represents a significant interoperability agreementamongst major users and implementers of the ISO CGM standard.
The design criteria for WebCGM aim to balance graphical expressive power onthe one hand, versus simplicity and implementability on the other. A small butpowerful set of standardized metadata elements supports the functionalities ofhyperlinking and document navigation, picture structuring and layering, andenabling search and query of WebCGM picture content.
The present version, WebCGM 2.1, refines and completes the features of themajor WebCGM 2.0 release. WebCGM 2.0 added a DOM (API) specification forprogrammatic access to WebCGM objects, a specification of an XML Companion File(XCF) architecture, and extended the graphical and intelligent content ofWebCGM 1.0.
This section describes the status of this document at the time of itspublication. Other documents may supersede this document. A list of current W3Cpublications and the latest revision of this technical report can be found intheW3C technical reports index athttp://www.w3.org/TR/.
This is theRecommendationof the WebCGM 2.1. This document is a product of theWebCGM Working Group as partof theGraphics Activity.
This specification was produced jointly byOASIS andW3C and published on 01 March 2010 by bothorganizations. It is published simultaneously as anOASIS Standard and a W3CRecommendation.The two documents have identical normative technical content, with only coverpage, editorial and formatting differences as appropriate to the twoorganizations.
Known implementations are documented in the publicWebCGM 2.1 implementation report. A test suite isalso available via theWebCGM2.1 Test Suite page.
This WebCGM 2.1 edition incorporates all known errata as of the publicationdate. The list of changes made since the Proposed Recommendation is availableinAppendixD1.
Please report errors in this document to the public email listpublic-webcgm@w3.org(publicarchive). Use "[REC Comment]" in the subject line of your email.
The original Recommendation document (dated 01 March 2010) was updated on 24august 2010. Wrong links in the following Table of Content and in the abovenon-normative formats (zip file andsingle HTML file) were corrected to relative links. Acopyof the original Recommendation cover page is archived.
WebCGM 2.1 is related to the previous W3C work on WebCGM 1.0 and 2.0.WebCGM 2.0 wassimultaneously published by W3C as a Recommendation and by OASIS as an OASISStandard. The two versions are identical in technical content, differing onlyin the formatting and presentation conventions of the two organizations.
This WebCGM 2.1 specification was initially based on a work by the samename,WebCGM2.1 an OASIS Committee Specification.
This document has been reviewed by W3C Members, by software developers, andby other W3C groups and interested parties, and is endorsed by the Director asa W3C Recommendation. It is a stable document and may be used as referencematerial or cited from another document. W3C's role in making theRecommendation is to draw attention to the specification and to promote itswidespread deployment. This enhances the functionality and interoperability ofthe Web.
This document was produced by a group operating under the5 February 2004 W3CPatent Policy. W3C maintains apublic list of any patentdisclosures made in connection with the deliverables of the group; thatpage also includes instructions for disclosing a patent. An individual who hasactual knowledge of a patent which the individual believes containsEssentialClaim(s) must disclose the information in accordance withsection6 of the W3C Patent Policy.
4.0WebCGM XMLCompanion File (XCF)
5.0WebCGM Document ObjectModel (DOM)
7.0Conformance
This chapter's sections are informative, unless otherwiseindicated.
This section is normative.
The key words words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT","SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" are to beinterpreted as described in[RFC2119].
This section is normative.
Available at the ISO page ofPublicly Available Standards. CGM:1999 was reaffirmed by ISO, without changes, at its 5-year review in 2004. The WebCGM profile is defined by reference to the ISO standard.
The scope of this WebCGMTM 2.1 specification includes thesecomponents.
WebCGM is a set of specifications targeted especially at the effectiveapplication of the ISO CGM:1999 standard to representation of 2D graphicalcontent within Web documents.
CGM has been an ISO standard since 1987, and CGM has been a registered mediatype (image/cgm) for the Internet and the World Wide Web since December 1995.WebCGM 1.0,comprising the original intelligent graphics profile of ISO CGM, was firstpublished in 1999, was re-released in 2001 with error corrections, and formedthe basis for the significant extensions of theWebCGM2.0 specification.
For much more information about WebCGM, please see theWebCGM FAQ,as well as other numerous other references and reading materials, on theOASIS CGM Open Web site.
The WebCGM profile is a conforming profile of ISO CGM under the stipulationsof CGM:1999 Clause 9, "Profiles and conformance", and it utilizes the ProfileProforma (PPF) of CGM:1999 Annex I.1, Proforma tables, for representation ofthe element-by-element content details.
The WebCGM profile is an "intelligent graphics" profile, which means that inaddition to graphical content based on CGM Versions 1-3, the profile includesnon-graphical content based on CGM Version 4, Application Structures. Thenon-graphical content allows the definition of hierarchies of applicationobjects, as well as the association of metadata, such as link specificationsand layer definitions, with the objects.
The originalWebCGM1.0 profile resulted from a collaboration between the CGM Open Consortiumand W3C Graphics Activity. The requirements that determined the contentselection for WebCGM 1.0 were derived from:
The selection criteria for the WebCGM profile include:
The requirements of the majorWebCGM2.0 release -- a set of additions, deletions, and modifications applied tothe 1.0 profile -- were shaped by:
The content of the WebCGM 2.1 profile comprises less than a dozen items thatwere arguably within the scope of WebCGM 2.0, but which arose too late in thestandardization of the latter. TheWebCGM 2.1Requirements document summarizes these requirements.
The WebCGM 2.1 intelligent graphics profile, like its predecessors WebCGM2.0 and WebCGM 1.0, is a profile of the ISO CGM:1999 standard, designed foreffective application of CGM in technical Web applications. WebCGM is not aimedat or optimized for any particular technical application sector, but isintended to satisfy general requirements shared by different but closelyrelated technical Web applications.
Following five years of deployment and application of WebCGM and othertechnical profiles (such as Air Transport Association's), some divergence beganto appear. WebCGM 2.0 represented a major effort towards convergence ofintelligent graphics profiles in closely related industries. In fact, startingwith version 2.0, it is the intention of the authors and publishers of WebCGMthat it be used as a basis for the definition of industry-specific profiles.CascadingProfiles describes the use of WebCGM as a core profile from which specificindustries derive and define their technical profiles.
CGM:1999 Clause 9, "Profiles and conformance", prescribes that profilesshall maintain revision control by using a standard "ProfileEd" keyword.Instances of a profile carry this edition information in their identificationsection. Prior releases of WebCGM include:
This specification is the first release of WebCGM 2.1 ("ProfileEd:2.1").There may be future releases of WebCGM 2.1, for maintenance and defectcorrection. There may be future higher editions and versions of WebCGM.
A summary of the substantive differences between WebCGM 2.1 and WebCGM 2.0may be found in the Appendix, "What's new in WebCGM 2.1".
WebCGM is written in these major sections:
Note aboutCGM examples. InChapter 5, defining the WebCGM DOM, there areexamples that end with text lines, "View this example as HTML-CGM(WebCGM-DOM-enabled browsers only.)" In document formats that supportexternal links (i.e., XHTML), each of these examples links to an XHTML snippetthat invokes WebCGM instances. To view them your browser must have a WebCGMviewer plug-in, control, or appropriate equivalent technology. To obtain such aviewer, see for example the (non-exhaustive)CGM products directoryon the OASIS/CGM Open Web site.
Copies of the ISO standards may be obtained from ISO:
ISO Central SecretariatFor the purpose of this Recommendation and according to the rules for thedesignation and operation of registration authorities in the ISO/IECDirectives, the ISO and IEC Councils have designated the following as theregistration authority:
Joint Interoperability Test Command
ATTN: JTF NITFS Registration Authority (ISO/IEC 9973)
P.O. Box 12798
Fort Huachuca, AZ 85670-2798
USA
For more information on WebCGM and the CGM:1999 standard itself, the CGMOpen Web site has a collection of bibliographic references and shortarticles:
These additional World Wide Web sites have more information on CGM:
This chapter is informative (non-normative).
A WebCGM is a Version 1, 2, 3, or 4 CGM as defined in ISO/IEC 8632:1999,with some restrictions. The restrictions improve the interoperability ofWebCGM, and simplify the production of WebCGM interpreter (viewer) tools.
A WebCGM 2.1 instance, as shown in Figure 1, consists of a singlePicture.
Properties which apply to the whole metafile are defined in the MetafileDescriptor. These include descriptive information about the metafile, theprecisions of numbers, as well as identifiers for fonts and such resources.Properties which apply to the elements in the body of the picture are containedin the Picture Descriptor. These include such information as picture size andscaling, specification modes for aspects such as line width, and backgroundcolor. Because WebCGM 2.1 allows only a single picture per metafile, thedistinction -- whole-metafile versus picture-specific -- may not seem useful.However, because a WebCGM 2.1 metafile must be a valid ISO CGM:1999 metafile,the ISO CGM:1999 metafile structure is observed.
The WebCGM picture contains CGM graphic elements, as well as (optionally)Application Structures. Application Structures define intelligent objectswithin the picture, which are comprised of groups of graphical primitives.These intelligent objects may contain attributes or properties. WebCGM definesseveral types of intelligent objects - "graphical object", "paragraph","layer", and "sub-paragraph" - as well as a few properties which each group mayhave.
![]() |
CGM supports both raster and vector graphics in the same picture. WebCGMpermits the use of popular raster compression methods — ITU-T Group 4,JPEG, and the deflate (LZ77 derivative) method of PNG — for rastercontent embedded within the picture.
For information about scaling of WebCGM pictures in Web documents, seesection"WebCGM and theobject
element".
This section presents an informative description of the normative drawingmodel of theISO CGM standard, aswell as registered extensions that have been incorporated into the WebCGMprofile.
Elements rendered first may be wholly or partially hidden by elementsrendered later. In theISO CGMstandard, the writing mode of primitives is "replacement mode" —content is rendered opaquely on top of previous content. To meet per-primitive(and per-pixel) transparency requirements, WebCGM includes aregistered extension for Alphatransparency, as well asregistered color modelsRGB-alpha and sRGB-alpha.
Implementations of WebCGM are expected to behave as though they implement adrawing model corresponding to the one described below. A real implementationis not required to implement the model in this way, but the result on anydevice supported by the implementation shall match that described by thismodel.
WebCGM uses a painters model of rendering. Colors are applied in successiveoperations to the output device. When an area overlaps a previously coloredarea the new color partially or completely obscures the old. When the color isnot completely opaque the result on the output device is defined by thefollowing (mathematical) rules for compositing (all color values usepremultiplied alpha):
Pr, Pg, Pb — Primitive color valuePa — Primitive alpha valueCr, Cg, Cb — Canvas color value (before blending)Ca — Canvas alpha value (before blending)Cr', Cg', Cb' — Canvas color value (after blending)Ca' — Canvas alpha value (after blending)Ca' = 1 - (1 - Pa) * (1 - Ca)Cr' = (1 - Pa) * Cr + PrCg' = (1 - Pa) * Cg + PgCb' = (1 - Pa) * Cb + Pb
Alpha compositing is performed in the current COLOUR MODEL (seeT.16.19).
Primitives in a WebCGM document have an implicit drawing order, with thefirst primitives in the WebCGM document getting drawn first. Subsequentprimitives are drawn on top of previously drawn primitives.
Primitives which have a value for theregistered Escape 45 other thanfully opaque, have the effect of producing a temporary separate canvasinitialized to transparent black onto which the primitive is drawn. The canvasis then composited into the background, taking into account the Escape 45value. The presence of APS in the primitive list has no effect on therendering. No temporary canvas is created. It is identical to the case of noAPS.
In the ISO CGM:1999 standard, a picture has an implicit or explicit opaquebackground. Graphic elements within the picture are rendered in the order theyappear in the metafile. It is a requirement of a 2D graphics format for Webdocuments that pictures may be overlaid on previous content. For this, it mustbe controllable whether the picture background is opaque or transparent (bothcases are needed), or "translucent" (partially opaque).
Conceptually, a CGM picture's background is handled as follows. When apicture's canvas is first created in the compositing model ofsection 2.2.2, it is initialized to transparent black(0,0,0,0). Before the drawing of the first foreground primitives, the canvas isthen filled per the equations in section 2.2.2 with theeffectivebackground color of the metafile.
In metafiles that use the RGB-alpha color model, the effective backgroundcolor may be directly set in the Picture Descriptor to any valid (r,g,b,a),including transparent black (0,0,0,0). In RGB metafiles, the same effects maybe achieved by including the registered Escape 45 (alpha transparency) elementin the Picture Descriptor, which is then combined with the defined RGBbackground color to achieve any valid (r,g,b,a) effective background color.
Within a WebCGM picture, groups of graphical primitives can be defined whichstructure graphics to meet the requirements of integration into Web documents.Groups in WebCGM are realized as standard Version 4 Application Structures(APS) of ISO CGM.
To meet the requirements of intelligent graphics, four specific group typesare defined and allowed in WebCGM: 'grobject', 'layer', 'para', and 'subpara'.WebCGM allows a fifth group type, 'grnode', as a convenience for authoringtools to preserve their graphical grouping functions. The detailed normativesyntax and semantics of the group types, including viewer behavior, is definedinChapter 3 and in thePPF. Below is a brief conceptual summary.
Every group has at least one explicit property, its unique identifier (aparameter of the Begin APS element). WebCGM groups other than 'grnode' may haveseveral explicit attributes associated with them. These attributes are realizedas standard Version 4 (V4) Application Structure Attribute elements (APSAttributes) of ISO CGM.
Chapter 3 normatively defines the detailed content model for version 4elements in WebCGM using EBNF notation. See section,"WebCGM Content Model", for aninformative (non-normative), all-at-once presentation of the content modelusing XML DTD notation.
WebCGM defines a set of allowable group (APS) types, to support the Webdocument operations of hyperlinking, layered pictures, and text search withingraphics. See Chapter 3 for thedetailed normative syntax andsemantics of the allowable group types. Brief conceptual descriptionsfollow (each item is linked to its Chapter 3 normative definition):
WebCGM does allow one other group type for the convenience of authoringtools:
Note that 'grnode' was not present in WebCGM 1.0, but was added to WebCGM2.0 to allow for better hierarchical structure in WebCGM documents. The'grnode' ("graphical node") APS allows illustration authoring tools to preservein the WebCGM metafile instance the graphical groupings that are often used bysuch tools.
WebCGM does not allow private group types in WebCGM instances. Externalprivate metadata can be associated, by id or by name, with all group (APS)types other than 'grnode' within a WebCGM. A standard external mechanism isdefined in theXML Companion Filesection.
Groups of types 'para', 'subpara', and 'grobject' may be used for pickingand navigation operations in hyperlinked Web documents. These three APS typesare called "objects" in WebCGM.
Objects may contain an explicit 'region' APS Attribute, which provides theboundary for picking operations. This is known as theoverlay model ofobject identification (for picking, mouseover screentip display, etc). It isuseful in cases where the picking region of an object can not be defined byexisting geometry, for example on line art drawings or raster content.
Objects which contain graphical content have an implicit property: theboundary or bounding extent of the enclosed graphical object. This extent isused for picking and navigation operations in hyperlinked Web documents, in theabsence of a 'region' attribute. Use of this implicit boundary property forpicking and navigation operations in Version 4 CGM instances is referred to astheembedded model.
Objects may also be the target of a link. Viewers will generally move theAPS into view and scale them to fit into the viewer's rectangle. The exactviewer behavior is controlled by a set ofobject behavior keywordsassociated with the link, and the presence or absence of certainAPS Attributes on the object('viewcontext', 'region', etc.)
Explicit properties or attributes of WebCGM groups are encoded as APSAttribute elements. Each APS Attribute has a "type" parameter, which identifiesthe attribute. See Chapter 3 for thedetailed normative syntax andsemantics of the allowable APS Attributes. Brief conceptual descriptionsfollow (each item is linked to its Chapter 3 normative definition):
WebCGM does not allow private attribute types in WebCGM instances. Externalprivate metadata, including attributes as well as elements, can be associatedby id or by name with all group (APS) types other than 'grnode' within aWebCGM. A standard external metadata binding mechanism is defined in theXML Companion File chapter .
The detailed normative syntax and semantics are presented later(Chapter 3) in this specification. Thestructure and relationships of the intelligent content are illustrated in thefollowing diagrams. In the following, "picbody" is not a specific WebCGM objecttype, but rather a convenience to refer to that part of the CGM picture whichis between the Begin Picture Body element and the End Picture Element,exclusive. Boxes with heavy borders indicate elements that are decomposedfurther, and offset boxes indicate attributes associated with an element.Similarly, gdata is not an object type, but rather a catch-all reference tozero or more CGM graphical elements which WebCGM allows, and which are valid atsuch a position according to the rules of CGM. The cgmprim attribute associatedwith gdata represents an entity that associates the graphical primitives to themodel. See Figure 2.
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
WebCGM supports object-to-object hyperlinking within individual WebCGMinstances, between WebCGM instances, from WebCGM instances to other Web mediatypes, and from other media types to WebCGM instances.
In-line linking is supported, from WebCGM objects (APS of type 'grobject', 'para', and 'subpara') to WebCGM graphic files,objects, as well as to text and other media types. WebCGM fully supportslinking from other media to WebCGM files and objects.
Links from WebCGM objects are realized as 'linkuri' APS Attribute elementscontained within the definitions of the objects. The address of the link (a'linkuri' parameter) is an Internationalized Resource Identifier (IRI) [RFC 3987], and is described in thenormative 'linkuri' section andfragment syntax subsections.
Objects may contain multiple 'linkuri' APS attribute instances,for which case the associated Link Title parameter is available to help theuser select the destination. WebCGM prescribes a uniform viewer requirement tooffer destination choice to the user for such multi-destination cases.
The target of a link, either from within a WebCGM or from another media type(e.g., HTML text), may be a WebCGM instance. WebCGM defines an optional "fragment syntax" for addressingobjects within a WebCGM metafile.
The fragment syntax, in full generality, is:
<base-IRI>#<pict-part>.<obj-part>
The <pict-part> is identified by a keyword and has two pieces, thepicture locator (either the 'PictureId' string parameter of the CGM, or thepicture sequence number), and viewer behavior upon navigating to the picture.With the WebCGM restriction of one picture per metafile (since WebCGM version2.0), the <pict-part> is not useful anymore, but is maintained in thesyntax for backward compatibility with WebCGM 1.0 metafiles and WebCGM 1.0implementations.
The <obj-part> similarly is identified by a keyword and has twopieces, the Id parameter of the object (APS), and viewer behavior.
The syntax is well-defined so that in many common cases, keywords and piecescan be eliminated and defaulted. So, for example,<base-IRI>#<string> unambiguously identifies the object (APS) whoseId parameter is "<string>" in the first (only) picture of the metafilepointed to by "<base-IRI>".
See thenormative specifications ofChapter 3 for complete details and examples.
Supported ISO CGM encodings. ISO CGM defines two encodings of the CGMfunctionality: Binary, and Clear Text. WebCGM, like other leading industryprofiles of CGM, limits the encoding to Binary for the purposes of conforminginterchange. It is the Binary encoding which is registered as a MIME type.Using available encoding converters, the Clear Text encoding can be used fordebugging, hand authoring, demonstration, etc.
GZIP compression.WebCGM data may be compressed for transmission using gzip compression. See "7.1 Conformancedefinitions" for normative specifications regarding GZIP compression.
WebCGM has no rules regarding filenames or filename extensions. It is acommon convention that normal (uncompressed) WebCGM instances use the filenameextension ".cgm", and thatgzip-compressed WebCGM files use theextension ".cgz". However, these are only conventions and care should beexercised not to break existing links when compression is introduced intoexisting environments.
The graphical content of WebCGM is chosen to balance the requirements ofhigh expressive power, and simplicity to implement. It is a subset of the ModelProfile (MP) of the CGM standard.
The WebCGMProfile Pro-forma (PPF),later in this document, gives the complete normative graphical content details.Following is a conceptual summary.
The most obvious aspect of a graphics format is the collection of graphicalprimitives - those drawing elements which define the geometric and otherpresentation content of the format. CGM:1999 contains a rich selection ofvector graphics primitives, plus fully integrated state-of-the-art compressedtile raster content.
WebCGM includes most of the significant graphical drawing primitives ofCGM:1999.
In CGM:1999 but excluded from the present version of WebCGM are:
Attribute elements and control elements determine the details of theappearance of graphical primitives.
The following attribute and control features of CGM:1999 are excluded fromWebCGM.
There are some CGM Version 3 attribute and control elements for which it isdesirable to override the default value in CGM:1999, when an explicitdefinition of the value is not present in the CGM file. This would also allowdefinition of the rendering behavior of CGM Version 1 and Version 2 files,where those attribute and control elements are not allowed, as well as allowdefinition in CGM Verson 3 files where the elements are not declared.
This is accomplished in WebCGM using a standard XML DTD to encode theallowable elements and their values in an XML instance. Examples and moredetails can be found in the WebCGM chapter onApplication Configurable Items.
The normal behavior of CGM:1999 viewers is to render later occurringprimitives completely opaquely on top of earlier primitives. Several notions oftransparency are supported in WebCGM. Seesection2.2.2 and2.2.3 for discussion of the CGMdrawing model and transparency options.
The full range of standard CGM:1999 color models is limited in WebCGM. Thedefault RGB model is included, as well as the models: RGB-alpha; thecolorimetric RGB space of the Web, sRGB; and sRGB-alpha. The latter three areregistered in the ISO Register of Graphical Items.
Fully international text is supported in WebCGM by:
The defaultcharacterencoding ("character set" in the now-archaic terminology of the originalCGM:1987) isISOLatin1. This default is mandated by the ISO CGM:1999standard.
A core set of 13 fonts, the same as those in the ISO CGM Model Profile (MP),are required in WebCGM implementations.
In order to facilitate font interchange, WebCGM defines a format to specifythe mapping of font names during the import process.
This mapping is accomplished in WebCGM using standard XML DTD. Examples andmore details can be found in the WebCGM chapter onApplication Configurable Items.
The XML Companion File (XCF) component of WebCGM was added in the WebCGM 2.0release. The WebCGM XCF provides a standard way to externalize metadata from aWebCGM instance, while maintaining a tight binding of that metadata to objects(APSs) in the WebCGM instance.
The WebCGM XCF was designed with three main usage scenarios in mind. AWebCGM companion file:
Examples and more details may be found in theWebCGM XML Companion File (XCF)chapter, the complete normative definition of the WebCGM XCF.
The normative definition of XCF includes a base and generic DTD. The WebCGMXCF is designed to be extensible, by other profiles derived from WebCGM, aswell as applications of WebCGM. In particular, this allows industry specificmetadata to be added to the WebCGM object model. See thenormative XCF definition for details.
The XCF is a mechanism to bind external metadata to objects in WebCGMinstances. Accordingly, unlike hierarchical tree structured WebCGM instances,the structure of the XML Companion File is mostly flat. See the normativesection,Relationship with XMLcompanion file, for more details.
The Document Object Model (DOM) component of WebCGM was added in the WebCGM2.0 release. An interface for programmatic access to WebCGM contents andstructure, as well as facilities to manipulate a standardized WebCGM XMLCompanion File, were perhaps the strongest driving requirements for the WebCGM2.0 release. Virtually all of the WebCGM viewer and user agent implementationshad already defined and implemented a proprietary application programminginterface (API) for such functionality.
Compared with detailed, complete DOM specifications such as W3C'sXML DOM Level 3, or the DOM of theSVG 1.1 Recommendation, the WebCGM DOMhas limited scope. A full DOM would support query and discovery of all objectsand entities in a target content (graphic) instance, right down to the leafnodes of the structure tree. It would also support symmetric, detailedmodification and manipulation capabilities for changing the object.
The functionality available in the WebCGM DOM is somewhat more limited. TheWebCGM DOM exposes the document graphic structure down to the ApplicationStructure (APS) level — APS's are the fundamental addressable graphicalobjects in WebCGM, and are the building blocks of the hierarchical structuretree of a WebCGM. Other capabilites available via WebCGM DOM include:
Temporary changes to the presentation style of graphical objects may be madevia DOM and XCF "Style Properties". Recognizing similar capabilities in CSS,potential relationships between WebCGM and CSS werestudied in detail prior to theaddition of DOM-accessible and XCF-accessible Style Properties to WebCGM.Ultimately, a lean and minimal WebCGM-specific model was chosen, thatnevertheless borrowed heavily from applicable CSS concepts (such asinheritance.)
Similar temporary changes to APS Attributes — which representnon-graphical metadata associated with graphical objects — are supportedby DOM and XCF access.
DOM functionality supports query and discovery of the structure of a WebCGM,enumeration of its graphical objects, extraction of associated metadata (e.g.,hyperlinking data) from documents, and provides users with standard ways to addmore interactivity to WebCGM documents than was previously possible. It alsoprovides users withstandard ways to add more interactivity to WebCGMdocuments than was previously possible.
DOM functionality also supports manipulation and application of standardWebCGM XML Companion Files, described in theprevious section.
The WebCGM DOM supports a number of usage scenarios and gives access to anumber of useful capabilities. Collectively, theWebCGM 2.0 Requirementsand theWebCGM 2.1Requirements documents give details about the in-scope andout-of-scope capabilities of WebCGM DOM.
This chapter and its sections are normative, unless otherwiseindicated.
TheIRI(Internationalized Resource Identifier) is how resources are identified on theWeb. For example, a CGM file called web.cgm might have the followingIRI:
http://example.org/web.cgm
Application structures and pictures within a WebCGM are addressed using themechanism of theIRI fragmentidentifier. These WebCGM rules are derived from and are consistent with the Webprotocols defined inIRI [RFC 3987] andURI (Uniform ResourceIdentifier) [RFC 3986].
AnIRIwhich includes anIRI fragment identifierconsists of an optional baseIRI, followed by theseparator character "#", followed by theIRI fragmentidentifier. For example, the followingIRI can be used tospecify the "wheelAssembly" object within web.cgm:
http://example.org/web.cgm#wheelAssembly
The fragment identifier is usually specific only to a particular class ofapplications. This clause defines the WebCGM fragment identifier which allowsWebCGM viewers, web browsers, scripting engines, and other applications to:
TheIRIfragment syntax, as adopted by WebCGM, is based on concepts described in theXML Pointer Language (seeXPointerFramework). TheIRI fragment syntax isdefined below. The formal grammar for the WebCGM fragment is given using asimple Extended Backus-Naur Form (EBNF) notation.
Note 1. Multiple pictures per WebCGM instance were allowed in WebCGM 1.0.Since 2.0, WebCGM allows only one picture per metafile. For backwardcompatibility with existing 1.0 metafiles and with viewer implementations, thefragment syntax is unchanged with regard to the picterm.
Note 2. WebCGM 1.0 described links usingURI terminology, howeverimplementations interpreted the WebCGM 1.0 language differently, and in factsome essentially supportedIRIs(Internationalized Resource Identifiers).IRIs are a moregeneralized complement to Uniform Resource Identifiers (URIs). AnIRI is a sequence ofcharacters from the Universal Character Set [Unicode40]. AURI is constructed from a muchmore restricted set of characters. AllURIs are conformantIRIs. A mapping fromIRIs toURIs is definedby theIRIspecification, and this mapping isadapted toWebCGM below (3.1.1.4).IRIs can be convertedtoURIs if the WebCGMprocessor does not supportIRIs directly. In thisspecification, the correctIRI terminology isused.
The following notation is used: * — 0 or more + — 1 or more ? — 0 or 1 ; — separates multiple fragment entries () — grouping | — separates alternatives double quotes (") surround literalswebcgmfragment ::= picterm "." objterm | picterm | objterm | picid "." objid | objid | xcftermpicterm ::= pictureid | pictsequencepictureid ::= "pictid(" picid ("," behavior)? ")"picid ::= (char)+behavior ::= "_blank" | "_self" | "_parent" | "_replace" | "_top" | targettarget ::= (char)+pictsequence ::= "pictseqno(" picseqno ("," behavior)? ")"picseqno ::= (digit)+digit ::= "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" objterm ::= specialForm | normalFormspecialForm ::= "id(*,clearHighlight)"normalForm ::= objectid | objectnameobjectid ::= "id(" objid ("," objbehavior)? ")"objid ::= (char)+objBehavior ::= navTerm | highlightTerm | navTerm "+" highlightTermnavTerm ::= "full" | "zoom" | "move"highlightTerm ::= "newHighlight" | "addHighlight"objectname ::= "name(" objname ("," objbehavior)? ")"objname ::= (char)+xcfterm ::= "xcf(" xcfurl ")"xcfurl ::= (char)+
See next section for a definition of the "char" production.
The productions 'picid
', 'target
','objid
', 'objname
', and'xcfurl'
in thefragment grammar above are represented by parameters in WebCGM content of typenon-graphical text (CGM type SF). Their character repertoire shall berestricted as follows.
objid
- corresponds to WebCGM Begin APS 'id' parameter; further restrictions: as thename construct defined insection 2.3 of XML 1.0, fifth edition.objname
- corresponds to WebCGM APS attribute of type 'name'; shall not contain (leading, trailing, or embedded) any of the whitespace characters #x09, #x0a, or #x0d, and shall not contain any leading or trailing blanks (#x20); the 1-character string "*" is reserved for special meaning and is not a validobjname
; no further restrictions.picid
- corresponds to the 'id' parameter of WebCGM BEGIN PICTURE elements; further restrictions: as objid for any picid value occurrences within a fragment, otherwise per type SF for the id parameter in the BEGIN PICTURE element itself (see further comments below).target
- further restrictions: asobjid
, plus must begin with [a-zA-Z], similarly to"Frame Target Name" of theHTML 4.01 Specification, upon which the set of WebCGM picture behaviors is based.xcfurl
- must be a validIRI, according to theencoding rules below (3.1.1.4), and follow the rules specified for the first parameter of the'linkuri' Application Structure Attribute.Note that these character repertoires allow one or more of the characters".", ",", "(", and ")". These are significant characters in the syntax of theWebCGM fragment specification. If any of these four significant characters isto appear in a valid id/name string within a fragment instance, then thefragment shall use the unabbreviated long form, which is the first of the sixoptional forms in the 'webcgmfragment' production of3.1.1.2. In particular, all components of the longform shall be included, and none of the parts marked as optional in the EBNFmay be omitted.
Note aboutpicid
: The character repertoire forpicid
occurrence in the fragment ("asobjid
") is morerestrictive than the repertoire for the id parameter of the BEGIN PICTUREelement itself (CGM data type SF, not further restricted). Any applicationwhich intends to use thepicid
field in the fragment must generatethe picture ids to the more restrictive repertoire of the fragment. (Seefurther discussion ofpicture selection keywordsin fragments, section 3.1.2.1.)
TheURI characterrepertoire, as defined inRFC3986, is comprised of the alphabetic and numeric characters of ASCII, plusa few punctuation marks. The character repertoires defined in 3.1.1.3, andallowed inIRIs, are much richer.The method for handling this disparity is described in this section.
AnIRI inWebCGM content must be aURI reference as defined inRFC 3986, or must result in aURI reference after the3-step escaping procedure is applied as described inRFC 3987 (IRI), section 3.1("Mapping ofIRIs toURIs"), Step 2. The procedure isapplied when a WebCGM processor (viewer, or any other WebCGM-interpretingprocess) passes theURIreference to aURIresolver.
This handling allows various degrees of "URI legal" (in the sense of RFC3986-conforming) content to appear in WebCGM content, as shown in the examplesat the end of this section. In the WebCGM context, WebCGM processors canpractically determine when to apply the 3-step escaping procedure as follows:if anIRI inWebCGM content contains a character sequence that corresponds to a validURI escaping sequence,i.e., a three-character "%HH" sequence, WebCGM processors shall consider thatsequence to be aURIescaping sequence. Such a sequence may be passed directly to theURI resolver. (This is shown inthe examples.)
This does still not guarantee that aURI will result that is validaccording all applicableURI specifications. E.g., itcould result in DNS-illegal characters in the domain name, if the input WebCGMcontent was badly formed its generator. Because it is impractical for anyapplication to check that a value corresponds to a validURI, this specification followsthe lead ofRFC 3986 in thismatter and imposes no such conformance testing requirement on WebCGMapplications. Although noURI conformance testingrequirements or error handling are specified here, WebCGM processors should, ofcourse, react gracefully to bad input.
string in WebCGM | disposition and handling |
---|---|
my WebCGM.cgm | must be URI-escaped,my%20WebCGM.cgm , before passing toURI resolver. |
my%20WebCGM.cgm | is already URI-escaped (represents "my WebCGM.cgm "), may be passed directly toURI resolver. |
%clear text comments% | not URI-escaped, must be converted to%25clear%20text%20comments%25 before passing toURI resolver. |
%25123456%25 | already URI-escaped (represents "%123456% "), may be passed directly. |
%25123456% | partially URI-escaped (represents%123456% ), must be fully escaped (%25123456%25 ) before passing. |
2 Japanese chars: | must be URI-escaped — first converted to UTF-8: EF BB BF E6 97 A5 E6 9C AC (9 octets), then non-ASCII chars are %-escaped: %EF%BB%BF%E6%97%A5%E6%9C%AC |
Theabove fragment EBNF defines axcfterm
production whose 'xcfurl
' parameteridentifies anXML Companion File associated theWebCGM identified by theIRI. WebCGM viewersthat supportXCF must interpretthe fragment, locate and load theXCF. The 'xcfurl
' parameteris itself aIRI, and it can beabsolute or relative. WebCGM viewers shall resolve a relative'xcfurl
'IRI relative to theIRI of theWebCGM instance with which theresource file isa companion — i.e. relative to the WebCGM file referenced by the basepart of theIRI containing thefragment — rather than relative to the file containing theIRI reference (e.g., anHTML file).
EXAMPLE. Suppose an HTML document contains a hyperlink(href
attribute on<a>
element) to a WebCGMillustration, and that hyperlinkIRI contains a fragmentspecifying to load and apply an XML Companion File:
http://www.example.org/parts-list.html
http://www.example.org/illustrations/some-part.cgm#xcf(some-part.xml)
Then the relativeIRI"some-part.xml
" is resolved according to the location of theassociated CGM, not according to the location of the HTML:
http://www.example.org/illustrations/some-part.xml
Similarly, if the fragment were#xcf(companions/some-part.xml)
,then thatIRIresolves to:
http://www.example.org/illustrations/companions/some-part.xml
The following subsections describe in detail how fragment parameters areused to specify the picture behaviors and object behaviors of links containingthe parameters. An informative summary of the rules is provided in thelast subsection of this section (3.1.2.8).
Since version 2.0, WebCGM allows only one picture per metafile. Thereforethe picture selection keywords are of limited utility, However, WebCGM 1.0allowed multiple pictures per metafile. Newer WebCGM viewers might thereforeoperate in legacy 1.0 environments or "mixed" environments:
pictid
- Thepictid
keyword indicates that thepicture to be viewed is identified by the id of the picture, which is the idparameter in the BEGIN PICTURE element. In the syntax, this is a requiredparameter of thepicterm
production, and there may be a secondassociated parameter, whose value is an optional picture behavior specification(seeEBNF). If the metafile does not contain apicture with the specified picture id value, the first (and only) picture inthe metafile is chosen.
pictseqno
- Thepictseqno
keyword indicates thatthe identity of the picture to be viewed is by the sequence number of thepicture in the metafile (seeEBNF). In thesyntax, this is a required parameter of thepicterm
production,and there may be a second associated parameter, whose value is an optionalpicture behavior specification. The picture sequence number shall be an integergreater than 0. If the specified picture sequence value exceeds the number ofpictures in the metafile, the last picture is displayed.
Picture behaviors describe to the viewer how to display the remote resourceof a hyperlink. Picture behaviors are based on the syntax and semantics ofFrame TargetNames defined in theHTML4.01 Specification. The "picture behaviors" concept of WebCGM isused to collectively address CGM pictures and other Web resources. "Picturebehaviors" is use to specify the name of a relevant presentation context (e.g.,an HTML or XHTML frame, iframe, or object element) into which a document is tobe opened when the link is activated
The reserved names listed below describe the various picture behaviors. Allother Picture Behavior values shall follow the naming convention of thepresentation context in question. For example, if the presentation context isan HTML frame, then the naming convention forFrame TargetNames in theHTML 4.01 Specification is followed — ifnot one of the reserved keywords, they must begin with [a-zA-Z]."
In what follows, the following conventions apply:
The following PictureBehavior values, except for _replace, are based onFrame TargetNames ofHTML 4.01:
If the picture behavior value is the name of a relevant presentation context(e.g., an HTML or XHTML frame, iframe, or object element), the remote resourceshall be displayed in the specified presentation context. If the presentationcontext already exists, it is re-used, replacing the existing content. If itdoes not exist, the viewer shall load the designated content (picture ordocument) in a new window with the specified name. Note that frame-target mustbe an XML Name [XML10].
WebCGM objects are often embedded in a parent language. In such a situation,link activation behaviors (picture behaviors) are defined by the parentobject's relevant language. For example, if the parent language were HTML, thenthe link activation behavior would be defined by theHTML 4.01Specification [HTML401].
EXAMPLE. If the parent language is HTML (per theHTML4.01 Specification) and the referenced resource is CGM, the links areHTML-to-CGM links. The effect of picture behaviors should beachieved with an HTML 'target
' attribute on an<a>
element, for example:
<a href="someCGM.cgm" ... />
The effect shouldnot be achieved by picture behavior terms in thefragment syntax. I.e., the following is invalid usage and viewers should ignoresuch fragment specifications:
<a href="someCGM.cgm#picseqno(1,_blank)" ... />
The following table illustrates how the generalized rules for linkactivation behavior (picture behaviors) would correctly be applied for somecommon source and destination resource types (HTML and CGM), and for thespecific HTML presentation context of frames. (See caveat following thetable.)
Behavior | CGM-to-HTML | CGM-to-CGM |
---|---|---|
_blank | The viewer shall load the designated document in a new, unnamed window. | The viewer shall load the designated picture in a new, unnamed window. |
_self | The viewer shall load the document in the same frame as the one containing the CGM picture that refers to this target. This is the default for CGM-to-HTML links. | The viewer shall load the picture in the same frame as the one containing the CGM picture that refers to this target. |
_parent | The viewer shall load the document into the immediate FRAMESET parent of the current frame in which the current picture is displayed. This value is equivalent to _self if the current frame has no parent. | The viewer shall load the picture into the immediate FRAMESET parent of the current frame in which the current picture is displayed. This value is equivalent to "_self" if the current frame has no parent. |
_replace | Not applicable. Default to _self. | The viewer shall display the designated CGM picture in the same rectangular area in the same frame as the picture which refers to this target. If the ending resource (CGM) is the same as the linking resource, the viewer does not reload the resource. This is the default behavior for CGM-to-CGM links. |
_top | The viewer shall load the document into the full, original window (thus canceling all other frames). This value is equivalent to _self if the current frame has no parent. | The viewer shall load the picture into the full, original window (thus canceling all other frames). This value is equivalent to _self if the current frame has no parent. |
target | The viewer shall load the document into the frame identified by "target". If no matching frame can be found, the viewer shall load the designated content document in a new window with the specified name. | The viewer shall load the picture into the frame identified by "target". If no matching frame can be found, the viewer shall load the designated content document in a new window with the specified name. |
Note: This table comprised the entire normative rules of WebCGM 1.0 for"picture behaviors". However, it did not include sufficient generality in thepossible resource types, nor in different presentation contexts. Therefore itis retained as examples of correct application of the current, more generalizedrules of WebCGM.
Figures 3 and 4 below give examples of _self and _replace.
![]() |
![]() |
id
- the id of the APS of type 'grobject', 'para' or 'subpara'to be selected. The id parameter in the BEGIN APS element. If no match is foundin the picture, no object is selected.
name
- the value of the 'name' attribute in an object(grobject, para, or subpara APS). This is an alternate way to address objects.All objects in the picture with matching 'name' attributes are selected. If nomatch is found in the picture, no object is selected.
In addition to these two object selection keywords, WebCGM defines onespecial form object behavior that allows a wild-cardobject selection keyword,"*"
. The wild-card keyword shall be usedonly in this special form.
Object behaviors describe how to present the view of object(s) that is (are)the targeted by a hyperlink containing aIRI fragment thatselects a particular object or group of objects as the target.
WebCGM contains twelve distinct object behaviors, eleven of which aregenerated by thefragment EBNF, and one of whichis defined in the EBNF as aspecial-form object behaviorfragment:
id(*,clearHighlight)
The default object behavior iszoom+newHighlight.
The next subsection defines the target rectangle of the navigationbehaviors, depending on whether a single or multiple objects are selected bytheobject selection keyword. The highlightbehaviors apply to all objects selected according to theobject selection keyword.
The object behaviors are built from a set three "atomic" navigation keywordsand a set of two "atomic" highlight keywords,defined below. The navigation keywords have nohighlighting side effects and the highlighting keywords have no navigation sideeffects — the navigation and highlighting keyword sets are orthogonal.
The special-form behavior,id(*,clearHighlight)
, clearshighlighting of any and all highlighted objects in the picture, withoutaffecting the navigation state of the picture.
Note that object behaviors are "cumulative". As described in the "Picture behaviors" section, if a link points to thesame CGM file that is currently viewed — e.g., a CGM-to-CGM link withinthe same file, with_replace
picture behavior — then thepicture is not reloaded, and any new object behaviors are applied starting fromthe current viewing state of the picture.
The following table enumerates the object behaviors available in WebCGM. TheNavigation column indicates whether the viewer performs any navigationfor the behavior, for theselected object(s).Highlighting indicates whether the viewer adjusts the highlighting oftheselected object(s) in some way ("X") ornot.
Behavior | Navigation | Highlighting |
---|---|---|
full | X | |
zoom | X | |
move | X | |
newHighlight | X | |
addHighlight | X | |
full+newHighlight | X | X |
zoom+newHighlight (default) | X | X |
move+newHighlight | X | X |
full+addHighlight | X | X |
zoom+addHighlight | X | X |
move+addHighlight | X | X |
clearHighlight | X |
WebCGM 1.0 defined threeobject behaviors thatWebCGM 2.0deprecated — view_context, highlight, and highlight_all. WebCGM 2.1viewers shall support these three object behaviors, and shall do so by mappingthem to WebCGM 2.1 behaviors as follows:
If navigation to an object or group of objects is indicated, a targetrectangle must be calculated as follows:
See the'visibility' APS Attribute fordiscussion of its effect on execution of Object Behaviors.
In addition to being able to meet the zooming and panning requirementsimposed by the above object behavior specifications, and those zooming andpanning requirements imposed by support of theobject
element's parameters, viewers whichoperate in an interaction-capable environment shall have zoom and pan controlsavailable to the user. The exact methods and user interface styles for zoom andpan selection and manipulation are viewer dependent.
Thefragment syntax can be used to load andapply anXML Companion File (XCF) together withthe WebCGM file. An interpreter that supports WebCGM DOM shall load the WebCGMfile first. Then it shall load and apply the XML Companion File specified bytheIRI (resolving a relativeIRI if necessary).Finally it shall apply theXCFbefore the first display of the CGM.
Interpreters that do not support the WebCGM DOM may ignore this fragmenttype.
The following isinformative summary and is intended to providereferences to wherethe normative picture and object behaviors aredefined.
target
' attribute of the<a>
element) (see3.1.2.2). Any picture behavior in anIRI fragment will be ignored by viewers (see3.1.2.2).linkuri
Application Structure Attribute (see3.2.2.3). Note that encoding the picture behavior in the first parameter of thelinkuri
Application Structure Attribute is discouraged when targeting a CGM resource (see3.2.2.3, "discouraged").src
attribute of theWebCGMMetafile
interface specifies theIRI of the image. Specifying behavior as part of theIRI is prohibited (see5.7.3 'src').This subsection and its subsections are informative(non-normative).
The WebCGM fragment in its most verbose form provides the means to addressobjects between metafiles, and tells the viewer what to do to execute the link.The default viewer behavior defines what the browser shall do if the WebCGMfragment does not explicitly define the viewer behavior.
The following examples illustrate some of the ways the WebCGM fragment canbe used. The examples describe how one might address a set of CGM filesrelating to various views of an engine which are stored on the example.org website (http://example.org/webcgm/). The CGM files contain various viewsof an engine assembly - the top view, the front view, the right view, the leftview, and the isometric view. The CGM files are identified as follows:
Metafile 1: "engine_top.cgm"
Metafile 2: "engine_front.cgm"
Metafile 3:"engine_right.cgm"
Metafile 4:"engine_left.cgm"
Metafile 5: "engine_iso.cgm"
Each metafile contains one picture, with picture id identical to themetafile name (without the ".cgm"), and with several identifiable objects— the oil pump, the cylinder head, the fan, the radiator, or thedistributor. Not all objects are shown in all views.
The objects contained in each metafile are as follows:
Metafile 1:
Oil pump: id='oil-pump-t' name='lube-system'
Cylinder head: id='cyl-hd-t' name='engine'
Fan: id='fan-t' name='cooling'
Radiator: id='rad-t' name='cooling'
Distributor: id='dist-t' name='ignition'
Metafile 2:
Oil pump: id='oil-pump-f' name='lube-system'
Cylinder head: id='cyl-hd-f' name='engine'
Fan: id='fan-f' name='cooling'
Radiator: id='rad-f' name='cooling'
Distributor: id='dist-f' name='ignition'
Metafile 3:
Oil pump: id='oil-pump-r' name='lube-system'
Cylinder head: id='cyl-hd-r' name='engine'
Fan: id='fan-r' name='cooling'
Radiator: id='rad-r' name='cooling'
Metafile 4:
Cylinder head: id='cyl-hd-l' name='engine'
Fan: id='fan-l' name='cooling'
Radiator: id='rad-l' name='cooling'
Distributor: id='dist-l' name='ignition'
Metafile 5:
Oil pump: id='oil-pump-i' name='lube'
Cylinder head: id='cyl-hd-i' name='engine'
Fan: id='fan-i' name='cooling'
Radiator: id='rad-i' name='cooling'
Distributor: id='dist-i' name='ignition'
1st param:http://example.org/webcgm/engine_top.cgm#pictseqno(1).id(cyl-hd-t,full+newHighlight)
3rd param:_blank
When used as the value of the 'linkuri' APS Attribute (1st and3rd parameters) in an object in a CGM file, this example retrievesengine_top.cgm CGM file from the example.org web site and displays the first(only) picture in a new window, highlighting the object with an id of"cyl-hd-t" in a full-picture view. The existing display window remainsunchanged. The above expressions represent the preferred form (see3.2.2.3) when the link is contained within CGMcontent. The following form is legal, but discouraged (may be removed fromfuture version of WebCGM):
http://example.org/webcgm/engine_top.cgm#pictseqno(1,_blank).id(cyl-hd-t,full+newHighlight)
http://example.org/webcgm/engine_top.cgm#pictid(engine_top).id(oil-pump-t,full+newHighlight)
IRI:http://example.org/webcgm/engine_iso.cgm#id(dist-i,zoom+newHighlight)
HTML 'target' attribute:topframe
When used as the value of theIRI to target an objectin a CGM file from an HTML file, thisIRI (plus HTMLattribute) retrieves the engine_iso.cgm CGM file from the example.org web siteand displays the picture in the metafile in the frame named "topframe",highlighting the object with an id of "dist-i". If present, the 'viewcontext'APS Attribute for the object "dist-i" is used to determine the rectangularportion of the picture to display in the frame, else the fallback computationof atarget rectangle used.
1stparam:http://example.org/engine_front.cgm
3rdparam:topframe
When used as the value of the 'linkuri' to target an object in a CGM filefrom another CGM file, this linkuri (1st and 3rdparameters) retrieves the engine_front.cgm CGM file from the example.org website and displays the picture in the metafile in the frame named "topframe",with a full-picture view. (See example 1, about alternate but discouragedforms.)
http://example.org/webcgm/engine_top.cgm#name(cooling)
This example retrieves the engine_top.cgm CGM file from the example.org website and displays the picture in the metafile. The view zooms to thetarget rectangle, which contains all objects with'name' APS Attribute with value "cooling", and each such object ishighlighted.
http://example.org/webcgm/engine_top.cgm#fan-t
This example retrieves the engine_top.cgm CGM file from the example.org website and displays the first (only) picture in the metafile. The view is zoomedto thecomputed target rectangle of the objectwith id "fan-t", and it is highlighted.
#id(oil-pump-t, addHighlight)
This example will leave unchanged the current zoom and pan factors in thecurrently displayed picture, and will highlight theoil-pump-t
object. Any existing highlighting of other objects in the picture ispreserved.
WebCGM defines these Application Structure (APS) types: layer, grobject,para, subpara, and grnode. This document uses the term "object" to refer to anAPS of type 'grobject', 'para', and 'subpara'.
Although the picture body of a WebCGM picture is not itself an APS, thecontent rules of the picture body (picbody
) are defined by thispiece of EBNF (see thefragment syntax fordefinition of notation):
picbody ::= layer+ | (grobject | para | grnode | gdata)*
I.e., a picture body contains either one or more layers, or else it containsa collection of eligible APSs ('grobject', 'para', 'grnode') and graphical data('gdata'
). The content rules of these APSs are defined in thefollowing sections.
CGM:1999 requires that the Begin APS element of every Application Structurehave a unique identifier parameter. The character repertoire of the APS idparameter in WebCGM content is identical to the repertoire defined for theobjid
fragment production inSection3.1.1.3.
Description. The Application Structure (APS) of type 'grobject' is used togroup graphical primitives in a picture together and assign certain attributesto the group. The object is geometrically identified either by the set ofprimitives enclosed between the BEGIN APS BODY and END APS elements (if any),or by the spatial region associated with the 'region' APS Attribute (ifpresent). APSs of type 'grobject' may contain any CGM graphical content allowedby this profile.
Definition: Theinteractive region of an object is theeffective geometric region for the purposes of all interactive cursor and mouseoperations, such as picking and mouseover. By default, thedrawn graphicalprimitives of the object define the interactive region. For filled-areaprimitives this includes: the edge, if edge visibility is 'on'; the interior,if the interior style is other than 'empty' or 'hollow'; and, the boundary, forinterior style 'hollow'. For all graphical primitive types,drawn graphicalprimitives exclude any that are fully transparent (so a fully transparentobject is equivalent to an empty object, for purposes of interactive regiondefinition). If the object contains a'region' APSAttribute, then that region area is the interactive region.
Content Model. Except when occurring in Text Open State (see 3.2.1.7), the content of an APS oftype 'grobject' is (seefragment syntax fordefinition of EBNF notation)::
grobject ::= (grobject | para | grnode | gdata)*
Viewer Behavior. The selection ("pick") of a 'grobject' APS, as well asother objects (APSs) that may be the target of a "pick" event, follow the rulesofWebCGM DOM events. Thoserules determine all aspects of the event processing, including the selection ofthe proper target object when there are multiple eligible candidates, and theselection of the proper handler to process the event. Viewers shall give visualfeedback to the user that a successful pick has occurred, and an indication ofthe particular object (or region) which has been picked. The exact method offeedback is viewer dependent.
Example. A common example in WebCGM usage scenarios is asimple 'grobject', that contains alinkuri APSAttribute. In this simple case, if an appropriate mouse event handler onthe Metafile does not handle the event and prevent further processing, theWebCGM DOM event model saysthat the event will be "passed on for hyperlink processing." The event modeldictates the following outcomes for the common cases:
If, on the other hand, the object (APS) that is "picked" by the event modelrules does not contain a linkuri, then no hyperlink processing occurs and theevent is passed along for further processing.
If an APS is the target of a link, either from within the picture or fromcontent external to the picture, then the behavior of the viewer shall be asdefined in the section"Object behaviors".
The CGM:1999 standard allows the definition of an APS to be continued inpieces which are disjoint in the file. If an APS occurs which has the samevalue of the 'id' parameter as an earlier APS occurrence, then that isconstrued as a continuation of the definition of that object. Since version2.0, continued APS constructs are prohibited in WebCGM metafile instances.
Description. The 'layer' APS declares that the graphical content within thisAPS and any valid nested APS ('grobject', 'para', and 'grnode', but not'layer') belongs to the layer identified by the contained 'layername' APSattribute.
Content Model. The content of an APS of type 'layer' is (seefragment syntax for definition of EBNF notation):
layer ::= (grobject | para | grnode | gdata)*
Viewer Behavior. Viewers shall provide functionality to inform users of thepresence of layers, their names and descriptions. Viewers shall providefunctionality to selectively turn on and off the visibility of layers. Viewersmay, but are not required to, provide additional functionality for the viewmanipulation and browsing of layers.
Description. The application structure (APS) of type 'para' may be used toidentify text ("paragraphs"). 'Para' together with 'content' can potentially enable applications tobuild text search functionality, especially in cases where the underlyinggraphical data does not comprise graphical text in a searchable form (e.g., thetext has been rasterized, polygonized, or visually-single strings arefragmented into multiple smaller text elements). Except when occurring in TextOpen State, 'para' APSs may contain any CGM graphical content allowed by thisprofile.
Content Model. Except when occurring in Text Open State (see 3.2.1.7), the content of an APS oftype 'para' is (seefragment syntax fordefinition of EBNF notation):
para ::= (subpara | gdata)*
Viewer Behavior. With respect to object selection and link navigation, theviewer behavior of 'para' is identical to that of 'grobject' (3.2.1.1).
This version of WebCGM does not standardize text search functionality, butprovides facilities with which applications can build such functionality. It isanticipated that a future version will define standard search functionality.
Example. A search match priority that applications mightuse (originally recommended in WebCGM 1.0) is: 'para' with matching 'content' (1st priority match); 'para'without 'content' but with recognizablesingle-element RESTRICTED TEXT match (2nd priority match); or,single-element RESTRICTED TEXT match, outside of any 'para' (3rdpriority match).
Description. The application structure (APS) of type 'subpara', may be usedto identify smaller fragments of text within APS of type 'para'. This enables,for example, the identification of the larger text block (the "paragraph") forsearching purposes, and the tagging of smaller fragments as hotspots. Exceptwhen occurring in Text Open State (see3.2.1.7), 'subpara' APSs may contain any CGM graphical content allowed bythis profile. 'Subpara' APS may not contain any nested APS.The APS attributecontent rules of sub-para matches those of 'para'.
Content Model. Except when occurring in Text Open State (see 3.2.1.7), the content of an APS oftype 'subpara' is (seefragment syntax fordefinition of EBNF notation):
subpara ::= (gdata)*
Viewer Behavior. See3.2.1.3, 'para'.
Description. The application structure (APS) of type 'grnode' is meant togroup basic graphical primitives only. For this reason, 'grnode' must containthe APS 'id' parameter required by CGM:1999 for all APS, but a 'grnode' cannotcontain any APS attribute elements. The content of a 'grnode' is, however, notlimited to graphical primitives. The allowed APS content of a 'grnode' is thesame as for the'grobject' ApplicationStructure.
Even if 'visibility' and 'interactivity' are not allowed on the APS, the'grnode' supports inheritance (i.e., it is possible to make a 'grnode' visibleor non-visible by inserting it within an object which support the 'visibility'attribute).
Content Model. The permissible content of an APS of type 'grnode' is:
grnode ::= (grobject | para | grnode | gdata)*
Viewer Behavior. Unlike other application structures, 'grnode' is notinteractive; i.e., it does not receive mouse events. If a mouse event istriggered on the geometry of a 'grnode', an ancestor node of type 'grobject'may respond to the event. Therefore, the content of a 'grnode' couldeffectively appear to be interactive, for example, if the 'grnode' were adirect child of a 'grobject'. See theEvent interface for moreinformation regarding mouse events. APS of type 'grnode' also do not supportmost DOM functionality such as Style Properties, object-extent inquiry, etc.See the appropriate sections of theDOM chapterfor details.
Description. This version and level of WebCGM do not allow additional APSelements to occur, other than 'grobject', 'layer', 'para', 'subpara', and'grnode'. Private metadata may be associated with WebCGM objects by keeping themetadata outside of the CGM, and associating it with objects within the CGM. Ameans for binding external private metadata to WebCGM instances is defined inthe sectionXML Companion File (XCF).
Therules ofCGM:1999 (corrected) allow an APS to occur in Text Open State, i.e., aftera 'notfinal' RESTRICTED TEXT (RT) element but before the terminating 'final'APPEND TEXT (AT) element. This allows, for example, a substring comprising oneof the interior APPEND TEXT elements in a RT-AT-AT-...-AT sequence to becontained within an APS. Thus, for example, the APPEND TEXT element (substring)could be the target of a link, or could be the source of a link (a"hotspot").
Such an APS is referred to as asubstring APS.
WebCGM 2.1 restricts the APS types of such substring APS to:'grobject', 'para',and 'subpara'. For APS of these types that arenot substring APS, the content rules are as quoted in sections3.2.1.1,3.2.1.3, and3.2.1.4 respectively. If an APS of one of thesetypes is a substring APS, then its content is restricted as follows by therules of CGM:1999 (corrected): only the APPEND TEXT element and those textattributes normally allowable in Text Open State (under CGM:1999 rules).
The allowable APS Attributes for 'grobject', 'para', and 'subpara' are asdesignated in3.2.1.1,3.2.1.3, and3.2.1.4respectively, regardless of whether or not they are substring APS.
TheWebCGM DOM (Chapter 5) allows theapplication of geometric transforms to APS of all types except 'grnode'.Therefore, a geometric transform could potentially be targetted at an APS('grobject', 'para', or 'subpara') that contains a substring APS. In this case,the layout and rendering rules of CGM:1999 for Restricted Text and Append Text(seeISO/IEC 8632:1999, section6.7.3) shall have precedence. Any attempt to set a geometric transform on asubstring APS shall have no effect.
Initial value: none
Applies to: 'grobject', 'para', 'subpara'
Inherited: no
Description. The 'region' APS Attribute provides an optional spatial region,associated with a graphical object, which assumes precedence for mouse eventoperations directed at the object, such as picking, mouseover, etc. This APSAttribute, if present, defines theinteractiveregion of an object; else, the interactive region is defined by thegeometry of the object.
Simple regions of type rectangle, ellipse, polygon, and polybezier can bedefined. Complex regions which comprise a collection of simple regions can bebuilt, allowing definition of disjoint subregions, regions with holes, etc.Their semantics (subregions, and interior/exterior definition) are identical tothose of the CGM element CLOSED FIGURE. At most one 'region' attribute may bepresent within a single APS.
Parameters. The data record is an SDR of one or more member pairs (i.e., 2*mmembers, m>=1). Each member-pair defines a simple region: the first memberis of data type Index, whose valid values are:
The second member is type VDC and contains:
For polygon and polybezier regions, closure is implicit (if the last givenpoint does not match the first, then the viewer closes the region with astraight line segment from the last to the first).
In the case that there are multiple simple regions, m>1, then theindividual simple regions each correspond to a REGION in the sense of the CGMCLOSED FIGURE element.
Viewer Behavior. See3.2.1.1.
Initial value: none
Applies to: 'grobject', 'para', 'subpara'
Inherited: no
Description. The 'viewcontext' APS Attribute provides a specification toviewers of the initial view of an object, when the viewer has been directed tonavigate to the graphical object which contains this attribute. A 'viewcontext'APS Attribute may be contained within an otherwise empty APS, in which case theAPS provides only a viewport specification. At most one 'viewcontext' attributemay be present within a single APS.
Parameters. The data record is an SDR of 1 member of type VDC defining twocorner points of a rectangle.
Viewer Behavior. See3.2.1.1.
Initial value: none
Applies to: 'grobject', 'para', 'subpara'
Inherited: no
Description. The 'linkuri' APS Attribute defines aIRI, to be associatedwith the object containing this attribute. When the object is selected by agraphical pick operation, and theWebCGM event model determinesthat hyperlink processing shall handle the event, then the viewer shall takenecessary action to navigate the link. Multiple 'linkuri' attributes may becontained within a single APS. If the object contains more than one 'linkuri'attribute, the user shall be given a choice of whichIRI to navigate.
Parameters. The data record is an SDR of one member, containing threestrings (type SF, String Fixed). The first string is the link destination, aIRI, thesecond string (possibly null) is a Link Title parameter, and the third string(possibly null) is the Behavior parameter. Note that a null string is azero-length string, and is not the same as an omitted parameter. The parametermust not be omitted.
The destination of a link is specified by a Internationalized ResourceIdentifier, orIRI. Seesection 3.1.1.4 for further discussion of thisparameter. This specification does not constrain the syntax or semantics of aIRI in a'linkuri' that identifies a resource that is not a CGM file (for example, anHTML or XML document).
TheBehavior string defines picture behavior associated with the link. Thevalues and meanings are as defined in3.1.2.2. Incases that the destination is not CGM media type, the 3rd parameter,Behavior, shall be used if picture behavior is to be specified for the link(there is no other option). The Behavior string may also be used for links toCGM media types, and is the preferred method.
In thecase that theIRI points to CGM mediatype, the picture behavior may be encoded within the optional fragmentidentifier in conjunction with theIRI structure, persection3.1.1, "IRI fragmentspecification". This form is discouraged, and may be removed in a futureedition of this profile. For specifying picture behavior, particular WebCGM'linkuri' instances shall use either the Behavior string (preferred), or thepicture behavior specification embedded in the fragment (discouraged), but notboth.
EXAMPLES. The following example illustrates the onlyallowable form of a CGM-to-HTML link that would open an HTML document in a new,blank window and navigate to an anchor,myAnchor
, in thedocument:
myHTMLfile.html#myAnchor
as 'linkrui' 1st parameter, plus 'linkuri' 3rd parameter value of_blank
.The preferred form of an analogous CGM-to-CGM link — opening a CGM ina new blank window, and navigating to a particular object — is shown inthe following two examples:
myCGMfile.cgm#picseqno(1).objid(someId,zoom)
, plus 'linkuri' 3rd parameter value of_blank
,
myCGMfile.cgm#objid(someId,zoom)
, plus 'linkuri' 3rd parameter value of_blank
.The following example illustrates an allowed, but discouraged, variant ofthe forms #2 and #3:
myCGMfile.cgm#pictseqno(1,_blank).objid(someId,zoom)
Initial value: none
Applies to: 'layer'
Inherited: no
Description. The 'layername' APS Attribute declares that the graphicsassociated with the 'layer' APS containing this attribute belong to theidentified layer. The 'layername' is not required to be unique. If more thanone 'layer' APS contains the same 'layername', then the occurrences followingthe first occurrence shall be construed as continuing the definition of thenamed layer. Exactly one 'layername' attribute must be present within each'layer' APS.
Parameters. The data record is an SDR of one member, containing one string(type SF, String Fixed) - the Layer Name (identifier). The string can be null(zero-length). If the Layer Name is null, then the graphics of this objectbelong to the null layer.
Viewer Behavior. See3.2.1.2.
Initial value: none
Applies to: 'layer'
Inherited: no
Description. The 'layerdesc' APS Attribute provides optional descriptivetext which is associated with the 'layer' APS in which it occurs. This may beused by viewers to facilitate required and optional layer manipulationfunctions, as described in 3.2.1.2. At most one 'layerdesc' attribute may becontained within a single 'layer' APS.
Parameters. The data record is an SDR of one member, containing one string(type SF, String Fixed).
Viewer Behavior. See3.2.1.2.
Initial value: none
Applies to: 'grobject', 'para', 'subpara'
Inherited: no
Description. The 'screentip' APS Attribute provides an optional string, tobe associated with a graphical object, which viewers can display when thegraphical cursor passes over theinteractiveregion of the graphical object. Whether or not the screentip displayactually occurs depends on how theWebCGM event model determinesthat mouse-over events should be handled. This APS Attribute may occur withinany graphical object of WebCGM, specifically, within any APS of type'grobject', 'para', and 'subpara', and there shall be at most one occurrencewithin any particular APS.
Parameters. The data record is an SDR of one member, containing one string(type SF, String Fixed).
Viewer Behavior. Viewers shall be capable of displaying the screen tip, ifone is defined for a graphical object, visible to the user when the cursorpasses over the graphical object, in the common style of Web browsers.
Initial value: none
Applies to: 'grobject', 'para', 'subpara'
Inherited: no
Description. The 'name' APS Attribute provides an optional string, thatdefines a "common name" associated with an object. Unlike the APS 'id'parameter, the 'name' APS attribute need not be unique within a metafile.Multiple 'name' attributes may be contained within a single APS.
Parameters. The data record is an SDR of one member, containing one string(type SF, String Fixed). The character repertoire of the name APS attribute inWebCGM content is identical to the repertoire defined for theobjname
fragment production inSection3.1.1.3.
Viewer Behavior. The 'name' gives applications a way to associate commonnames with objects. The object can optionally be addressed by the value of the'name' attribute. See3.1.1.
Initial value: none
Applies to: 'para', 'subpara'
Inherited: no
Description. The 'content' APS Attribute provides a means to declare what istext content in a 'para' APS and in a 'subpara' APS. It is provided as a basis on whichapplications can build text search (which is not further standardized in thisversion of WebCGM). Text that is apparent in a graphical display may notcorrespond to recognizable text strings in the metafile content itself. Forexample, the metafile content may draw the text with raster elements, or withfilled strokes, or one character at a time in random order, etc.
A 'content' attribute on a 'para' APS should contain all of the renderedtext of the 'para' APS, and a 'content' attribute on a 'subpara' APS shouldcontain all of the rendered text of the 'subpara' APS. The 'content' APSAttribute may occur only within APS of type 'para' and 'subpara', and thereshall be at most one occurrence within any such APS.
Parameters. The data record is an SDR of one member, containing one string(type SF, String Fixed).
Viewer Behavior. See the description under the 'para' APS,3.2.1.3.
Initial value: on
Applies to: 'layer', 'grobject', 'para', 'subpara'
Inherited: yes
Description. The 'visibility' attribute indicates if an object is visible ornot. 'Visibility' applies to Application Structures (APS) of type 'layer','grobject', 'para' and 'subpara'. The value of 'visibility' isinherited by any descendant objects of type'layer', 'grobject', 'para', and 'subpara'. Although it can't be set on'grnode' and doesn't apply to 'grnode', 'visibility' also inherits to objectsof type 'grnode', and inherits from objects of type 'grnode' to any descendentsin the WebCGM structure.
Parameters. The data record is an SDR of one member, containing one string(type SF, String Fixed). The valid values are 'off', 'on', 'inherit'.
Viewer behavior. A non-visible object is not displayed. For the purposes ofthis section, a non-visible object is one whose 'visibility' attribute value is'off', or one whose 'visibility' attribute value is 'inherit' with anon-visible parent. Highlight requests are ignored for non-visible objects,regardless of the source of the request (i.e., whether from Object Behaviorkeyword, or from highlight() DOM method, or from interaction feedback such asmouse-over). Visibility does not affect the ability to navigate to an object,for example by Object Behavior keywords. A non-visible object behaves like anon-interactive object (i.e., it cannot be clicked or highlighted). This doesnot imply that the'interactivity' APSattribute is changed to off, but simply that the user agent must notrespond to mouse events.
Initial value: on
Applies to: 'layer', 'grobject', 'para', 'subpara'
Inherited: yes
Description. The 'interactivity' attribute indicates if an object mayreceive mouse events. 'Interactivity' applies to Application Structures (APS)of type 'layer', 'grobject', 'para' and 'subpara'. The value of 'interactivity'isinherited by any descendant objects oftype 'layer', 'grobject', 'para', and 'subpara'. Although it can't be set on'grnode' and doesn't apply to 'grnode', 'interactivity' also inherits toobjects of type 'grnode', and inherits from objects of type 'grnode' to anydescendents in the WebCGM structure.
Parameters. The data record is an SDR of one member, containing one string(type SF, String Fixed). The valid values are 'off', 'on', 'inherit'.
Viewer behavior. When the 'interactivity' of an object is set to off, eventsfor this object are disabled. This has the effect of disabling event handlers,cursor changes, highlighting, screentip and hyperlinking for the given node andits descendants. Regardless of the value of its 'interactivity' attribute, anobject that is the target of a link responds to highlighting requests(keywords), provided that its visibility is enabled according to the value the'visibility' APS Attribute.
Description. This version and level of WebCGM do not allow additional APSAttribute elements to occur, other than as enumerated above. Private metadatamay be associated with WebCGM objects by keeping the metadata outside of theCGM, and associating it with objects within the CGM. A means for bindingexternal private metadata to WebCGM instances is defined in the sectionXML Companion File (XCF).
This subsection is informative (non-normative).
This is an informative, at-a-glance summary of the whole content model ofthe CGM Version 4 functionality of WebCGM — the "Intelligence" content— using the formal specification technique of the XML DTD. It has beensuggested that validating XML parsers could be adapted to perform contentvalidation of WebCGM instances (either via modification of the readers, or viatransformation of the intelligent content of the WebCGM instance).
<!-- To document the structure of the CGM Version 4 --><!-- content of WebCGM the following DTD fragment --><!-- has been developed. --><!-- --><!-- PICBODY is included in this DTD fragment for --><!-- purposes of demonstrating that the layer, grobject, --><!-- and para structures can exist within the picture --><!-- body level in a CGM instance. The gdata element --><!-- with its associated cgmprim entity attribute is --><!-- intended to represent the model for CGM data stored --><!-- as an external entity. --><!-- --><!-- Note: of the attributes listed below, all --><!-- correspond to APS Attribute elements of CGM, except --><!-- the 'ID', which corresponds to the 'id' parameter --><!-- of the Begin Application Structure CGM element. --><!ELEMENT picbody (layer+ | (grobject | para | grnode | gdata)*) ><!ELEMENT layer (grobject | para | grnode | gdata)* ><!ATTLIST layer id ID #REQUIRED layername CDATA #REQUIRED layerdesc CDATA #IMPLIED visibility (on | off | inherit) #IMPLIED interactivity (on | off | inherit) #IMPLIED ><!ELEMENT grobject (grobject | para | grnode | gdata)* ><!ATTLIST grobject id ID #REQUIRED region CDATA #IMPLIED viewcontext CDATA #IMPLIED linkuri CDATA #IMPLIED screentip CDATA #IMPLIED name CDATA #IMPLIED visibility (on | off | inherit) #IMPLIED interactivity (on | off | inherit) #IMPLIED ><!ELEMENT para (subpara | gdata)* ><!ATTLIST para id ID #REQUIRED region CDATA #IMPLIED viewcontext CDATA #IMPLIED linkuri CDATA #IMPLIED screentip CDATA #IMPLIED name CDATA #IMPLIED content CDATA #IMPLIED visibility (on | off | inherit) #IMPLIED interactivity (on | off | inherit) #IMPLIED ><!ELEMENT subpara (gdata)* ><!ATTLIST subpara id ID #REQUIRED region CDATA #IMPLIED viewcontext CDATA #IMPLIED linkuri CDATA #IMPLIED screentip CDATA #IMPLIED name CDATA #IMPLIED content CDATA #IMPLIED visibility (on | off | inherit) #IMPLIED interactivity (on | off | inherit) #IMPLIED ><!ELEMENT grnode (grobject | para | grnode | gdata)* ><!ATTLIST grnode id ID #REQUIRED ><!ELEMENT gdata EMPTY ><!ATTLIST gdata cgmprim ENTITY #REQUIRED >
Note: the use of XML to express the content model of WebCGM implies that aparticular attribute can have at most one instance within a particular APSinstance. This is not the case, and the normative rules are as specified in3.2.2.1 through3.2.2.10.
object
elementThe only standard way to reference inline CGMs from HTML documents isthrough theobject
element, using thedata
attributefor the CGM file and thetype
attribute to specify the full MimeType. The minimal element for adding CGM into a document would be:
<object data="xxx.cgm" type="image/cgm;Version=4;ProfileId=WebCGM"width="200" height="100" />
OtherHTML 4.01 attributes whichmay be used on theobject
tag includealign
,border
,hspace
,id
,name
andvspace
. Use ofalign
,border
,hspace
, andvspace
is only permitted in TransitionalHTML 4.01, not Strict HTML 4.01.
The attributesclassid
,codebase
,declare
,shapes
,usemap
,codetype
, andarchive
are prohibited. Content whichuses WebCGM shall not make direct reference to the code which may be used todisplay it.
The event-related attributes, ONCLICK,...,ONMOUSEOVER, are permitted buttheir effect is undefined in this version of WebCGM. Instead the WebCGM DOMoffers anaddEventListener method foradding event listeners on WebCGM documents
The attributesaccesskey
,alt
,class
,dir
,lang
,longdesc
,standby
,style
,tabindex
andtitle
are permitted, but have no defined effect on CGM viewers anddisplay of CGM pictures. They are used to improve accessibility, and may alsoaffect the presentation of any alternative text content of theobject
element.
Theobject
element can contain optionalparam
elements, which allow the HTML to pass additional data to the target object.The followingparam
elements are defined and permitted for WebCGM.Eachparam
is presented as a name followed by permissible values(after the ":"), and description. The names and the permissible values arecase-insensitive, with the single exception of the value of the'
onload
'param
(which identifies theevent handler script function that is to be invoked upon theonload
event, represented below as<eventHandlerName(evt)>
".
param
element and handler allows for script writers to manipulate the WebCGM DOM at the point at which the user agent has fully parsed theobject
tag and its descendants and is ready to render the object to the screen.EXAMPLE:
<script type="application/ecmascript"> <![CDATA[
function myHandler(evt)
{
// performs DOM manipulation calls...
}
]]>
</script>
[...]
<object data="xxx.cgm" type="image/cgm;Version=4;ProfileId=WebCGM"
width="200" height="100">
<param name="onload" value="myHandler(evt);"/>
</object>
Thebackground
param element isdeprecated and may be removed in a future version of this profile.
viewport
can conflict with some options (e.g., those object behaviors which effectively select a sub-picture via a 'viewcontext' APS attribute within the CGM picture) in aIRI fragment on thedata
attribute of theobject
element. In case of conflict, theviewport
specification shall have precedence.Theviewport
param element isobsolete as of version 2.1 of this profile.
height
andwidth
specified on theobject
tag. These three parameters can be used to specify where and how to place the CGM within the window specified on theobject
tag. 'Fit' specifies to isotropically scale the picture (or sub-picture) so that one dimension fits exactly in the window — there will be undrawn space left in the window in one dimension if the aspect ratios don't match. In this case, the handling of the extra space is defined by the values of 'halign' (if the extra space is in the horizontal dimension) and 'valign' (if the extra space is in the vertical dimension). 'Fill' means to isotropically scale so that the window is filled in both directions — if the aspect ratios don't match, a part of the picture will be clipped away at the window boundary. In this case, 'halign' and 'valign' define what part of the picture is shown (and what part is clipped away) in the dimension that needs to be clipped.The default values are 'fit', 'middle', 'middle'.
Theseparam
elements differ from thealign
attribute ofobject
, which is used to specify where theobject
is placed in the document. This could be expressed using theparam
element as:
<param name="halign" value="middle" /><param name="valign" value="middle" />
Figures 5 and 6 show the different effects achieved by 'Fit' and 'Fill' withthe different alignments.
![]() |
![]() |
This chapter and its sections are normative, unless otherwiseindicated.
This section and its subsections are informative(non-normative).
The WebCGM XML Companion File (XCF) was added to WebCGM in the 2.0 version,and further enhanced in this 2.1 upgrade. The element and attribute definitionsfound in this section represent the WebCGM XCF DTD. This DTD may be extended byprofiles deriving from WebCGM. The WebCGM XML companion files may be used forseveral purposes. There are many conceivable usage scenarios, but for the scopeof WebCGM, the following four were identified as most important.
Scenario 1: A companion file can be used to bindapplication specific details (such as a part number) to a particularApplication Structure. It is up to the application to control how theapplication-specific information is used.
Example4.1:A companion file used to relate some application-specific datato graphical objects.
<!ENTITY % grobjectAttEXT "model:partNum CDATA #IMPLIED" > <webcgm version="2.1" filename="sample_1.cgm" xmlns:model="http://example.org" xmlns="http://www.cgmopen.org/schema/webcgm/"> <grobject apsid="id_1" model:partNum="bolt-100A"/> <grobject apsid="id_2" model:partNum="wingnut-T9"/> ... <grobject apsid="id_49" model:partNum="drill-bit-D01"/> <grobject apsid="id_50" model:partNum="router-bit-B389"/> </webcgm> |
Scenario 2: A companion file could also be used to update aCGM illustration via the WebCGM DOM (see sectionRelationship with XML companion filefor more information):
Example 4.2:A companionfile used to update sample_2.cgm before being displayed by a user agent. Callsto some WebCGM DOM methods need to take place to perform thistask.
<webcgm version="2.1" filename="sample_2.cgm" <bindByName apstargetname="bolt_100" screentip="Replacement part:bolt-100B"/> <bindByName apstargetname="wingnut_9" screentip="Replacement part:wingnut-T9A"/> </webcgm> |
Scenario 3: Although it is out-of-scope of this version ofthe WebCGM XCF to fully mirror the hierarchical structure of a CGM graphic (see"Structure overview"), an XML Companion File could beused as a partial, scaled down XML inventory of a CGM illustration byenumerating the Application Structures IDs, types and (most) attributes.
Example 4.3:A companionfile used as a partial inventory of sample_3.cgm. In this case, the descriptionputs an emphasis on the hotspot region of each 'grobject'element.
<webcgm version="2.1" filename="sample_3.cgm" <grobject apsid="id_1" region="1 0 0 100 100"/> <grobject apsid="id_2" region="1 200 0 300 100"/> ... <grobject apsid="id_49" region="1 1600 600 1700 700"/> <grobject apsid="id_50" region="1 1800 600 1900 700"/> </webcgm> |
This section and its subsections are normative, unless otherwiseindicated.
It is not the intent of the WebCGM XML Companion File (XCF) to be a faithfulXML representation of the object tree in a hierarchical WebCGM. Rather, XCFprovides a mechanism to externalize both standardized and application (private)metadata from a structured WebCGM instance, and to bind it to the properobjects in the object tree of the WebCGM instance.
Accordingly, the structure of the XML Companion File is mostly flat. Afterthe root element,webcgm
, the variousstandardXCF elements occur as siblings in the companion file (with the singleexception oflinkuri
). So, for example,grobjects
that have a parent-child relationship in the CGM aresiblings in the XCF. The normative WebCGM DTD for XCF expresses and enforcesthis flat structure, independent of whatever hierarchy may exist in thecorresponding WebCGM instance.
Example 4.4:Amostly-flat companion file binds standardized metadata to a hierarchical objecttree in a WebCGM instance.
<webcgm version="2.1" filename="sample_4.cgm" <grobject apsid="level-4-obj" screentip="wingnut-400A"/> <grobject apsid="level-3-obj" screentip="bolt-assembly-100A"/> </webcgm> |
|
Note: Example 4.4 uses a condensed schematic representation of the CGM code,eliminating numerous details in order to illustrate the point.
Example 4.4 illustrates another point about the relationship of the XCFcontents to the corresponding WebCGM instance — the order of the XCF isnot required to follow the order of the CGM contents.
As suggested by Example 4.4, the root element of a conforming XCF instancemust be thewebcgm
element. Thewebcgm
element corresponds to the Picture object in the CGM. SeeRelationship with XML CompanionFile for more discussion.
The next section deals in detail with application-specific metadataattributes and elements in an XCF. In order to unambiguously establish where inthe WebCGM object tree those metadata are to be inserted, theapplication-specific attributes and elements (defined in a separate namespace)are placed in the XCF as attributes and child elements on standardized XCFelements that correspond (bind) to the appropriate object in the WebCGM. Thisis seen in example 4.1, for application-specific attributes. See also sectionRelationship with XML CompanionFile for more discussion.
The WebCGM DTD is extensible so that application-specific orindustry-specific metadata may be added to the WebCGM object model (as shown inexample 4.1). The extension definitions are implemented using namespaces. TheDTD defines an extension entity for the content and attributes of mostelements. As an example, a part manufacturer may want to associate partsinformation to graphical objects. This might be implemented with an extensionthat looks like:
<!ENTITY % grobjectAttEXT "model:partNum CDATA #IMPLIED" >
A host application could query the WebCGM DOM and retrieve the associatedpart information.
A set of rules must be followed when extending the WebCGM DTD:
The rules found above allow WebCGM user agents to process extended companionfiles in an interoperable manner.
The WebCGM namespace:
http://www.cgmopen.org/schema/webcgm/
Namespace example:
<webcgm version="2.1" filename="sample.cgm"xmlns="http://www.cgmopen.org/schema/webcgm/">
Public Identifier for WebCGM 2.1:
PUBLIC "-//OASIS//DTD WebCGM 2.1//EN"
System Identifier for the WebCGM 2.1:
http://docs.oasis-open.org/webcgm/v2.1/webcgm21.dtd
DOCTYPE example. The following is an example document typedeclaration for a WebCGM XCF document:
<!DOCTYPE webcgm PUBLIC "-//
OASIS
//DTDWebCGM 2.1//EN""http://docs.oasis-open.org/webcgm/v2.1/webcgm21.dtd">
A file is a conforming WebCGM 2.1 XCF document if it adheres to thespecifications described in this (WebCGM 2.1) document, including those in theWebCGM 2.1 XCF DTD, and in addition all of thefollowing conditions are met:
webcgm
This section and its subsections are normative, unless otherwiseindicated.
The standard XCF elements include:
webcgm
layer
,grobject
,para
,subpara
bindById
andbindByName
.The standard XCF elements also include:
linkuri
. Linkuri is an APS Attribute, but is encoded as an XCF element, rather than attribute, to avoid what would otherwise be an overly complex encoding of the string that would comprise its value as an XML attribute.For the standardized XCF content, most of the items expressed on XCFelements as XML attributes have a straightforward correlation to a standardizedWebCGM attribute or property that may be set or inquired with a WebCGMDOMcall.
In general, the encoding of XML attributes on XCF elements is identical tothe encoding of the corresponding parameters in DOM calls. For example, theWebCGMAppStructure interface (section 5.7.6)defines 'viewcontext' as a simple string of four numbers, whitespace separated(seeWsp definition, section 5.5). Theencoding of 'viewcontext' as an XML attribute on any allowed XCF element is thesame as its encoding as a DOM method parameter.
Similarly, theStyleProperties (settable on the WebCGMPicture and WebCGMAppStructureinterfaces), as XML attributes on the XCF elements have the same valid valuesand are encoded identically as in the corresponding DOM calls.
The single exception to the use of consistent encodings is for the'linkuri' APS attribute, which is encoded as an element inthe XCF, for reasons as explained.
See theWebCGM DOM data types sectionfor complete details.
Most of the XCF elements may haveStyle Properties as XML attributes(Style Properties are defined and supported on the DOMWebCGMPicture andWebCGMAppStructure interfaces.) Thefollowing entity definition is used in the DTD snippets of the subsequentsubsections, on those elements which support Style Properties at both the APSlevel and Picture level. (The background-color Style Property that applies onlyat the Picture level.)
<!ENTITY % styleProperties "text-size CDATA #IMPLIED fill-color CDATA #IMPLIED intensity CDATA #IMPLIED stroke-color CDATA #IMPLIED stroke-weight CDATA #IMPLIED text-color CDATA #IMPLIED text-font CDATA #IMPLIED raster-intensity CDATA #IMPLIED stroke-type CDATA #IMPLIED stroke-offset CDATA #IMPLIED interior-style CDATA #IMPLIED hatch-index CDATA #IMPLIED pattern-index CDATA #IMPLIED edge-visibility CDATA #IMPLIED fill-offset CDATA #IMPLIED"> |
A single WebCGM XCF element must not contain both theintensity
property and one or more of the overlapping propertiesfill-color
,stroke-color
,text-color
. Overlapping properties mayoccur sequentially on different XCF elements, and then their processing isdefined by their order of occurrence (seeStyle Properties description).
See "Data types and encoding" for more aboutStyle Properties.
A WebCGM companion file (or any other CGM profile derived from the WebCGMprofile) must have a 'webcgm' element as the root element. The 'webcgm' elementcorresponds to the Picture node in the WebCGM DOM tree (see for example theWebCGMPicture interface in the DOM).
<!ENTITY % webcgmEXT "" ><!ENTITY % webcgmAttEXT "" ><!ELEMENT webcgm ( (layer | grobject | para | subpara | bindById | bindByName %webcgmEXT;)* ) ><!ATTLIST webcgm id ID #IMPLIED version CDATA #FIXED '2.1' filename CDATA #IMPLIED xmlns CDATA #FIXED "http://www.cgmopen.org/schema/webcgm/" background-color CDATA #IMPLIED pictureVisibility ( on | off) #IMPLIED %styleProperties; %webcgmAttEXT;> |
Attribute definitions:
id="xml:id"
Standard XML attribute for assigning a unique identifier to an element. RefertoExtensible Markup Language (XML) 1.0 [XML10].
version="CDATA"
Represents the version of the WebCGM specification. The value is 2.1 for thisspecification. Every conforming XCF must identify its version, either byincluding this attribute on the webcgm element, or by including aDOCTYPE pointing to this WebCGM XCF's DTD, or both(recommended). An industry-specific profile derived from this WebCGM XCFspecification must not use this attribute to identify its version, and shoulddefine and require use of a namespace attribute to identify its profileversion. For example, if ASD includes in its future version of S1000D "n.m" anXCF derived from WebCGM 2.1, thewebcgm
tag might look likethis:
<webcgm version="2.1" asd:s1000d-version="n.m" xmlns:asd="http://example.org/asd/" ...>
filename="CDATA"
Represents the filename of the corresponding WebCGM file. 'filename' is adescriptive attribute.
xmlns[:prefix]="CDATA"
Standard XML attribute whose value defines the "resource-name" for identifyingan XML namespace. Refer toNamespaces in XML. The 'xmlns'attribute without prefix identifies the (default)WebCGMnamespace, and (with prefix) must be used to identify the foreignnamespace(s) of anyapplication-specific metadata thatare used in the XCF instance. Note that the value given in theDTD snippet, and the attribute type (#FIXED),apply only to the unprefixed, default WebCGM namespace.
<webcgm version="2.1" xmlns="http://www.cgmopen.org/schema/webcgm/" xmlns:asd="http://example.org/asd/" ...><xcf:webcgm version="2.1" xmlns:asd="http://example.org/asd/" ...>
In the first example, the WebCGM namespace is declared as the defaultnamespace for thewebcgm
element and its contents, and content inthe 'asd' namespace would use the "asd:" prefix. As theDTD shows, the second example is also validbecause the namespaceIRI defaults properlyfor thexmlns
attribute without prefix. It is recommended,however, that thexmlns
attribute declaring the default (WebCGM)namespace always be included.
background-color="CDATA"
background-color is aStyleProperty for setting the background color of the Picture (root node ofWebCGM object tree).
pictureVisibility="on|off"
Defines the visibility for the picture that corresponds to thewebcgm
element of this XCF. This is similar to the 'visibility'APS Attribute that can be applied to metafile Application Structures, except itapplies to the picture (on which the 'visibility' APS Attribute is not allowedby CGM rules.) The effect is the same as the invocation of thesetPictureVisibility method on theWebCGMPicture interface of the DOM. .
styleProperties
the styleProperties entity collectively defines thoseStyle Properties that apply atboth the Picture level and the object/APS level.
webcgmEXT
the webcgmEXT entity is a mechanism for adding additional child content (i.e.,metadata) on the root node.
webcgmAttEXT
the webcgmAttEXT entity is a mechanism for adding additional attributes (i.e.,metadata) on the root node.
The 'layer' element of an XML companion file represents a CGM ApplicationStructure of type 'layer'. The corresponding 'layer' is identifiable given itsassigned 'apsid' attribute value.
<!ENTITY % layerEXT "EMPTY" ><!ENTITY % layerAttEXT "" ><!ELEMENT layer %layerEXT; ><!ATTLIST layer apsid ID #REQUIRED layerdesc CDATA #IMPLIED visibility ( on | off | inherit) #IMPLIED interactivity ( on | off | inherit) #IMPLIED %styleProperties; %layerAttEXT;> |
Attribute definitions:
apsid="xml:id"
The unique identifier of the Application Structure for the given WebCGMfile.
layerdesc="CDATA"
Value of the 'layerdesc' Application Structure attribute for the associatedAPS.
visibility="on|off|inherit"
Value of the 'visibility' Application Structure attribute for the associatedAPS.
interactivity="on|off|inherit"
Value of the 'interactivity' Application Structure attribute for the associatedAPS.
styleProperties
the styleProperties entity collectively defines thoseStyle Properties that apply atboth the Picture level and the object/APS level.
layerEXT
the layerEXT entity is a mechanism for adding additional child content (i.e.,metadata) on the 'layer'.
layerAttEXT
the layerAttEXT entity is a mechanism for adding additional attributes (i.e.,metadata) on the 'layer'.
See also the'layer' functionaldescription in Section 3.
The 'grobject' element of an XML companion file represents a CGM ApplicationStructure of type 'grobject'. The corresponding grobject' is identifiable givenits assigned 'apsid' attribute value.
<!ENTITY % grobjectEXT "" ><!ENTITY % grobjectAttEXT "" ><!ELEMENT grobject ( linkuri %grobjectEXT; )* ><!ATTLIST grobject apsid ID #REQUIRED screentip CDATA #IMPLIED region CDATA #IMPLIED viewcontext CDATA #IMPLIED visibility ( on | off | inherit) #IMPLIED interactivity ( on | off | inherit) #IMPLIED %styleProperties; %grobjectAttEXT;> |
Attribute definitions:
apsid="xml:id"
The unique identifier of the Application Structure for the given WebCGMfile.
screentip="CDATA"
Value of the 'screentip' Application Structure attribute for the associatedAPS.
region="CDATA"
Value of the 'region' Application Structure attribute for the associatedAPS.
viewcontext="CDATA"
Value of the 'viewcontext' Application Structure attribute for the associatedAPS.
visibility="on|off|inherit"
Value of the 'visibility' Application Structure attribute for the associatedAPS.
interactivity="on|off|inherit"
Value of the 'interactivity' Application Structure attribute for the associatedAPS.
styleProperties
the styleProperties entity collectively defines thoseStyle Properties that apply atboth the Picture level and the object/APS level.
grobjectEXT
the grobjectEXT entity is a mechanism for adding additional child content(i.e., metadata) on the 'grobject'.
grobjectAttEXT
the grobjectAttEXT entity is a mechanism for adding additional attributes(i.e., metadata) on the 'grobject'.
See also the'grobject' functionaldescription in Section 3.
The 'para' element of an XML companion file represents a CGM ApplicationStructure of type 'para'. The corresponding 'para' is identifiable given itsassigned 'apsid' attribute value.
<!ENTITY % paraEXT "" ><!ENTITY % paraAttEXT "" ><!ELEMENT para ( linkuri %paraEXT; )* ><!ATTLIST para apsid ID #REQUIRED screentip CDATA #IMPLIED region CDATA #IMPLIED viewcontext CDATA #IMPLIED visibility ( on | off | inherit) #IMPLIED interactivity ( on | off | inherit) #IMPLIED %styleProperties; %paraAttEXT;> |
Attribute definitions:
apsid="xml:id"
The unique identifier of the Application Structure for the given WebCGMfile.
screentip="CDATA"
Value of the 'screentip' Application Structure attribute for the associatedAPS.
region="CDATA"
Value of the 'region' Application Structure attribute for theassociated APS.
viewcontext="CDATA"
Value of the 'viewcontext' Application Structure attribute for theassociated APS.
visibility="on|off|inherit"
Value of the 'visibility' Application Structure attribute for the associatedAPS.
interactivity="on|off|inherit"
Value of the 'interactivity' Application Structure attribute for the associatedAPS.
styleProperties
the styleProperties entity collectively defines thoseStyle Properties that apply atboth the Picture level and the object/APS level.
paraEXT
the paraEXT entity is a mechanism for adding additional child content (i.e.,metadata) on the 'para'.
paraAttEXT
the paraAttEXT entity is a mechanism for adding additional attributes (i.e.,metadata) on the 'para'.
See also the'para' functionaldescription in Section 3.
The 'subpara' element of an XML companion file represents a CGM ApplicationStructure of type 'subpara'. The corresponding 'subpara' is identifiable givenits assigned 'apsid' attribute value.
<!ENTITY % subparaEXT "" > <!ENTITY % subparaAttEXT "" > <!ELEMENT subpara ( linkuri %subparaEXT; )* > <!ATTLIST subpara apsid ID #REQUIRED screentip CDATA #IMPLIED region CDATA #IMPLIED viewcontext CDATA #IMPLIED visibility ( on | off | inherit) #IMPLIED interactivity ( on | off | inherit) #IMPLIED %styleProperties; %subparaAttEXT;> |
Attribute definitions:
apsid="xml:id"
The unique identifier of a the Application Structure for the given WebCGMfile.
screentip="CDATA"
Value of the 'screentip' Application Structure attribute for the associatedAPS.
region="CDATA"
Value of the 'region' Application Structure attribute for the associatedAPS.
viewcontext="CDATA"
Value of the 'viewcontext' Application Structure attribute for the associatedAPS.
visibility="on|off|inherit"
Value of the 'visibility' Application Structure attribute for the associatedAPS.
interactivity="on|off|inherit"
Value of the 'interactivity' Application Structure attribute for the associatedAPS.
styleProperties
the styleProperties entity collectively defines thoseStyle Properties that apply atboth the Picture level and the object/APS level.
subparaEXT
the subparaEXT entity is a mechanism for adding additional child content (i.e.,metadata) on the 'subpara'.
subparaAttEXT
the subparaAttEXT entity is a mechanism for adding additional attributes (i.e.,metadata) on the 'subpara'.
See also the'subpara' functionaldescription in Section 3.
A 'linkuri' element of an XML companion file represents a WebCGM 'linkuri'Application Structure attribute. Contrary to other attributes, the 'linkuri'attribute is expressed as an element in the XML companion file. Thecorresponding Application Structure of this 'linkuri' is its parent element.
<!ENTITY % linkuriEXT "" > |
Attribute definitions:
uri="CDATA"
TheIRI ofthis 'linkuri' attribute. See sectionBasic Data Types for moreinformation.
behavior="CDATA"
The behavior of this 'linkuri' attribute. See sectionBasic Data Types for moreinformation.
desc="CDATA"
The title or description of this 'linkuri' attribute. See sectionBasic Data Types for moreinformation.
linkuriEXT
the linkuriEXT entity is a mechanism for adding additional child content (i.e.,metadata) on the 'linkuri'.
linkuriAttEXT
the linkuriAttEXT entity is a mechanism for adding additional attributes (i.e.,metadata) on the 'linkuri'.
See also the'linkuri' functionaldescription in Section 3.
A 'bindByName' element of an XML companion file is intended to correspond toone or more Application Structure in a CGM file. The common link between thoseApplication Structures is that their 'name' or 'layername' attribute valuecorresponds to 'apstargetname'. See sectionRelationship with XML companion filefor more information on the rules of mapping 'bindByName' attributes to WebCGMApplication Structures.
<!ENTITY % bindByNameEXT "" > |
Attribute definitions:
apstargetname="CDATA"
Name used to identify the corresponding Application Structure(s) for a givenWebCGM file.
screentip="CDATA"
Value of the 'screentip' Application Structure attribute for the associatedAPS.
region="CDATA"
Value of the 'region' Application Structure attribute for the associatedAPS.
viewcontext="CDATA"
Value of the 'viewcontext' Application Structure attribute for the associatedAPS.
layerdesc="CDATA"
Value of the 'layerdesc' Application Structure attribute for the associatedAPS.
visibility="on|off|inherit"
Value of the 'visibility' Application Structure attribute for the associatedAPS.
interactivity="on|off|inherit"
Value of the 'interactivity' Application Structure attribute for the associatedAPS.
styleProperties
the styleProperties entity collectively defines thoseStyle Properties that apply atboth the Picture level and the object/APS level.
bindByNameEXT
the bindByNameEXT entity is a mechanism for adding additional child content(i.e., metadata) on the APS.
bindByNameAttEXT
the bindByNameAttEXT entity is a mechanism for adding additional attributes(i.e., metadata) on the APS.
The 'bindById' element of an XML companion file represents a CGM ApplicationStructure one of the types: layer, grobject, para, subpara. APS of type'grnode' are valid in a 'bindById' element. The corresponding object isidentifiable given its assigned 'apsid' attribute value. See sectionRelationship with XML companion filefor more information on the rules of mapping 'bindById' attributes to WebCGMApplication Structures.
<!ENTITY % bindByIdEXT "" > |
Attribute definitions:
apsid="xml:id"
The unique identifier of the Application Structure for the given WebCGMfile.
screentip="CDATA"
Value of the 'screentip' Application Structure attribute for the associatedAPS.
region="CDATA"
Value of the 'region' Application Structure attribute for the associatedAPS.
viewcontext="CDATA"
Value of the 'viewcontext' Application Structure attribute for the associatedAPS.
layerdesc="CDATA"
Value of the 'layerdesc' Application Structure attribute for the associatedAPS.
visibility="on|off|inherit"
Value of the 'visibility' Application Structure attribute for the associatedAPS.
interactivity="on|off|inherit"
Value of the 'interactivity' Application Structure attribute for the associatedAPS.
styleProperties
the styleProperties entity collectively defines thoseStyle Properties that apply atboth the Picture level and the object/APS level.
bindByIdEXT
the bindByIdEXT entity is a mechanism for adding additional child content(i.e., metadata) on the APS.
bindByIdAttEXT
the bindByIdAttEXT entity is a mechanism for adding additional attributes(i.e., metadata) on the APS.
This section is normative.
The complete WebCGM XML Companion File (XCF) DTD follows.
<?xml version="1.0" encoding="UTF-8"?><!-- ================================================================ --><!-- This is the WebCGM XML Companion File DTD for use with --><!-- WebCGM 2.1 --><!-- ================================================================ --><!-- Original issue: March 2008 --><!-- --><!-- Revision history: --><!-- June 2008 - updated for CD02 changes to DOM and XCF. --><!-- November 2009 - removed geometricTransform from the XCF. --><!-- --><!-- ================================================================ --><!-- --><!-- ================================================================ --><!-- Application specific entities --><!-- Application groups define application specific attributes here --><!-- and define the stubs for application specific elements that --><!-- will be defined later in the DTD --><!-- --><!ENTITY % webcgmEXT "" ><!ENTITY % webcgmAttEXT "" ><!ENTITY % layerEXT "EMPTY" ><!ENTITY % layerAttEXT "" ><!ENTITY % grobjectEXT "" ><!ENTITY % grobjectAttEXT "" ><!ENTITY % paraEXT "" ><!ENTITY % paraAttEXT "" ><!ENTITY % subparaEXT "" ><!ENTITY % subparaAttEXT "" ><!ENTITY % linkuriEXT "EMPTY" ><!ENTITY % linkuriAttEXT "" ><!ENTITY % bindByIdEXT "" ><!ENTITY % bindByIdAttEXT "" ><!ENTITY % bindByNameEXT "" ><!ENTITY % bindByNameAttEXT "" ><!ENTITY % styleProperties "text-size CDATA #IMPLIED fill-color CDATA #IMPLIED intensity CDATA #IMPLIED stroke-color CDATA #IMPLIED stroke-weight CDATA #IMPLIED text-color CDATA #IMPLIED text-font CDATA #IMPLIED raster-intensity CDATA #IMPLIED stroke-type CDATA #IMPLIED stroke-offset CDATA #IMPLIED interior-style CDATA #IMPLIED hatch-index CDATA #IMPLIED pattern-index CDATA #IMPLIED edge-visibility CDATA #IMPLIED fill-offset CDATA #IMPLIED" >
<!-- --><!ELEMENT webcgm ( (layer | grobject | para | subpara | bindById | bindByName %webcgmEXT;)* ) ><!ATTLIST webcgm id ID #IMPLIED version CDATA #FIXED '2.1' filename CDATA #IMPLIED background-color CDATA #IMPLIED pictureVisibility ( on | off ) #IMPLIED xmlns CDATA #FIXED "http://www.cgmopen.org/schema/webcgm/" %styleProperties; %webcgmAttEXT; ><!ELEMENT layer %layerEXT; ><!ATTLIST layer apsid ID #REQUIRED layerdesc CDATA #IMPLIED visibility ( on | off | inherit) #IMPLIED interactivity ( on | off | inherit) #IMPLIED %styleProperties; %layerAttEXT; ><!ELEMENT grobject ( linkuri %grobjectEXT; )* ><!ATTLIST grobject apsid ID #REQUIRED screentip CDATA #IMPLIED region CDATA #IMPLIED viewcontext CDATA #IMPLIED visibility ( on | off | inherit) #IMPLIED interactivity ( on | off | inherit) #IMPLIED %styleProperties; %grobjectAttEXT; ><!ELEMENT linkuri %linkuriEXT; ><!ATTLIST linkuri uri CDATA #REQUIRED behavior CDATA #IMPLIED desc CDATA #IMPLIED %linkuriAttEXT; ><!ELEMENT para ( linkuri %paraEXT; )* ><!ATTLIST para apsid ID #REQUIRED screentip CDATA #IMPLIED region CDATA #IMPLIED viewcontext CDATA #IMPLIED visibility ( on | off | inherit) #IMPLIED interactivity ( on | off | inherit) #IMPLIED %styleProperties; %paraAttEXT; ><!ELEMENT subpara ( linkuri %subparaEXT; )* ><!ATTLIST subpara apsid ID #REQUIRED screentip CDATA #IMPLIED region CDATA #IMPLIED viewcontext CDATA #IMPLIED visibility ( on | off | inherit) #IMPLIED interactivity ( on | off | inherit) #IMPLIED %styleProperties; %subparaAttEXT; ><!ELEMENT bindById ( linkuri %bindByIdEXT; )* ><!ATTLIST bindById apsid ID #REQUIRED screentip CDATA #IMPLIED layerdesc CDATA #IMPLIED region CDATA #IMPLIED viewcontext CDATA #IMPLIED visibility ( on | off | inherit) #IMPLIED interactivity ( on | off | inherit) #IMPLIED %styleProperties; %bindByIdAttEXT; ><!ELEMENT bindByName ( linkuri %bindByNameEXT; )* ><!ATTLIST bindByName apstargetname CDATA #REQUIRED screentip CDATA #IMPLIED layerdesc CDATA #IMPLIED region CDATA #IMPLIED viewcontext CDATA #IMPLIED visibility ( on | off | inherit) #IMPLIED interactivity ( on | off | inherit) #IMPLIED %styleProperties; %bindByNameAttEXT; ><!-- --><!-- Define content models for application specific elements --><!-- -->
This chapter and its sections are normative, unless otherwiseindicated.
This section is informative (non-normative).
This chapter defines a set of objects and interfaces for accessing andmanipulating WebCGM documents. The functionality specified in this sectionenables script writers to manipulate WebCGM documents and access informationfound in standard WebCGM XML companion files. The WebCGM DOM API focuses itsmethods on: tree traversal, style changes, and providing access to metadata.
This section is informative (non-normative).
Although inspired by the XML DOM specifications, the WebCGM DOM remainsoriented towards WebCGM specific functionality. Since WebCGM uses a treestructure to group graphical primitives, it was therefore appropriate, to use aset of interfaces similar to the XML DOM Node, Element and Document interfaces.However, since WebCGM is expressed in a non-XML syntax, several changes had tobe made to commonly known interfaces and methods in order to improve the userexperience of WebCGM script writers.
The WebCGM DOM could almost be perceived as a 'readonly' DOM. Some interfacemethods allow users to change the visual appearance of Application Structures,but unlike the XML DOM specification, it does not allow for removal orinsertion of WebCGMNodes into the object model. This constitute a significantdifference between the specifications.
While WebCGM 1.0 offered interactivity support via hyperlinking andhighlighting, the WebCGM 2.0 DOM took it to the next level. WebCGM 2.1 furtherenhances the DOM. The WebCGM DOM borrows concepts from theDOM3Events specification, and introduces the concept of EventListeners andmouse Events in order to meet the requirements of WebCGM users.
The WebCGM DOM is designed to provide access to XML metadata found in XMLCompanion Files. Practice has shown that some CGM illustrations are easier tomaintain if some of the non graphical information remains outside theillustration. An example of such information could be; language sensitivescreentips. The WebCGM DOM can then be used to 'apply' the information from theXML companion file to the WebCGM document (see Example 5.3) . For moreinformation on XML companion file syntax, please refer toChapter 4, WebCGM XML CompanionFile.
Another benefit of the XML Companion File is to carry application specificdata (or metadata) concerning a WebCGM illustration (see Example 4.2). Thisinformation is expressed using namespace attributes and elements in the XMLCompanion File. The WebCGM DOM provides a method for loading the XML metadatainto the user agent's object model. Using the WebCGM DOM, a user can gainaccess to the metadata. Here is a detailed example to better illustrate theconcept.
Example 5.1a:This WebCGM document (expressed inclearText encoding) will be updated by an XML companion file.
BEGMF 'example.cgm'; ...BEGPIC 'Picture 1'; ...BEGAPS 'L1' 'layer' STLIST; APSATTR 'layername' "14 1 'Standard layer'"; BEGAPSBODY; BEGAPS 'G1' 'grobject' STLIST; BEGAPSBODY; LINE 210,265 210,200 300,200; LINE 300,200 300,265 210,265; ENDAPS;ENDAPS; ...ENDPIC; ...ENDMF; |
The in-memory tree representation of this illustration should be similar tothe illustration found below. The metafile contains a picture, the picturecontains a child node Application Structure of type layer, and the layercontains a child node Application Structure of type grobject, as illustrated inFigure 7.
![]() |
Example 5.1b:XML companion file to be 'applied' onexample.cgm of example 5.1a.
<webcgm xmlns:wiring="http://www.example.org"> <grobject apsid="G1" screentip="A new screentip"> <wiring:data wire-bundle="E132-NAV"/> </grobject></webcgm> |
The WebCGM DOM provides methods for 'applying' an XML Companion File, likethe one shown in example 5.1b, to a picture in a WebCGM document. A conforminguser agent is expected to load and parse the XML Companion File and possibly'apply' updates from the XML Companion File to the user agent's object model. Auser may want to apply a companion file for the following reasons:
i) To replace standard Application Structure Attribute values present in theWebCGM instance with new values from the XML Companion File.
ii) To supply standard Application Structure Attribute values to ApplicationStructures which do not contain attribute values with values from the XMLcompanion file.
iii) To transiently modify the Style Properties (stoke-color, text-size,etc) with which an object (APS or picture) is displayed.
iv) To add XML metadata to the user agent's object model to be retrieved ata later stage using WebCGM DOM APIs.
Once the user agent has loaded the XML Companion File into its memory model,the tree should resemble this:
![]() |
The overall set of rules that a user agent must follow when applying an XMLCompanion File is as follows:
More specific rules forprocessing namespace attributesare:
More specific rules forprocessing child elements are:
This section describes howAPS Attributes areinherited in a WebCGM structure tree. It also describes howStyle Properties are inherited, which is similarbut differs in a few key details. The inheritance models are based closely onthe inheritance model ofCSS 2.0. Somedetails have been adapted to the particulars of the WebCGM format. This chapteris the normative reference for inheritance ofAPSAttributes and ofStyle Properties inWebCGM.
WebCGM user agents are required to support the inheritance model defined inthis section foreligible Style Properties. Oncea user agent has loaded a document and constructed a document tree, it mustassign, for every Application Structure in the tree, a value to every StyleProperty.
Very similar to the CSS model, the final value of a Style Properties is theresult of a four-step calculation: the value is determined throughspecification (the "Specified Value"), then resolved into a value that may beused for inheritance (the "Computed Value"), then converted into an absolutevalue if necessary (the "Used Value"), and finally transformed according to thelimitations of the local environment (the "Actual Value").
User agents must first assign a Specified Value to each Style Property basedon the following mechanisms (in order of precedence):
Note: In the context of WebCGM inheritance, the root of the document tree isthe Picture node.
Specified Values are resolved to Computed Values after the document tree iscreated.
The Computed Value exists even when the property doesn't apply, as definedby the 'Applies To' line.
In the CSS2 model from which the WebCGM model is derived, Computed Valuescan be relative to each other; for example a width could be set as apercentage, which is dependent on the containing block's width. The Used Valueis the result of taking the Computed Value and resolving these dependenciesinto a final absolute value used for the actual display. In this version ofWebCGM, there are no examples where Used Value differs from the Computed Value.This may change in a future version of the specification.
A Used Value is in principle the value used for rendering, but a user agentmay not be able to make use of the value in a given environment. For example, auser agent may only be able to render borders with integer pixel widths and maytherefore have to approximate the computed width, or the user agent may beforced to use only black and white shades instead of full colour. The ActualValue is the used value after any approximations have been applied.
WebCGM user agents are required to support the inheritance model ofApplication Structure (APS) Attributes defined in this section. Once a useragent has loaded a document and constructed a document tree, it must resolve,for every Application Structure in the tree, if an Attribute has a value (i.e.,no value is possible for some attributes).
Very similar to the CSS model, the final value of an APS Attribute is theresult of a four-step calculation: the value is determined throughspecification (the "Specified Value"), then resolved into a value that may beused for inheritance (the "Computed Value"), then converted into an absolutevalue if necessary (the "Used Value"), and finally transformed according to thelimitations of the local environment (the "Actual Value").
User agents must first assign a Specified Value to each APS Attribute basedon the following mechanisms (in order of precedence):
In the context of WebCGM inheritance, the root of the document tree is thePicture node. For the purposes of this inheritance model, the Picture root nodeis treated as if it were an Application Structure.
In this specification, Computed Values of Application Structure Attributes,with the exception of the 'inherit' value are identical to the SpecifiedValues. When the Specified Value is 'inherit', it must be replaced for theComputed Value as defined below in thesection oninheritance. The Computed Value exists even when the Attribute doesn'tapply (as defined by the 'Applies To' line in the Attribute's definition).
In the CSS2 model from which the WebCGM model is derived, Computed Valuescan be relative to each other; for example a width could be set as apercentage, which is dependent on the containing block's width. The Used Valueis the result of taking the Computed Value and resolving these dependenciesinto a final absolute value used for the actual display. In this version ofWebCGM, there are no examples where Used Value differs from the Computed Value.This may change in a future version of the specification.
A Used Value is in principle the value used for rendering, but a user agentmay not be able to make use of the value in a given environment. For example, auser agent may only be able to render borders with integer pixel widths and maytherefore have to approximate the computed width, or the user agent may beforced to use only black and white shades instead of full colour. The ActualValue is the Used Value after any approximations have been applied. In thisversion of WebCGM, there are no examples where Actual Value differs from theUsed Value. This may change in a future version of the specification.
Some values are inherited by the children of an Application Structure in thedocument tree, as described above. Each Style Property and ApplicationStructure Attribute defines whether it is inherited or not. As a general rule,when inheritance occurs, Application Structures inherit Computed values ofStyle Properties and Application Structure Attributes (unless implicitly statedin the Property or Attribute definition).
Application Structure Attributes and Style Properties may also have aSpecified Value of 'inherit'; which means that, for a given ApplicationStructure, the Property or Attribute takes the same Computed value of theApplication Structure's parent. The 'inherit' value can be used to strengtheninherited values, and it can also be used on Style Properties that are notnormally inherited. There are no examples of the latter in this version of WebCGM.
WebCGM consists of three components where data type definitions need to beconsidered: metafile instances, DOM, and XCF.
WebCGM instances are binary files. Metafile data types and encodings arefully defined in theCGM:1999standard, together with chapters 3 and 6 of this WebCGM specification.
Each interface of this DOM definition is normatively specified by a sectionof IDL code. The IDL uses basic data types such as unsigned short, boolean,long, etc. DOM applications are written in some programming language binding ofthe IDL, such as ECMAScript or Java. The only normatively specified binding forWebCGM DOM is theECMAScriptbinding.
The ECMAScript binding unambiguously associates ECMAScript language datatypes with the IDL data types, which provides all the data type informationneeded to write WebCGM DOM applications in ECMAscript.
Null returnvalue. WebCGM DOM attributes and method return values of typeWebCGMNode and WebCGMNodeList sometimes have to represent the case of no data,i.e., zero nodes. In the DOM functional specification of this chapter, the termnull is uniformly used to used to represent this case. In DOMbindings such as theECMAScriptbinding thenull return value maps naturally to anECMAScriptnull
reserved keyword. (For example,myNode.childnodes==null
evaluates to true, andmyPicture.getAppStructureById()==null
evaluates to true.)
One heavily used data type in the IDL definition is the WebCGMString, andsome of the DOM interfaces do specify substructure or sub-types for someWebCGMString attributes and parameters.
WebCGMString
A WebCGMString is a sequence of 16-bit units in WebCGM DOM.
IDL Definition
valuetype WebCGMString sequence<unsigned short>;
In WebCGM DOM, like XML DOM Level 3, the UTF-16 encoding was chosen becauseof its widespread industry practice. For ECMAScript and Java, WebCGMString isbound to the String type because both languages also use UTF-16 as theirencoding. The WebCGM DOM has many interfaces that imply string matching. ForXML, string comparisons are case-sensitive and performed with a binarycomparison of the 16-bit units of the WebCGMStrings.
Empty string.WebCGM DOM attributes and method return values of type WebCGMString sometimeshave to represent a string that has no data, i.e., zero characters. In the DOMfunctional specification of this chapter, the termemptystring is uniformly used to used to represent this case. In DOMbindings such as theECMAScriptbinding, the WebCGM empty string maps naturally to an ECMAScript string oflength zero, i.e., zero characters. (For example,myEmptyString.length==0
evaluates to true, andmyEmptyString==""
evaluates to true.)
The WebCGM DOM has a number of WebCGMString attributes or parameters that infact encode other data — such as numbers, colors, sub-strings, etc— into the string format. For the purposes of this specification, wedefine the following rules for how WebCGMStringsub-types areencoded and represented within WebCGMString objects.
A real number value encoded in a WebCGMString. The representation of thenumber can be eitherdecimal notation orscientificnotation. Decimal notation consists of either an integer, or anoptional sign character followed by zero or more digits followed by a dot (.)followed by one or more digits. Scientific notation consists of adecimal-notation representation immediately followed by the letter "e" or "E"immediately followed by an integer.
Percent
A percent, encoded in a WebCGMString, is anumber followedby a percent-sign character, "%".
Color
A color, encoded in a WebCGMString, is a "#", followed by exactly six hexdigits, [0-9a-fA-F]. The first two digits represent the red component, thesecond two represent the green component, and the last two represent the bluecomponent. Conceptually: #RRGGBB. Examples: #FF0000 is full red, #e1e1e1 is thegray background of the IDL definitions in this chapter, #00FFFF is full cyan,etc.
The following EBNF defines list-of-number (with number as defined above):
list-of-number ::= number | number Wsp list-of-numberWsp ::= (#x20 | #x9 | #xD | #xA)+
(Note:Wsp
matches the"Whitespace"definition of XML 1.0 [XML10].)
Delimited String (list-of-string)
Some WebCGMString attributes may encode multiple substrings, e.g., the APSAttributes, 'name' and 'linkuri'. For historical reasons, this is known asDelimited String sub-type (although functionally it is a "list-of-string").
A Delimited String conforms to the following notation:
DelimitedString ::= ListX | ListXXListX ::= '"'Name'"' | '"'Name'"' Wsp ListXListXX ::= "'"Name"'" | "'"Name"'" Wsp ListXXWsp ::= (#x20 | #x9 | #xD | #xA)+
Name ::= (ValidChar)*
The definition of ValidChar depends on the particular WebCGM entity that isbeing encoded. For example, in theAPS Attributestable for DOM access (in section 5.7.6, Interface WebCGMAppStructure), thevalid characters for each of the APS Attributes that are encoded by DelimitedString are determined by the WebCGM datatype of the particular APS Attribute(linked from the table), in combination with theCharacter Repertoire rules ofsection 3.1.1.3.
In the case of the'linkuri' APSattribute, the value always contains 3 * n strings, n representing thenumber of 'linkuri' attributes specified on the Application Structure. Whenmeaningful values are not supplied for some of the components, the componentsmust be represented by an empty string. The restriction of 3 * n stringssimplifies scripts aimed at manipulating Delimited Strings.
Example: to set a 'region' APS Attribute that consisted oftwo subregions:
setAppStructureAttr("region", "''1 0 0 100 100' '1 25 25 75 75'")
Example: a multilink consisting of two links could berepresented with the following delimited string:
'http://www.w3.org/' 'W3C' '_blank' 'http://www.cgmopen.org/' 'CGMOpen''_self'.
A Delimited String is a list of wsp-separated substrings. If the DelimitedString only contains a single substring, then it is coded as a simplestring.
Example: to set a 'region' APS Attribute that consists of asingle subregion:
setAppStructureAttr("region", "1 0 0 100 100")
Note. This Delimited String syntax, when combined with handling of stringparameters in languages such as ECMAScript, imposes some constraints on thecontent of Delimited String substrings. In particular, it would not be possibleto have a substring that contained both a QUOTE character and an APOSTROPHEcharacter.
TheXML Companion File (XCF) provides accessto many of the APS Attributes and Style Properties that are accessible via theWebCGM DOM. APS Attributes and Style Properties that occur in WebCGM DOM asattributes and method parameters are represented in XCF as XML attributes. Thevalues are encoded in the XML attribute strings of XCF exactly as they would beencoded in theWebCGMString type or aWebCGMString sub-type of the correspondingWebCGM DOM parameter or attribute.
In a WebCGM instance, the representation of coordinates (VDC) is influencedby several CGM elements: VDC TYPE, VDC EXTENT, and SCALE MODE. WebCGM requiresthat SCALE MODE be 'metric', but places few other constraints. Therefore VDC(times some scale factor) are equivalent to millimeters, but otherwise thecoordinate system could have a lot of variability: upper-left or lower-leftorigin, right-handed or left-handed, integer values or real values (floating orfixed), etc.
To simplify working with coordinates, the WebCGM DOM defines and uses acanonical, normalized coordinate system, Normalized VDC (NVDC).
NVDC units are millimeters, in a coordinate system whose origin correspondsto the lower left corner of the VDC extent, with the X axis pointing to theright, and the Y axis pointing up. The following examples illustrate thecorrespondence between NVDC and VDC values for several WebCGM instances.
Example 1: Simplest possible example, the VDC and the NVDCare identical
The picture's VDC have lower-left origin, X increases to right, Y increasesup, picture is 150 mm wide and 100 mm high. The NVDC are identical,: (0.,0.)for lower-left corner, (150.,100.) for upper-right corner. If(x,y)
are VDC and(x',y')
are NVDC, then:
x' = x
y' = y
Example 2: The VDC define an upper-left origin, andcorrespond to a U.S. paper size of 8.5x11.0 inches:
In VDC space, the origin is the upper-left corner, X increases to right, Yincreases down. In NVDC space, the lower-left corner coordinates (as always)are (0,0) and the upper right corner is (215.9,279.4). If(x,y)
are VDC and(x',y')
are NVDC, then:
x' = 25.4*x
y' = 279.4 - 25.4*y
Example 3: In thegeneral case, if VDCExtent coordinates are(xll, yll)
,(xur, yur)
, andScale Factor is 'metric',s
, then(x',y')
NVDC isderived from(x,y)
VDC by:
x' = sign(xur-xll) * (s) * (x - xll)
y' = sign(yur-yll) * (s) * (y - yll)
The following subsections define the conventions and rules associated withthe geometric transform, which are implemented in the DOM by methods on theWebCGMAppStructure interface.
A geometric transform may be attached to eligible APS nodes by a DOM call,and leads to transient visual modification of the displayed image. Eligible APSnodes are: grobject, para, subpara, layer.
Geometric transforms on nodes in the WebCGM object tree, whether the default(Identity) or explicitly specified, compose or combine with the transforms onancestor and descendant nodes, to define a composite transform — theCurrent Transformation Matrix — for every node in the tree.
Terminology: WebCGM geometric transforms are defined in the two-dimensionalNVDC coordinate space. In principle, any rotate and scale operations can berepresented by a 2x2 matrixM, which is multiplied by the 2x1vector representation for of a pointp to apply the transform.A translation byd=(dx,dy) is performed by addingd top.
WebCGM uses the homogeneous coordinate system to define and describe theeffect of transforms. In this system, the matrix representationM is 3x3, with the six unique numbers associated withrotation, scale, and translation comprising the first two rows, and the thirdrow always being (0,0,1). The point p is represented by the 3x1 vector(x,y,1).
a c e b d f 0 0 1
For convenience, this matrix formM will be referred to as:[a b c d e f]. The application of the transformM to the pointp is then defined by:
p' = M * p
The following definitions specify how to formMcooresponding to basic operations such as translate, rotate, scale:
Successive basic operations are performed by left-multiplying the matricescorresponding to the operations. For example, a translation by Mt followed by arotation by Ma is performed by:
p' = Ma * Mt * p
As another example, a rotation of anglea about anarbitrary pointc = (cx,cy) is performed by the sequence ofoperations:
FormingM1,M2, andM3 bythe above rules, then the matixM for the rotation bya about(cx,cy) is:
M = M3 * M2 * M1
TheWebCGMAppStructure Interface contains methods forapplying , rotate, translate, and general matrix transforms to ApplicationStructures. Each of the methods has a parameter,replace, whose valuesmay be 'combine
' or 'replace
'. These have thefollowing meanings:
replace
: replace any existing, explicitly-defined transform on the APS with the new transform.combine
: combine the new transform with any existing explicitly-specified transform by left multiplying. IfMn is the newly specified transform, andMe is the existing explicitly-specified transform, then the new explicitly-specified transformM is:M = Mn * Me
Assume that an object tree has this structure, where A contains B, whichcontains C and D:
APS-A
....APS-B
........APS-C
........APS-D
Placing a transform on node A transforms all of the geometry within A,including the contents of B, C, and D. But it doesn't supersede any transformthat might be on B, C, and D. Rather, it combines with them — youpost-multiply the matrix representations so that the various contents in thetree are transformed as follows:
Ma — inside APS-A, but outside APS-B.
Ma*Mb — inside APS-B, but outside APS-C and APS-D.
Ma*Mb*Mc — inside APS-C.
Ma*Mb*Md — inside APS-D.
The resultant composite transform as defined in these illustrations is knownas theCurrent Transformation Matrix (CTM) of thenode. Every node in the object tree conceptually has an associated CTM, even ifit is just the Identity matrix.
There is a parameter associated with the WebCGM geometric transform thatdetermines, when the DOM method specifies a 'transform' on a node in the objecttree, whether it is defined in 'replace
' mode or'combine
' mode. But once that transform-specifying method has beenexecuted, then there is some well-defined explicitly-specified transform onthat node, and it combines with its ancestors and descendants according to theusual rules to compute the CTM for each node.
The interfaces within this section are considered fundamental, and must befully implemented by all conforming implementations of the WebCGM DOM. TheWebCGM DOM presents WebCGM documents as a hierarchy ofWebCGMNode
objects that also implement other,more specialized interfaces. Some of the node types may have child nodes ofvarious types, and others are leaf nodes that cannot have anything below themin the WebCGM document structure. WebCGM has the following node types:
WebCGMMetafile
— contains alist of WebCGMPicture nodes.
WebCGMPicture
— may containchild WebCGMAppStructures or child XML metadata nodes.
WebCGMAppStructure
— maycontain child WebCGMAppStructures or child XML metadata nodes.
WebCGMAttr
— no children.
The WebCGM DOM also specifies several other interfaces to facilitate accessto WebCGM attributes. TheGetWebCGMDocument
interface isthe medium between the host environment and the WebCGM functionality. TheWebCGMNodeList
interfaceenables the handling of ordered lists of WebCGMNodes. TheWebCGMEvent
interface providescontextual information regarding mouse events. WebCGMNodeList objects in theDOM are live; that is, changes to the underlying document structure arereflected in all relevant NodeList objects. For example, if a DOM user gets aWebCGMNodeList object containing the children of an WebCGMAppStructure, thenchanges one of its children in the tree, all changes are reflected in theNodeList objects and in fact to all references to that Node in NodeListobjects.
The WebCGMPicture node is the root of the document tree for DOM andinheritance model purposes:
webcgm
root element of theXML Companion File (XCF), and the XCF design has determined that companion files should be per-picture.WebCGM operations only raise exceptions when an operation is impossible toperform.
exception WebCGMException { unsigned short code;};// ExceptionCodeconst unsigned short INDEX_SIZE_ERR = 1;const unsigned short WEBCGMSTRING_SIZE_ERR = 2;const unsigned short INVALID_CHARACTER_ERR = 3;const unsigned short NO_DATA_ALLOWED_ERR = 4;const unsigned short NO_MODIFICATION_ALLOWED_ERR = 5;const unsigned short NOT_SUPPORTED_ERR = 6;const unsigned short INVALID_ACCESS_ERR = 7;const unsigned short FILE_NOT_FOUND_ERR = 8; const unsigned short FILE_INVALID_ERR = 9; |
EXAMPLE:
This simple example shows how to catch a WebCGMException from HTML & ECMAScript. In a WebCGM-DOM enabled browser, correct execution of this HTML-ECMAScript code should cause an alert box to appear that an attempt to change a readonly attribute is made.
<html><head><title>Example, WebCGMException interface</title><script type="text/ecmascript"> function causeException(evt) { alert("Try to change the readonly attribute layername"); try { var webcgm = document.getElementById('ivx1').getWebCGMDocument(); var pic = webcgm.firstPicture; var obj = pic.getAppStructureByID("A"); obj.setAppStructureAttr("layername","anotherName"); } catch (e) { alert("Catch the exception: " + e.description); } }</script></head><body onload="causeException()"><table border="1" rules="cols"> <tr> <th>Example, causeException interface</th> </tr> <tr> <td><object data="ex_Exception.cgm" type="image/cgm;Version=4;ProfileId=WebCGM" width="480" height="360"></object> </td> </tr></table></body></html>
View this example as HTML-CGM (WebCGM-DOM-enabled browsers only.)
An integer indicating the type of error generated.
INDEX_SIZE_ERR; if index or size is negative, or greater than the allowed value.
DOMSTRING_SIZE_ERR; if the specified range of text does not fit into a WebCGMString.
INVALID_CHARACTER_ERR; if an invalid or illegal character is specified, such as in an XML name.
NO_DATA_ALLOWED_ERR; if data is specified for a node which does not support data.
NO_MODIFICATION_ALLOWED_ERR; if an attempt is made to modify an object where modifications are not allowed.
NOT_SUPPORTED_ERR; if the implementation does not support the requested type of object or operation.
INVALID_ACCESS_ERR; if a parameter or an operation is not supported by the underlying object.
FILE_NOT_FOUND_ERR; if the reference document could not be accessed
FILE_INVALID_ERR; if the reference document was not well-formed or was in error.
interface WebCGMRect { attribute float xll; // x coordinate of the lower-left corner attribute float yll; // y coordinate of the lower-left corner attribute float xur; // x coordinate of the upper right corner attribute float yur; // y coordinate of the upper right corner WebCGMRect unionRect(in WebCGMRect r); }; |
x coordinate of the lower-left corner of the rectangle.
y coordinate of the lower-left corner of the rectangle.
x coordinate of the upper-right corner of the rectangle.
y coordinate of the upper-right corner of the rectangle.
The rectangle used to calculate the union with the current rectangle.
interface WebCGMMatrix { attribute float a; attribute float b; attribute float c; attribute float d; attribute float e; attribute float f; WebCGMMatrix multiply (in WebCGMMatrix m); WebCGMMatrix inverse(); // raises exception WebCGMMatrix translate( in float x, in float y ); WebCGMMatrix scale( in float sx, in float sy, in float cx, in float cy ); WebCGMMatrix rotate( in float angle, in float rx, in float ry ); }; |
The a-f components of the matrix as defined in "Transform basic concepts"
in WebCGMMatrix m The matrix which is post-multiplied to this matrix.
The distances to translate respectively in the x-direction and y-direction. Units are NVDC.
The scale factors to apply respectively in the x-direction and y-direction, with scaling centered at NVDC point (cx,cy).
The x-coordinate and y-coordinate, respectively, of the NVDC centerpoint of the scaling operation.
The rotation angle. Positive values correspond to counter-clockwise in NVDC space.
The x-coordinate and y-coordinate, respectively, of the NVDC centerpoint of the rotation operation.
Since WebCGM documents are often embedded within a host document such asXHTML, WebCGM user agents are required to implement theGetWebCGMDocument interface for the element which referencesthe WebCGM document (e.g., the 'object' tag).
interface GetWebCGMDocument { WebCGMMetafile getWebCGMDocument ( ) raises ( WebCGMException ); WebCGMString getAppName(); WebCGMString getAppVersion();}; |
The
interface WebCGMMetafile { readonly attribute WebCGMString metafileDescription; readonly attribute WebCGMPicture firstPicture; readonly attribute WebCGMString metafileID; readonly attribute unsigned short metafileVersion; attribute WebCGMString src; void addEventListener(in WebCGMString type, in WebCGMEventListener listener); void removeEventListener(in WebCGMString type, in WebCGMEventListener listener)); void setRedraw(in WebCGMString value);}; |
EXAMPLE:
This simple example shows how to use a method of the WebCGMMetafile interface from HTML & ECMAScript. In a WebCGM-DOM enabled browser, correct execution of this HTML-ECMAScript code should display the metafileID parameter of the BEGIN METAFILE element in a message below the picture.
<html><head><title>Example, Metafile interface</title><script type="text/ecmascript"> function metafileInfo() { try { var webcgm = document.getElementById('ivx1').getWebCGMDocument(); document.getElementById("_1").firstChild.data = "The metafileID is \"" + webcgm.metafileID + "\""; } catch (e) { alert(e.description); } }</script></head><body onload="metafileInfo()"><table border="1" rules="cols"> <tr> <th>Example, WebCGMMetafile interface</th> </tr> <tr> <td><object data="ex_Metafile.cgm" type="image/cgm;Version=4;ProfileId=WebCGM" width="480" height="360"></object> </td> </tr></table><p>Metafile ID is:</p></body></html>
View this example as HTML-CGM (WebCGM-DOM-enabled browsers only.)
Returns the Metafile Description of the WebCGM document, which is a string consisting of QUOTE-delimited substrings, as defined in theWebCGM PPF. For example: "ProfileId:WebCGM""ProfileEd:2.1""Source:A software vendor""Date:20040602""ColourClass:monochrome". Also as specified by theWebCGM PPF, a validmetafileDescription will always contain the ProfileId: and the ProfileEd:, other information such as Source, ColourClass etc... is optional. If no WebCGM document is open in the viewer, anempty string is returned.
Returns the first WebCGMPicture element of the WebCGM document. Subsequent WebCGMPictures can be accessed using the WebCGMPicture interface. A WebCGM document (version 2.0 and later) contains exactly one WebCGMPicture. If no WebCGM document is open in the viewer,null is returned.
Returns the Metafile Identifier, which is the parameter of the BEGIN METAFILE element in the CGM document. If no WebCGM document is open in the viewer, anempty string is returned.
Returns the Metafile Version of the WebCGM document. If no WebCGM document is open in the viewer, the value zero is returned
EXAMPLE. The 'src' attribute is an IRI, with possible fragment containing object selection and object behavior terms. It isnot a full 'linkuri' (APS Attribute) data record, and any fragment doesnot contain picture behavior terms. So to open myCGM.cgm using (ECMAscript) DOM calls that reference an HTML<object>
element with ID of 'myObjElt':
Correct examples:
document.getElementById('myObjElt').getWebCGMDocument().src= 'myCGM.cgm#myId';
[...].getWebCGMDocument().src= 'myCGM.cgm#id(myId,full)';
Incorrect:
[...].getWebCGMDocument().src= 'myCGM.cgm#"myId" "myTitle" "_blank"'
[...].getWebCGMDocument().src= "myCGM.cgm#id(myId).picseqno(1,_blank)"
Note: Although all WebCGMEventListeners on the WebCGMMetafile are guaranteed to be triggered by any event which is received, no specification is made as to the order in which the WebCGMMetafile will receive the event with regards to the other WebCGMEventListeners on the WebCGMMetafile.
The event type for which the user is registering, (for example: "click", "mouseover").
The listener parameter takes an interface implemented by the user which contains the methods to be called when the event occurs.
Specifies the event type of the WebCGMEventListener being removed (for example: "click", "mouseover").
Indicates the WebCGMEventListener to be removed.
Specifies the redraw mode of the metafile, {enableAll | disableAll}.
TheWebCGMNodeinterface is the base datatype of the WebCGM Document Object Model. TheWebCGMNode object is the basis of several other interfaces. the WebCGMNodeobject is the basis of several other interfaces, including interfaces to WebCGMspecific elements (eg: WebCGMAppStructure), and to non-WebCGM elements such asMetadata nodes. The WebCGMNode interface specifies the attributes and methodsto perform simple and generic tree traversal. For these attributes and methodsin particular, APS of type 'grnode' are DOM-visible andDOM-accessible, unlike most other DOM interfaces.
interface WebCGMNode { const unsigned short PICTURE_NODE = 1; const unsigned short APP_STRUCTURE_NODE = 2; const unsigned short XML_METADATA_NODE = 3; const unsigned short TEXT_NODE = 4; const unsigned short ATTR_NODE = 5; readonly attribute WebCGMString nodeName; readonly attribute WebCGMString nodeValue; // raises(WebCGMException) on retrieval readonly attribute unsigned short nodeType; readonly attribute WebCGMNode parentNode; readonly attribute WebCGMNodeList childNodes; readonly attribute WebCGMNode firstChild; readonly attribute WebCGMNode lastChild; readonly attribute WebCGMNode previousSibling; readonly attribute WebCGMNode nextSibling; readonly attribute WebCGMPicture ownerPicture; boolean hasChildNodes(); boolean hasAttributes(); readonly attribute WebCGMNodeList attributes; readonly attribute WebCGMString namespaceIRI; readonly attribute WebCGMString prefix; readonly attribute WebCGMString localName; WebCGMString getAttributeNS(in WebCGMString namespaceIRI, in WebCGMString localName); void setAttributeNS(in WebCGMString namespaceIRI, in WebCGMString qualifiedName, in WebCGMString value); WebCGMNodeList getElementsByTagNameNS(in WebCGMString namespaceIRI, in WebCGMString localName);}; |
EXAMPLE:
This simple example shows how to use an attribute on the WebCGMNode interface from HTML & ECMAScript. In a WebCGM-DOM enabled browser, correct execution of this HTML-ECMAScript code should display a message below the picture, with a 2nd line indicating nodeType "1".
<html><head><title>Example, WebCGMNode interface</title><script type="text/ecmascript"> function getNodeType(evt) { var webcgm = document.getElementById('ivx1').getWebCGMDocument(); if( webcgm ) { var pic = webcgm.firstPicture; if( pic ) { var elem = document.getElementById('result').lastChild; var text = elem.nodeValue; text = text + pic.nodeType; elem.nodeValue = text; } } }</script></head><body onload="getNodeType()"><table border="1" rules="cols" width="480"> <tr> <th>Example, WebCGMNode interface</th> </tr> <tr> <td><object data="ex_Node.cgm" type="image/cgm;Version=4;ProfileId=WebCGM" width="480" height="360"></object> </td> </tr> <tr > <td>The <strong>WebCGMNode.nodeType</strong> value of...<br/><em>getWebCGMDocument().firstPicture</em> is: </td> </tr> </table></body></html>
View this example as HTML-CGM (WebCGM-DOM-enabled browsers only.)
An integer indicating which type of node this is.
PICTURE_NODE; the node is a WebCGMPicture.
APP_STRUCTURE_NODE; the node is a WebCGMAppStructure.
XML_METADATA_NODE; the node is XML companion information attached to a CGM element.
TEXT_NODE; the node contains character data.
ATTR_NODE; the node is a WebCGMAttr.
The name of this node, depending on its type; see thetable below.
The value of this node, depending on its type; see thetable below.
WebCGMException; NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly and if it is not defined to benull.
WebCGMException; DOMSTRING_SIZE_ERR: Raised when it would return more characters than fit in a WebCGMString variable on the implementation platform.
A code representing the type of the underlying object.
The values of nodeName and nodeValue vary according to the node type as follows:
Interface | nodeName | nodeValue |
WebCGMAppStructure | WebCGMAppStructure type: "layer" | "grobject" | "para" | "subpara" | "grnode" | empty string |
WebCGMAttr | WebCGMAttr.name | empty string |
WebCGMPicture | "#picture" | empty string |
Character Data | "#text" | content of the text node |
XML Metadata | prefix + localName | empty string |
The parent (immediate ancestor node of a node) of this node. All nodes, except WebCGMPicture and WebCGMAttr, may have a parent.
A WebCGMNodeList that contains all children of this node. If there are no children, this returnsnull.
The first child of this node. If there is no such node, this returnsnull.
The last child of this node. If there is no such node, this returnsnull.
The node immediately preceding this node. If there is no such node, this returnsnull.
The node immediately following this node. If there is no such node, this returnsnull.
The WebCGMPicture object associated with this node. When the node is a WebCGMPicture node, this returnsnull
A WebCGMNodeList containing all attributes (WebCGM and namespaced) of this node ornull if the WebCGMNode doesn't have any attributes. Alwaysnull when nodeType is APS_STRUCTURE_NODE and nodeName is 'grnode'. The 'apsid' parameter of the Begin APS element is considered to be an attribute of its APS for DOM purposes, and the 'pictid' parameter of the Begin Picture element is considered to be an attribute of its Picture for DOM purposes. This table summarizes the contents of 'attributes' for the various node types:
Node type | attributes |
---|---|
PICTURE_NODE | pictid (always); NS attributes |
APP_STRUCTURE_NODE | apsid (always); NS attributes; APS Attributes |
XML_METADATA_NODE | NS attributes |
ATTR_NODE | none (alwaysnull) |
TEXT_NODE | none (alwaysnull) |
The namespace IRI of this node. For example, on the elementfoo:someElement
, returns the IRI of the (xmlns) namespace declaration that associates the prefixfoo
with the namespace. This is not a computed value that is the result of a namespace lookup based on an examination of the namespace declarations in scope. It is the namespace IRI given at creation time. This returnsempty string if the WebCGMNode is not of type XML_METADATA_NODE or ATTR_NODE.
The namespace prefix of this node (e.g., foo:elementName, returns "foo"). This returnsempty string if the WebCGMNode is not of type XML_METADATA_NODE or ATTR_NODE.
Returns the local part of the qualified name of this node (e.g., foo:elementName, returns "elementName"). This returnsempty string if the WebCGMNode is not of type XML_METADATA_NODE or ATTR_NODE.
The namespace IRI of the attribute to retrieve.
The local name of the attribute to retrieve.
The namespace IRI of the attribute to create or alter.
The qualified name of the attribute to create or alter.
The value to set, in string form.
WebCGMException; INVALID_CHARACTER_ERR: Raised if the specified qualified name contains an illegal character. The legal-character constraints of the qualified name match those of theattribute name construct ofXML 1.0 [XML10].
The namespace IRI of the XML elements to match on.
The local name of the XML elements to match on.
TheWebCGMPictureinterface allows for access to the Application Structures of the WebCGMdocument. It also specifies how to load and apply anXML Companion File (XCF) to a WebCGM document.
interface WebCGMPicture :WebCGMNode { readonly attribute float width; readonly attribute float height; readonly attribute WebCGMString pictid; boolean applyCompanionFile(in WebCGMString fileIRI); WebCGMAppStructure getAppStructureById(in WebCGMString apsId); WebCGMNodeList getAppStructuresByName(in WebCGMString apsName); void highlight(in WebCGMNodeList nodes, in WebCGMString type); void clearHighlight(); void setPictureVisibility(in WebCGMString visibility); void setStyleProperty(in WebCGMString style, in WebCGMString value); void reloadPicture(); boolean setView (in WebCGMRect viewRect); WebCGMString getStyleProperty(in WebCGMString style); WebCGMRect createWebCGMRect();}; |
EXAMPLE:
This simple example shows how to use a method of the WebCGMPicture interface from HTML & ECMAScript. In a WebCGM-DOM enabled browser, execution of this HTML-ECMAScript code should cause the initial view of the technical illustration to appear with a blue-gray background, instead of a white background:
<html><head><title>Example, WebCGMPicture interface</title><script type="text/ecmascript"> function changeBackground(evt) { var webcgm = document.getElementById('ivx1').getWebCGMDocument(); if( webcgm ) { var pic = webcgm.firstPicture; if( pic ) { pic.setStyleProperty("background-color","#A0A0D0"); } } }</script></head><body onload="changeBackground()"><table border="1" rules="cols"> <tr> <th>Example, WebCGMPicture interface</th> </tr> <tr> <td><object data="ex_Picture.cgm" type="image/cgm;Version=4;ProfileId=WebCGM" width="480" height="360"></object> </td> </tr></table></body></html>
View this example as HTML-CGM (WebCGM-DOM-enabled browsers only.)
Represents the WebCGMPicture width in millimeters. Please refer toCoordinate Values section for more information.
Represents the WebCGMPicture height in millimeters. Please refer toCoordinate Values section for more information.
Represents the WebCGMPicture id, which is the id parameter in the BEGIN PICTURE element in the CGM document.
Reads an XML Companion File (XCF) into the user agent's object model. Ifapplication-specific metadata is found in the companion file (in the form of namespace attributes and namespace children elements), the user agent will create new namespace application structures as children of existing WebCGM Application Structures within it's object model. This information will then be accessible using methods found on this WebCGMPicture interface, onWebCGMAppStructure and onWebCGMNode. If thefileIRI
parameter of this method is a relative IRI, then that relative IRI is resolved similarly toresolving relative IRIs for XCF resources referenced in the WebCGMIRI fragment syntax, i.e., the IRI is resolved relative to location of the CGM resource to which the XCF resource is a companion.
Please refer to theRelationship with XML companion file section for more discussion.
The file name and location of the XML companion file to load and apply into the object model.
WebCGMException; FILE_INVALID_ERR: if the referenced document was not well-formed or in error.
apsId
. If no such Application Structure exists, returnsnull. Returnsnull ifapsid
corresponds to an APS of type 'grnode'. Behavior is not defined if more than one element has this ID. Only WebCGM Application Structures may be retrieved using getAppStructureById, it does not retrieve foreign namespace elements (application-specific metadata elements).The unique id value for an Application Structure.
A non-unique name value for an Application Structure.
A WebCGMNodeList of APP_STRUCTURE_NODEs to highlight.
Denotes a behavior identical to the correspondinghighlighting object behavior keywords of the fragment syntax. Values: { add | new }.
id(*,clearHighlight)
, that is defined in theenumeration of behaviors of the fragment syntax.Value for the visibility of the picture, {on | off}.
Set a style property at the picture level by name.
Style Property Name | Picture level | APS level | Attribute value(s) | Initial value | Example |
---|---|---|---|---|---|
background-color | yes | no | absolute RGB or relative intensity (0..100%) | 100% | "#000000" or "75%" |
text-size | yes | yes | absolute NVDC or relative scale (both > 0) | 100% | "225%" |
fill-color | yes | yes | absolute RGB or relative intensity (0..100%) | 100% | "#FF0000" or "75%" |
intensity | yes | yes | intensity (0..100%) | 100% | "75%" |
stroke-color | yes | yes | absolute RGB or relative intensity (0..100%) | 100% | "#FF0000" or "75%" |
stroke-weight | yes | yes | absolute NVDC or relative scale (both > 0) | 100% | "225%" |
text-color | yes | yes | absolute RGB or relative intensity (0..100%) | 100% | "#FF0000" or "75%" |
text-font | yes | yes | WebCGMString | "metafile" | "Helvetica" |
raster-intensity | yes | yes | relative intensity (0..100%) | 100% | "75%" |
stroke-type | yes | yes | positive or negative integer | metafile-value | "1" or "-3" |
stroke-offset | yes | yes | relative distance (0..100%) | metafile-value | "25%" |
interior-style | yes | yes | integer value (0,1,2,3,4,6) | metafile-value | "4" |
hatch-index | yes | yes | index value (1..6 and negative) | metafile-value | "1" or "-2" |
pattern-index | yes | yes | index value (>0) | metafile-value | "2" |
edge-visibility | yes | yes | "on" or "off" | metafile-value | "off" |
fill-offset | yes | yes | NVDC point | >metafile-value | "0.2 0.5" |
Common specifications. The following common specifications, related to theinheritance model, apply to all of the Style Properties:
Units in the table. RGB colors are expressed as hexadecimal values. Relative scale values are expressed as a positive or non-negative number (depending on the property) followed by a '%' unit designator. Relative values of some properties can exceed 100%. Relative intensity values are expressed as a number followed by a '%' unit, ex: "75%". Relative intensity values cannot exceed 100%.
Color representation. Absolute RGB colors are expressed using a hexadecimal representation for all three RGB channels, #RRGGBB. Examples of colors expressed in hexadecimal representation: red is expressed as #FF0000, and cyan which uses both full green and full blue is expressed as #00FFFF. The representation must be exactly 6 digits, 2 each for R, G, and B. Shorthand hexadecimal notation, e.g., the 3-digit #RGB notation, is not supported in this specification.
Replacement mode. When Style Properties have values of "%" (percent), the respective attribute value used for display is adjusted by applying the appropriate formulae to the attribute values in the metafile (for the appropriate target object). For example, stroke-weight of 60% means that the metafile-defined LINE WIDTH and EDGE WIDTH attributes are multiplied by 0.6. Successive setting of the same Style Property replaces any previous setting of the same Style Property (rather than accumulating with it). So, for example, stroke-weight 60% followed later by stroke-weight 40% results in stroke-weight 40%, not stroke-weight 24%.
Order counts. Some Style Properties have overlapping effects. For example, intensity and fill-color both affect the color of filled areas. When both properties are defined for a target APS, the latter definition supersedes and replaces the earlier definition. So for example intensity 40% followed by fill-color 60% results in 60% fill color, while fill-color #FF0000 followed by intensity 40% results in fill-color 40% (of the filled-areas colors in the metafile, for the target object).
Initial value. The role of the Initial Value is described in theinheritance model. The phrasemetafile-value, when appearing in the initial-value column of theabove Style Properties table, means that the present values of the associated CGM attributes in the target object (APS or picture) of the metafile are used. In this version of WebCGM, the initial values are all such that the associated Style Property does not affect the display appearance unless it is explicitly set with a setStyleProperty() method call.
Style Property Definitions. The following are the detailed functional definitions of each of the Style Properties:
background-color is the color of the rendering surface for the entire picture, on which all elements are drawn. It corresponds to the BACKGROUND COLOUR attribute of the CGM standard. Example: a value of #000000 for the background-color style property will override what is in the WebCGM instance, and display a black background for all elements to render over.
text-size redefines the size of all text in the target object. If text-size is "%", then it adjusts the text restriction boxes (heights and widths) and the CGM CHARACTER HEIGHT attribute by that amount. If the text-size value is NVDC, for each text element in the target object, compute the ratio (effectively, a percent) of the new NVDC value and the restriction box height, and apply the resulting ratio as would be done for the same "%" value.
fill-color is the style property applied to a closed area inside the path of a shape. It corresponds to the CGM attribute FILL COLOUR, and will override the current values of that attribute within the target object (APS or picture), if the fill-color Style Property is applied to object.
intensity is a way to make the current color fade towards white. An intensity value of 0% applied to an Application Structure (APS) will make its contents completely white while a value of 100% will keep the current colors intact. The intensity equation is as follows:
normalizedNewRed = 1 - intensity * (1 - normalizedOldRed)
normalizedNewGreen = 1 - intensity * (1 - normalizedOldGreen)
normalizedNewBlue = 1 - intensity * (1 - normalizedOldBlue)
Example: Here is an example of the computations when applying an intensity of 40% to the color orange #FFA500:
normalizedNewRed = 1 - 0.4 * (1 - 1) = 1
normalizedNewGreen = 1 - 0.4 * (1 - 0.647) = 0.859
normalizedNewBlue = 1 - 0.4 * (1 - 0) = 0.5
The new color is %FFDB99.
Setting a relative intensity value is allowed on a number of individual style properties, see table above. The 'intensity' style property, however, represents a convenience property that simultaneously controls the intensity value of the following four properties: fill-color, stroke-color, text-color and raster-intensity.
stroke-color defines the color for the lines and edges within the target object (APS or picture) to which the property is applied. Stroke-color overrides the CGM attributes LINE COLOUR and EDGE COLOUR. This style property will apply an absolute or a relative intensity color change to metafile-defined values of those CGM attributes within the target object.
stroke-weight redefines the thickness of the pen strokes for drawing of lines and edges within the target object (APS or picture) to which it is applied. Stroke-weight overrides CGM attributes LINE WIDTH and EDGE WIDTH. This stroke-weight property can apply a relative scale change to the metafile-defined value of those attributes, or can provide an absolute (NVDC) replacement for those current values.
text-color redefines the color for the graphical text within the target object (APS or picture) to which the property is applied. Text-color overrides the CGM attribute TEXT COLOUR. This style property will apply an absolute or a relative intensity color change to metafile-defined value of that CGM attribute within the APS.
text-font specifies a replacement font for all text in the target object. If the characters that are needed for all text in the target object are available in the specified replacement font, and if the specified font is available, then use it for all text in the target object. Otherwise, ignore the specified replacement font. The initial value of text-font, which is the reserved keyword "metafile", means that the font specifications of the metafile are used.
raster-intensity is a way to make the current color fade towards white in a raster element. It applies to the colors within CELL ARRAY, TILE, and BITONAL TILE elements within the target object (APS or picture) to which it is applied. An intensity value of 0% applied to an Application Structure (APS) will make its raster contents completely white while a value of 100% will keep the current raster colors intact. The equations for computing new color values are the same as for theintensity property, above.
stroke-type defines the line type within the target object (APS or picture) to which the property is applied. stroke-type overrides the CGM attribute elements LINE TYPE and EDGE TYPE. Valid values are:integers 1-5 (which correspond to solid, dash, dot, dash-dot, dash-dot-dot), integers 6-15 (the registered or user defined values that are defined within the WebCGM.
stroke-offset defines the percentage of the first cycle of the stroke type that is omitted when starting to draw a non-solid stroke. Stroke offset overrides the CGM attribute elements LINE TYPE INITIAL OFFSET and EDGE TYPE INITIAL OFFSET within the target object (APS or picture).
interior-style determines which style of interior is used to draw a filled-areas. It corresponds to the CGM attribute element INTERIOR STYLE and will override the current values of that attribute within the target object (APS or picture). The valid Style Property values {0,1,2,3,4,6} corresponding respectively to {‘hollow', ‘solid', ‘pattern', ‘hatch', ‘empty', '‘interpolated'}.
hatch-index determines which hatch to use within filled-area elements of the target object (APS or picture). Hatch-index corresponds to the CGM attribute element HATCH INDEX and overrides the current values of that attribute within the target object (APS or picture). It must refer to aCGM:1999 pre-defined hatch index or a negative hatch index that has been defined with a HATCH STYLE DEFINITION with the WebCGM. Note: valid pre-defined hatch indexes are 1-6 (corresponding to: horizontal, vertical, positive slope, negative slope, horizontal/vertical cross, positive/negative slope cross)
pattern-index determines which of pattern to use within filled-area elements of the target object (APS or picture). Pattern-index corresponds to the CGM attribute element PATTERN INDEX and overrides the current values of that attribute within the target object (APS or picture). It must refer to a pattern that has been defined with a PATTERN TABLE with the WebCGM.
edge-visibility determines if the edge of filled-area elements of the target object (APS or picture) are drawn. Edge visibility corresponds to the CGM attribute element EDGE VISIBILITY and overrides the current values of that attribute within the target object (APS or picture)
fill-offset sets a reference point for patterns or hatch fills within the target object (APS or picture). Fill-offset corresponds to the CGM attribute element FILL REFERENCE POINT and overrides the current values of that attribute within the target object (APS or picture)
Conceptual effect of setting Style Properties. Style Properties, in this version of WebCGM, have no effect on the display appearance unless explicitly set by a call to the DOMsetStyleProperty
method (for either the whole picture via this method in this WebCGMPicture interface, or a specific APS viaWebCGMAppStructure'ssetStyleProperty
method). Conceptually, the effect of asetStyleProperty
method call is as follows. When a viewer initially processes a picture, or after areloadPicture
method call, it builds a display list that accurately reflects the contents of the each object and the whole picture — graphical primitives, primitive attributes, control elements, etc. The Style Property definitions above indicate, for each Style Property, what are the associated CGM primitive attributes. When asetStyleProperty
method call happens, the associated attributes in the object's display list contents are altered accordingly. Unless redraw is suppressed, the viewer applies theinheritance model and then traverses the modified display list. The visual result is fully defined by the rules ofISO/IEC 8632:1999 (CGM:1999), i.e., CGM:1999 fully defines the graphical result of traversing and displaying any valid sequence of metafile elements. If redraw is suppressed, then further DOM calls tosetStyleProperty
may lead to further changes to associated attributes in the display list, which are accumulated until redraw is allowed. This specification of conceptual effect describes the results to be achieved — viewers are not constrained to implement as conceptually described.
EXAMPLE 1: With redraw allowed, if APS "A" as defined in the metafile has INTERIOR STYLE 'solid', and two consecutivesetStyleProperty
calls set the interior-style SP to "2" (pattern) and then the pattern-index SP to 6, then: the first call will result in a redraw with defaultCGM:1999 pattern index 1 (assuming PATTERN INDEX is not defined in the metafile copy of the APS), and the second call will result in a redraw with pattern index 6. If redraw is instead suppressed until after the secondsetStyleProperty
call, then the single redraw will display the APS with pattern index 6.
EXAMPLE 2: With redraw allowed, if APS "B" as defined in the metafile has INTERIOR STYLE 'solid', and two consecutivesetStyleProperty
calls set the pattern-index SP to 6 and then interior-style SP to "2" (pattern), then: the first call should have no visual effect on the target APS (because the interior style in the display list is solid), and the second call will result in a redraw with pattern interior style and pattern index 6. (Be careful to note however, that the first callcould affect a nested APS, if the nested APS had interior style pattern.)
The name of the style property to modify.
The new value for the given style. Note that "inherit" is a valid value for every Style Property, and per theinheritance model, it has the effect of restoring the style property to its initial (load time) value (as determined by the inheritance model).
The name of the style property to retrieve.
WebCGMAppStructure::getObjectExtent andWebCGMRect::unionRect can be used to set the view around more than one APS.
The view rectangle in NVDC.
Creates aWebCGMRect object outside of the document.
The
The following table identifies which APS attribute values can be expressedas a Delimited String. Each entry in the table points to the detaileddescription of the attribute, as it appears in WebCGM content.
APS Attribute Name | read/write | Delimited strings | Example |
---|---|---|---|
content | yes | no, single string | "car engine transmission" |
interactivity | yes | no, single string | "on" |
layerdesc | yes | no, single string | "This layer contains English instructions" |
layername | readonly | no, single string | "English instructions" |
linkuri | yes | yes, multiple 3-tuples possible | '"http://w3.org" "W3C" "_blank"' |
name | readonly | yes, multiple names possible | '"firstName" "anotherName"' |
region | yes | yes, multiple subregions possible | '"1 0 0 100 100" "1 25 25 75 75"' |
screentip | yes | no, single string | "This is a screentip" |
viewcontext | yes | no, single string (two corner points) | "0 0 100 100" |
visibility | yes | no, single string | "on" |
The
interface WebCGMAppStructure :WebCGMNode { readonly attribute WebCGMString apsId; readonly attribute unsigned long nameCount; readonly attribute unsigned long linkuriCount; WebCGMString getAppStructureAttr(in WebCGMString name); void setAppStructureAttr(in WebCGMString name, in WebCGMString value) raises( WebCGMException ); void removeAppStructureAttr(in WebCGMString name) raises( WebCGMException ); void setStyleProperty(in WebCGMString style, in WebCGMString value); WebCGMNodeList toNodeList(); WebCGMRect getObjectExtent(); WebCGMString getStyleProperty(in WebCGMString style); void translate(in WebCGMString dx, in WebCGMString dy, in WebCGMString replace); void rotate(in WebCGMString angle, in WebCGMString rx, in WebCGMString ry, in WebCGMString replace); void scale(in WebCGMString sx, in WebCGMString sy, in WebCGMString cx, in WebCGMString cy, in WebCGMString replace); void setTransform(in WebCGMmatrix matrix, in WebCGMString replace); WebCGMMatrix getTransform(in WebCGMString type); }; |
EXAMPLE:
This simple example shows how to use methods of the WebCGMAppStructure interface from HTML & ECMAScript. In a WebCGM-DOM enabled browser, correct execution of this HTML-ECMAScript code should display "Layer name is fleet" under the picture.
<html><head><title>Example, WebCGMAppStructure interface</title><script type="text/ecmascript"> function OnBtnDOM() { try { // Get layernname var cgmDoc = document.getElementById("ivx1").getWebCGMDocument(); var cgmPic = cgmDoc.firstPicture; var result = document.getElementById("_1"); var gr = cgmPic.getAppStructureById("fleet"); var i = gr.getAppStructureAttr("layername"); result.firstChild.data = "Layer name is " + i ; } catch (e) { alert("Catch the exception: " + e.description); } }</script></head><body onload="OnBtnDOM()"><table border="1" rules="cols"> <tr> <th>Example, WebCGMAppStructure interface</th> </tr> <tr> <td><object data="ex_AppStructure.cgm" type="image/cgm;Version=4;ProfileId=WebCGM" width="480" height="360"></object> </td> </tr></table><p>Layer name is ...</p></body></html>
View this example as HTML-CGM (WebCGM-DOM-enabled browsers only.)
EXAMPLE:
The more advanced example inAppendix F shows how to use methods of the WebCGMAppStructure interface from HTML & ECMAScript to perform a regular expression searching based on the contents of APS attributes.
The unique identifier of the Application Structure. Always theempty string if the APS is of type 'grnode'.
Represents the number of 'name' attribute values present on this Application Structure. Always zero if the APS is of type 'grnode'.
Represents the number of 'linkuri' attribute values present on this Application Structure. Always zero if the APS is of type 'grnode'.
Retrieves an Application Structure attribute value by name. Please refer to theApplication Structure Attributes table for more detailed information on retrievable and modifiable Application Structure attributes.
The name of the Application Structure attribute to retrieve.
Adds a new Application Structure attribute. If an attribute with that name is already present in the APS, its value is changed to be that of the value parameter. Please refer to theApplication Structure Attributes table for more detailed information on retrievable and modifiable Application Structure attributes. If the APS is of type 'grnode', this method shall have no effect, neither on the viewed image nor the DOM tree.
The name of the Application Structure attribute to create or alter.
Value to set in string form. The value may be a delimited string.
Removes an Application Structure attribute. Please refer to theApplication Structure Attributes table for more detailed information on retrievable and modifiable Application Structure attributes. If the APS is of type 'grnode', this method shall have no effect, neither on the viewed image nor the DOM tree.
The name of the Application Structure attribute to remove.
Set a style property by name on the given Application Structure. Please refer to theStyle Properties Table for more detailed information on style properties. If the APS is of type 'grnode', this method shall have no effect, neither on the viewed image nor the DOM tree.
The name of the style attribute to modify.
The new value for the given style.
Creates a new WebCGMNodeList object and inserts the current Application Structure node into the list. The list count is 1.
Retrieves the axis-aligned bounding box rectangle of the Graphical Primitive elements within an APS. The bounding box calculation is based on thelocus of the primitives within the APS. Other than text attributes and text-related Style Properties, the calculation is not affected by CGM Primitive Attribute elements (such as line width) or Control elements (such as clipping), nor byAPS Attributes or non-textStyle Properties. It is affected bygeometric transform — the defining coordinates of the WebCGMRect return value are expressed in NVDC, computed after the application of theCurrent Transformation Matrix to the object's contents.
The contribution of raster elements to the object extent is directly related to the "footprint" of the element as defined inCGM:1999. For CELL ARRAY elements, the P,Q.R corner points (seeCGM:1999, section 7.6.9) define a parallelogram, which is the basis of the computation of the extent. For Tile Array elements, it is the "actual image within the tile space", and not the entire tile space, that is the basis of the extent (seeCGM:1999 section 6.6.5.4.2, and especially Figure 5).
The contribution of text elements to the object extent of a Restricted Text element is calculated as follows. First, an effective font size is derived that reflects all applicable CGM text attributes for the text string in question, as well as theStyle Properties text-size and text-font, plus the "effective Restricted Text parallelogram" and the Restricted Text Type. The "effective Restricted Text parallelogram" is defined to be the Restricted Text parallelogram as possibly altered by thetext-size Style Property. Then, the text string can be laid out glyph-by-glyph at this effective font size according to all applicable CGM attributes and applicable Style Properties, as defined inCGM:1999 section 6.7.3.
For the purposes of the object extent (bounding box) calculation, each glyph is treated as a separate graphics element. The calculations assume that all glyphs occupy their full glyph cell in both the vertical and horizontal directions. Therefore, calculations assume that each glyph extends to the full ascent and descent vertical font values; and to the glyph's horizontal advance value. InCGM:1999 terminology, full ascent and descent correspond to the top-line and bottom-line, respectively (see Figure 11,CGM:1999 section 6.7.3.2). For example, the font's bottom-line and top-line correspond to the ymin/ymax values of the fontBBox item found in the databases of WebCGM's core thirteen fonts (section 6.5, T.16.13). Similarly, the full horizontal extent of the glyph cell for the particular glyph — as distinct from actual drawn extents of the glyph — corresponds to the glyph's horizontal advancement value (WX) in the font databases of WebCGM's core thirteen fonts.
The object extent of the text string is he minimal axis-aligned bounding rectangle that contains all the glyph cells.
In practice, this calculation can usually be simplified considerably. By far the most commonly occurring WebCGM-compliant use cases involve fonts with left-to-right text progression and Restricted Text Type values 'box-cap' or 'box-all'. For the 'boxed-all' case, the sum of the glyph boxes is simply the Restricted Text parallelogram, and the object extent is simply the minimal axis-aligned rectangle that contains said parallelogram. 'Boxed-cap' is equally straightforward, involving a simple arithmetic adjustment to the Restricted Text parallelogram.
Note: Although WebCGM prohibits use of the TEXT element for graphical text and requires that the RESTRICTED TEXT element be used instead, viewers may encounter legacy CGM content that uses TEXT. It is recommended that DOM implementations of getObjectExtent should be able to correctly handle such metafiles, according to the calculations specified here.
The name of the style property to retrieve. Always theempty string if the APS is of type 'grnode'.
Defines on the APS a new geometric transform that consists of a translate operation. Please refer to"Geometric transform" for more detailed information about geometric transforms and the parameters of this method. If the APS is of type 'grnode', this method shall have no effect, neither on the viewed image nor the DOM tree.
Defines on the APS a new geometric transform that consists of a rotate operation. Please refer to"Geometric transform" for more detailed information about geometric transforms and the parameters of this method. If the APS is of type 'grnode', this method shall have no effect, neither on the viewed image nor the DOM tree.
The angle of the rotation operation, in degrees, as anumber sub-type. The positive angular direction is counterclockwise in NVDC space.
Thex coordinate (NVDC) of the center point about which the rotation is defined, as anumber in NVDC.
They coordinate (NVDC) of the center point about which the rotation is defined, as anumber in NVDC.
How to apply the new transform, {combine | replace}.
Defines on the APS a new geometric transform that consists of a scale operation centered at (0,0) NVDC. Please refer to"Geometric transform" for more detailed information about geometric transforms and the parameters of this method. If the APS is of type 'grnode', this method shall have no effect, neither on the viewed image nor the DOM tree.
The scale factor to apply in the NVDC x-direction, as a unitlessnumber.
The scale factor to apply in the NVDC y-direction, as a unitlessnumber.
Thex coordinate of the center point of the scaling operation, as anumber in NVDC.
They coordinate of the center point of the scaling operation, as anumber in NVDC.
How to apply the new transform, {combine | replace}.
Defines on the APS a new local geometric transform by specifying the contents of the transform matrix. Please refer to"Geometric transform" for more detailed information about geometric transforms and the parameters of this method. If the APS is of type 'grnode', this method shall have no effect, neither on the viewed image nor the DOM tree.
The matrix used to determine the new local transform on the node, as described in "Transform basic concepts".
How to apply the matrix to determine the new local transform, {combine | replace}, as described in "Transform basic concepts".
Returns current geometric transform information for the APS. Please refer to"Geometric transform" for more detailed information about geometric transforms and the parameters of this method.
Determines which matrix to return, {local | ctm}.
When type is "ctm", theCurrent Transformation Matrix for this APS is returned. i.e., the accumulation of all transformations that have been defined on this node and all its ancestors, up to the Picture's normalized coordinate system.
When type is "local", the transformation defined on this APS only is returned; ancestor transformations are ignored. Note: the returned matrix must respect previous transform operation modes (replace | combine), if any.
WebCGMMatrix; The matrix corresponding to the requested tranform on the node.
The
interface WebCGMNodeList { readonly attribute unsigned long count; WebCGMNode item(in unsigned long index); WebCGMNode removeItem ( in unsigned long index ) raises( WebCGMException ); WebCGMNode appendItem ( in WebCGMNode newItem ) raises( WebCGMException );}; |
EXAMPLE:
This simple example shows how to use a method of the WebCGMNodeList interface from HTML & ECMAScript. In a WebCGM-DOM enabled browser, execution of this HTML-ECMAScript code should count the number of planes in the fleet application structure..
<html><head><title>Example, NodeList interface</title><script type="text/ecmascript"> function getNodeList() { try { var webcgm = document.getElementById('ivx1').getWebCGMDocument(); var pic = webcgm.firstPicture; var mylist = pic.getAppStructureByID("fleet").childNodes; document.getElementById("_1").firstChild.data = "The fleet contains "+mylist.count+" planes." ; } catch (e) { alert(e.description); } }</script></head><body onload="getNodeList()"><table border="1" rules="cols"> <tr> <th>Example, WebCGMNodeList interface</th> </tr> <tr> <td><object data="ex_NodeList.cgm" type="image/cgm;Version=4;ProfileId=WebCGM" width="480" height="360"></object> </td> </tr></table><p>The fleet contains xx planes.</p></body></html>
View this example as HTML-CGM (WebCGM-DOM-enabled browsers only.)
The number of nodes in the list. The range of valid child node indices is 0 tocount-1
inclusive.
Returns the indexed item in the collection.
Index into the collection.
Removes an existing item from the list.
The index of the item which is to be removed. The first item is number 0.
Inserts a new item at the end of the list. If newItem is already in a list, it is removed from its previous list before it is inserted into this list.
The item which is to be inserted into the list.
TheWebCGMAttr
interface represents an attribute in aXML_METADATA_NODE, a PICTURE_NODE or a APP_STRUCTURE_NODE.
Note that WebCGMAttr objects inherit the WebCGMNode interface, but sincethey are not actually child nodes of the element they describe, the WebCGM DOMdoes not consider them part of the document tree. Thus, the WebCGMNodeattributes parentNode, previousSibling, and nextSibling have anull value for WebCGMAttr objects.
interface WebCGMAttr:WebCGMNode { readonly attribute WebCGMString name; attribute WebCGMString value; readonly attribute WebCGMNode ownerNode;}; |
Returns the name of this attribute. If WebCGMNode.localName is different from theempty string, this attribute is a qualified name.
On retrieval, the value of the attribute is returned as a string, see WebCGMNode.getAppStructureAttr(). On setting, is it equivalent to WebCGMNode.setAppStructureAttr().
WebCGMException; NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
The Element node this attribute is attached to ornull if this attribute is not in use.
The WebCGMEventListener interface is the primary method for handling events.Users register their listener on theWebCGMMetafile nodewith the addEventListener method.
interface WebCGMEventListener { void handleEvent(in WebCGMEvent evt);}; |
EXAMPLE:
This simple example shows how to use the addEventListener method of the WebCGMMetafile interface from HTML & ECMAScript. In a WebCGM-DOM enabled browser, execution of this HTML-ECMAScript code should display a picture with two black-framed square figures, and a mouse click anywhere on either of them should result in an alert saying "Event handler installed successfully."
<html><head><title>Example for WebCGMEventListener</title><script type="text/ecmascript">var cgmDoc;function InstallEventListener() { try { cgmDoc = document.getElementById("ivx1").getWebCGMDocument(); cgmDoc.src = 'ex_WebCGM_Event.cgm'; cgmDoc.addEventListener( "click", handleClick); } catch(e) { alert( "Failed: " + e.description ); }}function handleClick(evt) { alert( "Event handler installed successfully." );}</script></head><body onload="InstallEventListener();"> <table border="1" rules="cols"> <tr> <th>Example, WebCGMEventListener Interface</th> </tr> <tr> <td><object type="image/cgm;Version=4;ProfileId=WebCGM" width="480" height="360"></object> </td> </tr> </table></body></html>
View this example as HTML-CGM (WebCGM-DOM-enabled browsers only.)
This method is called whenever an event occurs of the type for which the WebCGMEventListener interface was registered.
The WebCGMEvent containing contextual information about the event.
WebCGMEvent
The WebCGMEvent interface is used to provide contextual information about anevent to the handler processing the event.
There exists three levels of interactivity in WebCGM:
This section also describes how a user agent processes the three differentlevels of interactivity.
When a mouse event occurs, the WebCGM user agent determines the targetobject of the mouse event. For the purposes of this discussion, "object" meansApplication Structure (APS). The target object is the topmost object whoseinteractiveregion is under the mouse at the time of the event. (Note that thedefinition of interactive region excludes objects that are fully transparentdue to the setting of their graphical attributes.)
An application structure of type 'grnode' or 'layer' cannot be a target of amouse event. Instead, if the mouse pointer was over a 'grnode' when the eventoccurred; its closest ancestor object of type 'grobject', 'para' or 'subpara'will be designated as the target element. When an object is not displayed(i.e., 'visibility' attribute is set to off) or made non-interactive (i.e.,'interactivity' attribute is set to off), that object cannot be the target ofmouse events.
The event is either initially dispatched to the Metafile, or else notdispatched, depending on the following:
See also the descriptions ofgrobject,grnode,para orsubpara, for related specifics.
The processing order for user interface events is as follows:
Since hyperlinks will in general change the context of a document it is moreappropriate to allow explicit handlers to act on an event first and thenprocess the hyperlink. The reverse order cannot guarantee that the script wouldget executed. Script writers should be made aware that this specification doesnot cover user agent event facilities such as zooming, panning or contextmenus. The mechanism to invoke such functionality will likely be differentbetween vendors. Script writers are encouraged to become aware of thosedifferences and thus, write highly interoperable WebCGM scripts.
interface WebCGMEvent { readonly attribute WebCGMString type; readonly attribute WebCGMNode target; readonly attribute unsigned short button; readonly attribute long numPressed; readonly attribute float clientX; readonly attribute float clientY; readonly attribute boolean ctrlKey; readonly attribute boolean shiftKey; readonly attribute boolean altKey; readonly attribute boolean metaKey; void preventDefault();}; |
EXAMPLE:
This simple example shows how to use the attributes of the WebCGMEvent interface from HTML & ECMAScript. In a WebCGM-DOM enabled browser, successful execution of this HTML-ECMAScript code should display a picture with two black-framed square figures. A mouse click anywhere on the left black background should report the X/Y location of the click, and a mouseover of the left ellipse should report the mouseover.
<html><head><title>Example for WebCGMEvent</title><script type="text/ecmascript"> var cgmDoc; function handleClick(evt) { try { if( evt.target.apsId == "grobject_rect_1" ) { alert( "ClientX = " + evt.clientX + " ClientY = " + evt.clientY ); } } catch(e) { alert( e ); } } function handleMOver(evt) { try { if( evt.target.apsId == "grobject_circle_1" ) { alert( "You have mouse-over'd grobject_circle_1" ); } } catch(e2) { alert( e2 ); } } function addHandlers() { try { cgmDoc = document.getElementById("ivx1").getWebCGMDocument(); cgmDoc.src = 'ex_WebCGM_Event.cgm'; cgmDoc.addEventListener ("click", handleClick); cgmDoc.addEventListener ("mouseover", handleMOver); } catch(e4) { alert( e4 ); } }</script></head><body onload="addHandlers();"> <table border="1" rules="cols"> <tr> <th>Example, WebCGMEvent Interface</th> </tr> <tr> <td><object type="image/cgm;Version=4;ProfileId=WebCGM" width="480" height="360"></object> </td> </tr> </table></body></html>
View this example as HTML-CGM (WebCGM-DOM-enabled browsers only.)
The name of the event (case-insensitive). The name must be an XML name.
Used to indicate the WebCGMNode (Application Structure) to which the event was originally dispatched.
During mouse events caused by the depression or release of a mouse button, button is used to indicate which mouse button changed state. The values for button range from zero to indicate the left button of the mouse, one to indicate the middle button if present, and two to indicate the right button. For mice configured for left handed use in which the button actions are reversed the values are instead read from right to left.
Indicates the number of times a mouse button has been pressed and released over the same screen location during a user action. The attribute value is 1 when the user begins this action and increments by 1 for each full sequence of pressing and releasing. If the user moves the mouse between the mousedown and mouseup the value will be set to 0, indicating that no click is occurring.
The horizontal coordinate at which the event occurred expressed in Normalized VDC.
The vertical coordinate at which the event occurred expressed in Normalized VDC.
Used to indicate whether the 'ctrl' key was depressed during the firing of the event.
Used to indicate whether the 'shift' key was depressed during the firing of the event.
Used to indicate whether the 'alt' key was depressed during the firing of the event. On some platforms this key may map to an alternative key name.
Used to indicate whether the 'meta' key was depressed during the firing of the event. On some platforms this key may map to an alternative key name.
Calling preventDefault has the effect of canceling the event. Any default action associated with the event will not occur.
WebCGM supports the following types of events:
click The click event occurs when the pointing devicebutton is clicked. A click is defined as a mousedown and mouseup over the samescreen location. The sequence of these events is: mousedown, mouseup, click. Ifmultiple clicks occur at the same screen location, the sequence repeats withthe detail attribute incrementing with each repetition. The ApplicationStructure (if any) which was under the mouse pointer when clicked is populatedin the WebCGMEvent.target property.
mousedown The mousedown event occurs when the pointingdevice button is pressed. The Application Structure (if any) which was underthe mouse pointer when it was pressed down is populated in theWebCGMEvent.target property.
mouseup The mouseup event occurs when the pointing devicebutton is released. The Application Structure (if any) which was under themouse pointer when it was released is populated in the WebCGMEvent.targetproperty.
mouseover The mouseover event occurs when the pointingdevice is moved onto an Application Structure. The Application Structure thatthe mouse pointer moved over is populated in the WebCGMEvent.targetproperty.
mouseout The mouseout event occurs when the pointing deviceis moved away from an Application Structure. The Application Structure that themouse pointer moved away from is populated in the WebCGMEvent.targetproperty.
load The load event occurs when the WebCGM DOMimplementation finishes loading all content within a WebCGM metafile.
unload The unload event occurs when the WebCGM DOMimplementation removes a WebCGM metafile from a window or frame.
This chapter and its sections are normative, unless otherwiseindicated.
The following profile proforma (PPF) defines the WebCGM application profilefor CGM files with a comparison to the ISO Model Profile as defined in ISO/IEC8632:1999. The tables for the ISO Model Profile are duplicated here forreference and are intended to be accurate. In case of discrepancies, the ModelProfile in ISO/IEC 8632:1999 shall take precedence. In the PPF, there arereferences such as 9.5.4.5, 7.5.11, and Annex I, etc. These are references tosections of the CGM:1999 text, from which this proforma is extracted. Otherinternal PPF references look like T.16.13 and Attachment 26.3, which arereferences to table entries in the PPF itself.
The Model Profile (in the ISO CGM:1999 text) uses check boxes to indicatewhether an item is required, permitted, or prohibited in metafiles conformingto the Model Profile. Authors of cascading profiles should be aware that theModel Profile does not have all three possible choices for each item, and thatalternate choices are indicated here in the tables with "No" and the "checked"choice is indicated with "Yes." For example, this rule "Element is: RequiredYes; Permitted No;" means that the element is required in all metafilesconforming to WebCGM 2.1 and that authors of cascading profiles could choose tomake the element optional (Permitted), but they must not prohibit theelement.
Functionality | Specifications - WebCGM 2.1 Profile | Specifications - Model Profile |
---|---|---|
T.13.1 | Same as Model Profile:No | |
Encodings | Select 1 or more encodings: BinaryYes; Clear textNo; Other: None. | Select 1 or more encodings: BinaryYes; Clear textYes; |
Same as Model Profile:No | ||
Number of pictures | Number of pictures permitted in a metafile: minimum (>=0)?1. maximum (>=0 or no limit)?1. Other: None. | Number of pictures permitted in a metafile: minimum (>=0)?1. maximum (>=0 or no limit)?No limit. Other:None. |
Same as Model Profile:Yes | ||
Empty pictures | Are pictures allowed which have no graphical primitives? (yes/no)Yes. Other:None. | |
T.13.4 | Same as Model Profile:Yes | |
Metafile size | Any restrictions on metafile size?No. Other:None. |
Functionality | Specifications - WebCGM 2.1 Profile | Specifications - Model Profile |
---|---|---|
Same as Model Profile:No | ||
Colour References: 9.5.4.1 | Select which rule applies to each metafile (choose 1): Either all colours or none shall be defined.Yes; All colours shall be defined.No; No colours shall be defined.No; Are colour indexes allowed to be redefined within a picture or metafile? (yes/no)Yes. Any restrictions on the number of distinct colours used within a picture or metafile? (Monochrome metafiles shall use at most two distinct colours.)None. Are conformance categories defined? (yes/no)Yes. If yes, specify. Monochrome and colour. Other:Greyscale is considered to be a special class of colour. | Select which rule applies to each metafile (choose 1): Either all colours or none shall be defined.Yes; All colours shall be defined.No; No colours shall be defined.No; Are colour indexes allowed to be redefined within a picture or metafile? (yes/no)No. Any restrictions on the number of distinct colours used within a picture or metafile? (Monochrome metafiles shall use at most two distinct colours.)None. Are conformance categories defined? (yes/no)Yes. If yes, specify.3 categories: monochrome, greyscale, and colour. Other:None. |
Same as Model Profile:Yes | ||
Line primitives -geometric degeneracies References: 9.5.4.3 | Geometric degeneracies are: PermittedYes; ProhibitedNo; If permitted, graphical meaning of the degeneracy:A line primitive element, whose entire locus is a single point, denotes a graphical dot which is a filled circle, with diameter equal to the current line width and colour equal to the current line colour. Other:None. | |
Same as Model Profile:Yes | ||
Filled area primitives - geometric degeneracies References: 9.5.4.4 | Geometric degeneracies are: PermittedYes; ProhibitedNo; If permitted, graphical meaning of the degeneracy:A filled-area primitive element, whose entire locus is either a single point or a line has the following meaning: - If the locus of a filled-area primitive is a single point, then the meaning is a dot (which is a filled circle). - If the locus of a filled-area primitive is a non-degenerate line segment, then the meaning is a line. The dot or line is displayed with the fill colour if EDGE VISIBILITY is 'off', unless INTERIOR STYLE is 'empty', in which case it is not rendered. If EDGE VISIBILITY is 'on', the interior treatment is the dot or line displayed in the fill colour, and then a dot or line superimposed with the current edge attributes. Other:None. | |
T.14.4 | Same as Model Profile:No | |
Graphical text strings References: 9.5.4.5 | Minimum string length (bytes):0 Maximum string length (bytes):508 Any restrictions on the use of ISO/IEC 2022 switching controls? The C0 character NUL (code value) is permitted and has no effect. String parameters of graphical text shall contain no control character (7/8 bit codes: 1-31 and 128-159). ISO/IEC 2022 switching is not allowed in graphical text. A valid WebCGM metafile may use for graphical text only thecharacter encodings (CGM "character sets"): the collection of four character encodings which comprise ISO Latin1 and Symbol (see CHARACTER SET LIST); Unicode UTF-8; and UTF-16. Other:None. Note. According to the Binary Encoding of CGM:1999, strings of multi-byte Unicode text are "big-endian", like the rest of the binary metafile. | Minimum string length (bytes): 0. Maximum string length (bytes):254. Any restrictions on the use of ISO/IEC 2022 switching controls?C0 control codes (except NUL and ISO/IEC 2022 switching) are prohibited. Any character set used in the metafile which is accessed by ISO/IEC 2022 switching techniques shall be in the Character Set List (defined in this profile). Other:None. |
Same as Model Profile:No | ||
Non-graphical text strings References: 9.5.4.6 | Maximum string length (bytes): for type SF:508 for type SFwithin type D and type SDR:2048 Format effectors and ESC: PermittedYes; ProhibitedNo; Note: according to CGM:1999, the format effectors are NUL, CR, LF, BS, HT, VT, and FF. Other C0 control codes (except NUL and ISO/IEC 2022 switching) are prohibited. Any limits on the set of acceptablecharacter encodings (CGM "character sets")?The permittedcharacter encodings (CGM "character sets") for non-graphical text are ISO Latin 1 (LHS & RHS), and UNICODE UTF-8, and Unicode UTF-16. Only one of these three shall be used throughout any particular WebCGM metafile instance. According to the CGM standard, the default SF character encoding ("set"), at the beginning of the 'metafile id' parameter of the BEGIN METAFILE element is ISO Latin 1. If the metafile is to use UTF-8 for SF parameters, then the following 4-octet ISO 2022 sequence shall occur as the first 4 octets of the 'metafile id' parameter: ESC 2/5 2/15 4/9 If the metafile is to use UTF-16 for SF parameters, then the following 4-octet ISO 2022 sequence shall occur as the first 4 octets of the 'metafile id' parameter: ESC 2/5 2/15 4/12 Otherwise, the use of ISO 2022 switching is prohibited in non-graphical text string. NOTE: Section 6.3.4.5 of CGM:1999 allows the switching to UTF-8 (variable length multi-byte), and allows the use of 8-bit access to the ISO Latin 1 set. Any restrictions on the use of ISO/IEC 2022 switching controls? Anycharacter encodings (CGM "character sets") used in the metafile which is accessed by ISO/IEC 2022 switching techniques shall be in the character set list (defined in this profile). Other:See3.1.1 for additional restrictions to the character repertoire for those WebCGM non-graphical strings which may be part of the WebCGM IRI fragment. Note. According to the Binary Encoding of CGM:1999, strings of multi-byte Unicode text are "big-endian", like the rest of the binary metafile. | Maximum string length (bytes): for type SF:254. for type SF within type D and type SDR:1024. Format effectors and ESC: PermittedYes; ProhibitedNo; Other C0 control codes (except NUL and ISO/IEC 2022 switching) are prohibited. Any limits on the set of acceptable character sets?The permitted character sets are ISO 8859-1 LHS No.1 and ISO 8859-1 RHS No.1. Any restrictions on the use of ISO/IEC 2022 switching controls? Any character set used in the metafile which is accessed by ISO/IEC 2022 switching techniques shall be in the character set list (defined in this profile). Other:None. |
T.14.6 | Same as Model Profile:Yes | |
Data record strings References: 9.5.4.7 | Maximum string length (bytes) or state "no limit":32767. SDR-coding techniques must be used (see annex C.2.2). Other:None. |
Element | Specifications - WebCGM 2.1 Profile | Specifications - Model Profile |
---|---|---|
T.15.0 | Same as Model Profile:Yes | |
no-op [v1] References: Part 3, 8.2 | Element is: RequiredNo; PermittedYes; The parameter value of this element is encoding dependent. This element is applicable only to binary encoding. It shall be included in the profile only if binary encoding is permitted or required. If binary encoding is permitted, is the element RequiredNo; PermittedYes; If permitted, are there any restrictions on the Parameter value?None. Other:None. | |
T.15.1 | Same as Model Profile:Yes | |
BEGIN METAFILE END METAFILE [v1] References: 7.2.1 7.2.2 9.5.4.6 | Element is: RequiredYes; Themetafile identifier parameter shall follow the rules for non-graphical text, clause 9.5.4.6 andT.14.5. Other:None. | |
T.15.2 | Same as Model Profile:No | |
BEGIN PICTURE BEGIN PICTURE BODY END PICTURE [v1] References: 7.2.3 7.2.4 7.2.5 9.5.4.6 | Element is: RequiredYes; Thepicture identifier shall follow the rules for non-graphical text, clause 9.5.4.6 andT.14.5. Number of occurrences of these elements allowed in the metafile:1. Other:None. | Element is: RequiredNo; PermittedYes; ProhibitedNo; Thepicture identifier shall follow the rules for non-graphical text, clause 9.5.4.6 andT.14.5. Number of occurrences of these elements allowed in the metafile:No limit. Other:None. |
T.15.3 | Same as Model Profile:No | |
BEGIN SEGMENT END SEGMENT [v2] References: 7.2.6 7.2.7 | Element is: RequiredNo; PermittedNo; ProhibitedYes; Maximum number of simultaneously defined segments (both global and local) at any point in the metafile: Any limits on the number of elements or restrictions on which elements compose a segment? Is there any meaning given to thesegment identifier parameter? (yes/no) If yes, specify. (Meaning shall have no graphical effect.) Other:None. | Element is: RequiredNo; PermittedYes; ProhibitedNo; Maximum number of simultaneously defined segments (both global and local) at any point in the metafile:1024. Any limits on the number of elements or restrictions on which elements compose a segment?None. Is there any meaning given to thesegment identifier parameter? (yes/no)No. If yes, specify. (Meaning shall have no graphical effect). Other:When global segments are specified in the Metafile Descriptor, all global segment definitions shall follow all other Metafile Descriptor elements. When segments are specified in the Picture Descriptor, all such segment definitions shall follow all other Picture Descriptor elements. |
T.15.4 | Same as Model Profile:No | |
BEGIN FIGURE END FIGURE [v2] References: 7.2.8 7.2.9 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Limits on the number of elements or restrictions on which elements comprise a figure definition:Maximum number of elements = 1024. No restrictions on which eligible elements may be included. Other:Note that the 1024 element limit applies to the maximum number of graphical primitive elements. Eligible elements of classes other than graphical primitives that are included within the CLOSED FIGURE, e.g., primitive attribute elements, do not count against the 1024 limit. | Element is: RequiredNo; PermittedYes; ProhibitedNo; Limits on the number of elements or restrictions on which elements comprise a figure definition:Maximum number of elements = 128. No restrictions on which eligible elements may be included. Other:None. |
T.15.5 | Same as Model Profile:No | |
BEGIN PROTECTION REGION END PROTECTION REGION [v3] References: 7.2.10 7.2.11 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Maximum number of simultaneously defined protection regions:1. Maximum number of elements within each protection region:128. Is there any meaning to the region index parameter other than as a unique identifier for each protection region? (yes/no)No. If yes, specify. (Meaning shall have no graphical effect). Other:Region index is restricted to the value "1". | Element is: RequiredNo; PermittedYes; ProhibitedNo; Maximum number of simultaneously defined protection regions:32. Maximum number of elements within each protection region:128. Is there any meaning to the region index parameter other than as a unique identifier for each protection region? (yes/no) No. If yes, specify. (Meaning shall have no graphical effect). Other:None. |
T.15.6 | Same as Model Profile:Yes | |
BEGIN COMPOUND LINE END COMPOUND LINE [v3] References: 7.2.12 7.2.13 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Limits on the number of elements and identity of elements comprising a path definition:Maximum number of elements is 128. No restrictions on which eligible elements may be included. Other:None. | |
T.15.7 | Same as Model Profile:Yes | |
BEGIN COMPOUND TEXT PATH END COMPOUND TEXT PATH [v3] References: 7.2.14 7.2.15 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Limits on the number and identity of elements comprising a path definition:Maximum number of elements is 128. No restrictions on which eligible elements may be included. Other:None. | |
T.15.8 | Same as Model Profile:No | |
BEGIN TILE ARRAY END TILE ARRAY [v3] References: 7.2.16 7.2.17 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Maximum number of tiles in path direction:64 Maximum number of tiles in line direction:64 Maximum number of cells/tile in path direction:4096 Maximum number of cells/tile in line direction:4096 Limits on pel path:shall be 0. Limits on line progression:None. Limits on image offset:None. Other:Two types of raster images are allowed. A single (non-tiled) image has a maximum of 1,073,741,824 (1 giga, 32768**2) cells. A non-tiled image may exceed the 4096 cells/tile restriction specified for the tiled images. Tiled raster images are limited 64X64 tiles which are a maximum of 4096X4096 cells each. These tiled images are limited to a total of 1,073,741,824 (1 giga, 32768**2) cells (adjustment of maximum number of tiles and cells per tile are necessary to meet this requirement). | Element is: RequiredNo; PermittedYes; ProhibitedNo; Maximum number of tiles in path direction:16. Maximum number of tiles in line direction:16. Maximum number of cells/tile in path direction:1024. Maximum number of cells/tile in line direction:1024. Limits on pel path:None. Limits on line progression:None. Limits on image offset:None. Other:None. |
T.15.9 | Same as Model Profile:No | |
BEGIN APPLICATION STRUCTURE BEGIN APPLICATION STRUCTURE BODY END APPLICATION STRUCTURE [v4] References: 7.2.18 7.2.19 7.2.20 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Limits on the maximum number of defined structures within a picture:None. Limits on the number and identity of elements comprising a structure:None. Is there any meaning to the Application Structure (APS) identifier parameter? yes/noNo. No assigned meaning beyond being a unique identifier for the application structure. If yes, specify.n/a Is the inheritance flag parameter restricted? Yes/no:Yes.The value of the inheritance flag is restricted to a value corresponding to "statelist". Other:The value of the structure type parameter must be chosen from the list of valid structure types listed in theSection 3.2.1. Structures are placed in the metafile according to the EBNF content model fragments inSection 3.2.1 and its subsections. The character repertoire of the APS id parameter is identical to that of the | Element is: RequiredNo; PermittedYes; ProhibitedNo; Limits on the maximum number of defined structures within a picture:None. Limits on the number and identity of elements comprising a structure:None. Is there any meaning to the application structure identifier parameter? yes/noNo. No assigned meaning beyond being a unique identifier for the application structure. If yes, specify. Is the inheritance flag parameter restricted? Yes/no:No Other:None. |
Element | Specifications - WebCGM 2.1 Profile | Specifications - Model Profile |
---|---|---|
T.16.1 | Same as Model Profile:Yes | |
METAFILE VERSION [v1] References: 7.3.1 | Element is: RequiredYes; Metafile versions permitted by this profile:1, 2, 3, 4 Other:None. | |
T.16.2 | Same as Model Profile:No | |
METAFILE DESCRIPTION [v1] References: 7.3.2 9.5.2.1 9.5.2.2 9.5.4.6 | Element is: RequiredYes; Thedescription parameter shall follow the rules for non-graphical text, clause 9.5.4.6 andT.14.5. The substring within the SF parameter shall be of the form: "keyword:item", where the double quotes are part of the substring. Maximum number of occurrences of this element?1 Profile identification (use keyword, "ProfileId:"):"ProfileId:WebCGM". Profile edition (use keyword, "ProfileEd:"): Refers to the approved version and revision of the specification that applies for this graphic. The Item associated with the keyword ProfileEd shall be n.m. For this WebCGM Edition: "ProfileEd:2.1". Additional information content: Metafile colour conformance class, source, and date items shall be encoded as substrings of thedescription parameter using the keywords: "ColourClass:", "Source:", and "Date:", respectively. ColourClass: RequiredYes;
Source? RequiredNo; PermittedYes;
Date? RequiredNo; PermittedYes;
Other:Parameter strings are considered case insensitive. | Element is: RequiredYes; Thedescription parameter shall follow the rules for non-graphical text, clause 9.5.4.6 andT.14.5. The substring within the SF parameter shall be of the form: "keyword:item", where the double quotes are part of the substring. Maximum number of occurrences of this element?Unlimited. Profile identification (use keyword, "ProfileId:"):"ProfileId:Model-Profile". Profile edition (use keyword, "ProfileEd:"):"ProfileEd:2". If the profile edition is not given, then the edition defaults to 1. Additional information content: Metafile colour conformance class, source, and date items shall be encoded as substrings of thedescription parameter using the keywords: "ColourClass:", "Source:", and "Date:", respectively. ColourClass: RequiredYes; PermittedNo;
Source? RequiredYes; PermittedNo;
Date? RequiredYes; PermittedNo;
Other:None. |
T.16.3 | Same as Model Profile:Yes | |
VDC TYPE [v1] References: 7.3.3 | Element is: RequiredNo; PermittedYes; Any restrictions on the parameter value?None. Other:None. | |
T.16.4 | Same as Model Profile:No | |
INTEGER PRECISION [v1] References: 7.3.4 | Element is: RequiredNo; PermittedYes; The parameter value of this element is encoding dependent. If binary encoding is permitted, are there any restrictions on the parameter value?16, or 32. Other:None. If clear text encoding is permitted, are there any restrictions on the parameter value?n/a Other:n/a | Element is: RequiredNo; PermittedYes; The parameter value of this element is encoding dependent. If binary encoding is permitted, are there any restrictions on the parameter value?8, 16, or 32. Other:None. If clear text encoding is permitted, are there any restrictions on the parameter value?[-256,255], [-32767,32767], [-32768,32767] or [-2147483648,2147483647] Other:None. |
T.16.5 | Same as Model Profile:Yes | |
REAL PRECISION [v1] References: 7.3.5 | Element is: RequiredNo; PermittedYes; The parameter value of this element is encoding dependent. If binary encoding is permitted, are there any restrictions on the parameter value?(1, 16, 16) or (0, 9, 23). Other:None. If clear text encoding is permitted, are there any restrictions on the parameter value?-32767,+32767, 4; or -32768, +32767, 10; or -3.4028235E38, +3.4028235E38, 8 Note: The latter two values are the closest approximation, in base 10 clear text, to the REAL PRECISION values allowed in binary encoded CGMs. Other:None. | |
T.16.6 | Same as Model Profile:No | |
INDEX PRECISION [v1] References: 7.3.6 | Element is: RequiredNo; PermittedYes; The parameter value of this element is encoding dependent. If binary encoding is permitted, if permitted, are there any restrictions on the parameter value?16. Other:None. If clear text encoding is permitted, are there any restrictions on the parameter value?n/a Other:n/a | Element is: RequiredNo; PermittedYes; The parameter value of this element is encoding dependent. If binary encoding is permitted, If permitted, are there any restrictions on the parametervalue?8, 16, or 32. Other:None. If clear text encoding is permitted, are there any restrictions on the parameter value?[0, 127], [ -256, 255], [-32767, 32767], [-32768, 32767], or [-2147483648, 2147483647] Other:None. |
T.16.7 | Same as Model Profile:Yes | |
COLOUR PRECISION [v1] References: 7.3.7 | Element is: RequiredNo; PermittedYes; The parameter value of this element is encoding dependent. If binary encoding is permitted, are there any restrictions on the parameter value?8 or 16. Other:None. If clear text encoding is permitted, are there any restrictions on the parameter value?255 or 65535. Other:None. | |
T.16.8 | Same as Model Profile:Yes | |
COLOUR INDEX PRECISION [v1] References: 7.3.8 | Element is: RequiredNo; PermittedYes; The parameter value of this element is encoding dependent. If binary encoding is permitted, are there any restrictions on the parameter value?8 or 16. Other:None. If clear text encoding is permitted, are there any restrictions on the parameter value?127, 255, 32767. Other:None. | |
T.16.9 | Same as Model Profile:No | |
MAXIMUM COLOUR INDEX [v1] References: 7.3.9 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Is this element required to be a least upper bound? (yes/no) No. Any restrictions on the parameter values?
Other:Greyscale is considered a special case of colour. | Element is: RequiredNo; PermittedYes; ProhibitedNo; Is this element required to be a least upper bound? (yes/no)No. Any restrictions on the parameter values?
Other:None. |
T.16.10 | Same as Model Profile:Yes | |
COLOUR VALUE EXTENT [v1] References: 7.3.10 | Element is: RequiredNo; PermittedYes; Any restrictions on the parameter value?None. Other:None. | |
T.16.11 | Same as Model Profile:Yes | |
METAFILE ELEMENT LIST [v1] References: 7.3.11 | Element is: RequiredYes; Other:None. | |
T.16.12 | Same as Model Profile:Yes | |
METAFILE DEFAULTS REPLACEMENT [v1] References: 7.3.12 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Is each occurrence of the MDR restricted to defining just one default? (yes/no)No. Additional restrictions may be specified in parts 3 and 4 of ISO/IEC 8632. Other:None. | |
Same as Model Profile:No | ||
FONT LIST [v1] References: 7.3.13 annex I | Element is: RequiredNo; PermittedYes; ProhibitedNo; This element is required for all metafiles containing graphical text. Maximum number of fonts in the list:256 All font indexes referenced in the metafile, including the default (nominally index 1) shall be defined in the FONT LIST element, with font name construction consistent with the rules of ISO/IEC 9541. List ofrecommended fonts:
NOTE - Theses font names are trademarked and some are proprietary and copyrighted. Times and Helvetica are registered trademarks of Allied Corporation, the owner of the copyright on the fonts of those names. Metric equivalents of the named fonts may be substituted by interpreters. Times is a serif font. Helvetica is a sans-serif font. Courier is a monospaced, serif font. The association of character code to glyph which shall be used for each of the fonts and the metrics of the named fonts are contained in clause I.2, annex I of CGM:1999. Other:The list of recommended fonts is intended to be a list of required minimum interpreter font capability and a recommended maximum font capability for generators. If other fonts are used, the FONT PROPERTIES and RESTRICTED TEXT elements are required. Font names are considered case insensitive. | Element is: RequiredNo; PermittedYes; ProhibitedNo; This element is required for all metafiles containing graphical text. Maximum number of fonts in the list:64. All font indexes referenced in the metafile, including the default (nominally index 1) shall be defined in the FONT LIST element, with font name construction consistent with the rules of ISO/IEC 9541. List of permitted fonts:
NOTE - Theses font names are trademarked and some are proprietary and copyrighted. Times and Helvetica are registered trademarks of Allied Corporation, the owner of the copyright on the fonts of those names. Metric equivalents of the named fonts may be substituted by interpreters. Times is a serif font. Helvetica is a sans-serif font. Courier is a monospaced, serif font. The association of character code to glyph which shall be used for each of the fonts and the metrics of the named fonts are contained in clause I.2, annex I. Other:None. |
Same as Model Profile:No | ||
CHARACTER SET LIST [v1] References: 7.3.14 | Element is: RequiredNo; PermittedYes; ProhibitedNo; This element is required for all metafiles containing graphical text. Note. The terminology "character set", used in the original ISO CGM:1987 specification and preserved through CGM:1999, is considered inaccurate by contemporary standards. The current correct terminology ischaracter encoding, defined in the [CHARMOD] standard. Maximum limit for the number of character sets in the character set list:6. Allowable character sets: "94-character G-set", 4/2 (ISO 8859-1 LH); "96-character G-set", 4/1 (ISO 8859-1 RH); "94-character G-set", 2/10 3/10 (Symbol LH); "94-character G-set", 2/6 3/10 (Symbol RH);. "complete code", 2/15 4/9 (UTF-8) "complete code", 2/15 4/12 (UTF-16) Note. The tails for UTF-8 and UTF-16 differ from their WebCGM 1.0 values. 2.1 metafiles shall not use the 1.0 forms. If any of these character sets is of type "complete code", specify the content of the complete code and its associated sequence tail:Specified Other:None. | Element is: RequiredNo; PermittedYes; ProhibitedNo; This element is required for all metafiles containing graphical text. Maximum limit for the number of character sets in the character set list:4. Character sets shall be selected from the ISO Registry of Character Sets. This list may be extended by adding profile-defined character sets. List character sets: "94-character G-set", 4/2 (ISO 8859-1 LH); "96-character G-set", 4/1 (ISO 8859-1 RH); "94-character G-set", 2/10 3/10 (Symbol LH); "94-character G-set", 2/6 3/10 (Symbol RH). If any of these character sets is of type "complete code", specify the content of the complete code and its associated sequence tail: Other:None. |
T.16.15 | Same as Model Profile:No | |
CHARACTER CODING ANNOUNCER [v1] References: 7.3.15 | Element is: RequiredYes; Any restrictions on the parameter values?Value shall be 'basic 8-bit'. Other:None. | Element is: RequiredNo; PermittedYes; ProhibitedNo; Any restrictions on the parameter values?Values shall be 'basic 7-bit' and 'basic 8-bit'. Other:None. |
T.16.16 | Same as Model Profile:No | |
NAME PRECISION [v2] References: 7.3.16 Part 3, 8.3 Part 4, 7.2 | Element is: RequiredNo; PermittedNo; ProhibitedYes; The parameter value of this element is coding dependent. If binary encoding is permitted, are there any restrictions on the parameter value?n/a. Other:n/a. If clear text encoding is permitted, are there any restrictions on the parameter value?n/a. Other:n/a. | Element is: RequiredNo; PermittedYes; The parameter value of this element is coding dependent. If binary encoding is permitted, are there any restrictions on the parameter value?8 or 16. Other:None. If clear text encoding is permitted, are there any restrictions on the parameter value?127, 255, 32767. Other:None. |
T.16.17 | Same as Model Profile:Yes | |
MAXIMUM VDC EXTENT [v2] References: 7.3.17 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Any restrictions on the parameter values?None. Other:None. | |
T.16.18 | Same as Model Profile:No | |
SEGMENT PRIORITY EXTENT [v2] References: 7.3.18 | Element is: RequiredNo; PermittedNo; ProhibitedYes; Any restrictions on the parameter values. Other:None. | Element is: RequiredNo; PermittedYes; ProhibitedNo; Any restrictions on the parameter values?None. Other:None. |
Same as Model Profile:No | ||
COLOUR MODEL [v3] References: 7.3.19 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Any restrictions on the set of colour models?Shall be 1, 6, 7, or 8. Other:Values 6, 7, and 8 are the registered values for RGB-alpha, sRGB, and sRGB-alpha. | Element is: RequiredNo; PermittedYes; ProhibitedNo; Any restrictions on the set of colour models?None. Other:None. |
T.16.20 | Same as Model Profile:No | |
COLOUR CALIBRATION [v3] References: 7.3.20 | Element is: RequiredNo; PermittedNo; ProhibitedYes; Calibration selection values permitted in accordance with the permitted model(s): If CYMK is permitted, minimum number of grid locations: Any restrictions on the number of colour lookup table entries, n? Any restrictions on the number of grid locations, m? If CYMK is permitted, algorithms for interpolation between grid locations? Other:None. | Element is: RequiredNo; PermittedYes; ProhibitedNo; Calibration selection values permitted in accordance with the permitted model(s):Values 1..6, 9. If CYMK is permitted, minimum number of grid locations:3. Any restrictions on the number of colour lookup table entries, n?None. Any restrictions on the number of grid locations, m?None. If CYMK is permitted, algorithms for interpolation between grid locations?None. Other:None. |
T.16.21 | Same as Model Profile:No | |
FONT PROPERTIES [v3] References: 7.3.21 | RequiredNo; PermittedYes; ProhibitedNo; Any restrictions on the parameter values?The required parameters, when used, are INDEX, FONT FAMILY, POSTURE, WEIGHT, PROPORTIONATE WIDTH, DESIGN GROUP and STRUCTURE. Other:This element is required when a font is used that is not in the list of recommended fonts specified in the FONT LIST element. Parameter values of type SF are considered to be case insensitive | RequiredNo; PermittedYes; ProhibitedNo; Any restrictions on the parameter values?All defined index and enumerated values of all parameters shall be permitted. Other:None. |
Same as Model Profile:No | ||
GLYPH MAPPING [v3] References: 7.3.22 | RequiredNo; PermittedNo; ProhibitedYes; Subset of AFII registered glyphs which may be referenced: Maximum number of glyphs which may be defined: Other:None. | RequiredNo; PermittedYes; ProhibitedNo; Subset of AFII registered glyphs which may be referenced:None. Maximum number of glyphs which may be defined:8192. Other:None. |
Same as Model Profile:Yes | ||
SYMBOL LIBRARY LIST [v3] References: 7.3.23 | RequiredNo; PermittedNo; ProhibitedYes; Libraries which may be accessed and their encoding rules: Maximum number of libraries which may be accessed: Other: NOTE - There are currently no registered symbol libraries. | |
T.16.24 | Same as Model Profile:No | |
PICTURE DIRECTORY [v4] References: 7.3.24 9.5.4.6 | RequiredNo; PermittedNo; ProhibitedYes; Follow the rules for non-graphical text strings for picture identifier parameter, clause 9.5.4.6 andT.14.5. If present, shall PICTURE DIRECTORY elements be complete, i.e., have an entry for every picture in the metafile? (yes/no):n/a. If "no", describe any special meaning associated with those entries which appear in PICTURE DIRECTORY elements which are incomplete.n/a Other:None. | RequiredNo; PermittedYes; ProhibitedNo; Follow the rules for non-graphical text strings for picture identifier parameter, clause 9.5.4.6 andT.14.5. If present, shall PICTURE DIRECTORY elements be complete, i.e., have an entry for every picture in the metafile? (yes/no)Yes. If "no", describe any special meaning associated with those entries which appear in PICTURE DIRECTORY elements which are incomplete. Other:None. |
Element | Specifications - WebCGM 2.1 Profile | Specifications - Model Profile |
---|---|---|
T.17.1 | Same as Model Profile:No | |
SCALING MODE [v1] References: 7.4.1 | Element: RequiredYes; Any restrictions on the parameter values? SCALING MODE shall be metric. Other:None. | Element: RequiredNo; PermittedYes; ProhibitedNo; Any restrictions on the parameter values?If SCALING MODE is metric then the 'metric scale factor' shall be positive. Other:None. |
T.17.2 | Same as Model Profile:Yes | |
COLOUR SELECTION MODE [v1][v2] References: 7.4.2 | Element: RequiredNo; PermittedYes; Any restrictions on the parameter values?None. Other:None. | |
T.17.3 | Same as Model Profile:Yes | |
LINE WIDTH SPECIFICATION MODE [v1][v2] References: 7.4.3 | Element: RequiredNo; PermittedYes; Any restrictions on the parameter values?None. Other:None. | |
T.17.4 | Same as Model Profile:Yes | |
MARKER SIZE SPECIFICATION MODE [v1][v2] References: 7.4.4 | Element: RequiredNo; PermittedYes; Any restrictions on the parameter values?None. Other:None. | |
T.17.5 | Same as Model Profile:Yes | |
EDGE WIDTH SPECIFICATION MODE [v1][v2] References: 7.4.5 | Element: RequiredNo; PermittedYes; Any restrictions on the parameter values?None. Other:None. | |
T.17.6 | Same as Model Profile:Yes | |
VDC EXTENT [v1] References: 7.4.6 | Element: RequiredNo; PermittedYes; Limits on the sense and orientation of the VDC space:None. Is zero-area VDC extent permitted? (yes/no)No. If yes, specify its meaning. Other:None. | |
T.17.7 | Same as Model Profile:Yes | |
BACKGROUND COLOUR [v1] References: 7.4.7 9.5.4.1 | Element: RequiredNo; PermittedYes; Thecolour value parameter shall follow the rules for colour, clause 9.5.4.1 andT.14.1. Other:None. | |
T.17.8 | Same as Model Profile:Yes | |
DEVICE VIEWPORT [v2] References: 7.4.8 | Element: RequiredNo; PermittedNo; ProhibitedYes; Interaction of this element with environmental presentation directives: Meaning of this element if the specified value is inconsistent with the presentation device: Other: NOTE - This element is prohibited due to its device dependence. | |
T.17.9 | Same as Model Profile:Yes | |
DEVICE VIEWPORT SPECIFICATION MODE [v2] References: 7.4.9 | Element: RequiredNo; PermittedNo ProhibitedYes; Set of legal values: Other: NOTE - This element is prohibited due to its device dependence. | |
T.17.10 | Same as Model Profile:Yes | |
DEVICE VIEWPORT MAPPING [v2] References: 7.4.10 | Element: RequiredNo; PermittedNo; ProhibitedYes; Set of legal values: Other: NOTE - This element is prohibited due to its device dependence. | |
Same as Model Profile:No | ||
LINE REP- RESENTATION [v2] References: 7.4.11 9.5.2.6 9.5.4.2 | Element: RequiredNo; PermittedNo; ProhibitedYes; Maximum number of simultaneous bundle definitions: Other:None. | Element: RequiredNo; PermittedYes; ProhibitedNo; Maximum number of simultaneous bundle definitions:20. Other:None. |
Same as Model Profile:No | ||
MARKER REP- RESENTATION [v2] References: 7.4.12 9.5.2.6 9.5.4.2 | Element: RequiredNo; PermittedNo; ProhibitedYes; Maximum number of simultaneous bundle definitions: Other:None. | Element: RequiredNo; PermittedYes; ProhibitedNo; Maximum number of simultaneous bundle definitions:20. Other:None. |
Same as Model Profile:No | ||
TEXT REP- RESENTATION [v2] References: 7.4.13 9.5.2.6 9.5.4.2 | Element: RequiredNo; PermittedNo; ProhibitedYes; Maximum number of simultaneous bundle definitions: Other:None. | Element: RequiredNo; PermittedYes; ProhibitedNo; Maximum number of simultaneous bundle definitions:20. Other:None. |
Same as Model Profile:No | ||
FILL REP- RESENTATION [v2] References: 7.4.14 9.5.2.6 9.5.4.2 | Element: RequiredNo; PermittedNo; ProhibitedYes; Maximum number of simultaneous bundle definitions: Other:None. | Element: RequiredNo; PermittedYes; ProhibitedNo; Maximum number of simultaneous bundle definitions:20. Other:None. |
Same as Model Profile:No | ||
EDGE REP- RESENTATION [v2] References: 7.4.15 9.5.2.6 9.5.4.2 | Element: RequiredNo; PermittedNo; ProhibitedYes; Maximum number of simultaneous bundle definitions: Other:None. | Element: RequiredNo; PermittedYes; ProhibitedNo; Maximum number of simultaneous bundle definitions:20. Other:None. |
T.17.16 | Same as Model Profile:Yes | |
INTERIOR STYLE SPECIFICATION MODE [v3] References: 7.4.16 | Element: RequiredNo; PermittedYes; Any restriction on the parameter value?None. Other:None. | |
T.17.17 | Same as Model Profile:No | |
LINE AND EDGE TYPE DEFINITION [v3] References: 7.4.17 | Element: RequiredNo; PermittedYes; ProhibitedNo; Any limits on the number of definitions?Maximum of 32 line types shall be specified simultaneously. Any limits on the number of elements in a given definition?Number of values in the dash gap list shall not exceed 64. Any restrictions on the dash cycle repeat length?None. Any restrictions on complexity of definition to prevent degeneracies?None. Other:None. | Element: RequiredNo; PermittedYes; ProhibitedNo; Any limits on the number of definitions?Maximum of 32 line types shall be specified simultaneously. Any limits on the number of elements in a given definition?Number of values in the dash gap list shall not exceed 8. Any restrictions on the dash cycle repeat length?None. Any restrictions on complexity of definition to prevent degeneracies?None. Other:None. |
T.17.18 | Same as Model Profile:Yes | |
HATCH STYLE DEFINITION [v3] References: 7.4.18 | Element: RequiredNo; PermittedYes; ProhibitedNo; Limit on the number of hatch styles?Maximum of 32 hatch styles shall be specified simultaneously. Limit on the number of gaps in a given definition?Number of entries in the gap width list shall not exceed 8. Any limits on duty cycle length?None. Any restrictions on complexity of definition to prevent degeneracies?None. Any restrictions on the style indicator?None. Other:None. | |
T.17.19 | Same as Model Profile:No | |
GEOMETRIC PATTERN DEFINITION [v3] References: 7.4.19 | Element: RequiredNo; PermittedNo; ProhibitedYes; Any limits on the number of geometric patterns defined? Any limits on the classes of primitives? Other:None. | Element: RequiredNo; PermittedYes; ProhibitedNo; Any limits on the number of geometric patterns defined?The maximum number of geometric patterns is 64. NOTE - The number of geometric patterns cannot exceed the number of segments. Any limits on the classes of primitives?None. Other:None. NOTE - The number of geometric patterns cannot exceed the number of segments. |
T.17.20 | Same as Model Profile:No | |
APPLICATION STRUCTURE DIRECTORY [v4] References: 7.4.20 9.5.4.6 | Element: RequiredNo; PermittedNo; ProhibitedYes; Follow rules for non-graphical text stringsfor application structure identifier parameter, clause 9.5.4.6 andT.14.5. Other:None. | Element: RequiredNo; PermittedYes; ProhibitedNo; Follows rules for non-graphical text stringsfor application structure identifier parameter, clause 9.5.4.6 andT.14.5. If present, shall APPLICATION STRUCTURE DIRECTORY elements be complete, i.e., have an entry for every application structure in the picture? (yes/no)Yes. If "no", describe any special meaning associated with those entries which appear in APPLICATION STRUCTURE DIRECTORY elements which are incomplete. Other:None. |
Element | Specifications - WebCGM 2.1 Profile | Specifications - Model Profile |
---|---|---|
T.18.1 | Same as Model Profile:Yes | |
VDC INTEGER PRECISION [v1] References: 7.5.1 Part 3, 8.5 Part 4, 7.4 | Element is: RequiredNo; PermittedYes; The parameter values of this element are encoding dependent. If binary encoding is permitted, are there any restrictions on the Parameter value?16 or 32. Other:None. If clear text encoding is permitted, are there any restrictions on the parameter value?[-32767,32767], [-32768, 32767], or [-2147483648,2147483647]. Other:None. | |
T.18.2 | Same as Model Profile:Yes | |
VDC REAL PRECISION [v1] References: 7.5.2 Part 3, 8.5 Part 4, 7.4 | Element is: RequiredNo; PermittedYes; The parameter values of this element are encoding dependent. If binary encoding is permitted, are there any restrictions on the Parameter value?(1, 16, 16) or (0, 9, 32) Other:None. If clear text encoding is permitted, are there any If clear text encoding is permitted, are there any restrictions on the parameter value?0.0, 1.0 , 4; or -32767, 32767, 4; or -32768, 32767, 10; or -3.4028235E38, +3.4028235E38, 8 Note: The latter two values are the closest approximation, in base 10 clear text, to the REAL PRECISION values allowed in binary encoded CGMs. Other:None. | |
T.18.3 | Same as Model Profile:Yes | |
AUXILIARY COLOUR [v1] References: 7.5.3 9.5.4.1 D.4.4.1 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Theauxiliary colour specifier parameter shall follow the rules for colour, clause 9.5.4.1 andT.14.1. Other:None. | |
T.18.4 | Same as Model Profile:Yes | |
TRANSPARENCY [v1] References: 7.5.4 9.5.7.9 | Note: In terms of the drawing model description ofsection 2.2.2, the conceptual effect of Transparency is as follows. When Transparency is 'on' (default), then for the items affected by Auxiliary Colour and Transparency (inter-dash spaces, etc) the (Pr, Pg, Pb, Pa) in the equations is set to (0,0,0,0) -- transparent black. When Transparency is 'off', then for affected items the (Pr, Pg, Pb, Pa) is set to (r,g,b,a) of the Transparent Color, if RGB-alpha is the colour model. If the colour model is simple RGB, then the (Pr, Pg, Pb, Pa) is set to (r,g,b,a'), where a' is the Esc-45 alpha value in effect at the time, or 1 if there is no such Esc.45. | Element is: RequiredNo; PermittedYes; ProhibitedNo; Any restriction on the parameter value?None. Other:None. |
T.18.5 | Same as Model Profile:Yes | |
CLIP RECTANGLE [v1] References: 7.5.5 D.4.4.2 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Meaning of boundary cases for: zero-area: Prohibited. area greater than VDC extent: Clipping shall be done to the intersection of CLIP RECTANGLE and VDC EXTENT. additional cases: None. Other:None. | |
T.18.6 | Same as Model Profile:Yes | |
CLIP INDICATOR [v1] References: 7.5.6 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Any restrictions on the parameter value?None. Other:None. | |
T.18.7 | Same as Model Profile:No | |
LINE CLIPPING MODE [v2] References: 7.5.7 D.4.4.3 | Element is: RequiredNo; PermittedNo; ProhibitedYes; Any restrictions on the parameter value?None. Other:None. | Element is: RequiredNo; PermittedYes; ProhibitedNo; Any restrictions on the parameter value?None. Other:None. |
T.18.8 | Same as Model Profile:No | |
MARKER CLIPPING MODE [v2] References: 7.5.8 D.4.4.3 | Element is: RequiredNo; PermittedNo; ProhibitedYes; Any restrictions on the parameter value?None.Other:None. | Element is: RequiredNo; PermittedYes; ProhibitedNo; Any restrictions on the parameter value?None. Other:None. |
T.18.9 | Same as Model Profile:No | |
EDGE CLIPPING MODE [v2] References: 7.5.9 D.4.4.3 | Element is: RequiredNo; PermittedNo; ProhibitedYes; Any restrictions on the parameter value?None.Other:None. | Element is: RequiredNo; PermittedYes; ProhibitedNo; Any restrictions on the parameter value?None. Other:None. |
T.18.10 | Same as Model Profile:Yes | |
NEW REGION [v2] References: 7.5.10 | Element is: RequiredNo; PermittedYes; ProhibitedNo; This element shall be permitted only if BEGIN FIGURE is permitted. Any restrictions on the number of occurrences?None. Other:None. | |
T.18.11 | Same as Model Profile:No | |
SAVE PRIMITIVE CONTEXT [v2] References: 7.5.11 | Element is: RequiredNo; PermittedNo; ProhibitedYes; Maximum number of simultaneously saved contexts: Other:None. | Element is: RequiredNo; PermittedYes; ProhibitedNo; Maximum number of simultaneously saved contexts:1024. Other:None. |
T.18.12 | Same as Model Profile:No | |
RESTORE PRIMITIVE CONTEXT [v2] References: 7.5.12 | Element is: RequiredNo; PermittedNo; ProhibitedYes; This element is permitted only if SAVE PRIMITIVE CONTEXT is permitted. Other:None. | Element is: RequiredNo; PermittedYes; ProhibitedNo; This element is permitted only if SAVE PRIMITIVE CONTEXT is permitted. Other:None. |
T.18.13 | Same as Model Profile:No | |
PROTECTION REGION INDICATOR [v3] References: 7.5.13 | Element is: RequiredNo; PermittedYes; ProhibitedNo; The values are restricted to:off, clip. Other:None. | Element is: RequiredNo; PermittedYes; ProhibitedNo; This element shall be permitted only if BEGIN PROTECTION REGION is permitted. Other:None. |
T.18.14 | Same as Model Profile:No | |
GENERALIZED TEXT PATH MODE [v3] References: 7.5.14 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Any restrictions on the parameter value?off, axis-tangential Other:None. | Element is: RequiredNo; PermittedYes; ProhibitedNo; Any restrictions on the parameter value?None. Other:None. |
Same as Model Profile:No | ||
MITRE LIMIT [v3] References: 7.5.15 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Any restrictions on the parameter value?None. Other:Seeadditional interpreter specifications for mitre limit handling. | Element is: RequiredNo; PermittedYes; ProhibitedNo; Any restrictions on the parameter value?None. Other:None. |
T.18.16 | Same as Model Profile:Yes | |
TRANSPARENT CELL COLOUR [v3] References: 7.5.16 9.5.4.1T14.1 | "Note: In terms of the drawing model summary ofsection 2.2.2, the effect of Transparent Cell Colour (TCC) is described as follows. For any cell whose color matches the specified TCC, the (Pr, Pg, Pb, Pa) for that cell in the equations of 2.2.2 is set to (0,0,0,0) -- transparent black. Note that TCC is legacy functionality -- the same thing can be achieved better with RGB-alpha color alone, and mixing TCC and RGB-alpha does not make sense." | Element is: RequiredNo; PermittedYes; ProhibitedNo; Thetransparent cell colour specifier parameter shall follow the rules for colour, clause 9.5.4.1 andT.14.1. Any restrictions on the parameter values?None. Other:None. |
Element | Specifications - WebCGM 2.1 Profile | Specifications - Model Profile |
---|---|---|
T.19.1 | Same as Model Profile:Yes | |
POLYLINE [v1] References: 7.6.1 D.2.21 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Maximum number of points or state "no limit":4096. Zero-length geometric degeneracies shall be as defined inT.14.2. Other:None. | |
T.19.2 | Same as Model Profile:Yes | |
DISJOINT POLYLINE [v1] References: 7.6.2 D.2.2.1 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Maximum number of points or state "no limit":4096. Zero-length geometric degeneracies shall be as defined inT.14.2. Other:None. | |
T.19.3 | Same as Model Profile:Yes | |
POLYMARKER [v1] References: 7.6.3 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Maximum number of points or state "no limit":4096. Other:None. | |
T.19.4 | Same as Model Profile:No | |
TEXT [v1] References: 7.6.4 9.5.4.5 | Element is: RequiredNo; PermittedNo; ProhibitedYes; Thestring parameter shall follow the rules for graphical text, clause 9.5.4.5. Is the 'not final' flag allowed: (yes/no) Other:Graphical text shall be represented by the Restricted Text element in this profile. | Element is: RequiredNo; PermittedYes; ProhibitedNo; Thestring parameter shall follow the rules for graphical text, clause 9.5.4.5. Is the 'not final' flag allowed: (yes/no)Yes. Other:None. |
T.19.5 | Same as Model Profile:Yes | |
RESTRICTED TEXT [v1] References: 7.6.5 9.5.4.5 D.4.5.2 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Thestring parameter shall follow the rules for graphical text, clause 9.5.4.5. Is the 'not final' flag allowed: (yes/no)Yes. For[v1/2] metafiles, is the realization of RESTRICTED TEXT according to one of the standard or registered values for RESTRICTED TEXT TYPE? (yes/no)Yes. If yes, specify. Boxed-cap, also seeT.26.7 For [v3] and [v4] metafiles, RESTRICTED TEXT TYPE shall be used if this element is used. Other:None. | |
T.19.6 | Same as Model Profile:Yes | |
APPEND TEXT [v1] References: 7.6.6. 9.5.4.5 D.4.5.1 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Thestring parameter shall follow the rules for graphical text, clause 9.5.4.5. Other:None. | |
T.19.7 | Same as Model Profile:Yes | |
POLYGON [v1] References: 7.6.7 D.2.2.2 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Maximum number of points:4096. Zero-area geometric degeneracies shall be as defined inT.14.3. Other:None. | |
T.19.8 | Same as Model Profile:Yes | |
POLYGON SET [v1] References: 7.6.8 D.2.2.2 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Maximum number of points:4096. Number of polygons in a set?No limit. Zero-area geometric degeneracies shall be as defined inT.14.3. Other:Each individual polygon within a set shall have at least 3 points. | |
T.19.9 | Same as Model Profile:No | |
CELL ARRAY [v1] References: 7.6.9 D.4.5.3 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Limit for nx:32768 Limit for ny:32768 Limit for nx*ny:1,073,741,824 ("1 giga", 32768**2). Are rotated and skewed cell arrays allowed? (yes/no)No. If yes, specify the graphical meaning. Other:Zero-area cell arrays are prohibited. | Element is: RequiredNo; PermittedYes; ProhibitedNo; Limit for nx:2048. Limit for ny:2048. Limit for nx*ny:4194304. Are rotated and skewed cell arrays allowed? (yes/no)No. If yes, specify the graphical meaning. Other:Zero-area cell arrays are prohibited. |
T.19.10 | Same as Model Profile:Yes | |
GENERALIZED DRAWING PRIMITIVE [v1] References: 7.6.10 | Element is: RequiredNo; PermittedNo; ProhibitedYes; List all the registered GDPs that are allowed: List all profile-defined GDPs that are allowed and attach complete description: Other: | |
T.19.11 | Same as Model Profile:Yes | |
RECTANGLE [v1] References: 7.6.11 D.2.2.2 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Zero-area geometric degeneracies shall be as defined inT.14.3. Other: None. | |
T.19.12 | Same as Model Profile:Yes | |
CIRCLE [v1] References: 7.6.12 D.2.2.2 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Zero-area geometric degeneracies shall be as defined inT.14.3. Other:None. | |
T.19.13 | Same as Model Profile:Yes | |
CIRCULAR ARC 3 POINT [v1] References: 7.6.13 D.2.2.2 D.4.5.4 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Zero-length geometric degeneracies shall be as defined inT.14.2. Other:None. | |
T.19.14 | Same as Model Profile:Yes | |
CIRCULAR ARC 3 POINT CLOSE [v1] References: 7.6.14 D.2.2.2 D.4.5.5 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Zero-area geometric degeneracies shall be as defined inT.14.3. Other:None. | |
T.19.15 | Same as Model Profile:Yes | |
CIRCULAR ARC CENTRE [v1] References: 7.6.15 D.2.2.2 D.4.5.6 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Zero-length geometric degeneracies shall be as defined inT.14.2. Other:None. | |
T.19.16 | Same as Model Profile:Yes | |
CIRCULAR ARC CENTRE CLOSE [v1] References: 7.6.16 D.2.2.2 D.4.5.7 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Zero-area geometric degeneracies shall be as defined inT.14.3. Other:None. | |
T.19.17 | Same as Model Profile:Yes | |
ELLIPSE [v1] References: 7.6.17 D.2.2.2 D.4.5.9 D.4.5.10 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Zero-area geometric degeneracies shall be as defined inT.14.3. Other:None. | |
T.19.18 | Same as Model Profile:Yes | |
ELLIPTICAL ARC [v1] References: 7.6.18 D.2.2.1 D.4.5.11 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Zero-length geometric degeneracies shall be as defined inT.14.2. Other:None. | |
T.19.19 | Same as Model Profile:Yes | |
ELLIPTICAL ARC CLOSE [v1] References: 7.6.19 D.2.2.2 D.4.5.12 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Zero-area geometric degeneracies shall be as defined inT.14.3. Other:None. | |
T.19.20 | Same as Model Profile:Yes | |
CIRCULAR ARC CENTRE REVERSED [v2] References: 7.6.20 D.2.2.1 D.4.5.8 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Zero-length geometric degeneracies shall be as defined inT.14.2. Other:None. | |
T.19.21 | Same as Model Profile:Yes | |
CONNECTING EDGE [v2] References: 7.6.21 D.2.2.1 | Element is: RequiredNo; PermittedYes; ProhibitedNo; This element shall be permitted only if BEGIN/END FIGURE is permitted. Zero-length geometric degeneracies shall be as defined inT.14.2. Other:None. | |
T.19.22 | Same as Model Profile:No | |
HYPERBOLIC ARC [v3] References: 7.6.22 D.2.2.1 | Element is: RequiredNo; PermittedNo; ProhibitedYes; Zero-length geometric degeneracies shall be as defined inT.14.2. Other:None. | Element is: RequiredNo; PermittedYes; ProhibitedNo; Zero-length geometric degeneracies shall be as defined inT.14.2. Other:None. |
T.19.23 | Same as Model Profile:No | |
PARABOLIC ARC [v3] References: 7.6.23 D.2.2.1 | Element is: RequiredNo; PermittedNo; ProhibitedYes; Zero-length geometric degeneracies shall be as defined inT.14.2. Other:None. | Element is: RequiredNo; PermittedYes; ProhibitedNo; Zero-length geometric degeneracies shall be as defined inT.14.2. Other:None. |
T.19.24 | Same as Model Profile:Yes | |
NON-UNIFORM B-SPLINE [v3] References: 7.6.24 D.2.2.1 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Set of spline orders:cubic spline (order=4). Maximum number of control points:4096. Zero-length geometric degeneracies shall be as defined inT.14.2. Other:The spline shall be clamped form, i.e., the first 4 knots shall be identical and the last 4 knots shall be identical. | |
T.19.25 | Same as Model Profile:Yes | |
NON-UNIFORM RATIONAL B-SPLINE [v3] References: 7.6.25 D.2.2.1 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Set of spline orders:cubic spline (order=4). Maximum number of control points:4096. Zero-length geometric degeneracies shall be as defined inT.14.2. Other:The spline shall be clamped form, i.e., thefirst 4 knots shall be identical and the last 4 knotsshall be identical. | |
T.19.26 | Same as Model Profile:Yes | |
POLYBEZIER [v3] References: 7.6.26 D.2.2.1 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Maximum number of points:4096. Any restrictions on the continuity indicator?None. Zero-length geometric degeneracies shall be as defined inT.14.2. Other:None. | |
T.19.27 | Same as Model Profile:Yes | |
POLYSYMBOL [v3] References: 7.6.27 D.2.2.1 | Element is: RequiredNo; PermittedNo; ProhibitedYes; Point list: Effect of a reference to a symbol index parameter which is not in the symbol library. Other: NOTE - This element is prohibited because SYMBOL LIBRARY LIST is prohibited. | |
T.19.28 | Same as Model Profile:No | |
BITONAL TILE [v3] References: 7.6.28 D.2.2.1 D.4.5.13 | Element is: RequiredNo; PermittedYes; ProhibitedNo; List allowable compression types:2, 5, or 6. Requirements on row padding:None. Other:The WebCGM 1.0 values 0, 1 aredeprecated. | Element is: RequiredNo; PermittedYes; ProhibitedNo; List allowable compression types:Values 0..6. Requirements on row padding:None. Other:CCITT compression methods (T6 and T4) should be used with 1 bit cell colour precision and indexed colour. Note — Several compression types have beenregistered (as of date of publication) in the ISORegister of Graphical Items, specifically: JPEG,LZW, and PNG. |
Same as Model Profile:No | ||
TILE [v3] References: 7.6.29 D.2.2.1 D.4.5.13 | Element is: RequiredNo; PermittedYes; ProhibitedNo; List allowable compression types:5, 6, 7, or 9 Requirements on row padding:None. Other:The value 9 is the ISO registered value for compression method 0 of PNG. The WebCGM 1.0 values 0, 1, 2 aredeprecated. | Element is: RequiredNo; PermittedYes; ProhibitedNo; List allowable compression types:Values 0..6. Requirements on row padding?None. Other:CCITT compression methods (T6 and T4) should be used with 1 bit cell colour precision and indexed colour. Note — Several compression types have beenregistered (as of date of publication) in the ISORegister of Graphical Items, specifically: JPEG, LZW, and PNG. |
Element | Specifications - WebCGM 2.1 Profile | Specifications - Model Profile |
---|---|---|
Same as Model Profile:No | ||
LINE BUNDLE INDEX [v1] References: 7.7.1 9.5.4.2 D.4.6.1 | Element is: RequiredNo; PermittedNo; ProhibitedYes; Theline bundle index parameter shall follow the rules for indexes, clause 7.5.4.2. For [v1] metafiles, allowable index values: For [v2/3] metafiles, any referenced bundle shall have an explicit representation definition. Other:None. | Element is: RequiredNo; PermittedYes; ProhibitedNo; Theline bundle index parameter shall follow the rules for indexes, clause 7.5.4.2. For [v1] metafiles, allowable index values:1..5.
line type 1 2 3 4 5 line width 1.0 1.0 1.0 1.0 1.0 line colour 1 1 1 1 1 For [v2], [v3], and [v4]metafiles, any referenced bundle shall have an explicit representation definition. Other:None. |
T.20.2 | Same as Model Profile:No | |
LINE TYPE [v1] References: 7.7.2 9.4.17 D.4.6.2 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Select 1 or more of the following:
For [v3] and [v4] metafiles,
Other:Line types 6-15 are included in the Register of Graphical Objects. This register is available from the ISO SC24 Committee. See Section6.16 about specific and generic line types. | Element is: RequiredNo; PermittedYes; ProhibitedNo; Select 1 or more of the following:
For [v3] and [v4] metafiles,
Other:None. |
T.20.3 | Same as Model Profile:Yes | |
LINE WIDTH [v1] References: 7.7.3 D.4.6.3 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Is value zero allowed? (yes/no)Yes. If yes, specify its meaning.Minimum available line width. Any restrictions on the parameter value?None. Other:None. | |
T.20.4 | Same as Model Profile:Yes | |
LINE COLOUR [v1] References: 7.7.4 9.5.4.1 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Theline colour specifier parameter shall follow the rules for colour, clause 9.5.4.1 andT.14.1. Any restrictions on the parameter value?None. Other:None. | |
Same as Model Profile:No | ||
MARKER BUNDLE INDEX [v1] References: 7.7.5 9.5.4.2 D.4.6.1 | Element is: RequiredNo; PermittedNo; ProhibitedYes; Themarker bundle index parameter shall follow the rules for indexes, clause 9.5.4.2. For [v1] metafiles, allowable index values: For [v2/3] metafiles, any referenced bundle shall have an explicit representation definition. Other:None. | Element is: RequiredNo; PermittedYes; ProhibitedNo; Themarker bundle index parameter shall follow the rules for indexes, clause 9.5.4.2. For [v1] metafiles, allowable index values:1..5. index 1 2 3 4 5 marker type 1 2 3 4 5 marker width 1.0 1.0 1.0 1.0 1.0 marker colour 1 1 1 1 1 For [v2], [v3] and [v4]metafiles, any referenced bundle shall have an explicit representation definition. Other:None. |
T.20.6 | Same as Model Profile:Yes | |
MARKER TYPE [v1] References: 7.7.6 D.4.6.4 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Indicate one or more of the following restrictions:
Other:None. | |
T.20.7 | Same as Model Profile:Yes | |
MARKER SIZE [v1] References: 7.7.7 D.4.6.5 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Is value zero allowed? (yes/no)Yes. If yes, specify its meaning.Minimum available size. Any restrictions on the parameter value?None. Other:None. | |
T.20.8 | Same as Model Profile:Yes | |
MARKER COLOUR [v1] References: 7.7.8 9.5.4.1 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Themarker colour specifier parameter shall follow the rules for colour, clause 9.5.4.1 andT.14.1. Any restrictions on the parameter value?None. Other:None. | |
Same as Model Profile:No | ||
TEXT BUNDLE INDEX [v1] References: 7.7.9 9.5.4.2 D.4.6.1 | Element is: RequiredNo; PermittedNo; ProhibitedYes; Thetext bundle index parameter shall follow the rules for indexes, clause 9.5.4.2.
For [v2/3] metafiles, any referenced bundle shall have an explicit representation definition. Other:None. | Element is: RequiredNo; PermittedYes; ProhibitedNo; Thetext bundle index parameter shall follow the rules for indexes, clause 9.5.4.2. For [v1] metafiles, allowable index values:1..2. index 1 2 font index 1 1 text precision stroke stroke character expansion factor 1.0 0.7 character spacing 0.0 0.0 text colour 1 1 For [v2], [v3] and [v4] metafiles, any referenced bundle shall have an explicit representation definition. Other:None. |
T.20.10 | Same as Model Profile:Yes | |
TEXT FONT INDEX [v1] References: 7.7.10 9.5.4.2 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Every referenced index shall refer to an entry in the FONT LIST (seeT.16.13). Other:None. | |
T.20.11 | Same as Model Profile:No | |
TEXT PRECISION [v1] References: 7.7.11 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Any restrictions on the parameter value?Value shall be 'stroke'. Other:None. | Element is: RequiredNo; PermittedYes; ProhibitedNo; Any restrictions on the parameter value?None. Other:None. |
T.20.12 | Same as Model Profile:Yes | |
CHARACTER EXPANSION FACTOR [v1] References: 7.7.12 D.4.6.7 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Is value zero allowed? (yes/no)No. If yes, state the meaning. Any restrictions on the parameter value?Values shall be restricted to the range 0.1..10.0 Other:None. | |
T.20.13 | Same as Model Profile:Yes | |
CHARACTER SPACING [v1] References: 7.7.13 D.4.6.8 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Any restrictions on the parameter value?Values shall be restricted to the range of -1.0..5.0. Other:None. | |
T.20.14 | Same as Model Profile:Yes | |
TEXT COLOUR [v1] References: 7.7.14 9.5.4.1 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Thetext colour specifier parameter shall follow the rules for colour, clause 9.5.4.1 andT.14.1. Any restrictions on the parameter value?None. Other:None. | |
T.20.15 | Same as Model Profile:Yes | |
CHARACTER HEIGHT [v1] References: 7.7.15 D.4.6.9 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Is zero height allowed: (yes/no)Yes. If yes, state its meaning: Minimum available height. Any restrictions on the parameter?None. Other:None. | |
T.20.16 | Same as Model Profile:Yes | |
CHARACTER ORIENTATION [v1] References: 7.7.16 D.4.6.10 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Any restrictions on the following distortion aspects? rotation?None. skewing?None. mirroring?None. aspect ratio?None. Other:None. | |
T.20.17 | Same as Model Profile:Yes | |
TEXT PATH [v1] References: 7.7.17 D.4.6.11 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Any restrictions on the parameter value?None. Other:None. | |
T.20.18 | Same as Model Profile:Yes | |
TEXT ALIGNMENT [v1] References: 7.7.18 D.4.6.12 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Any restrictions on the horizontal and vertical alignment values?None. Any restrictions on the continuous horizontal and vertical alignment values?None. Other:None. | |
T.20.19 | Same as Model Profile:No | |
CHARACTER SET INDEX [v1] References: 7.7.19 9.5.4.2 D.4.6.13 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Every referenced index shall refer to an entry in the CHARACTER SET LIST. This includes implicit reference to the default index value. Other:None. | Element is: RequiredNo; PermittedYes; ProhibitedNo; Every referenced index shall refer to an entry in the CHARACTER SET LIST or GLYPH MAPPING. This includes implicit reference to the default index value. Other:None. |
T.20.20 | Same as Model Profile:No | |
ALTERNATE CHARACTER SET INDEX [v1] References: 7.7.20 9.5.4.2 D.4.6.13 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Every referenced index shall refer to an entry in the CHARACTER SET LIST. This includes implicit reference to the default index value. Other:None. | Element is: RequiredNo; PermittedYes; ProhibitedNo; Every referenced index shall refer to an entry in the CHARACTER SET LIST or GLYPH MAPPING. This includes implicit reference to the default index value. Other:None. |
Same as Model Profile:No | ||
FILL BUNDLE INDEX [v1] References: 7.7.21 9.5.4.2 D.4.6.1 | Element is: RequiredNo; PermittedNo; ProhibitedYes; Thefill bundle index parameter shall follow the rules for indexes, clause 9.5.4.2. For [v1] metafiles, allowable index values: For [v2/3] metafiles, any referenced bundle shall have an explicit representation definition. Other:None. | Element is: RequiredNo; PermittedYes; ProhibitedNo; Thefill bundle index parameter shall follow the rules for indexes, clause 9.5.4.2. For [v1] metafiles, allowable index values:1..5. index 1 2 3 4 5 interior style hatch hatch hatch hatch hatch fill colour 1 1 1 1 1 hatch index 1 2 3 4 5 pattern index 1 1 1 1 1 For [v2], [v3] and [v4] metafiles, any referenced bundle shall have an explicit representation definition. Other:None. |
T.20.22 | Same as Model Profile:No | |
INTERIOR STYLE [v1] References: 7.7.22 D.4.6.15 | Element is: RequiredNo; PermittedYes; ProhibitedNo; For 'hollow' interior style, line type and width of the bounding line:Solid line type and default line width. Any restrictions on the parameter value?hollow, solid, pattern, hatch, empty, interpolated. Other:None. | Element is: RequiredNo; PermittedYes; ProhibitedNo; For 'hollow' interior style, line type and width of the bounding line:Solid line type and default line width. Any restrictions on the parameter value?None. Other:None. |
T.20.23 | Same as Model Profile:Yes | |
FILL COLOUR [v1] References: 7.7.23 9.5.4.1 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Thefill colour specifier parameter shall follow the rules for colour, clause 9.5.4.1 andT.14.1. Any restrictions on the parameter value?None. Other:None. | |
T.20.24 | Same as Model Profile:Yes | |
HATCH INDEX [v1] References: 7.4.18 7.7.24 6.7.4.3 D.4.6.16 | Note. See6.17 for further discussion of hatch interiors in WebCGM. | Element is: RequiredNo; PermittedYes; ProhibitedNo; Select 1 or more of the following:
For [v3] and [v4]metafiles,
Other:None. |
T.20.25 | Same as Model Profile:Yes | |
PATTERN INDEX [v1] References: 7.7.25 9.5.4.2 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Thepattern index parameter shall follow the rules for indexes, clause 9.5.4.2. Any restrictions on the parameter value?None. Other:None. | |
Same as Model Profile:No | ||
EDGE BUNDLE INDEX [v1] References: 7.7.26 9.5.4.2 D.4.6.1 | Element is: RequiredNo; PermittedNo; ProhibitedYes; Theedge bundle index parameter shall follow the rules for indexes, clause 9.5.4.2. For [v1] metafiles, allowable index values: For [v2/3] metafiles, any referenced bundle shall have an explicit representation definition. Other:None. | Element is: RequiredNo; PermittedYes; ProhibitedNo; Theedge bundle index parameter shall follow the rules for indexes, clause 9.5.4.2. For [v1] metafiles, allowable index values:1..5.
edge type 1 2 3 4 5 edge width 1.0 1.0 1.0 1.0 1.0 edge colour 1 1 1 1 1 For [v2], [v3] and [v4]metafiles, any referenced bundle shall have an explicit representation definition. Other:None. |
T.20.27 | Same as Model Profile:Yes | |
EDGE TYPE [v1] References: 7.4.17 9.7.27 D.4.6.17 | Note. See6.16 for further discussion of line and edge type definitions in WebCGM. | Element is: RequiredNo; PermittedYes; ProhibitedNo; Select 1 or more of the following:
For [v3] and [v4] metafiles,
Other:None. |
T.20.28 | Same as Model Profile:Yes | |
EDGE WIDTH [v1] References: 7.7.28 D.4.6.18 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Is value zero allowed? (yes/no)Yes. If yes, specify its meaning.Minimum available edge width. Any restrictions on the parameter value?None. Other:None. | |
T.20.29 | Same as Model Profile:Yes | |
EDGE COLOUR [v1] References: 7.7.29 9.5.4.1 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Theedge colour specifier parameter shall follow the rules for colour, clause 9.5.4.1 andT.14.1. Any restrictions on the parameter value?None. Other:None. | |
T.20.30 | Same as Model Profile:Yes | |
EDGE VISIBILITY [v1] References: 7.7.30 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Any restrictions on the parameter value?None. Other:None. | |
T.20.31 | Same as Model Profile:Yes | |
FILL REFERENCE POINT [v1] References: 7.7.31 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Any restrictions on the parameter value? None. Other: None. | |
T.20.32 | Same as Model Profile:Yes | |
PATTERN TABLE [v1] References: 7.7.32 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Maximum size for nx:32. Allowable values for nx:8, 16, or 32. Maximum size for ny:32. Allowable values for ny:8, 16, or 32. Any restrictions on the number of pattern definitions?64. Any restrictions on allowable combinations of nx and ny?None. Any restrictions on the number of colours?None. Other:None. | |
T.20.33 | Same as Model Profile:Yes | |
PATTERN SIZE [v1] References: 7.7.33 D.4.6.19 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Must pattern vectors be parallel to coordinate axes? (yes/no)Yes. If no, state the meaning of skewed or non-aligned patterns. Other:None. | |
T.20.34 | Same as Model Profile:No | |
COLOUR TABLE [v1] References: 7.7.34 9.5.4.1 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Any limits on the length of colour list?Monochrome: 2, Colour: 256. Any restrictions on the index values?Index values shall not exceed the maximum colour index. Other:Greyscale metafiles are considered special cases of colour metafiles. | Element is: RequiredNo; PermittedYes; ProhibitedNo; Any limits on the length of colour list?Monochrome: 2, Greyscale: 64, Colour: 256. Any restrictions on the index values?Index values shall not exceed the maximum colour index. Other:None. |
T.20.35 | Same as Model Profile:No | |
ASPECT SOURCE FLAGS [v1] References: 7.7.35 D.4.6.20 | Element is: RequiredNo; PermittedNo; ProhibitedYes; Are all ASF values to be the same: for the metafile? (yes/no) within each class (line, marker, text, fill, edge) of primitive? (yes/no) Other:None. | Element is: RequiredNo; PermittedYes; ProhibitedNo; Are all ASF values to be the same: for the metafile? (yes/no)No. within each class (line, marker, text, fill, edge) of primitive? (yes/no)Yes. Other:None. |
T.20.36 | Same as Model Profile:No | |
PICK IDENTIFIER [v2] References: 7.7.36 | Element is: RequiredNo; PermittedNo; ProhibitedYes; Any restrictions on the parameter value? Other:None. | Element is: RequiredNo; PermittedYes; ProhibitedNo; Any restrictions on the parameter value?None. Other:None. |
Same as Model Profile:No | ||
LINE CAP [v3] References: 7.7.37 9.5.7.5 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Any restrictions on the set of values for the line cap indicator? (choose 1 or both) Yes; values 1..4; No; subset of registered values (attach list). Any restrictions on the set of values for the dash cap indicator? (choose 1 or both) Yes; values 1..3; No; subset of registered values (attach list). Other:None. | Element is: RequiredNo; PermittedYes; ProhibitedNo; Any restrictions on the set of values for the line cap indicator? (choose 1 or both) Yes; values 1..5; No; subset of registered values (attach list). Any restrictions on the set of values for the dash cap indicator? (choose 1 or both) Yes; values 1..3; No; subset of registered values (attach list). Other:None. |
Same as Model Profile:Yes | ||
LINE JOIN [v3] References: 7.7.38 9.5.7.5 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Any restrictions on the set of values? (choose 1 or both) Yes; values 1..4; No; subset of registered values (attach list). Other:None. | |
Same as Model Profile:Yes | ||
LINE TYPE CONTINUATION [v3] References: 7.7.39 9.5.7.5 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Any restrictions on the set of values?1..4. Other:None. | |
T.20.40 | Same as Model Profile:Yes | |
LINE TYPE INITIAL OFFSET [v3] References: 7.7.40 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Any restrictions on the parameter value?None. Other:None. | |
T.20.41 | Same as Model Profile:Yes | |
TEXT SCORE TYPE [v3] References: 7.7.41 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Any restrictions on the set of values? (choose 1 or both) Yes; Values 1..4; No; Subset of registered values (attach list). Other:None. | |
Same as Model Profile:Yes | ||
RESTRICTED TEXT TYPE [v3] References: 7.7.42 9.5.7.5 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Any restrictions on the set of values? (choose 1 or both) Yes; Values 1..6; No; Subset of registered values (attach list). Algorithms for achieving restriction type? (attach)Not specified. Other:None. | |
T.20.43 | Same as Model Profile:Yes | |
INTERPOLATED INTERIOR [v3] References: 7.7.43 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Any limits on the number of stages?Maximum number of stages is 8. Any restrictions on the set of values? (choose 1 or both) Yes; Values 1..3; No; Subset of registered values (attach list). Other:None. | |
Same as Model Profile:No | ||
EDGE CAP [v3] References: 7.7.44 9.5.7.5 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Any restrictions on the set of values for the edge cap indicator? (choose 1 or both) Yes; values 1..4; No; subset of registered values (attach list). Any restrictions on the set of values for the dash cap indicator? (choose 1 or both) Yes; values 1..3; No; subset of registered values (attach list). Other:None. | Element is: RequiredNo; PermittedYes; ProhibitedNo; Any restrictions on the set of values for the edge cap indicator? (choose 1 or both) Yes; values 1..5; No; subset of registered values (attach list). Any restrictions on the set of values for the dash cap indicator? (choose 1 or both) Yes; values 1..3; No; subset of registered values (attach list). Other:None. |
Same as Model Profile:Yes | ||
EDGE JOIN [v3] References: 7.7.45 9.5.7.5 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Any restrictions on the set of values? (choose 1 or both) Yes; values 1..4; No; subset of registered values (attach list). Other:None. | |
Same as Model Profile:Yes | ||
EDGE TYPE CONTINUATION [v3] References: 7.7.46 9.5.7.5 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Any restrictions on the set of values?1..4. Other:None. | |
T.20.47 | Same as Model Profile:Yes | |
EDGE TYPE INITIAL OFFSET [v3] References: 7.7.47 | Element is: RequiredNo; PermittedYes; ProhibitedNo; Any restrictions on the parameter value?None. Other:None. | |
T.20.48 | Same as Model Profile:Yes | |
SYMBOL LIBRARY INDEX [v3] References: 7.7.48 9.5.4.2 | Element is: RequiredNo; PermittedNo; ProhibitedYes; Every referenced index shall refer to an entry in the SYMBOL LIBRARY LIST (seeT.16.23). Other:This element is prohibited because SYMBOL LIBRARY LIST is prohibited. | |
T.20.49 | Same as Model Profile:Yes | |
SYMBOL COLOUR [v3] References: 7.7.49 9.5.4.1 D.4.6.21 | Element is: RequiredNo; PermittedNo; ProhibitedYes; Thesymbol colour specifier parameter shall follow the rules for colour, clause 9.5.4.1 andT.14.1. Any restrictions on the parameter value? Other:This element is prohibited because SYMBOL LIBRARY LIST is prohibited. | |
T.20.50 | Same as Model Profile:Yes | |
SYMBOL SIZE [v3] References: 7.7.50 | Element is: RequiredNo; PermittedNo; ProhibitedYes; Is value zero is allowed: (yes/no) If yes, specify its meaning. Any restrictions on the parameter value? Other:This element is prohibited because SYMBOL LIBRARY LIST is prohibited. | |
T.20.51 | Same as Model Profile:Yes | |
SYMBOL ORIENTATION [v3] References: 7.7.51 D.4.6 | Element is: RequiredNo; PermittedNo; ProhibitedYes; Any restrictions on rotation? Any restrictions on skewing? Any restrictions on mirroring? Any restrictions on distortion of aspect ratio? Other:This element is prohibited because SYMBOL LIBRARY LIST is prohibited. |
Element | Specifications - WebCGM 2.1 Profile | Specifications - Model Profile |
---|---|---|
T.21.1 | Same as Model Profile:No; | |
ESCAPE [v1] References: 7.8.1 | Element: RequiredNo; PermittedYes; ProhibitedNo; List all registered ESCAPEs that are allowed:
List all profile-defined ESCAPEs that are allowed and attach complete description: Other:All ESCAPE element parameters shall be encoded as SDRs NOTE: Only registered ESCAPEs and profile-defined ESCAPEs shall be allowed in profiles. | Element: RequiredNo; PermittedYes; ProhibitedNo; List all registered ESCAPEs that are allowed: ESCAPE 22, Transparent Cell Colour [v1/v2] metafiles only.
List all profile-defined ESCAPEs that are allowed and attach complete description:None. Other:None |
Element | Specifications - WebCGM 2.1 Profile | Specifications - Model Profile |
---|---|---|
T.22.1 | Same as Model Profile:No | |
MESSAGE [v1] References: 7.9.1 | Element: RequiredNo; PermittedNo; ProhibitedYes; Values of theaction required flag parameter:
(if permitted, specify the messages and actions taken)
Any restrictions on the length of the message string, other than those for type SF parameter? Other:None. | Element: RequiredNo; PermittedYes; ProhibitedNo; Values of theaction required flag parameter:
(if permitted, specify the messages and actions taken)
Any restrictions on the length of the message string, other than those for SF parameter?None. Other:None. |
T.22.2 | Same as Model Profile:No | |
APPLICATION DATA [v1] References: 7.9.2 | Element: RequiredNo; PermittedNo; ProhibitedYes; Attach a syntactic and semantic description of all application data elements associated with this profile. Other:None. | Element: RequiredNo; PermittedYes; ProhibitedNo; The use of this element shall not be restricted. Attach a syntactic and semantic description of all application data elements associated with this profile. Other:None. |
Element | Specifications - WebCGM 2.1 Profile | Specifications - Model Profile |
---|---|---|
T.23.1 | Same as Model Profile:No | |
COPY SEGMENT [v2] References: 7.10.1 D.4.9.2 | Element: RequiredNo; PermittedNo; ProhibitedYes; Every segment identifier shall refer to a defined segment. Any limits on the segment transformation application value? Any restrictions on the nature of the transformation (e.g., permitting only isotropic transformations)? Other:None. | Element: RequiredNo; PermittedYes; ProhibitedNo; Every segment identifier shall refer to a defined segment. Any limits on the segment transformation application value?None. Any restrictions on the nature of the transformation (e.g., permitting only isotropic transformations)?Non-singular. Other:None. |
T.23.2 | Same as Model Profile:No | |
INHERITANCE FILTER [v2] References: 7.10.2 | Element: RequiredNo; PermittedNo; ProhibitedYes; Any limits on the filter selection list? Any limits on the selection setting? Other:None. | Element: RequiredNo; PermittedYes; ProhibitedNo; Any limits on the filter selection list?None. An limits on the selection setting?None. Other:None. |
T.23.3 | Same as Model Profile:No | |
CLIP INHERITANCE [v2] References: 7.10.3 D.4.9.2 | Element: RequiredNo; PermittedNo; ProhibitedYes; Any limits on the parameter? Other:None. | Element: RequiredNo; PermittedYes; ProhibitedNo; Any limits on the parameter?None. Other:None. |
T.23.4 | Same as Model Profile:No | |
SEGMENT TRANS- [v2] References: 7.10.4 | Element: RequiredNo; PermittedNo; ProhibitedYes; Any restrictions on the nature of the transformation (e.g., permitting only isotropic transformations)? Other:None. | Element: RequiredNo; PermittedYes; ProhibitedNo; Any restrictions on the nature of the transformation (e.g., permitting only isotropic transformations)?Non-singular. Other:None. |
T.23.5 | Same as Model Profile:No | |
SEGMENT HIGHLIGHTING [v2] References: 7.10.5 | Element: RequiredNo; PermittedNo; ProhibitedYes; Any restrictions on the parameter values? Other:None. | Element: RequiredNo; PermittedYes; ProhibitedNo; Any restrictions on the parameter values?None. Other:None. |
T.23.6 | Same as Model Profile:No | |
SEGMENT DISPLAY PRIORITY [v2] References: 7.10.6 | Element: RequiredNo; PermittedNo; ProhibitedYes; Any restrictions on the parameter values? Other:None. | Element: RequiredNo; PermittedYes; ProhibitedNo; Any restrictions on the parameter values?None. Other:None. |
T.23.7 | Same as Model Profile:No | |
SEGMENT PICK PRIORITY [v2] References: 7.10.7 | Element: RequiredNo; PermittedNo; ProhibitedYes; Any restrictions on the parameter values? Other:None. | Element: RequiredNo; PermittedYes; ProhibitedNo; Any restrictions on the parameter values?None. Other:None. |
Functionality | Specifications - WebCGM 2.1 Profile | Specifications - Model Profile |
---|---|---|
T.24.1 | Same as Model Profile:No | |
APPLICATION STRUCTURE ATTRIBUTE [v4] References: 6.9 6.13.5 7.9.2 7.1.1 | Element: RequiredNo; PermittedYes; ProhibitedNo; Define the set of structure elements for use within application structures (APS), and attach complete syntactic and semantic description: The set of attributes allowed is listed inSection 3.2.2, which includes complete syntactic and semantic definitions, as well as permissibility according to APS type. Other:None. | Element: RequiredNo; PermittedYes; ProhibitedNo; Define the set of structure elements for use within application structures, and attach complete syntactic and semantic description: None. Other:None. |
Functionality | Specifications - WebCGM 2.1 Profile | Specifications - Model Profile |
---|---|---|
T.25.1 | Same as Model Profile:Yes | |
Colour requirements References: 9.5.4.1 9.5.6.2.2 | Colour mapping is: PermittedYes; ProhibitedNo; Reduction of the number of colours?Not specified. NOTE - If mapping of application colours to metafile colour specifications is required, it is recommended that colour distance in the mapping be computed by the Euclidean metric in CIEXYZ space. Definition of mapping algorithms, metrics, and colour space? No specific colour mapping techniques or selection of metafile colour sets are defined. For [v1/2] metafiles, implicit colour calibration specifications?No specifications are defined. Other:None. | |
T.25.2 | Same as Model Profile:Yes | |
Geometric accuracy and latitude References: 9.5.6.2.1 | Accuracy and latitude for mapping application graphics to CGM graphical primitive elements: Accuracy and latitude for mapping application graphics to CGM graphical primitive elements:Generators shall produce a metafile whose graphical primitive elements match the application graphical primitives accurately to within ±0.1% of relative position within the VDC Extent box or ±1/2 pixel of the intended size, whichever is greater. Generators shall produce geometric size aspects of the primitives (e.g., text size, line width, and edge width) to within 1% of the intended size or ±1/2 pixel of the intended size, whichever is greater. This requirement shall apply to all graphical primitive elements, unless superseded by specific element requirements in this clause. | |
T.25.3 | Same as Model Profile:Yes | |
Text accuracy and latitude References: 9.5.6.2.3 | Is text accuracy and latitude addressed? (yes/no)Yes. If yes, specify.Metafile text specifications shall match the text of the application picture to within ±1% of relative to the intended size or ±1/2 pixel of the intended size, whichever is greater, for the placement and overall extent of each text string. | |
Same as Model Profile:No | ||
Font substitution References: 9.5.6.2.4 I.2 | Font substitution is: PermittedYes; ProhibitedNo; Similarity of font visual characteristics?Substituted fonts shall be metrically equivalent or be controlled by the RESTRICTED TEXT element. Font metrics?Specified in ISO/IEC 8632:1999 Annex I.2 for the core 13 fonts. Individual glyph metrics?Specified in ISO/IEC 8632:1999 Annex I.2 for the core 13 fonts. Other:None. | Font substitution is: PermittedYes; ProhibitedNo; Similarity of font visual characteristics?Substituted fonts shall have similar visual characteristics (e.g., posture, weight, proportionate width). Font metrics?Specified in clause I.2. Individual glyph metrics?Specified in clause I.2. Other:None. |
T.25.5 | Same as Model Profile:Yes | |
Preservation of primitives References: 9.5.6.3 | Is preservation of graphical primitive elements addressed? (yes/no)No. If yes, specify allowable substitutions. | |
T.25.6 | Same as Model Profile:No | |
Semantic latitude References: 9.5.6.4 | Drawing priority and mode:Priority shall correspond to the metafile order (i.e., primitives occurring later in the file shall overlay primitives occurring earliest in the file). Mode shall be "replacement" mode. Clipping:Clipping shall be to the intersection of the clip rectangle, the VDC EXTENT, the device viewport, and the device view surface limits. Edge centreing:Edges shall be centred on the ideal mathematically-defined edge of the area Meaning of predefined line types and edge types:See Section6.16 about specific and generic line types. Meaning of predefined hatch styles:See Section6.17 about specific and generic hatch styles. Other:None. | Drawing priority and mode:Priority shall correspond to the metafile order (i.e., primitives occurring later in the file shall overlay primitives occurring earliest in the file). Mode shall be "replacement" mode. Clipping:Clipping shall be to the intersection of the clip rectangle, the VDC EXTENT, the device viewport, and the device view surface limits. Edge centreing:Edges shall be centred on the ideal mathematically-defined edge of the area. Meaning of predefined line types and edge types:The exact on-off definitions for the predefined line types and edge types are not specified. Meaning of predefined hatch styles:The inter-line spacing is not specified. Use the latitudes of annex D.4.6.16 for the angular directions. Other:None. |
Same as Model Profile:Yes | ||
Error processing References: 9.5.6.5 | Is error processing addressed? (yes/no)No. If yes, specify the action taken. Classification of error severity? Requirements for error recovery? Requirements for error reporting? Additional areas? Other:None. | |
T.25.8 | Same as Model Profile:Yes | |
Reporting References: 9.5.6.6 | Is reporting required? (yes/no)No. If yes, specify the action taken. Method and format of the reporting? Requirement to report substitution, error, fallback behavior, mappings, or other behaviors? Additional areas? Other:None. | |
T.25.9 | Same as Model Profile:Yes | |
Degeneracies References: 9.5.6.7 9.5.4.4 D.2 D.4 | Is the generation of degenerate primitives addressed? (yes/no)No. The generation of degenerate primitives is not restricted. If yes, attach specifications. Other:None. |
Functionality | Specifications - WebCGM 2.1 Profile | Specifications - Model Profile |
---|---|---|
T.26.1 | Same as Model Profile:Yes | |
Number of pictures References: 9.5.7.2 | If 0 pictures are permitted (seeT.13.2), describe the interpreter behavior:Prohibited byT.13.2. | |
T.26.2 | Same as Model Profile:Yes | |
Empty pictures References: 9.5.7.3 | If permitted (seeT.13.3), interpreter behavior:The graphical effect shall be one picture in the background colour. | |
T.26.3 | Same as Model Profile:Yes | |
Colour requirements References: 9.5.4.1 9.5.7.4.2 9.5.4.5 | Interpreters shall be classified as either monochrome, greyscale, or colour interpreters (depending on the colour capability of the interpreter), and shall meet the criteria in attachment 26.3 Conversions between different colour models shall be according to the conversions in annex G. Mapping of metafile colour to device components?If mapping (to fewer colour, or greyscale, or monochrome) is required for RGB metafiles, the recommendations of annex D.3.2 shall be used. For [v1/2] metafiles, implicit colour calibration specifications?No specifications are defined. Other:None. | |
T.26.4 | Same as Model Profile:Yes | |
Geometric accuracy and latitude References: 9.5.7.4.1 | Accuracy and latitude for placement and realization of geometric aspects when geometric primitive elements are rendered.Interpreters shall render graphical primitive elements accurately to within ± 0.1% of relative position within the VDC Extent box or ±1/2 of the pixel resolution of the output device, whichever is greater. Interpreters shall render the geometric size aspect of primitives (e.g., text size, line width, and edge width) to within 1% of the intended size or ±1/2 pixel of resolution of the output device, whichever is greater. This requirement shall apply to all graphical primitive elements, unless superseded by specific element requirements in this clause. | |
T.26.5 | Same as Model Profile:Yes | |
Text rendering References: 9.5.7.4.3 | Is text accuracy and latitude addressed? (yes/no)Yes. If yes, specify.Interpreter-rendered text shall match the text specification of the metafile to within 1% relative to the intended size or ±1/2 pixel of resolution of the output device, whichever is greater, for the placement and overall extent of each text string. Is precision of text rendering is addressed? (yes/no)Yes. If yes, specify interpreter action.Interpreters shall render text using 'stroke' precision, regardless of the actual value of the TEXT PRECISION of the metafile. | |
T.26.6 | Same as Model Profile:No | |
Font substitution References: 9.5.7.4.4 annex I.2 | Font substitution is: PermittedYes; ProhibitedNo; If prohibited, use the font as specified in the FONT LIST. If permitted, include a reference set of font and glyph metrics which correspond to the canonical instances of the substitutable font.See the FONT LIST element and annex I.2 CGM:1999. Are substitution methods, latitudes, and constraints addressed? (yes/no) No If yes, specify: Similarity of font visual characteristics?Substituted fonts shall be metrically equivalent or be controlled by the RESTRICTED TEXT element. Font metrics?Substituted fonts shall have similar metrics to the fonts specified in the metafile. Individual glyph metrics?Specified in ISO/IEC 8632:1999 Annex I.2 for the core thirteen fonts. Additional areas?None. Other:A method for the user specification of font substitution is described in theApplication Configurable Item chapter. | Font substitution is: PermittedYes; ProhibitedNo; If prohibited, use the font as specified in the FONT LIST. If permitted, include a reference set of font and glyph metrics which correspond to the canonical instances of the substitutable font.See the FONT LIST element and annex I.2. Are substitution methods, latitudes, and constraints addressed? (yes/no)Yes. If yes, specify: Similarity of font visual characteristics?Substituted fonts shallhave similar visual characteristics to the fonts specified in the metafile Font metrics?Substituted fonts shall have similar metrics to the fonts specified in the metafile. Individual glyph metrics?As specified in annex I.2. Additional areas?None. Other:None. |
Same as Model Profile:No | ||
Semantic latitude References: 9.5.7.5 | Drawing priority and mode:Priority shall correspond to the metafile order (i.e., primitives occurring later in the file shall overlay primitives occurring earliest in the file. Mode shall be "replacement" mode.) View surface clearing at picture start:Surface will be cleared upon the occurrence of BEGIN PICTURE BODY, except as specified elsewhere in this profile. Clipping:When CLIP INDICATOR is 'off', clipping shall be to the intersection of the device viewport and the device view surface limits. When CLIP INDICATOR is 'on', clipping shall be to the intersection of the clip rectangle, the VDC EXTENT, the device viewport, and the device view surface limits Edge centreing:Edges shall be centred on the ideal mathematically-defined edge of the area. Meaning of predefined line types and edge types:See Section6.16 about specific and generic line types. Meaning of predefined hatch styles:See Section6.17 about specific and generic hatch styles. In the absence of a LINE/MARKER/TEXT/EDGE CLIPPING MODE element, the interpreter treatment of LINE/MARKER/TEXT/EDGE CLIPPING MODE shall be: In the style of one specific parameter value, from the set of standardized values.YES. Specify which one:SHAPE In the style of any of the specific parameter values, from the set of standardized values.NO For [v1/v2] metafiles, text restriction method for RESTRICTED TEXT elements, chosen from the set of standard and registered styles of the RESTRICTED TEXT TYPE element:Value 2. For [v1/2] metafiles, interpreter treatment of the 2 aspects of line cap shall be either:
For [v1/2] metafiles, interpreter treatment of the 2 aspects of edge cap shall be either:
For [v1/2] metafiles, interpreter treatment of line join shall be either:
For [v1/2] metafiles, interpreter treatment of edge join shall be either:
For [v1/2] metafiles, interpreter treatment of line type continuation shall be either:
For [v1/2] metafiles, interpreter treatment of edge type continuation shall be either:
Other:Mitre Limit handling: The handling ofMITRE LIMIT in CGM:1999 6.5.6 is considered to contain errors, and an ISO erratum is being pursued. The following variation shall be considered conforming for the WebCGM profile, and is the preferred method when mitred line joins are rendered.
Note: The semantic latitude for many of these cases is addressed in theApplication Configurable Items chapter, allowing explicit definition of rendering behavior for V1/V2 files and for those V3 and later files that have not explicitly specified parameter values. | Drawing priority and mode:Priority shall correspond to the metafile order (i.e., primitives occurring later in the file shall overlay primitives occurring earliest in the file. Mode shall be "replacement" mode.) View surface clearing at picture start:Surface will be cleared upon the occurrence of BEGIN PICTURE BODY. Clipping:When CLIP INDICATOR is 'off', clipping shall be to the intersection of the device viewport and the device view surface limits. When CLIP INDICATOR is 'on', clipping shall be to the intersection of the clip rectangle, the VDC EXTENT, the device viewport, and the device view surface limits. Edge centering:Edges shall be centred on the ideal mathematically-defined edge of the area. Meaning of predefined line types and edge types:The exact on-off definitions for the predefined line types and edge types are not specified. Meaning of predefined hatch styles:The inter-line spacing is not specified. Use the latitudes of annex D.4.6.16 for the angular directions. In the absence of a LINE/MARKER/TEXT/EDGE CLIPPING MODE element, the interpreter treatment of LINE/MARKER/TEXT/EDGE CLIPPING MODE shall be (check one): In the style of one specific parameter value, from the set of standardized values.No. Specify which one: In the style of any of the specific parameter values, from the set of standardized values.Yes. Specify which one: For [v1/v2] metafiles, text restriction method for RESTRICTED TEXT elements, chosen from the set of standard and registered styles of the RESTRICTED TEXT TYPE element:Value 2. For [v1/2] metafiles, interpreter treatment of the 2 aspects of line cap shall be either:
For [v1/2] metafiles, interpreter treatment of the 2 aspects of edge cap shall be either:
For [v1/2] metafiles, interpreter treatment of line join shall be either:
For [v1/2] metafiles, interpreter treatment of edge join shall be either:
For [v1/2] metafiles, interpreter treatment of line type continuation shall be either:
For [v1/2] metafiles, interpreter treatment of edge type continuation shall be either:
Other:None. |
T.26.8 | Same as Model Profile:Yes | |
Error processing References: 9.5.7.6 | Is error processing addressed? (yes/no)No. If yes, specify the action taken. Classification of error severity? Requirements for error recovery? Requirements for error reporting? Additional areas? Other:None. | |
T.26.9 | Same as Model Profile:Yes | |
Reporting References: 9.5.7.7 | Is reporting required? (yes/no)No. If yes, specify the action taken. Method and format of the reporting? Requirement to report any substitution, error, fallback behavior, mappings, or other behaviors? Additional areas? Other:None. | |
T.26.10 | Same as Model Profile:Yes | |
Degeneracies References: 9.5.7.8 9.5.4.4 D.2 D.4 | Note: For degenerate ELLIPTICAL ARC CLOSE, the intent of D.4.5.12 is that the radius is drawn along the coincident start-end rays. | Is the interpretation of degenerate primitives addressed? (yes/no)Yes. If yes, for each primitive, specify the degeneracy including its source (i.e., intrinsic or computational).Intrinsically degenerate primitives shall be rendered as specified in annex D subsections: D.2.2, D.2.3, D.4.5.4 through D.4.5.8, D.4.5.11, and D.4.5.12. Interpreters are not required to detect computational degeneracy. If interpreters do detect computational degeneracies, they shall be rendered as specified in annex D subsections: D.2.2, D.2.3, D.4.5.4 through D.4.5.8, D.4.5.11, and D.4.5.12 Other:None. |
T.26.11 | Same as Model Profile:Yes | |
Transparency References: 7.5.3 7.5.4 T.18.4 | If Transparency permitted specify interpreter behavior:Interpreters shall implement the AUXILIARY COLOUR and TRANSPARENCY elements as described in the 2nd and 3rd paragraphs of the description in 7.5.4. Other:None. | |
T.26.12 | Same as Model Profile:No | |
INTERPRETATION OF STRUCTURES AND DIRECTORIES [v4] References: | Any requirements on the interpretation of the application structures?Interpreters shall produce the correct graphical results. Is application meaning associated with application structures? yes/noYes. If yes, specify the interpreter action or actions for each type of structure. Viewer behavior for application structures is specified in WebCGM sections 3.2.1.1, 3.2.1.2, 3.2.1.3, 3.2.1.4, and 3.2.1.5. Other: None. | Any requirements on the interpretation of the application structures?Interpreters shall produce the correct graphical results. Is application meaning associated with application structures? yes/noNo. If yes, specify the interpreter action or actions for each type of structure. Other:None. |
Attachment 26.3 Colour requirements, Model Profile: |
The colour mapping step (CMS) and colour rendering step (CRS) for each class of interpreters is as follows:
|
WebCGM supports both generic, but imprecise line types, and specific,precise line types. The realizations of line types 1..5 are described ingeneral terms in the CGM standard (e.g., "dash-dot-dot"), and the realizationsand constraints of the registered line types 6..15 are described in the ISORegister of Graphical Items (e.g., requirements for inking vertexes in certainengineering line types). Otherwise, the exact line patterns of implicit linetypes 1..15 are unconstrained. Where exact realizations of line types areexpected and required, the LINE AND EDGE TYPE DEFINITION element should beused.
WebCGM supports both generic, but imprecise hatch styles, and specific,precise hatch styles. The realizations of hatch styles 1..6 are described ingeneral terms in the CGM standard. Otherwise, the exact hatch patterns ofimplicit hatch styles 1..6 are unconstrained. Where exact realizations of hatchstyles are expected and required, the HATCH STYLE DEFINITION element should beused.
This section is informative (non-normative).
Following is an informative summary of the normative requirements for JPEGin WebCGM, as defined in the JPEG item in theISO International Register ofGraphical Items.
This profile allows the use of JPEG restricted to the TILE element. Themethod is limited to BASELINE JPEG. BASELINE JPEG conforms to the processrequired for all DCT-based decoders. The colour selection mode of the TILEelement shall always be direct, independent of the COLOUR SELECTION MODE ineffect in the CGM. The cell colour precision parameter of the TILE shall alwaysbe 8-bit for BASELINE JPEG. The COLOUR model of the TILE element shall bedefined in the method specific parameters element of the TILE. It can be thesame or independent of the COLOUR MODEL of the CGM. BASELINE JPEG shall assumethat the order of the spectral bands is the same order given by the colourmodel as defined by the method specific parameters. For example, if the modelis RGB, each scan will compress the red component, followed by the greencomponent, followed by the blue component. For the case where the colour modelis "RGB related", the specific colour model shall be defined in the methodspecific parameters of the TILE element. The method specific parameters shallbe present for each image compressed using BASELINE JPEG. The parameters shallbe encoded as an SDR. The JPEG colour model parameter is required and isspecified according to the rules of the INDEX PRECISION element. Valid valuesare:
Values outside the range of 0-5 are not allowed. The JPEG colour submodel isrequired only when the JPEG colour model is "RGB related" and is specifiedaccording to the rules of the INDEX PRECISION ELEMENT. Valid values are:
Other values are not allowed.
This section and its subsections are normative, unless otherwiseindicated.
WebCGM 2.1 defines conformance for these classes of product:
WebCGM contains both static graphics functionality and dynamic-behaviorsfunctionality. Viewer conformance to the static graphics functionality can bemeasured for any kind of WebCGM viewer. Full viewer conformance to the dynamicbehaviors specifications can only be measured in an environment of HTML-baseddocuments and Web browsers. Therefore, full dynamic conformance of a viewer toall specifications in WebCGM 2.1 can only be measured for a WebCGM browserplugin (or equivalent architecture).
WebCGM 2.1 viewers, both static anddynamic, shall correctly handle valid WebCGM 2.1 Binary-encoded metafiles thataregzip-compressed. WebCGM 2.1viewers that claim to correctly handle valid WebCGM metafiles of an earlierWebCGM version (1.0 or 2.0) according to the conformance rules of that earlierversion, shall correctly handle such metafiles when they are gzipcompressed.
The following WebCGM 1.0 features, deprecated in an earlier release ofWebCGM, were made obsolete in WebCGM 2.0, and are not part of the WebCGM 2.0standard nor of this WebCGM 2.1 standard:
The following WebCGM 2.0 features, deprecated in an earlier release ofWebCGM, were made obsolete in WebCGM 2.1, and are not part of WebCGM 2.1:
Note: viewers that only claim WebCGM 2.1 compliance need not handle2.1-obsoleted features; however, viewers that claim full backward-compatiblesupport of earlier WebCGM versions do have support requirements.
In the case of the three object behaviors, in WebCGM 2.0 the followingrequirement supplemented the general defined requirements for deprecatedfeatures: WebCGM 2.0 viewers were required to support these behaviors. Suchsupport shall be according to thedefined mapping onto the 2.1 setof object behaviors. Note. This specification is made because legacyoccurrences of these behaviors can originate in non-CGM content types, and canoccur independently of the versioning mechanism of WebCGM content.
The following WebCGM features are deprecated in WebCGM 2.1, and may beremoved (made obsolete) in some future version:
For WebCGM 2.1, the following generaldefinition ofdeprecation applies:
There are no optional features in WebCGM. Conforming static implementationsmust implement all static functionality as defined herein. Conforming dynamicimplementations must implement all dynamic functionality, including DOM and XCFfunctionality, as defined herein.
For WebCGM implementations, the following extensibility rules apply to thegiven WebCGM components for which WebCGM defines conformance.
A conforming WebCGM DOM implementation must implement the interfaces ofWebCGM DOM definition (Chapter 5) exactly as described therein. Any DOM implementation, whether profile defined or private (vendor defined), that extends, subsets, or modifies the WebCGM DOM is not a conformant WebCGM DOM implementation. The specification of a DOM based on or derived from the WebCGM DOM is considered to be a new, independent DOM that would be outside of the scope of the WebCGM specification. Such a DOM would not be WebCGM conformant, and a WebCGM DOM implementation is not expected to handle this DOM.
This sub-section is informative (non-normative.)
One design goal of WebCGM is to serve as a foundation profile for a familyof closely related technical application sectors. The aim is that those sectorsmay succinctly present their profile definitions as delta documents fromWebCGM, as explained inCascadingProfiles. The following rules should be observed by suchprofiles.
The sections and subsections of this specification are labeled, after thesection heading, to specify whether they are normative or informative. If asubsection is not labeled, it has the same normativity as its parentsection.
For example, this conformance clause (Appendix A) says, right after thesection heading, "This section and its subsections are normative, unlessotherwise indicated."Section 7.4.1 hasno label, so it is normative, while7.4.2 says"This sub-section is informative (non-normative.)"
Allexamples in this specification are informative. Allillustrations in this specification are informative. AllEBNF in thisspecification is normative, unless specifically labeled as informative. AllDTDs and DTD fragments are normative, unless specificallylabeled as informative.
The individual conformance requirements of this specification are presentedin these principal ways:
This subsection is informative (non-normative).
One of the benefits of using any CGM profile is the ability to insureinteroperability through the use of validation tools against CGM instances andcertification services for applications. Once an application has been certifiedthrough a testing service, behavior of that application is predictable underthe constraints of the profile. Validation and certification tools and serviceswhich exist (or have existed) and can be leveraged for WebCGM are:
This chapter is normative.
Prototype Object WebCGMException The WebCGMException class has the following constants: WebCGMException.INDEX_SIZE_ERR This constant is of type Number and its value is 1. WebCGMException.WEBCGMSTRING_SIZE_ERR This constant is of type Number and its value is 2. WebCGMException.INVALID_CHARACTER_ERR This constant is of type Number and its value is 3. WebCGMException.NO_DATA_ALLOWED_ERR This constant is of type Number and its value is 4. WebCGMException.NO_MODIFICATION_ALLOWED_ERR This constant is of type Number and its value is 5. WebCGMException.NOT_SUPPORTED_ERR This constant is of type Number and its value is 6. WebCGMException.INVALID_ACCESS_ERR This constant is of type Number and its value is 7. WebCGMException.FILE_NOT_FOUND_ERR This constant is of type Number and its value is 8. WebCGMException.FILE_INVALID_ERR This constant is of type Number and its value is 9.Object WebCGMException The WebCGMException object has the following properties: code This property is of type Number.
Object WebCGMRect The WebCGMRect object has the following properties: xll This property is of type Number. yll This property is of type Number. xur This property is of type Number. yur This property is of type Number.
The WebCGMRect object has the following methods: unionRect(r) This method returns a WebCGMRect. The r parameter is of type WebCGMRect.
Object WebCGMMatrix The WebCGMMatrix object has the following properties: a This property is of type Number. b This property is of type Number. c This property is of type Number. d This property is of type Number. e This property is of type Number. f This property is of type Number. The WebCGMMatrix object has the following methods: multiply(m) This method returns a WebCGMMatrix. The m parameter is of type WebCGMMatrix. inverse() This method returns a WebCGMMatrix. // Raises WebCGMException if matrix is not invertible. translate(x,y) This method returns a WebCGMMatrix. The x parameter is of type Number. The y parameter is of type Number.
scale(sx,sy,cx,cy) This method returns a WebCGMMatrix. The sx parameter is of type Number. The sy parameter is of type Number. The cx parameter is of type Number. The cy parameter is of type Number.
rotate(angle,rx,ry) This method returns a WebCGMMatrix. The angle parameter is of type Number. The rx parameter is of type Number. The ry parameter is of type Number.
Object GetWebCGMDocument The GetWebCGMDocument object has the following methods: getWebCGMDocument() This method returns a WebCGMMetafile. getAppName() This method returns a String. getAppVersion() This method returns a String.Object WebCGMMetafile The WebCGMMetafile object has the following properties: metafileDescription This read-only property is of type String. firstPicture This read-only property is a WebCGMPicture object. metafileID This read-only property is of type String. metafileVersion This read-only property is of type Number. src This property is of type String. The WebCGMMetafile object has the following methods: addEventListener(type,listener); The type parameter is of type String. The listener parameter is a WebCGMEventListener object. removeEventListener(type,listener); The type parameter is of type String. The listener parameter is a WebCGMEventListener object.
setRedraw(value); The value parameter is of type String.
Prototype Object WebCGMNode The WebCGMNode class has the following constants: WebCGMNode.PICTURE_NODE This constant is of type Number and its value is 1. WebCGMNode.APP_STRUCTURE_NODE This constant is of type Number and its value is 2. WebCGMNode.XML_METADATA_NODE This constant is of type Number and its value is 3. WebCGMNode.TEXT_NODE This constant is of type Number and its value is 4. WebCGMNode.ATTR_NODE This constant is of type Number and its value is 5.Object WebCGMNode The WebCGMNode object has the following properties: nodeName This read-only property is of type String. nodeValue This read-only property is of type String, can raise a WebCGMException object on retrieval. nodeType This read-only property is of type Number. parentNode This read-only property is a WebCGMNode object. childNodes This read-only property is a WebCGMNodeList object. firstChild This read-only property is a WebCGMNode object. lastChild This read-only property is a WebCGMNode object. previousSibling This read-only property is a WebCGMNode object. nextSibling This read-only property is a WebCGMNode object. attributes This read-only property is a WebCGMNodeList object. ownerPicture This read-only property is a WebCGMPicture object. namespaceIRI This read-only property is of type String. prefix This read-only property is of type String. localName This read-only property is of type String. The WebCGMNode object has the following methods: hasChildNodes() This method returns a Boolean. hasAttributes() This method returns a Boolean. getAttributeNS(namespaceIRI, localName) This method returns a String. The namespaceIRI parameter is of type String. The localName parameter is of type String. setAttributeNS(namespaceIRI, qualifiedName, value) This method has no return value. The namespaceIRI parameter is of type String. The qualifiedName parameter is of type String. The value parameter is of type String. getElementsByTagNameNS(namespaceIRI, localName) This method returns a WebCGMNodeList object. The namespaceIRI parameter is of type String. The localName parameter is of type String.Object WebCGMPicture WebCGMPicture has all the properties and methods of the WebCGMNode object as well as the properties and methods defined below. The WebCGMPicture object has the following properties: width This read-only property is of type Number. height This read-only property is of type Number. pictid This read-only property is of type String. The WebCGMPicture object has the following methods: applyCompanionFile(fileIRI) This method returns a Boolean. The fileIRI parameter is of type String. getAppStructureById(apsId) This method retuns a WebCGMAppStructure. The apsId parameter is of type String. getAppStructuresByName(apsName) This method retuns a WebCGMNodeList object. The apsName parameter is of type String. highlight(nodes,type) This method has no return value. The nodes parameter is a WebCGMNodeList object. The type parameter is of type WebCGMString. clearHighlight() This method has no return value. This method has no parameters. setPictureVisibility(visibility) This method has no return value. The visibility parameter is of type String. setStyleProperty(style,value) This method has no return value. The style parameter is of type String. The value parameter is of type String. reloadPicture() This method has no return value.
getStyleProperty(style) This method returns a String. The style parameter is of type String.
setView(viewRect) This method returns a boolean. The viewRect parameter is of type WebCGMRect.
createWebCGMRect() This method returns a WebCGMRect.
Object WebCGMAppStructure WebCGMAppStructure has all the properties and methods of the WebCGMNode object as well as the properties and methods defined below. The WebCGMAppStructure object has the following properties: apsId This read-only property is of type String. nameCount This read-only property is of type Number. linkuriCount This read-only property is of type Number. The WebCGMAppStructure object has the following methods: getAppStructureAttr(name) This method returns a String. The name parameter is of type String. setAppStructureAttr(name,value) This method has no return value. The name parameter is of type String. The value parameter is of type String. removeAppStructureAttr(name) This method has no return value. The name parameter is of type String. setStyleProperty(style,value) This method has no return value. The style parameter is of type String. The value parameter is of type String. toNodeList() This method has no parameters. This method returns a WebCGMNodeList object.
getObjectExtent() This method has no parameters. This method returns a WebCGMRect. getStyleProperty(style) This method returns a String. The style parameter is of type String. translate(dx,dy,replace) This method has no return value. The dx parameter is of type Number. The dy parameter is of type Number. The replace parameter is of type String. rotate(angle,cx,cy,replace) This method has no return value. The angle parameter is of type Number. The cx parameter is of type Number. The cy parameter is of type Number. The replace parameter is of type String.
scale(sx,sy,cy,cyreplace) This method has no return value. The sx parameter is of type Number. The sy parameter is of type Number. The cx parameter is of type Number. The cy parameter is of type Number. The replace parameter is of type String.
setTransform(matrix,replace) This method has no return value. The matrix parameter is of type WebCGMMatrix. The replace parameter is of type String. getTransform(type) This type parameter is of type String. This method returns a WebCGMMatrix.
Object WebCGMNodeList The WebCGMNodeList object has the following properties: count This read-only property is of type Number. The WebCGMNodeList object has the following methods: item(index) This method returns a WebCGMNode object. The index parameter is of type Number. removeItem(index) // Raises WebCGMException when the list cannot be modified. This method returns a WebCGMNode object. The index parameter is of type Number. appendItem(newItem) // Raises WebCGMException when the list cannot be modified. This method returns a WebCGMNode object. The newItem parameter is a WebCGMNode object.Object WebCGMAttr WebCGMAttr has all the properties and methods of the WebCGMNode object as well as the properties and methods defined below. The WebCGMAttr object has the following properties: name This read-only property is of type String. value This property is of type String. ownerNode This read-only property is a WebCGMNode object.Object WebCGMEventListener This is an ECMAScript function reference. This method has no return value. The parameter is a WebCGMEvent object.Object WebCGMEvent The WebCGMEvent object has the following properties: type This read-only property is of type String. target This read-only property is a WebCGMNode object. button This read-only property is of type Number. numPressed This read-only property is of type Number. clientX This read-only property is of type Number. clientY This read-only property is of type Number. ctrlKey This read-only property is of type Boolean. shiftKey This read-only property is of type Boolean. altKey This read-only property is of type Boolean. metaKey This read-only property is of type Boolean. The WebCGMEvent object has the following methods: preventDefault() This method has no return value.
This chapter and its sections are normative, unless otherwiseindicated.
This section is informative (non-normative).
The WebCGM Application Configuration Items file (ACI) allows the user toimprove font interchange by specifying a desired font mapping when WebCGMapplications process WebCGM content.
The ACI file also provides a mechanism to specify default handling forcertain CGM Version 3 elements that may not have a specific default treatmentaccording to the rules of CGM:1999 or the WebCGM profile.
The ACI file is designed as a set of initialization directives for a viewer,and thus is intended to be associated with a viewer instance and processed onceper viewer invocation. The normative specification of methods to associate anACI file with a viewer is beyond the scope of this version of WebCGM. Somerecommedations are given in this chapter.
The use cases and requirements for the default-setting functionality of theACI include several scenarios that the ACI file should satisfy:
The WebCGM Application Configurable Items (ACI) file is an XML instancespecifying default values for various CGM Version 3 attribute and controlelements, font substitutions to be performed by WebCGM processors . It is madeup of a root element (<webcgmConfig>
) followed by anoptional font map (<fontMap>) element and an optional default attributes(<defaultAttributes>
) element.
Public Identifier for WebCGM 2.1 ACI DTD:
PUBLIC "-//OASIS//DTD WebCGM 2.1 Config//EN"
System Identifier for the WebCGM 2.1 ACI DTD:
http://docs.oasis-open.org/webcgm/v2.1/webcgmConfig21.dtd
DOCTYPE example. he following is an example document typedeclaration for a WebCGM ACI document:
<!DOCTYPE webcgmConfig PUBLIC "-//OASIS//DTD WebCGM 2.1 Config//EN""http://docs.oasis-open.org/webcgm/v2.1/webcgmConfig21.dtd">
A file is a conforming WebCGM 2.1 ACI document if:
This subsection is informative (non-normative).
Methods to associate an ACI file with a viewer — being operatingsystem, viewer, and application dependent — are considered to be beyondthe scope of the normative specifications of this version of WebCGM. To improveinteroperability between the various providers of WebCGM 2.1 viewers, thefollowing recommendations for associating an ACI file with a WebCGM 2.1 viewerare included.
It is recommended ACI file have the extension ".aci" (all lowercase) on allplatforms.
To convey to a WebCGM 2.1 viewer the location of an ACI file, an environmentvariable name WebCGM_ACI_File is defined. This environment variable could beset at the time of the viewer installation or modified by a user. On Windowsthis should be System environment variable that would apply to all users.
Example:
WebCGM_ACI_File=c:/Documents and Settings/All Users/Application Data/CGMOpen/WebCGM.aci
If it is not feasible for a viewer to set an environment variable duringviewer installation, or if users are prohibited from doing so due to securitypolicies that are becoming commonplace in large organizations, then the viewershould provide and document an alternative method for users to specify the ACIfile search path, for example in a viewer preferences or configuration menu.
An ACI file must havewebcgmConfig
as its root element.
<!ELEMENT webcgmConfig ( fontMap?, defaultAttributes? ) > |
ThefontMap
element is the ACI mechanism for fontsubstitution.
<!ELEMENT fontMap ( defaultFont?, mapList* ) > |
ThedefaultFont
element specifies, via itsuseFont
attribute, a string defining the font to be used when a requested mappingcannot be accomplished.
<!ELEMENT defaultFont EMPTY ><!ATTLIST defaultFont useFont CDATA #REQUIRED > |
Attribute definitions:
useFont="CDATA"
The default font to use when the specified font mapping cannot be accomplished.If the font(s) ofmapList
(substitutionList
) are notavailable, and ifdefaultFont
(useFont
) is notavailable, then thefontMap
element has no effect, and any viewerfallback action is viewer dependent. The syntax and normalization rules ofuseFont
are the same as those of thesubstitutionList
attribute, exceptthatuseFont
shall have exactly one font-family name or genericname in its list.
ThemapList
element specifies, via itscgmFont
andsubstitutionList
attributes, the font mapping to be performedbefore rendering of the image. Subject to the value of theforceSubstitution
attribute (see below), if the metafile uses afont whose name matchescgmFont
(after normalization of both fontnames as described below), then the viewer shall substitute the first availablefont in the priority-ordered list of thesubstitutionList
attribute.
<!ELEMENT mapList EMPTY ><!ATTLIST mapList forceSubstitution ( yes | no ) "yes" cgmFont CDATA #REQUIRED substitutionList CDATA #REQUIRED > |
Attribute definitions:
forceSubstitution= { yes | no }
If 'yes', then the subsitution is unconditional — it is attemptedregardless of whether or not the viewer has the font specified bycgmFont
available. If 'no', then the substitution is conditional— the viewer only attempts the substitution if it does not have the fontspecified bycgmFont
available.
cgmFont="CDATA"
The name of the font in the metafile for which font substitution is requested.Before attempting to match a font used in the metafile to the value (string) ofcgmFont, both font names are normalized by a WebCGM-specific normalization:convert to lower-case; and strip out allwhitespace, UNDERSCORE, and HYPHENcharacters.Note: These normalization rulesare derived from and intended for the substantial volume of existing metafilesthat aim to invoke fonts from WebCGM's restricted core set of thirteen specificfonts (see T.16.13 ofsection6.5) and that contain well-known and trivial deviations in the constructionof those font names. The rules may be less useful outside of that intendedscope. The target metafiles of these normalizations are most often, but notalways, encoded in WebCGM's default character encoding of ISO 8859-1. Afterthis WebCGM-specific normalization, correct and consistent results whencomparing metafile font names to thecgmFont
value — forfont names outside of WebCGM's restricted core set of thirteen specific fonts— may require that WebCGM processors convert to aunicode normalizationform before performing the comparison.
A comma-separated, priority-ordered list of comprised of font-family names(e.g., Arial) and generic names (e.g., san-serif). The processor shall use thefirst name in thesubstitutionList
that it has available. The listsyntax and normalization are derived from the specifications of CSS 2.0 [CSS20].
Example:
<mapList cgmFont="helvetica" substitutionList="Arial, 'FontCorp Swiss',sans-serif">
ThedefaultAttributes
element is the ACI mechanism to specifydefault values for certain CGM attribute and control elements whose default isotherwise under-specified in CGM:1999 and the WebCGM profile. This element,when processed at initialization time, will set default values for theapplicable metafile elements. If the contents of the metafile, uponinterpretation, explicitly set the applicable metafile element (either viaMETAFILE DEFAULTS REPLACEMENT or via the element itself in the body of thepicture), then that explicit intra-metafile setting supersedes thedefaultAttributes
setting
<!ELEMENT defaultAttributes ( lineCap | edgeCap | lineJoin | edgeJoin | lineTypeCont | edgeTypeCont | mitreLimit | restrTextType | lineEdgeTypeDef | hatchStyleDef )+ > |
It is possible to define the default values of the following Version 3elements:
The parameter definition for each element is consistent with its associatedISO/IEC 8632:1999 CGM parameter definition.
ThelineCap
element is an EMPTY element that specifies thedesired rendering of the end caps of lines and of dashes within lines.
<!ELEMENT lineCap EMPTY ><!ATTLIST lineCap lineCapInd ( 1 | 2 | 3 | 4 )#REQUIRED lineDashInd ( 1 | 2 | 3 )#REQUIRED> |
Attribute definitions:
The line cap indicator is restricted to values of 1-4. (Note that the ISO/IEC8632:1999 value "5" is disallowed in the WebCGM profile.)
Note (informative): in theCGM:1999 specification, the defaultvalue for the corresponding 'line cap indicator' parameter of the LINE CAPAttribute element is "1 (unspecified)."
lineDashInd="1|2|3"
The line dash indicator is restricted to values of 1-3 as defined in ISO/IEC8632:1999.
Note (informative): in theCGM:1999 specification, the defaultvalue for the corresponding 'dash cap indicator' parameter of the LINE CAPAttribute element is "1 (unspecified)."
TheedgeCap
element is an EMPTY element that specifies thedesired rendering of the end caps of edges and of dashes within edges.
<!ELEMENT edgeCap EMPTY ><!ATTLIST edgeCapedgeCapInd ( 1 | 2 | 3 | 4 ) #REQUIRED edgeDashInd ( 1 | 2 | 3 )#REQUIRED > |
Attribute definitions:
edgeCapInd="1|2|3|4"
The edge cap indicator is restricted to values of 1-4. (Note that the ISO/IEC8632:1999 value "5" is disallowed in the WebCGM profile.)
Note (informative): in theCGM:1999 specification, the defaultvalue for the corresponding 'edge cap indicator' parameter of the EDGE CAPAttribute element is "1 (unspecified)."
edgeDashInd="1|2|3"
The edge dash indicator is restricted to values of 1-3 as defined in ISO/IEC8632:1999.
Note (informative): in theCGM:1999 specification, the defaultvalue for the corresponding 'dash cap indicator' parameter of the EDGE CAPAttribute element is "1 (unspecified)."
ThelineJoin
element is an EMPTY element that specifies thedesired rendering of the join characteristics at vertices of the lineelement.
<!ELEMENT lineJoin EMPTY ><!ATTLIST lineJoin lineJoinInd ( 1 | 2 | 3 | 4 )#REQUIRED> |
Attribute definitions:
lineJoinInd="1|2|3|4"
The line join indicator is restricted to values of 1-4 as defined in ISO/IEC8632:1999.
Note (informative): in theCGM:1999 specification, the defaultvalue for the corresponding 'line join indicator' parameter of the LINE JOINAttribute element is "1 (unspecified)."
TheedgeJoin
element is an EMPTY element that specifies thedesired rendering of the join characteristics at vertices of the edgeelement.
<!ELEMENT edgeJoin EMPTY ><!ATTLIST edgeJoin edgeJoinInd ( 1 | 2 | 3 | 4 )#REQUIRED> |
Attribute definitions:
edgeJoinInd="1|2|3|4"
The edge join indicator is restricted to values of 1-4 as defined in ISO/IEC8632:1999.
Note (informative): in theCGM:1999 specification, the defaultvalue for the corresponding 'edge join indicator' parameter of the EDGE JOINAttribute element is "1 (unspecified)."
ThemitreLimit
element is an EMPTY element that specifies howline join at vertices are achieved.
<!ELEMENT mitreLimit EMPTY ><!ATTLIST mitreLimit limitVal CDATA #REQUIRED> |
Attribute definitions:
limitVal="CDATA"
The mitre limit value is defined as a scale factor applied to current line andedge width. Valid values are non-negative real numbers.
TherestrTextType
element is an EMPTY element that specifieshow text should fit within the restriction rectangle defined by the RESTRICTEDTEXT element of CGM:1999.
<!ELEMENT restrTextType EMPTY ><!ATTLIST restrTextType restrType ( 1 | 2 | 3 | 4 | 5 | 6 )#REQUIRED> |
Attribute definitions:
restrType="1|2|3|4|5|6"
The restricted text type is restricted to value of 1-6 as defined in ISO/IEC8632:1999.
Note (informative): in theCGM:1999 specification, the defaultvalue for the corresponding 'restriction type' parameter of the RESTRICTED TEXTTYPE Attribute element is "1 (basic)."
ThelineEdgeTypeDef
element is an element that specifies thedesired rendering of the standard line type in ISO/IEC 8632:1999.
<!ELEMENT lineEdgeTypeDef EMPTY ><!ATTLIST lineEdgeTypeDef lineIndex ( 1 | 2 | 3 | 4 | 5 ) #REQUIREDdashLength CDATA #REQUIRED repeatLength CDATA #REQUIRED> |
Attribute definitions:
lineIndex="1|2|3|4|5"
The line type index is restricted to value of 1-5 as defined in ISO/IEC8632:1999.
dashLength="CDATA"
ThedashLength
attribute is a string that contains a list ofnon-negative integers in the format of theWebCGMString List-of-numbersubtype. The integers specify the lengths of each dash and gap in thedefined line pattern in abstract units, that are then normalized as a wholepattern to therepeatLength
attribute oflineEdgeTypeDef
. The first integer corresponds to solid, thesecond to gap, the third to solid, etc.
repeatLength="CDATA"
The dash cycle repeat length defines the length of one complete repetition ofthe dash pattern in NVDC units.
The complete WebCGM Application Configurable Items (ACI) file DTDfollows.
<?xml version="1.0" encoding="UTF-8"?><!-- ================================================================ --><!-- This is the WebCGM Application Configurable Item file DTD --><!-- for use with WebCGM 2.1 --><!-- ================================================================ --><!-- Original issue: March 2008 --><!-- --><!-- Revision history: --><!-- June 2008 - modified for changes to CD02 ACI text. --><!-- March 2009 - changed 4 elements to attributes. --><!-- April 2009 - fixed mapList, dashLength to proper camel-case. --><!-- May 2009 - removed "5" from lineCapInd, edgeCapInd. --><!-- May 2009 - changed attributes to #REQUIRED in the elements --><!-- lineCap, edgeCap, lineJoin, edgeJoin, lineTypeCont, --><!-- edgeTypeCont, restrTextType. --><!-- November 2009 - removed lineTypeCont & edgeTypeCont elements --><!-- November 2009 - removed hatchStyleDef element --><!-- --><!-- ================================================================ --><!-- --><!ELEMENT webcgmConfig ( fontMap?, defaultAttributes? ) ><!ELEMENT fontMap ( defaultFont?, mapList* ) ><!ELEMENT defaultFont EMPTY ><!ATTLIST defaultFont useFont CDATA #REQUIRED ><!ELEMENT mapList EMPTY ><!ATTLIST mapList forceSubstitution ( yes | no ) "yes" cgmFont CDATA #REQUIRED substitutionList CDATA #REQUIRED >
<!ELEMENTdefaultAttributes ( lineCap | edgeCap | lineJoin | edgeJoin | mitreLimit | restrTextType | lineEdgeTypeDef )+ >
<!ELEMENT lineCap EMPTY ><!ATTLIST lineCaplineCapInd ( 1 | 2 | 3 | 4 ) #REQUIRED lineDashInd ( 1 | 2 | 3 )#REQUIRED ><!ELEMENT edgeCap EMPTY ><!ATTLIST edgeCapedgeCapInd ( 1 | 2 | 3 | 4 ) #REQUIRED edgeDashInd ( 1 | 2 | 3 )#REQUIRED ><!ELEMENT lineJoin EMPTY ><!ATTLIST lineJoin lineJoinInd ( 1 | 2 | 3 | 4 )#REQUIRED ><!ELEMENT edgeJoin EMPTY ><!ATTLIST edgeJoin edgeJoinInd ( 1 | 2 | 3 | 4 )#REQUIRED ><!ELEMENT mitreLimit EMPTY ><!ATTLIST mitreLimit limitVal CDATA #REQUIRED ><!ELEMENT restrTextType EMPTY ><!ATTLIST restrTextType restrType ( 1 | 2 | 3 | 4 | 5 | 6 )#REQUIRED ><!ELEMENT lineEdgeTypeDef EMPTY ><!ATTLIST lineEdgeTypeDef lineIndex ( 1 | 2 | 3 | 4 | 5 ) #REQUIREDdashLength CDATA #REQUIRED repeatLength CDATA #REQUIRED >
In addition to thelisted editors ofthis specification, the following individuals have contributed significantly tothe present WebCGM 2.1 specification:
Additionally, the following individuals made signficant contributions topredecessor versions, WebCGM 2.0 and WebCGM 1.0:
This section is informative (non-normative).
WebCGM 2.1 builds uponWebCGM2.0 and adds these new features:
In addition, the WebCGM 2.1 makes these clarifications and other changes toWebCGM 2.0:
A complete listing of all text changes since WebCGM 2.0 can be found in the"Change log" section.
Note: Throughout the previous published versions of this specification (20080917 and20090130), the newfeatures that WebCGM 2.1 added to WebCGM 2.0 were highlighted. In this version,only the differences from the previous Last Call Working Draft (20080917) arehighlighted, in a style similar to the item #11 above.
This section is informative (non-normative).
Note: The following subsections document all significant changes appliedto the WebCGM 2.0 specification to derive this draft of the WebCGM 2.1specification.
This Recommendation includes the below editorial corrections to theProposedRecommendation version.
A complete listing of all prior text changes since WebCGM 2.0 can be foundin thePRversion's "Change log" section.
This section and its subsections are informative(non-normative).
Topics such as internationalization and accessibility have been addressed byW3C in other Recommendations available on theTechnical Reports page. The relationshipbetween the specifications of technology modules, such as this one, and thosecross-cutting recommendations is discussed in theSpecificationGuidelines. As suggested in the Specification Guidelines, this sectionidentifies some relationships between the capabilities afforded by WebCGMfeatures and accessibility requirements established by otherRecommendations.
Although a WebCGM metafile is a binary file format, it has systematicgrouping and annotation features that foster accessibility of WebCGM metafilecontent. For example, graphical text is ideally stored as Unicode text stringswithin the metafile, but to handle cases where graphical text images areactually the result of other vector (e.g. stroking) or raster (e.g., bitmaps)graphics in the metafile, WebCGM has the attribute 'content' on the para and subparaobjects, that gives the text-string equivalent of the rendered graphicaltext.
Features that are in the binary metafile itself will, unlike clear-textformats such as HTML, XML, and SVG, require the cooperation and intervention ofthe WebCGM authoring tools and viewers. As described in[Essential Components of WebAccessibility], several components such as authoring tools, media viewersand developers, have to work together to improve Web accessibility. Therefore,the discussions in the following sections are recommendations to contentdevelopers, and builders of authoring tools and viewers.
By Guideline 9 "Provide navigation mechanisms" of [UAAG10] a WebCGM viewer is expected tolet users interact with 'enabled' and significant objects in the image.'Enabled' objects are those which accept user input, such as on screen buttons.By the structure of WebCGM, each APS should be treated as a significant objectand be reachable by navigation techniques. By Guideline 1 "Support input andoutput device independence" the reach of keyboard-actuated navigation shouldcover this whole set of navigation destinations.
Some notion of forward and backward motion among peer nodes in the WebCGMimage should be provided. This should by default move among paragraphs andsub-paragraphs in the order in which they appear in the metafile. The creatorsof WebCGM instances should ensure that this results in a sensible readingorder. However, efficient motion as called for in [UAAG10]Checkpoint9.9, is not likely to result from one global list or loop of all theplausible navigation destinations. Exploiting the structure of the metafile,structured navigation could take hierarchical or categorical forms. Inhierarchical navigation, forward and back motion moves among peer nodes at thesame level in the layers-and-objects nesting tree. In categorical navigation,the sequential navigation could exhibit navigation modes which visit only'grobject' nodes, or only the 'gropbject' nodes with a common 'name.' Anexample of hierarchical navigation is provided by the player behavior for the[DAISY] standard digital talking book. An example of categorical structurednavigation is provided by the diverse navigation modes of the Opera browser.The creators of WebCGM instances should ensure that the layers-and-objectsnesting forms a plausible table of contents as annotated with the textualproperties (see E.3 below) of the affected nodes, and that collecting nodes oflike 'name' forms meaningful slices of what is in the scene.
In this version of WebCGM, there are no intra-metafile controls to alter thenavigation graph. In a scenario where such capability is desired, theprivate-namespace extension feature ofthe XCF can be used to introduce further intelligence associated with thecontents of the metafile proper.
Web Content Accessibility Guidelines such as [WCAG10] require that essentialinformation be available in text form. Some key examples are:
WebCGM contains attributes that associate text with things in the depictedscene, and can be used to meet these requirements.
This essential content, if not always presented to the user, must beconsidered 'conditional content' in the sense of [UAAG10],Checkpoint2.3. That checkpoint gives some latitude to the viewer as to whether topresent these attributes globally through view-mode controls or locally inresponse to focus and inspect actions of the user.
WebCGM viewers should also make this textual information available to assistivetechnology through the accessibility API appropriate to the programmingplatform, following [UAAG10],Guideline6.
Note. It might be thought that the 'name' APS attribute could or shouldbe used in a manner like 'alt' on 'img' in HTML. This is not the design intentof the 'name' attribute. It has well-defined category, not instance, semanticsand associated categorical navigation behavior.
WebCGM versions 2.0 and higher support transient, display-time control ofa number of display properties ofobjects. These can be manipulated via the WebCGM DOM, and are also availablevia the XCF mechanism. Although WebCGM does not supportconventional styling, an (external) XCF canfunction similarly to an external style sheet. For improved accessibility,WebCGM viewers should provide some user control of rendering. Use of thesemechanisms partially supports the recommendations of [WCAG10],Checkpoint 3.3 and[UAAG10],Guideline4.
By default, WebCGM viewers allow the user to navigate to and interact withonly enabled elements (i.e. element whose 'visibility' attribute is 'on').Objects which are not visible do not display tooltips (the 'screentip' APSattribute), may not be highlighted without making them visible, and may not benavigated to via the picture behaviors (whether in picture fragments or DOM srcparameter).
In addition, WebCGM viewers can offer a mode where, at user option, the 'visibility' attribute is ignored,for accessibility or debugging support. It meets a requirement of [UAAG10],CheckPoint9.3.
This section is informative (non-normative).
The advanced example in this section shows how the functionality of theWebCGMAppStructure interface can be used tobuild useful convenience functions, in this case a function to search a WebCGMinstance for all APS that contain an APS Attribute of a given type, whose valuematches a given regular expression (regex).
EXAMPLE:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <title>WebCGM 2.0 regex example</title> <script type="text/ecmascript"> var cgm; var pic; var mydiv; var o; var nl; var res; function loadCGM(fname) { try {var obj = document.getElementById('image');obj.innerHTML = "<object id='cgm' type='image/cgm;Version=4;ProfileId=WebCGM' width='400' height='300' src='"+fname+"'>";document.getElementById('cgm').getWebCGMDocument().src = fname;cgm = document.getElementById('cgm').getWebCGMDocument();pic = cgm.firstPicture;mydiv = '<h2>Looking at file '+fname+'</h2>\n';mydiv += '<p>Enter an attribute and regular expression then click the Submit button.</p>\n'; mydiv += '<form name="myform">\n'; mydiv += '<select name="attr">\n'; mydiv += '<option value="content">content</option>\n'; mydiv += '<option value="interactivity">interactivity</option>\n'; mydiv += '<option value="layerdesc">layerdesc</option>\n'; mydiv += '<option value="layername">layername</option>\n'; mydiv += '<option value="linkuri">linkuri</option>\n'; mydiv += '<option value="name">name</option>\n'; mydiv += '<option value="region">region</option>\n'; mydiv += '<option value="screentip">screentip</option>\n'; mydiv += '<option value="viewcontext">viewcontext</option>\n'; mydiv += '<option value="visibility">visibility</option>\n'; mydiv += '</select>\n'; mydiv += '<input type="text" name="regex" size="20"></input>\n'; mydiv += '<input type="button" value="Submit"></input>\n'; mydiv += '</form>\n';var t = document.getElementById('attinput');t.innerHTML = mydiv; } catch (e) { alert("loadCGM error " + e); } } function processAttr(att, val) { try {o = '<p>Searching APS for attribute '+att + ' containing '+val+'</p>\n';// Create a list of nodes and print out the attribute// This part is not really needed it is mostly here as // a sanity check.nl = listNodes(pic.firstChild);o+='<p>List of all nodes in the DOM tree. A "" implies normally means the attribute was not specified.</p><ul>';for(i=0; i< nl.length; i++){ o+='<li>'+nl[i].apsId+' ('+att+'="'+nl[i].getAppStructureAttr(att)+'")</li>';}o+='</ul>';// Now we just run through the list and remove nodes that do not matchres = new Array();for(i=0; i<nl.length;i++) { attVal = nl[i].getAppStructureAttr(att); if(attVal.match(val)) { res.push(nl[i]); }}if( res.length < 1) { o += '<p>No nodes found matching that regular expression</p>\n';} else { o+= '<p>The following nodes match the regular expression</p><ul>'; for(i=0; i< res.length; i++){ o+='<li>'+res[i].apsId+' ('+att+'="'+res[i].getAppStructureAttr(att)+'")</li>'; } o+='</ul>';}var t = document.getElementById('attout');t.innerHTML = o; } catch(e) {alert("processAttr error " + e); } }// These are helper functions that I found on the web // http://www.ibm.com/developerworks/xml/library/x-matters41.html// // They are needed because you need to walk the tree to // create a list of all of the nodes in the tree.// return next node in document orderfunction nextNode(node) { if (!node) return null; if (node.firstChild){ return node.firstChild; } else { return nextWide(node); }}// helper function for nextNode()function nextWide(node) { if (!node) return null; if (node.nextSibling) { return node.nextSibling; } else { return nextWide(node.parentNode); }}// return an WebCGMNodeList of all nodes, starting at startNode and// continuing through the rest of the DOM treefunction listNodes(startNode) { var node = startNode; var list = new Array(); while(node) { list[list.length] =node; node = nextNode(node); } return list;} </script></head><body><h1>WebCGM 2.0 regex example</h1><table> <tr> <td>Select a CGM image...</td> </tr></table><br><input size="60" type="file" name="cgmfile" onChange="loadCGM(this.value)"/><div></div><div></div></body></html>
Viewthis example as HTML-CGM (WebCGM-DOM-enabled browsers only.)