Deployment Kit Information > Developing a Compact Installation > Developing the Deploy Directory > The site Directory
  
The site Directory
The site directory in the Deploy Directory enables you to have centralized control over how Arbortext Editor is customized and configured for your users. This directory initially contains just the siteprefs.xml configuration file, but you can add additional files that are referenced from the siteprefs.xml file. For example, if you have a custom directory for your site you can make a zip archive of that directory and store it in the site directory. An example site directory is included in the Arbortext Editor deployment kit in the site_sample directory.
Note that any preferences or other configuration settings you include in the siteprefs.xml file will override the same settings users have on their systems. You should only include configuration information in this file that applies to all of the users at your site.
Unlike the release directory, Arbortext Editor checks the contents of the site directory every time a user starts up the compact version of Arbortext Editor. If you need to change your Arbortext Editor configuration, for example if you change license or Arbortext Publishing Engine servers, you just need to update the contents of your centralized site directory and that change is automatically passed along to all of the compact installations that are associated with the Deploy Directory.
If your network is not available to a user for some reason, that user can still use the compact installation of Arbortext Editor. Arbortext Editor stores local versions of the files in the site directory in its cache directory (.aptcache) and will use the locally cached files if the Deploy Directory is not available. However, that user might not have the latest versions of these files if you updated the site directory since the last time that user worked with Arbortext Editor while connected to the network. The local version of the siteprefs.xml file is stored in the .aptcache\site directory. That user will get the latest updates to the site directory the next time the user starts up Arbortext Editor while connected to the network.
To set up the centralized configuration and customization information for your compact installation, you must edit the relevant parts of the siteprefs.xml file. It is recommended that you use Arbortext Editor to edit the file. If you edit the file in a text editor or other editor that does not provide XML validation, you might introduce XML errors into the file. Note that when checking the contents of the site directory at startup, Arbortext Editor will not process the parts of a siteprefs.xml file that contain XML errors.
Following is the default siteprefs.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<!--PTC Inc., 1988-2013, v.4002-->
<SiteConfiguration xmlns="http://www.arbortext.com/namespace/doctypes/scf">

<!--This file contains site-wide customizations.
For complete details, see the documentation that comes with the
Arbortext Editor Deployment Kit.

Generally, a 'path' attribute value is the name of a file that resides
in the same directory as this .xml file. However, if needed, a full
network file system or HTTP path to an external resource can be specified.-->

<ZippedCustomizations>
<!--This section can cite zero or more zipped customizations.
These are generally zipped 'custom' directories containing desired
site-wide customizations.
-->
<ZipFile path=""/>
</ZippedCustomizations>

<LibraryFiles>
<!--This section can cite zero or more library files.
These are generally used to customize Applications and Adapters supplied
by Arbortext. In some cases, a library file requires that a certain
GlobalParameter (see below) also be specified.-->
<LibFile path=""/>
</LibraryFiles>

<Preferences>
<!--This section can specify zero or more Arbortext Editor
preference options. Be very selective about which options are
specified here because they override an end-user's own option
setting.

Typically the 'peservices' and 'peserverurl' options are set here
to inform Arbortext Editor to perform composition services via a
particular Arbortext Publishing Engine server.-->
<Option name="" value=""/>
</Preferences>

<EnvironmentVariables>
<!--This section can specify zero or more environment variables.
Any cited variable will be set in the Arbortext Editor process early
during startup.

Typically this is used to set a value for the 'PTC_D_LICENSE_FILE'
environment variable which specifies one or more license sources from
which Arbortext Editor can obtain a license.-->
<Variable name="" value=""/>
</EnvironmentVariables>

<GlobalParameters>
<!--This section can specify zero or more global parameter settings.
These settings are normally used to configure Arbortext Editor Applications
and Adapters.

As an example, this could be used to specify the list of host servers that
an Arbortext Editor adapter should present to the end-user when they try to
establish a session using that adapter.-->
<Parameter>
<ParameterName></ParameterName>
<ParameterValue></ParameterValue>
</Parameter>
</GlobalParameters>

</SiteConfiguration>
The siteprefs.xml file is divided into the following areas:
Zipped customizations
Library files
Preferences
Environment variables
Global parameters
Zipped Customizations
The following section of the siteprefs.xml file is where you add zipped customizations:
<ZippedCustomizations>
<!--This section can cite zero or more zipped customizations.
These are generally zipped 'custom' directories containing desired
site-wide customizations.
-->
<ZipFile path=""/>
</ZippedCustomizations>
You can add a zipped custom directory, application directory, or adapter directory to this part of the file. If you enter a relative path in the ZipFile tag’s path attribute, the path is relative to the site directory. You can also specify a full network file system path or HTTP path to the zip file. At startup, Arbortext Editor checks whether an updated version of a zipped customization is available. If an updated version is available, it is unzipped to the local system in the .aptcache\zc directory.
Note that you cannot include the following font configuration files in the lib subdirectory of a zipped custom directory:
charent.cf
wcharent.cf
wfontsub.cf
charmap.cf
These files are processed before a zipped custom directory when Arbortext Editor starts up, so the files cannot be processed when deployed in this way.
Following is an example of how this section of the file appears when edited in Arbortext Editor:
This graphic shows zipped customizations section of the siteprefs.xml file.
For more information on zipped customizations, refer to the Deploying zipped customizations help topic in the Customizer's Guide PDF.
Library Files
The following section of the siteprefs.xml file is where you add library files:
<LibraryFiles>
<!--This section can cite zero or more library files.
These are generally used to customize Applications and Adapters supplied
by Arbortext. In some cases, a library file requires that a certain
GlobalParameter (see below) also be specified.-->
<LibFile path=""/>
</LibraryFiles>
You can add library files to this section that customize or configure adapters or applications. You can also add any file that can be placed in the top level of a custom\lib directory. If you enter a relative path in the LibFile tag’s path attribute, the path is relative to the site directory. You can also specify a full network file system path or HTTP path to the zip file. At startup, Arbortext Editor checks whether an updated version of a library file is available. If an updated version is available, it is stored on the local system in the .aptcache\site\lib directory.
The LibFile tag also has a base attribute. This attribute enables you to supply the base name for a library file in cases where the path does not contain the file name. For example, you might be using a script to download a library file that references the file by an ID value instead of the file name. In this case, you can use the base attribute to supply the file name, as follows:
<LibraryFiles>
<LibFile path="http://server/cgi/download.pl?docId=325607" base="aptifscfg.xml"/>
</LibraryFiles>
Note that you cannot include the following font configuration files in the LibraryFiles section of a Deploy Directory’s siteprefs.xml file:
charent.cf
wcharent.cf
wfontsub.cf
charmap.cf
These files are processed before a Deploy Directory when Arbortext Editor starts up, so the files cannot be processed when deployed in this way.
Following is an example of how this section of the file appears when edited in Arbortext Editor:
This graphic shows library files section of the siteprefs.xml file.
Preferences
The following section of the siteprefs.xml file is where you set preferences:
<Preferences>
<!--This section can specify zero or more Arbortext Editor
preference options. Be very selective about which options are
specified here because they override an end-user's own option
setting.

