Up to cover page | Back to WebCGM Concepts | On to WebCGM Profile
The URI (Uniform Resource Identifier) is how resources are identified on the Internet. For example, a CGM file called web.cgm located on the CGM Open web site might have the following URI:
http://www.cgmopen.org/web.cgm
Pictures and objects (application structures) within a WebCGM are addressed using the mechanism of the URI fragment. These WebCGM rules are derived from and are consistent with the Web protocols defined in RFC-2396.
A URI fragment is the separator character " # " appended to the main part of the URI or the "base", followed by a string. The fragment string is usually specific only to a particular class of applications. This clause defines the WebCGM fragment which allows CGM viewers, web browsers, scripting engines, and other applications to address (point to) specific pictures and objects within pictures in CGM files.
The base URI is terminated by "#", and a fragment is appended which defines the picture, object, and the desired viewer behavior. The URI fragment syntax is based on concepts described in the XML Pointer Language(Xpointer). The URI fragment syntax is defined below. The formal grammar for the WebCGM fragment is given using a simple Extended Backus-Naur Form (EBNF) notation.
webcgmfragment ::= picterm "." objterm | picterm | objterm | picid "." objid | objid picterm ::= pictureid | pictsequence pictureid ::= "pictid(" picid ("," behavior)? ")" picid ::= (char)+ behavior ::= "_blank" | "_self" | "_parent" | "_replace" | "_top" | target target ::= (char)+ pictsequence ::= "pictseqno(" picseqno ("," behavior)? ")" picseqno ::= (digit)+ digit ::= "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" objterm ::= objectid | objectname objectid ::= "id(" objid ("," objbehavior)? ")" objid ::= (char)+ objbehavior ::= "view_context" | "highlight" | "highlight_all" objectname ::= "name(" objname ("," objbehavior)? ")" objname ::= (char)+
See next section for a definition of the "char" production.
The productions 'picid', 'target', 'objid', and 'objname' in the fragment grammar are represented by parameters in WebCGM of type non-graphical text (CGM type SF). Their character repertoire shall be restricted as follows.
Note that these character repertoires allow one or more of the characters ".", ",", "(", and ")". These are significant characters in the syntax of the WebCGM fragment specification. If any of these four significant characters is to appear in a valid id/name string within a fragment instance, then the fragment shall use the unabbreviated long form, which is the first of the five optional forms in the 'webcgmfragment' production of 3.1.1.2. In particular, all components of the long form shall be included, and none of the parts marked as optional in the EBNF may be omitted.
Comment about 'picid': note that the character repertoire for picid occurrence in the fragment ("as objid") is more restrictive than the repertoire for the id parameter of the BEGIN PICTURE element itself (CGM data type SF, not further restricted). Any application which intends to use multi-picture addressing by id must therefore generate the picture ids to the more restrictive repertoire of the fragment. See, however, comments at the end of 2.2.1 about deprecation of multi-picture metafiles in WebCGM application.
The URI character repertoires, as define in the appropriate W3C specifications, basically comprise the alphabetic and numeric characters of ASCII, plus a few punctuations. The character repertoires defined in 3.1.1.3 are potentially much richer. The method for handling this disparity is as defined in section 4.2.2 of XML 1.0, second edition, REC-xml-20001006. That specification is adapted for WebCGM processors as follows.
A WebCGM processor shall interpret a non-ASCII character in a URI by representing the character in UTF-8 as one or more bytes, and then escaping these bytes with the URI escaping mechanism (i.e., by converting each byte to %HH, where HH is the hexadecimal notation of the byte value).
pictid
- The pictid
keyword indicates
that selection of the picture to be viewed is by the id of the
picture, which is the id parameter in the BEGIN PICTURE element.
The picture id value is the first, required parameter associated
with the keyword (see EBNF), and
there may be a second associated parameter, which is an optional
picture behavior specification. If the metafile does not contain a
picture with the specified picture id value, the first picture in
the metafile is chosen.
pictseqno
- The pictseqno
keyword
indicates that selection of the picture to be viewed is by the
sequence number of the picture in the metafile. "1" is the first
picture, "2" is the second picture, etc. An all-digit string
representing the picture sequence number value is the first,
required parameter associated with the keyword (see EBNF), and there may be a second
associated parameter, whose value is an optional picture behavior
specification. The picture sequence number shall be an integer greater than zero. If
the specified picture sequence value exceeds the number of pictures
in the metafile, the last picture is displayed.
Picture behaviors describe to the viewer how to display the picture, which is the target of a hyperlink. Picture behaviors are based on the syntax and semantics of " Frame Target Names" defined in the HTML 4.0 Specification.
The reserved names listed below describe the various picture behaviors. All other Picture Behavior values shall be valid Frame Target Names as described in the HTML 4.0 specification. Frame Target Names must begin with an alphabetic character (a-zA-Z).
In what follows, the following conventions apply:
The following Picture Behavior values, except for _replace, are defined per HTML 4.0:
If the picture behavior value is any valid name string other than the above reserved names, (it begins with an alphabetic character (a-zA-Z)), remove the existing content (picture or document) from the frame whose name matches the string and display the specified content in the specified frame. If no frame exists by the specified name, the viewer shall load the designated content (picture or document) in a new window with the specified name.
In the case that a link is HTML to CGM, the picture behavior should not be included in any fragment specification. Rather, the effect should be achieved with HTML TARGET attribute on the link specification in the HTML, per the specifications in the HTML 4.0 Recommendation. CGM viewers shall ignore picture behavior specifications in URI fragments which are part of links from non-CGM content.
The following table summarizes the rules for other link types, CGM-to-HTML and CGM-to-CGM:
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 replace the current picture by the designated picture in the same rectangular area in the same frame or window as the picture which refers to this target. 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: Link interactions between CGM and non-CGM mime types other than HTML follow the same rules as CGM and HTML interactions.
Figures 3 and 4 below give examples of _self and _replace.
Figure 3. Example of _self
Figure 4. Example of _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 found in 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. The first object in the picture which contains
a 'name' attribute with a matching value is selected. If no match is
found in the picture, no grobject is selected. If more than one
match is found in the picture the 'highlight_all' behavior can be
used to highlight all selected objects.
view_context
- If a 'viewcontext' APS attribute exists
for the object APS, display only the rectangular region of the
picture defined by the 'viewcontext' APS attribute, and highlight the
object. If no 'viewcontext' APS attribute exists in the object, the
highlight behavior shall be implemented. The "view_context" object
behavior is the default behavior. (See
3.2.1.1).
highlight
- highlight the first object selected and
ignore the 'viewcontext' attribute, if present. The resulting view is
a full-picture view, not a zoomed view.
highlight_all
- highlight all objects selected. The
resulting view is a full-picture view, not a zoomed view.
In addition to being able to meet the zooming requirements imposed by the object behavior specifications, and those zooming requirements imposed by support of the OBJECT tags paramenters, viewers which operate in an interaction-capable environment shall have zoom and pan controls available to the user. The exact methods and user interface styles for zoom and pan selection and manipulation are viewer dependent.
The WebCGM fragment in its most verbose form provides the means to address objects in single or multiple picture metafiles and tell the viewer what to do to execute the link. The default viewer behavior defines what the browser shall do if the WebCGM fragment does not explicitly define the viewer behavior.
The following examples illustrate some of the ways the WebCGM fragment can be used. The examples describe how one might address the CGM file "engine.cgm" which is stored on the CGM Open website (http://www.cgmopen.org/webcgm/). The CGM file contains various pictures of an engine assembly - the top view, the front view, the right view, the left view, and the isometric view. The pictures are ordered sequentially in the CGM file and identified as follows:
Picture 1: picid="top"
Picture 2: picid="front"
Picture 3: picid="right"
Picture 4: picid="left"
Picture 5: picid="iso"
Each picture in the CGM file contains several identifiable objects - the oil pump, the cylinder head, the fan, the radiator, or the distributor. Not all objects are shown in all views.
The objects contained in each picture are as follows:
Picture 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'
Picture 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'
Picture 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'
Picture 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'
Picture 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'
http://cgmopen.org/webcgm/engine.cgm#pictid(top,_blank).id(cyl-hd-t,highlight)
When used as the value of the URI attribute in an object in a CGM file, this URI retrieves engine.cgm CGM file from the cgmopen.org web site and displays the picture named "top" in a new window, highlighting the object with an id of "cyl-hd-t". The existing display remains. The entire picture is displayed, regardless of the presence of a 'viewcontext' APS for the object "cyl-hd-t". Note that inclusion of the picture behavior, "_blank", in the URI fragment is not the preferred formulation for this link/behavior combination (see 3.2.2.3). The preferred form would place the string "_blank" into the 3rd parameter of the 'linkuri' APS attribute, and the first parameter would be:
http://cgmopen.org/webcgm/engine.cgm#pictid(top).id(cyl-hd-t,highlight)
http://cgmopen.org/webcgm/engine.cgm#pictid(top).id(oil-pump-t,highlight)
When used as the URL in an OBJECT element in HTML, this example displays the CGM inside a rectangle defined by the width and height parameters of the OBJECT tag, displaying the whole of "top" with the pump highlighted. Since "top" is the first picture in the file, if we had used the name "top-view" the visual result would have been the same, since "top" is the first picture in the file.
http://cgmopen.org/webcgm/engine.cgm#pictseqno(5,topframe).id(dist-i,view_context)
When used as the value of the URI attribute in a object in a CGM file, this URI retrieves the engine.cgm CGM file from the cgmopen.org web site and displays the fifth 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 rectangular portion of the picture to display in the frame. Note, as in example 1, that inclusion of the picture behavior, a target frame named "topframe", in the URI fragment is not the preferred formulation for this link/behavior combination (see 3.2.2.3). The preferred form would place the string "topframe" into the 3rd parameter of the 'linkuri' APS attribute, and the first parameter would be:
http://cgmopen.org/webcgm/engine.cgm#pictseqno(5).id(dist-i,view_context)
http://cgmopen.org/engine.cgm#picseqno(2,topframe)
When used as the value of the URI attribute in a object in a CGM file, this URI retrieves the engine.cgm CGM file from the cgmopen.org web site and displays the second picture in the metafile in the frame named "topframe" Note, as in example 1 and 3, that inclusion of the picture behavior, a target frame named "topframe", in the URI fragment is not the preferred formulation for this link/behavior combination (see 3.2.2.3). The preferred form would place the string "topframe" into the 3rd parameter of the 'linkuri' APS attribute, and the first parameter would be:
http://cgmopen.org/webcgm/engine.cgm#pictseqno(2)
http://cgmopen.org/webcgm/engine.cgm#name(cooling)
This example retrieves the engine.cgm cgm file from the cgmopen.org web site and displays the first (default) picture in the metafile. The first object containing a 'name' attribute with value "cooling" is highlighted and the 'viewcontext' APS attribute, if it exists, is used to define the rectangular area of the picture to display.
http://cgmopen.org/webcgm/engine.cgm#fan-t
This example retrieves the engine.cgm cgm file from the cgmopen.org web site and displays the first (default) picture in the metafile. The object with id "fan-t" is highlighted and the 'viewcontext' APS attribute of the object, if it exists, is used to define the rectangular area of the picture to display.
#id(oil-pump-t)
This example will highlight the object "oil-pump-t" in the currently displayed picture and the 'viewcontext' APS attribute, if it exists for the object "oil-pump-t", is used to define the rectangular area of the picture to display. The address fragment could be shortened even further to "#oil-pump-t"
Often, applications will display several pictures in a single HTML page. The only way to address the cgm viewer instance that is responsible for the display of a particular picture is via the "object" tag defined in HTML 4.0. The CGM defined by the object tag can be uniquely addressed using the <name> parameter of the object tag. However, the specific syntax for addressing a specific CGM in an HTML page is not standardized.
The Document Object Model (DOM) is currently under development. This work, when completed, is expected to provide a standard basis for addressing this problem.
WebCGM has four APS types: layer, grobject, para, and subpara. This document uses the term "object" to refer to an APS of type 'grobject', 'para', and 'subpara'.
Description. The application structure (APS) of type 'grobject' is used to group graphical primitives in a picture together and assign certain attributes to the group. The object is geometrically identified either by the set of primitives enclosed between the BEGIN APS and END APS elements (if any), or by the spatial region associated with the 'region' APS Attribute (if present). 'Grobject' APSs may contain any CGM graphical content allowed by this profile, and may contain other APS and APS attribute content as defined in section 3.3 (the complete, normative WebCGM content model).
Viewer Behavior. A 'grobject' APS may be selected by the user ("pick"). The viewer shall decide about the pick selection in the following manner:
It is possible that a user selection ("pick") of a object in a displayed WebCGM picture may not have a single unambiguous result - the cursor location may reside within the geometric extent or 'region' of more than one APS. In such a case, the pick priority is as follows:
Viewers shall give visual feedback to the user that a successful pick has occurred, and an indication of the particular object (or region) which has been picked. The exact method of feedback is viewer dependent.
If an APS is the target of a link, either from within the picture or from content external to the picture, then the default behavior of the viewer shall be as follows:
The case of default object behavior and no 'viewcontext' APS attribute requires a full-picture view, not a zoomed view. Some legacy intelligent graphics content, as well as some closely related IG profiles, have specified that this case requires a zoomed view. Viewers should have an operating mode to select zoomed view for these default cases. The next functional edition of WebCGM will have explicit controls for this viewer behavior.
Caveat: the CGM standard allows the definition of an APS to be continued in pieces which are disjoint in the file. If an APS occurs which has the same value of the 'id' parameter as an earlier APS occurrance, then that is construed as a continuation of the definition of that object. This has not been prohibited in the WebCGM 1.0 profile. However, it is considered to be problematic, separating the logical structure from the file structure, and allowing non-hierarchical constructs in the latter. Prohibiting continued APS in the next functional Edition of WebCGM is under active discussion, and is considered likely.
Description. The 'layer' APS declares that the graphical content within this APS and any valid nested APS ('grobject' and 'para', but not 'layer') belong to the layer identified by the contained 'layername' APS attribute. Each 'layer' APS shall contain exactly one 'layername' APS attribute and also may contain one 'layerdesc' APS attribute.
Viewer Behavior. Viewers shall provide functionality to inform users of the presence of layers, their names and descriptions. Viewers shall provide functionality to selectively turn on and off the visibility of layers. Viewer may, but are not required to, provide additional functionality for the view manipulation and browsing of layers.
Description. The application structure (APS) of type 'para', may be used to identify text ("paragraphs"). In the case that the underlying graphic does not represent graphical text in a searchable form (e.g., the text has been rasterized, polygonized, broken into small units, or pieces of a single string occur in awkward order), 'para' together with 'content' can potentially enable text search functionality. 'Para' APSs may contain any CGM graphical content allowed by this profile, and may contain other APS and APS attribute 'content' as defined in section 3.3 (the complete, normative WebCGM content model).
Viewer Behavior. The WebCGM prescription for priority of text search matching is: 'para' with matching 'content' (1st priority match); 'para' without 'content' but with recognizable single-element RESTRICTED TEXT match (2nd priority match); or, single-element RESTRICTED TEXT match, outside of any 'para' (3rd priority match). Further details of behavior of viewers with respect to identifying matches or communicating the identity of matches is not specified in WebCGM 1.0.
In other respects, e.g., picking and link navigation, the viewer behavior of 'para' is identical to that of 'grobject'. See 3.2.1.1.
Description. The application structure (APS) of type 'subpara', may be used to identify smaller fragments of text within APS of type 'para'. This enables, for example, the identification of the larger text block (the "paragraph") for searching purposes, and the tagging of smaller fragments as hotspots. 'Subpara' APSs may contain any CGM graphical content allowed by this profile, may not contain nested APS, and may contain APS attribute 'content' as defined in section 3.3. The APS attribute content rules of sub-para matches those of 'para'.
Viewer Behavior. See 3.2.1.3, 'para'.
Description. This version and level of WebCGM do not allow additional APS elements to occur, other than 'grobject', 'layer', 'para', and 'subpara'. Private metadata may be associated with WebCGM objects by keeping the metadata outside of the CGM, and associating it with objects within the CGM. The methods, structures, and results of such private intelligent graphics architectures are not specified by WebCGM 1.0, and are outside the scope of standardized interchange under WebCGM 1.0.
Description. The 'region' APS Attribute provides an optional spatial region, associated with a graphical object, which assumes precedence for user picking operations directed at the object. Simple regions of type rectangle, ellipse, polygon, and continuous polybezier can be defined. Complex regions which comprise a collection of simple regions can be built, allowing definition of disjoint subregions, regions with holes, etc. Their semantics (subregions, and interior/exterior definition) are identical to those of the CGM element CLOSED FIGURE. At most one 'region' attribute may be present within a single APS.
Parameters. The data record is a SDR of one or more member pairs (i.e., 2*m members, m>=1). Each member-pair defines a simple region: the first member is 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 given point does not match the first, then the viewer closes the region with a straight line segment from the last to the first).
In the case that there are multiple simple regions, m>1, then the individual simple regions each correspond to a REGION in the sense of the CGM CLOSED FIGURE element.
Viewer Behavior. See 3.2.1.1.
Description. The 'viewcontext' APS Attribute provides specification to viewers of the initial view of an object, when the viewer has been directed to navigate to the graphical object which contains this attribute. A 'viewcontext' APS Attribute may be contained within an otherwise empty APS, in which case the APS provides only a viewport specification. At most one 'viewcontext' attribute may be present within a single APS.
Parameters. The data record is a SDR of 1 member of type VDC defining two corner points of a rectangle.
Viewer Behavior. See 3.2.1.1.
Description. The 'linkuri' APS Attribute defines a URI, to be associated with the object containing this attribute. When the object is selected by a graphical pick operation, then the viewer shall take necessary action to navigate the link. Multiple 'linkuri' attributes may be contained within a single APS.
Parameters. The data record is a SDR of one member, containing three strings (type SF, String Fixed). The first string is the link destination, a URI, the second string (possibly null) is a Link Title parameter, and the third string is (possibly null) the Behavior parameter. Note that a null string is a zero-length string, and is not the same as an omitted parameter.
The destination of a link is specified by a Uniform Resource Identifier, or URI. Any valid URL under the specifications of RFC-2396 is a valid value of this parameter. This specification does not constrain the syntax or semantics of a URI in a 'linkuri' that identifies a resource that is not a CGM file (for example, an HTML or XML document).
The Behavior string defines picture behavior associated with the link. The values and meanings are as defined in 3.1.2.2. In cases 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 to CGM media types, and is the preferred method.
In the case that the URI points to CGM media type, the picture behavior may be encoded within the optional fragment identifier in conjunction with the URI structure, per section 3.1.1, "Addressing Pictures and Objects". This form is deprecated, and may be removed in a future edition of this profile. For specifying picture behavior, particular WebCGM 'linkuri' instances shall use either the Behavior string (preferred), or the picture behavior specification embedded in the fragment, but not both.
Description. The 'layername' APS Attribute declares that the graphics associated with the 'layer' APS containing this attribute belong to the identified layer. The 'layername' need not be unique. If more than one 'layer' APS contains the same 'layername', then the occurrences following the first occurrence shall be construed as continuing the definition of the named layer. At most one 'layername' attribute may be present within a single 'layer' APS.
Note: as a consequence of ISO CGM Defect Resolution 8632-1/064, the definition of any application structure can be continued by the occurrence of a disjoint APS (i.e., a separate BeginAPS-content-EndAPS group) with the same APS id parameter value. Therefore, the definition of a given layer can be continued by repeating the value of the 'layername' APS attribute in a disjoint APS, either with different APS id value, or with the same APS id value. However, it is not permitted for a subsequent disjoint APS to have the same APS id value as a previous APS, but with a different value of the 'layername' APS attribute.
Parameters. The data record is a 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 object belong to the null layer.
Viewer Behavior. See 3.2.1.2.
Description. The 'layerdesc' APS Attribute provides optional descriptive text which is associated with the 'layer' APS in which it occurs. This may be used by viewers to facilitate required and optional layer manipulation functions, as described in 3.2.1.2. At most one 'layerdesc' attribute may be contained within a single 'layer' APS.
Parameters. The data record is a SDR of one member, containing one string (type SF, String Fixed).
Viewer Behavior. See 3.2.1.2.
Description. The 'screentip' APS Attribute provides an optional string, to be associated with a graphical object, which viewers can display when the graphical cursor passes over the graphical object. This APS Attribute may occur within any graphical object of WebCGM, specifically, within any APS of type 'grobject', 'para', and 'subpara', and there shall be at most one occurrence within any particular APS.
Parameters. The data record is a SDR of one member, containing one string (type SF, String Fixed).
Viewer Behavior. Viewers shall be capable of displaying the screen tip, if one is defined for a graphical object, visible to the user when the cursor passes over the graphical object, in the common style of Web browsers.
Description. The 'name' APS Attribute provides an optional string, that defines a "common name" associated with an object. Unlike the APS 'id' parameter, the 'name' APS attribute need not be unique within a metafile. This is the same as the Name ("common name") APS Attribute of ATA Grexchange 2.4. Multiple 'name' attributes may be contained within a single APS.
Parameters. The data record is a SDR of one member, containing one string (type SF, String Fixed).
Viewer Behavior. The 'name' gives applications a way to associate common names with objects. The object can optionally be addressed by the value of the 'name' attribute. See 3.1.1.
Description. The 'content' APS Attribute provides a means to declare what is the first priority searchable text content of a 'para' APS. The 'content' APS Attribute may occur only within APS of type 'para' and 'sub-para', and there shall be at most one occurrence within any such APS.
Parameters. The data record is a SDR of one member, containing one string (type SF, String Fixed).
Viewer Behavior. See the description under the 'para' APS, 3.2.1.3.
Description. This version and level of WebCGM do not allow additional APS Attribute elements to occur, other than as enumerated above. Private metadata may be associated with WebCGM objects by keeping the metadata outside of the CGM, and associating it with objects within the CGM. The methods, structures, and results of such private intelligent graphics architectures are not specified by WebCGM 1.0, and are outside the scope of standardized interchange under WebCGM 1.0.
This is the formal specification of the content model of the CGM Version 4 functionality of WebCGM - the "Intelligence" content. XML has been chosen as the specification language, as validating parsers are widely available which could be adapted to perform content validation checking against WebCGM instances (either via modification of the readers, or via transformation of the intelligent content of 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 CGM APS element. --> <!ELEMENT picbody (layer+ | (grobject | para | gdata)*) > <!ELEMENT layer (grobject | para | gdata)+ > <!ATTLIST layer id ID #REQUIRED layername CDATA #REQUIRED layerdesc CDATA #IMPLIED > <!ELEMENT grobject (grobject | para | gdata)* > <!ATTLIST grobject id ID #REQUIRED region CDATA #IMPLIED viewcontext CDATA #IMPLIED linkuri CDATA #IMPLIED screentip CDATA #IMPLIED name CDATA #IMPLIED > <!ELEMENT para (subpara | gdata)* > <!ATTLIST para id ID #REQUIRED region CDATA #IMPLIED viewcontext CDATA #IMPLIED linkuri CDATA #IMPLIED screentip CDATA #IMPLIED content CDATA #IMPLIED > <!ELEMENT subpara (gdata)* > <!ATTLIST subpara id ID #REQUIRED region CDATA #IMPLIED viewcontext CDATA #IMPLIED linkuri CDATA #IMPLIED screentip CDATA #IMPLIED content CDATA #IMPLIED > <!ELEMENT gdata EMPTY > <!ATTLIST gdata cgmprim ENTITY #REQUIRED >
Note: the use of XML to express the content model of WebCGM implies that a particular attribute can have at most one instance within a particular APS instance. This is not the case, and the normative rules are as specified in 3.2.2.1 through 3.2.2.8.
The only standard way to reference in-line CGMs from HTML documents is through the OBJECT tag, using the DATA attribute for the CGM file and the TYPE attribute to specify the full Mime Type. The minimal tag for adding CGM into a document would be:
<OBJECT DATA="xxx.cgm"
TYPE="image/cgm;Version=4;ProfileId=WebCGM"; WIDTH=200;
HEIGHT=100>
Other HTML 4.0 attributes which may be used in the OBJECT tag include ALIGN, BORDER, HSPACE, ID, NAME and VSPACE. Use of ALIGN, BORDER, HSPACE, and VSPACE is only permitted in Transitional HTML 4.0, not Strict HTML 4.0.
The attributes CLASSID, CODEBASE, DECLARE, SHAPES, USEMAP, CODETYPE, and ARCHIVE are prohibited. Content with uses WebCGM shall not make direct reference to the code which may be used to display it.
The event-related attributes, ONCLICK,...,ONMOUSEOVER, are permitted but their effect is undefined in this version, Edition 1.0, of WebCGM. Mouse-related events occurring within the area of the WebCGM picture will be handled by the WebCGM viewer, which need not expose these events.
The attributes ACCESSKEY, ALT, CLASS, DIR, LANG, LONGDESC, STANDBY, STYLE, TABINDEX and TITLE are permitted, but have no defined effect on CGM viewers and display of CGM pictures. They are used to improve accessibility, and may also affect the presentation of any alternative text content of the OBJECT element.
The OBJECT element can contain optional PARAM elements, which allow the HTML to pass additional data to the OBJECT. The following PARAMs are defined and permitted for WebCGM. Each PARAM is presented as a name, and permissible values.
<PARAM name="halign" value="middle"> <PARAM name="valign" value="middle">
Figures 5 and 6 show the different effects achieved by 'Fit' and 'Fill' with the different alignments.
Figure 5. Example of Fit
Figure 6. Example of Fill
Up to cover page | Back to WebCGM Concepts | On to WebCGM Profile