Up to cover page | Back to Intelligent Content | On to WebCGM DOM

WebCGM 2.1 — WebCGM XCF


4. WebCGM XML Companion File

This chapter and its sections are normative, unless otherwise indicated.

Contents

4.1 Introduction & examples

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 definitions found in this section represent the WebCGM XCF DTD. This DTD may be extended by profiles deriving from WebCGM. The WebCGM XML companion files may be used for several purposes. There are many conceivable usage scenarios, but for the scope of WebCGM, the following four were identified as most important.

Scenario 1: A companion file can be used to bind application specific details (such as a part number) to a particular Application Structure. It is up to the application to control how the application-specific information is used.

Example 4.1: A companion file used to relate some application-specific data to graphical objects.

<!ENTITY % grobjectAttEXT "model:partNum CDATA #IMPLIED" >
<webcgm version="2.1" id="root-cgm" 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 a CGM illustration via the WebCGM DOM (see section Relationship with XML companion file for more information):

Example 4.2: A companion file used to update sample_2.cgm before being displayed by a user agent. Calls to some WebCGM DOM methods need to take place to perform this task.

<webcgm version="2.1" id="root-cgm" filename="sample_2.cgm"
                      xmlns="http://www.cgmopen.org/schema/webcgm/">
<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 of the WebCGM XCF to fully mirror the hierarchical structure of a CGM graphic (see "Structure overview"), an XML Companion File could be used as a partial, scaled down XML inventory of a CGM illustration by enumerating the Application Structures IDs, types and (most) attributes.

Example 4.3: A companion file used as a partial inventory of sample_3.cgm. In this case, the description puts an emphasis on the hotspot region of each 'grobject' element.

<webcgm version="2.1" id="root-cgm" filename="sample_3.cgm"
                      xmlns="http://www.cgmopen.org/schema/webcgm/">

<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>

4.2 Content and structure of the XCF

This section and its subsections are normative, unless otherwise indicated.

4.2.1 Structure overview

It is not the intent of the WebCGM XML Companion File (XCF) to be a faithful XML representation of the object tree in a hierarchical WebCGM. Rather, XCF provides a mechanism to externalize both standardized and application (private) metadata from a structured WebCGM instance, and to bind it to the proper objects in the object tree of the WebCGM instance.

Accordingly, the structure of the XML Companion File is mostly flat. After the root element, webcgm, the various standard XCF elements occur as siblings in the companion file (with the single exception of linkuri). So, for example, grobjects that have a parent-child relationship in the CGM are siblings in the XCF. The normative WebCGM DTD for XCF expresses and enforces this flat structure, independent of whatever hierarchy may exist in the corresponding WebCGM instance.

Example 4.4: A mostly-flat companion file binds standardized metadata to a hierarchical object tree in a WebCGM instance.

<webcgm version="2.1" filename="sample_4.cgm"
                      xmlns="http://www.cgmopen.org/schema/webcgm/">
   <grobject apsid="level-4-obj" screentip="wingnut-400A"/>
   <grobject apsid="level-3-obj" screentip="bolt-assembly-100A"/>
</webcgm>
BegPic
  ..(graphics etc)..
  BegAps type="grobject" id="level-1-obj"
    BegAps type="grobject" id="level-2-obj"
      ..(graphics etc)..
      BegAps type="grobject" id="level-3-obj"
        BegAps type="grobject" id="level-4-obj"
          ..(graphics etc)..
        EndAps
      EndAps
    EndAps
  EndAps
EndPic

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 XCF contents to the corresponding WebCGM instance — the order of the XCF is not required to follow the order of the CGM contents.

As suggested by Example 4.4, the root element of a conforming XCF instance must be the webcgm element. The webcgm element corresponds to the Picture object in the CGM. See Relationship with XML Companion File for more discussion.

The next section deals in detail with application-specific metadata attributes and elements in an XCF. In order to unambiguously establish where in the WebCGM object tree those metadata are to be inserted, the application-specific attributes and elements (defined in a separate namespace) are placed in the XCF as attributes and child elements on standardized XCF elements that correspond (bind) to the appropriate object in the WebCGM. This is seen in example 4.1, for application-specific attributes. See also section Relationship with XML Companion File for more discussion.

4.2.2 Extending the XML Companion File