Typically the 'peservices' and 'peserverurl' options are set here
to inform Arbortext Editor to perform composition services via a
particular Arbortext Publishing Engine server.-->
<Option name="" value=""/>
</Preferences>
You can set the value for any set command option. Enter the name of the option in the Option tag’s name attribute and the value in the value attribute.
Note that any preferences you include in the siteprefs.xml file will override the same settings users have on their systems. You should only include preferences in this file that apply to all of the users at your site. A typical use for this section is to set the preferences for Arbortext Publishing Engine. For any preference that has a path in its value, you can use a special %S character in the path to represent the .aptcache\site\lib directory. This enables you to reference a local library file if needed.
Following is an example of how this section of the file appears when edited in Arbortext Editor:
This graphic shows preferences section of the siteprefs.xml file.
Environment Variables
The following section of the siteprefs.xml file is where you set environment variables:
<EnvironmentVariables>
<!--This section can specify zero or more environment variables.
Any cited variable will be set in the Arbortext Editor process early
during startup.

Typically this is used to set a value for the 'PTC_D_LICENSE_FILE'
environment variable which specifies one or more license sources from
which Arbortext Editor can obtain a license.-->
<Variable name="" value=""/>
</EnvironmentVariables>
You can set the value for any Arbortext Editor environment variable. Enter the name of the variable in the Variable tag’s name attribute and the value in the value attribute.
Note that any environment variables you include in the siteprefs.xml file will override the same settings users have on their systems. You should only include variables in this file that apply to all of the users at your site. A typical use for this section is to set the floating license server.
For any variable that has a path in its value, you can use a special %S character in the path to represent the .aptcache\site\lib directory. For any variable that needs to reference the value of another environment variable, you can use the syntax $(envar) to reference that value. For example, if you want to reference the value of the USERPROFILE environment variable, you would include $(USERPROFILE) as part of the value attribute.
Global Parameters
The following section of the siteprefs.xml file is where you set global parameters:
<GlobalParameters>
<!--This section can specify zero or more global parameter settings.
These settings are normally used to configure Arbortext Editor Applications
and Adapters.

As an example, this could be used to specify the list of host servers that
an Arbortext Editor adapter should present to the end-user when they try to
establish a session using that adapter.-->
<Parameter>
<ParameterName></ParameterName>
<ParameterValue></ParameterValue>
</Parameter>
</GlobalParameters>
This section of the file enables you to set the global parameters for an Arbortext Editor application or CMS adapter. Each application has an application.xml configuration file. Similarly, each CMS adapter has a cms_adapters.xml configuration file. Each of these files has a section where you can set global parameters for that application or adapter. This enables you to manage those parameters in a central location for all users. Refer to the Content Management Guide for more information about the global parameters for the CMS adapters.
The global parameters section contains a series of Parameter tags. Each Parameter tag contains a ParameterName tag and one or more ParameterValue tags. Enter the name of the application or adapter in the ParameterName tag with the name of the parameter appended to the tag. For example, to set the HostList parameter for the PTC Server connection (com.ptc.prowt.arbortext) you would enter com.ptc.prowt.arbortext.HostList in the ParameterName tag. Enter the value(s) in one or more ParameterValue tags.
For any value that has a path, you can use a special %S character in the path to represent the .aptcache\site\lib directory. Some application or adapter parameters have library files associated with them that you must include in the library files section of the siteprefs.xml file. For example, the deprecated Arbortext Adapter to Oracle CM SDK had a aptifscfg.xml configuration file that was set in the ConfigFile parameter. If you included aptifscfg.xml in your site directory and referenced that file in the library files section of the siteprefs.xml file, you can use the %S character in the value for this parameter to ensure that the adapter used the configuration file included in your centralized site directory instead of the one in the local Arbortext Editor install tree. For example:
<GlobalParameters>
<Parameter>
<ParameterName>com.ptc.arbortext.adapters.oracle.cmsdk.ConfigFile</ParameterName>
<ParameterValue>%S/aptifscfg.xml</ParameterValue>
</Parameter>
</GlobalParameters>
Following is an example of how this section of the file appears when edited in Arbortext Editor:
This graphic shows global parameters section of the siteprefs.xml file.
This parameter is the list of hosts to which the PTC Server connection can connect.