VRML97, ISO/IEC 14772-1:1997 -- Annex F, Recommendations for non-normative extensions

#

#
The Virtual Reality Modeling Language

#
Annex F
(informative)

#
Recommendations for non-normative extensions

###

## F.1 Introduction

This annex describes recommended practice for non-normative extensions to ISO/IEC 14772.

F.1 Introduction
F.2 URNs
F.3 Browser extensions

## F.2 URNs

URNs are location-independent pointers to a file or to different representations of the same content. In most ways, URNs can be used like URLs except that, when fetched, a smart browser should fetch them from the closest source. URN resolution over the Internet has not yet been standardized. However, URNs may be used now as persistent unique identifiers for referenced entities such as files, EXTERNPROTOs, and textures. General information on URNs is available at E.[URN].

URNs may be assigned by anyone with a domain name. For example, if the company Foo owns foo.com, it may allocate URNs that begin with "urn:inet:foo.com:". An example of such usage is "urn:inet:foo.com:texture:wood001". See the draft specification referenced in E.[URN] for a description of the legal URN syntax.

To reference a texture, EXTERNPROTO, or other file by a URN, the URN is included in the url field of another node. For example:

        ImageTexture {
            url [ "http://www.foo.com/textures/woodblock_floor.gif",
                  "urn:inet:foo.com:textures:wood001" ]
        }

specifies a URL file as the first choice and a URN as the second choice.

## F.3 Browser extensions

Browsers that wish to add functionality beyond the capabilities of ISO/IEC 14772 can do so by creating prototypes or external prototypes. If the new node cannot be expressed using the prototyping mechanism (i.e., it cannot be expressed in the form of a VRML scene graph), it can be defined as an external prototype with a unique URN specification. Authors who use the extended functionality may provide multiple, alternative URLs or URNs to represent content to ensure it is viewable on all browsers.

For example, suppose a browser wants to create a native Torus geometry node implementation:

        EXTERNPROTO Torus [ field SFFloat bigR, field SFFloat smallR ]
        ["urn:inet:browser.com:library:Torus",
         "http://.../proto_torus.wrl" ]

This browser will recognize the URN and use the URN resource's own private implementation of the Torus node. Other browsers may not recognize the URN, and skip to the next entry in the URL list and search for the specified prototype file. If no URLs are found, the Torus is assumed to be an empty node.

The prototype name "Torus" in the above example has no meaning whatsoever. The URN/URL uniquely and precisely defines the name/location of the node implementation. The prototype name is strictly a convention chosen by the author and shall not be interpreted in any semantic manner. The following example uses both "Ring" and "Donut" to name the torus node. However, the URN/URL pair "`urn:browser.com:library:Torus`, `http://.../proto_torus.wrl`" specifies the actual definitions of the Torus node:

        #VRML V2.0 utf8
        EXTERNPROTO Ring [field SFFloat bigR, field SFFloat smallR ]
          ["urn:browser.com:library:Torus", "http://.../proto_torus.wrl" ]
        EXTERNPROTO Donut [field SFFloat bigR, field SFFloat smallR ]
          ["urn:browser.com:library:Torus", "http://.../proto_torus.wrl" ]

        Transform { ... children Shape { geometry Ring { } } }
        Transform { ... children Shape { geometry Donut { } } }

Questions or comments.
Copyright © 1997 The VRML Consortium Incorporated.
`http://www.vrml.org/Specifications/VRML97/part1/extensions.html`