The Resource Locator object represents a general access path to any kind of resource in the same way as a URL (Uniform Resource Locator) in the Web environment. It is used to get access to certain file-based resources such as audio, video, grammar, or script files. It defines a physical file location and the corresponding URL for this location. Various objects, including e.g. Audio, Video, Grammar, and Plug-In, use Resource Locator objects to access certain files.
The Object Definition below covers the configuration of the Resource Locator object with VoiceObjects Desktop. For information on how to define this object type using VoiceObjectsXML refer to the VoiceObjectsXML Definition paragraph.
The Resource Locator object belongs to the object category Resources.
The Definition of the Resource Locator object provides one section:
· Declaration
To denote the physical path for browsing and the corresponding URL (Uniform Resource Locator) for dialog processing.

For information regarding the Properties section refer to Properties in this Object Reference.
The Declaration section denotes the physical path to the resources, the corresponding URL, and a base locator.
In the Physical path field, the location within the file system is specified where the targeted files are located, e.g.:
\\MyServer\MyVoiceApplication\MyFiles\
The definition of the physical path is optional; this information is mainly used if the user wants to browse for files in VoiceObjects Desktop at development time. In the Recording object, the physical path defines the location of the recorded audio or video files. It can thus be dynamically specified at call time by using a Variable, Expression, Script or Layer object instead of a constant declaration.
In the URL field, the published context of the corresponding Web server is specified, e.g.:
http://MyWebServer/MyVoiceApplication/MyFiles/
The definition of the URL is required because it is included in the dynamically generated markup documents (e.g. into VoiceXML documents) by the server at call time. The URL can be defined as a combination of text, Variable, Expression, Script, and Layer objects. Variable, Expression, Script and Layer objects are displayed in square brackets with prefix “V:”, “E:”, “X:”, and “L:” respectively.

Object references are typically used within the URL for multi-lingual or multi-persona applications, where the different audio files are stored in separate locations on a resource server. By switching the content or state of the corresponding Variable, Expression, Script, or Layer object, the correct audio file is played at call time.
For more information on using dynamic resource locators of this kind see Chapter 7 – How To Use Layers in the Design Guide.
8 Caution: Be careful when using Script objects within resource locators. As the script code needs to be evaluated every time the Resource Locator object is used, this may have a severely negative impact on performance.
i8 Note: Depending on the operating system, the physical path and the URL definition may not allow blanks or other special characters.
In the Base Locator field, a parent Resource Locator object may optionally be specified. Both the physical path and the URL defined in this parent Resource Locator object are prepended to the respective entries in the current Resource Locator object. Base Resource Locator objects can be stacked in any number of levels, thus providing a convenient mechanism to operate relative to certain base paths.
8 Caution: Do not use a Resource Locator object as its own base locator. This will lead to infinite loops and prevent your application from being deployed to VoiceObjects Server.
When the check box Allow service overwrite is selected, the definition made in the corresponding Service object overwrites the local definitions of the resource locator. This is useful in particular for base locators, as their definition might change when migrating from a prototype to a production deployment. Defining it in the Service object allows you to make the change independent of the project itself. For more information on the Service definition see Chapter 2 – Configuring Servers and Services in the Deployment Guide.
When working with Voxeo Evolution you have the option of uploading resources such as audio and grammar files to Voxeo web hosting. Visit the Files, Logs, Reports section of your Evolution account for more details.
Once you have uploaded a file, it is accessible through a URL of the format http://webhosting.voxeo.net/{user ID}/www/... The exact URL is shown for each file:

To access hosted files within your application it is recommended to create a Base Locator that models this URL.
The Resource Locator object is represented by the VoiceObjectsXML element <resourceLocator>. It has three attributes and one group of children.
In addition, the element has the standard attributes described in the XDK Guide.
· base
Defines the base locator. Must be a reference to a Resource Locator object.
· physicalPath
Text string that defines the physical path used for file browsing (only relevant in VoiceObjects Desktop) or to store a recorded audio file. All paths should use forward slashes.
· allowServiceOverwrite
Either true or false. Indicates whether physical path and URL may be overwritten by defaults defined in the Service object. If not specified, defaults to false.
· +(<variable>, <expression>, <script>, <text>, <layer>)
Defines the URL from which to fetch the resource.
<resourceLocator physicalPath=”C:” allowServiceOverwrite=”true”>
<text> http://127.0.0.1:7077/</text>
<variable link=”#Basepath”/>
<text>/</text>
<variable link=”#System:Language”/>
<text>/</text>
</resourceLocator>
The following table contains all object types that can reference a Resource Locator object:
|
Icon |
Object Name |
Use Case Example |
|
|
A Resource Locator object can be referenced within an Audio object. |
|
|
|
A Resource Locator object can be referenced within an Video object. |
|
|
|
A Resource Locator object can be referenced within a Format object. |
|
|
|
A Resource Locator object can be referenced within each Grammar item in a Grammar object. |
|
|
|
A Resource Locator object can be referenced within each connector item in a Connector object. |
|
|
|
A Resource Locator object can be referenced within a Script object. |
|
|
|
A Resource Locator object can be referenced within a Plug-In object. |
|
|
|
Resource Locator |
A Resource Locator object can be referenced within another Resource Locator object as a parent locator. |
|
|
A Resource Locator object can be referenced within a Recording object. |
|
|
|
A Resource Locator object can be referenced within the parameter set of any OSDM object. |
In order to leverage the capabilities of the integrated documentation of VoiceObjects it is important to provide intuitive and self-explanatory object names and descriptions.
The name of a Resource Locator object should indicate which types of resources it is used for. The table below lists three examples:
|
Name |
Description |
|
|
Base Resource Locator object providing the initial path (parent) for all other Resource Locator objects. |
|
|
Resource Locator object for grammar files. |
|
|
Resource Locator object indicating the location of the recorded claim descriptions. |