The WebCGM DTD is extensible so that application-specific or industry-specific metadata may be added to the WebCGM object model (as shown in example 4.1). The extension definitions are implemented using namespaces. The DTD defines an extension entity for the content and attributes of most elements. As an example, a part manufacturer may want to associate parts information to graphical objects. This might be implemented with an extension that looks like:

<!ENTITY   % grobjectAttEXT   "model:partNum CDATA #IMPLIED" >

A host application could query the WebCGM DOM and retrieve the associated part information.

A set of rules must be followed when extending the WebCGM DTD:

  1. The root element MUST be 'webcgm'.
  2. The extended elements and/or attributes MUST be in another namespace (See Namespaces in XML).
  3. Extending the list of children of an element MUST use the elementNameEXT entity.
  4. Extending the attribute list of an element MUST use the elementNameAttEXT entity.
  5. Elements from the WebCGM namespace MUST NOT be descendants of other namespaced elements.

The rules found above allow WebCGM user agents to process extended companion files in an interoperable manner.

4.2.3 The WebCGM XCF namespace

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 type declaration for a WebCGM XCF document:

<!DOCTYPE webcgm PUBLIC "-//OASIS//DTD WebCGM 2.1//EN" "http://docs.oasis-open.org/webcgm/v2.1/webcgm21.dtd">

4.2.4 WebCGM XML Companion File conformance

A file is a conforming WebCGM 2.1 XCF document if it adheres to the specifications described in this (WebCGM 2.1) document, including those in the WebCGM 2.1 XCF DTD, and in addition all of the following conditions are met:

4.3 XCF elements

This section and its subsections are normative, unless otherwise indicated.

The standard XCF elements include:

The standard XCF elements also include:

4.3.1 Data types and encoding

For the standardized XCF content, most of the items expressed on XCF elements as XML attributes have a straightforward correlation to a standardized WebCGM attribute or property that may be set or inquired with a WebCGM DOMcall.

In general, the encoding of XML attributes on XCF elements is identical to the encoding of the corresponding parameters in DOM calls. For example, the WebCGMAppStructure interface (section 5.7.6) defines 'viewcontext' as a simple string of four numbers, whitespace separated (see Wsp definition, section 5.5). The encoding of 'viewcontext' as an XML attribute on any allowed XCF element is the same as its encoding as a DOM method parameter.

Similarly, the Style Properties (settable on the WebCGMPicture and WebCGMAppStructure interfaces), as XML attributes on the XCF elements have the same valid values and 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 in the XCF, for reasons as explained.

See the WebCGM DOM data types section for complete details.

4.3.2 Conventions used

