Customizer's Guide > Working with ActiveX Controls > Integrating Arbortext Editor with Web Pages > Processing Query Strings
  
Processing Query Strings
The arbortext-editor and arbortext-editor-embed protocols enable you to add an optional query string to the URI. Following is an example of a URI with the query string:
arbortext-editor:x-wc%3A%2F%2Ffile%3D1234.xml?workspace=ws1&hosturl=http%3A%2F%2Fpjl%2FWindchill
In this example, there are two query parameters: workspace and hosturl. Their decoded values are ws1 and http://pjl/Windchill.
These query string parameters enable the link to specify potentially useful metadata about the link. This metadata can be accessed inside of an ACL editbeforehook hook function. When one of these links are selected in a web browser, all of the functions in the editbeforehook are called before the document is actually opened. This gives the hook function a chance to do any special processing before the document opens.
For example, following is an HTML link containing some query strings that opens a Arbortext Editor session:
<a href="arbortext-editor:http%3A%2F%2Fserver%2Fpath%2Ffile.xml?hint1=food&hint2=M%26Ms">
click here
</a>
This links opens the http://server/path/file.xml document and includes the hints food and M&Ms as query strings. Assume the following hook code is sourced:
package metadata;

function my_edit_before_hook(path)
{
local hint1 = get_custom_property('com.ptc.arbortext.launcher.temp.hint1');
local hint2 = get_custom_property('com.ptc.arbortext.launcher.temp.hint2');

response("Path=$path\n\nhint1=$hint1\n\nhint2=$hint2");

# returning -1 will cancel the edit
}

add_hook('editbeforehook', package_name().'::my_edit_before_hook');
In this case, when the link is selected in the web browser, the response dialog box displays both the decoded http path to the file and the hint1 and hint2 metadata that was in the original HTML link.