This document covers integration of URN's with VRML, and specifies procedures for their use especially with respect to libraries of textures etc.
Last updated by Mitra on 15th July 1996. This document's URL is http://earth.path.net/mitra/papers/vrml-urn.html
This document covers a number of related topics
URN's are location independent pointers to a file, or to different representations of the same content. In most ways they can be used like URL's except that when fetched a smart browser should fetch them from the closest source.
The syntax of URN's is fixed, and typically looks like "urn:inet:vrml.org:texture/wood001" where
URN resolution is still an area being standardized, in July '96 the IETF was estimating another year before it is finalized, but resolution is NOT required in order for VRML to start making use of URN's to solve the pressing problems of better performance with large files on slow networks.
It should be noted that a URN does not necessarily specify a single file, the example above might be available as a GIF, PNG, BMP and JPEG, with the normal HTTP "Accept" mechanism deciding which types are appropriate.
The goal is to allow a standard library of many textures, prototypes and objects do be available, the files in this library are more likely to be available in the user's HTTP cache, or to have been previously downloaded as a library.
In order to do this, the namespace identifier "vrml.org" will be reserved for library. To this will be attached a hierarchy of names, representing textures, prototypes and generic objects. This library will contain only textures, prototypes, and objects that are donated to the public domain, and may be freely copied, adapted, re-sold providing only that proper (TBD) procedures are taken to acknowledge origin. A procedure will be set up to allow textures to be submitted and added to the library.
Once such a library exists, it should be possible for Authors to reference a particular texture with the hope that many users will be able to view their world significantly more quickly than if a custom texture were used.
The library for Prototypes will allow standard extension nodes to be easily referenced, reducing again the size of worlds.
The procedure above supports the creation of a standard library, but many companies will wish to produce their own libraries, either for commercial sale, or just so that worlds built using it will have a better chance of being viewed quickly because the files may have been cached, or be available locally.
In order to do this, a library publisher should use their regular domain name in a URN with a form similar to that above, for example ParaGraph owns the domain paragraph.com and so can allocate URN's of the form. "urn:inet:paragraph.com:proto/gnome".
It should be noted, that once the resolution scheme is settled on by the IETF, then this will probably require the library publisher to set up a URN resolver, but this is likely to be of equivalent complexity to running an HTTP server.
In order for a world to be viewed more quickly even when the desired texture is not immediately available, the concept of "generic textures" or "generic objects" is useful. Verbally the idea is "use this special texture for the floor if its available, but while we are fetching it use this standard maple floor". This concept is enabled by the VRML2.0 system of multiple URL's in any place where one is allowed. It does not require URN's in order to work, but is enhanced by the use of URN's since it is more likely that a texture referenced by URN will be available, for example:
ImageTexture { url [ "http://www.paragraph.com/textures/woodblock_floor.gif", "urn://vrml.org/textures/wood001" ] }
In order for libraries to be distributed on CD-ROM, it is necessary that browsers have a standard method for determining which URN's or URL's are available on the CD-ROM. To this extend we recommend that the root directory of any CD-ROM contain a file "index.urn" with lines that contain rules for converting a URL or URN being looked for (Left hand side) into a relative or absolute URL where the file - or more information - may be found.
#URN1.0
#The header line above specifies the format of this file.
#This rule specifies two files in this directory which match a given URN
#the browser should select whichever format it supports.
urn:inet:paragraph.com/textures/wood001 wood001.bmp,wood001.gif
#This rule says that anything starting with urn:inet:paragraph.com:/proto/*
#can be found relative to this file in a directory "proto"
urn:inet:paragraph.com:/proto/* /proto/*
#This rule specifies a subsiduary index file to look in
urn:inet:paragraph.com:/textures/* @/distn2/textures/index.urn
#This rule acts as a default, sending all URN's from paragraph.com to the library on
#their WWW site.
urn:inet:paragraph.com:* http://www.paragraph.com/library/*
The semi-formal BNF for this file is
File | ::= | Header Lines |
Header | ::= | "URN1.0" |
Lines | ::= | Line | Line Line |
Line | ::= | LineEnd | Production |
LineEnd | ::= | [Comment] CRLF |
Production | ::= | Pattern Blanks Results LineEnd |
Results | ::= | Result | Result "," Results |
Pattern | ::= | URI | PartialPattern |
PartialPattern | ::= | URIStart "*" |
Result | ::= | URISpecifier | PartialResult | Directory |
# Replace the "*" with the "*" part of the Pattern and return the file. | ||
PartialResult | ::= | UrlString "*" |
# Specifies a local or remote file to look for a sub-index. | ||
Directory | ::= | "@" URISpecifier |
# Any valid URN or absolute URL or relative URL for the file to return. | ||
URISpecifier | ::= | URI |
# Any valid beginning for a URN or absolute URL | ||
URIStart | ::= | UrlString |
# Any valid URN or absolute URL | ||
URI | ::= | UrlString |
UrlString | ::= | String using URL encoding as in RFC1738 |
Comment | ::= | "#" UTF8 |
CRLF | ::= | CR | LF |
UTF8 | ::= | Any UTF8 character except CR or LF |
Blanks | ::= | Blank | Blank Blanks |
Blank | ::= | Tab | Space |
URN resolution will probably not be standardized until late '97, but it is expected that implementations may appear before then. Until URN deploymen is widespread, URN's should always appear with a URL where the file can also be found. For example:
EXTERNPROTO Ellipsoid [ field SFVec3f scale ] [ "urn:inet:vrml.org:proto/Ellipsoid", "http://www.vrml.org/proto/Ellipsoid.wrl" ]
Specifies both a URN in order to find a copy quickly, and a URL to be sure to find the file somewhere.
It is not specified here how a Browser will find libraries, for example a Browser might always check the CD-Rom, or there might be .ini file, or a Windows resource that specifies where libraries are loaded.
It is not specified here, or in the VRML2.0 spec, how a browser
should behave when it sees multiple URI's in a Node, it is only
specified that the order of the URI's specifies the order of preference
of the author. Clever browsers might, for example, show a lower
preference texture while a higher preference texture loads, less
clever browsers might not show the lower preference texture until
they have failed to retrieve the higher preference. See the Concepts
section (URL required) for details of this.