Most of the XCF elements may have Style Properties as XML attributes (Style Properties are defined and supported on the DOM WebCGMPicture and WebCGMAppStructure interfaces.) The following entity definition is used in the DTD snippets of the subsequent subsections, on those elements which support Style Properties at both the APS level and Picture level. (The background-color Style Property that applies only at 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 the intensity property and one or more of the overlapping properties fill-color, stroke-color, text-color. Overlapping properties may occur sequentially on different XCF elements, and then their processing is defined by their order of occurrence (see Style Properties description).

See "Data types and encoding" for more about Style Properties.

4.3.3 The 'webcgm' element

A WebCGM companion file (or any other CGM profile derived from the WebCGM profile) must have a 'webcgm' element as the root element. The 'webcgm' element corresponds to the Picture node in the WebCGM DOM tree (see for example the WebCGMPicture 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. Refer to Extensible Markup Language (XML) 1.0 [XML10].
version="CDATA"
Represents the version of the WebCGM specification. The value is 2.1 for this specification. Every conforming XCF must identify its version, either by including this attribute on the webcgm element, or by including a DOCTYPE pointing to this WebCGM XCF's DTD, or both (recommended). An industry-specific profile derived from this WebCGM XCF specification must not use this attribute to identify its version, and should define and require use of a namespace attribute to identify its profile version. For example, if ASD includes in its future version of S1000D "n.m" an XCF derived from WebCGM 2.1, the webcgm tag might look like this:

<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 a descriptive attribute.
xmlns[:prefix]="CDATA"
Standard XML attribute whose value defines the "resource-name" for identifying an XML namespace. Refer to Namespaces in XML. The 'xmlns' attribute without prefix identifies the (default) WebCGM namespace, and (with prefix) must be used to identify the foreign namespace(s) of any application-specific metadata that are used in the XCF instance. Note that the value given in the DTD snippet, and the attribute type (#FIXED), apply only to the unprefixed, default WebCGM namespace.

EXAMPLES:
<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 default namespace for the webcgm element and its contents, and content in the 'asd' namespace would use the "asd:" prefix. As the DTD shows, the second example is also valid because the namespace IRI defaults properly for the xmlns attribute without prefix. It is recommended, however, that the xmlns attribute declaring the default (WebCGM) namespace always be included.

background-color="CDATA"
background-color is a Style Property for setting the background color of the Picture (root node of WebCGM object tree).
pictureVisibility="on|off"
Defines the visibility for the picture that corresponds to the webcgm element of this XCF. This is similar to the 'visibility' APS Attribute that can be applied to metafile Application Structures, except it applies to the picture (on which the 'visibility' APS Attribute is not allowed by CGM rules.) The effect is the same as the invocation of the setPictureVisibility method on the WebCGMPicture interface of the DOM. .
styleProperties
the styleProperties entity collectively defines those Style Properties that apply at both 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.

4.3.4 The 'layer' element

The 'layer' element of an XML companion file represents a CGM Application Structure of type 'layer'. The corresponding 'layer' is identifiable given its assigned '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 WebCGM file.
layerdesc="CDATA"
Value of the 'layerdesc' Application Structure attribute for the associated APS.
visibility="on|off|inherit"
Value of the 'visibility' Application Structure attribute for the associated APS.
interactivity="on|off|inherit"
Value of the 'interactivity' Application Structure attribute for the associated APS.
styleProperties
the styleProperties entity collectively defines those Style Properties that apply at both 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' functional description in Section 3.

4.3.5 The 'grobject' element

The 'grobject' element of an XML companion file represents a CGM Application Structure of type 'grobject'. The corresponding grobject' is identifiable given its 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 WebCGM file.
screentip="CDATA"
Value of the 'screentip' Application Structure attribute for the associated APS.
region="CDATA"
Value of the 'region' Application Structure attribute for the associated APS.
viewcontext="CDATA"
Value of the 'viewcontext' Application Structure attribute for the associated APS.
visibility="on|off|inherit"
Value of the 'visibility' Application Structure attribute for the associated APS.
interactivity="on|off|inherit"
Value of the 'interactivity' Application Structure attribute for the associated APS.
styleProperties
the styleProperties entity collectively defines those Style Properties that apply at both 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' functional description in Section 3.

4.3.6 The 'para' element

The 'para' element of an XML companion file represents a CGM Application Structure of type 'para'. The corresponding 'para' is identifiable given its assigned '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 WebCGM file.
screentip="CDATA"
Value of the 'screentip' Application Structure attribute for the associated APS.
region="CDATA"
Value of the 'region' Application Structure attribute for the associated APS.
viewcontext="CDATA"
Value of the 'viewcontext' Application Structure attribute for the associated APS.
visibility="on|off|inherit"

Value of the 'visibility' Application Structure attribute for the associated APS.
interactivity="on|off|inherit"
Value of the 'interactivity' Application Structure attribute for the associated APS.
styleProperties
the styleProperties entity collectively defines those Style Properties that apply at both 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' functional description in Section 3.

4.3.7 The 'subpara' element

The 'subpara' element of an XML companion file represents a CGM Application Structure of type 'subpara'. The corresponding 'subpara' is identifiable given its 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 WebCGM file.
screentip="CDATA"
Value of the 'screentip' Application Structure attribute for the associated APS.
region="CDATA"
Value of the 'region' Application Structure attribute for the associated APS.
viewcontext="CDATA"
Value of the 'viewcontext' Application Structure attribute for the associated APS.
visibility="on|off|inherit"

Value of the 'visibility' Application Structure attribute for the associated APS.
interactivity="on|off|inherit"
Value of the 'interactivity' Application Structure attribute for the associated APS.
styleProperties
the styleProperties entity collectively defines those Style Properties that apply at both 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' functional description in Section 3.

4.3.8 The 'linkuri' element

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. The corresponding Application Structure of this 'linkuri' is its parent element.

<!ENTITY % linkuriEXT "" >
<!ENTITY % linkuriAttEXT "" >
<!ELEMENT linkuri %linkuriEXT; >
<!ATTLIST linkuri uri CDATA #REQUIRED
behavior CDATA #IMPLIED
desc CDATA #IMPLIED
%linkuriAttEXT;
>

Attribute definitions:
uri="CDATA"
The IRI of this 'linkuri' attribute. See section Basic Data Types for more information.
behavior="CDATA"
The behavior of this 'linkuri' attribute. See section Basic Data Types for more information.
desc="CDATA"
The title or description of this 'linkuri' attribute. See section Basic Data Types for more information.
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' functional description in Section 3.

4.3.9 The 'bindByName' element

A 'bindByName' element of an XML companion file is intended to correspond to one or more Application Structure in a CGM file. The common link between those Application Structures is that their 'name' or 'layername' attribute value corresponds to 'apstargetname'. See section Relationship with XML companion file for more information on the rules of mapping 'bindByName' attributes to WebCGM Application Structures.

<!ENTITY % bindByNameEXT "" >
<!ENTITY % bindByNameAttEXT "" >
<!ELEMENT bindByName ( linkuri %bindByNameEXT; )* >
<!ATTLIST bindByName apstargetname CDATA #REQUIRED
screentip CDATA #IMPLIED
region CDATA #IMPLIED
viewcontext CDATA #IMPLIED
layerdesc CDATA #IMPLIED
visibility ( on | off | inherit) #IMPLIED
interactivity ( on | off | inherit) #IMPLIED %styleProperties;
%bindByNameAttEXT; >

Attribute definitions:
apstargetname="CDATA"
Name used to identify the corresponding Application Structure(s) for a given WebCGM file.
screentip="CDATA"
Value of the 'screentip' Application Structure attribute for the associated APS.
region="CDATA"
Value of the 'region' Application Structure attribute for the associated APS.
viewcontext="CDATA"
Value of the 'viewcontext' Application Structure attribute for the associated APS.
layerdesc="CDATA"
Value of the 'layerdesc' Application Structure attribute for the associated APS.
visibility="on|off|inherit"
Value of the 'visibility' Application Structure attribute for the associated APS.
interactivity="on|off|inherit"
Value of the 'interactivity' Application Structure attribute for the associated APS.
styleProperties
the styleProperties entity collectively defines those Style Properties that apply at both 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.

4.3.10 The 'bindById' element

The 'bindById' element of an XML companion file represents a CGM Application Structure one of the types: layer, grobject, para, subpara. APS of type 'grnode' are valid in a 'bindById' element. The corresponding object is identifiable given its assigned 'apsid' attribute value. See section Relationship with XML companion file for more information on the rules of mapping 'bindById' attributes to WebCGM Application Structures.

<!ENTITY % bindByIdEXT "" >
<!ENTITY % bindByIdAttEXT "" >
<!ELEMENT bindById ( linkuri %bindByIdEXT; )* >
<!ATTLIST bindById apsid ID #REQUIRED
screentip CDATA #IMPLIED
region CDATA #IMPLIED
viewcontext CDATA #IMPLIED
layerdesc CDATA #IMPLIED
visibility ( on | off | inherit) #IMPLIED
interactivity ( on | off | inherit) #IMPLIED %styleProperties;
%bindByIdAttEXT; >

Attribute definitions:
apsid="xml:id"
The unique identifier of the Application Structure for the given WebCGM file.
screentip="CDATA"
Value of the 'screentip' Application Structure attribute for the associated APS.
region="CDATA"
Value of the 'region' Application Structure attribute for the associated APS.
viewcontext="CDATA"
Value of the 'viewcontext' Application Structure attribute for the associated APS.
layerdesc="CDATA"

Value of the 'layerdesc' Application Structure attribute for the associated APS.
visibility="on|off|inherit"
Value of the 'visibility' Application Structure attribute for the associated APS.
interactivity="on|off|inherit"
Value of the 'interactivity' Application Structure attribute for the associated APS.
styleProperties
the styleProperties entity collectively defines those Style Properties that apply at both 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.

4.4 The complete XCF DTD

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          -->
<!--                                                                  -->

Back to top of chapter