內容管理 > PTC 伺服器連線 Document Bursting > Configuring Object Location Mappings
  
Configuring Object Location Mappings
In a document-type-specific burst configuration file, the dmslocation element can contain as many locnrule elements as necessary to implement the desired element-to-location or source-type-to-location mappings. Use these elements to configure where your objects should be stored in the PTC Server. Note that you should either an element-to-location or a source-type-to-location mapping in a locnrule element. You cannot use both mappings in the same locnrule element.
Element-to-location mappings map an element name that you've specified as an object boundary to a specific location in a PTC Server. Source-type-to-location mappings map a general source object type (such as graphic or text) to a specific location in the PTC Server.
If user-overrides are enabled, the locnrule elements are ignored in favor of the folder selected by the user.
For an element-to-location mapping, enter a locnrule element with the following attribute settings:
elementname — This is the case-sensitive name of the element you want to map to a location. The name is obtained from the DTD or schema and must match an element name that you've specified as an object boundary.
location — Specifies where the specified elementname objects will be stored in a PTC Server. The path inside of the PTC Server should be delimited by front slashes (/). You can set a path relative to the current product and context by leaving the initial front slash off of the path, for example: XML/Documents. Note that the specified path is relative to the default folder of the product a user enters into the Connect dialog box. If you use relative paths, make sure that those paths exist in any product and context a user can access. If the user has authorization to check objects into a specific product or library, you can use an initial front slash on the path to designate a full path to that location, for example: /Documentation/XML/Documents. For PTC Servers running releases prior to 10.0 F000, the specified location must exist in the PTC Server, as Arbortext Editor and Arbortext Publishing Engine will not create it for you. PTC Servers running release 10.0 F000 or later will create a specified folder in a product or library, but will not create a product or library. The PTC Server cannot create a folder in a site.
expr — Specifies an XPath expression used to determine the PTC Server folder location for burst objects from content in the XML document being burst. Locations specified in the expr attribute have precedence over locations specified in the location attribute. If an error occurs when evaluating an XPath expression, document objects are stored in the default location indicated in the atidefaults.bcf file. Errors are either displayed in a dialog box or written to the burst activity log, if logging is enabled.
See XPath examples below for examples of using the expr attribute.
For a source-type-to-location mapping, enter a locnrule element with the following attribute settings:
sourcetype — This specifies the general type of data you want to map to a location. The only available settings are graphic for graphic objects and text for non-graphic elements.
location — Specifies where the specified sourcetype objects will be stored in a PTC Server. The path inside of the PTC Server should be delimited by front slashes (/). You can set a path relative to the current product and context by leaving the initial front slash off of the path, for example: XML/Documents. Note that the specified path is relative to the default folder of the product a user enters into the Connect dialog box. If you use relative paths, make sure that those paths exist in any product and context a user can access. If the user has authorization to check objects into a specific product or library, you can use an initial front slash on the path to designate a full path to that location, for example: /Documentation/XML/Documents. For PTC Servers running releases prior to 10.0 F000, the specified location must exist in the PTC Server, as Arbortext Editor and Arbortext Publishing Engine will not create it for you. PTC Servers running release 10.0 F000 or later will create a specified folder in a product or library, but will not create a product or library. The PTC Server cannot create a folder in a site.
expr — Specifies an XPath expression used to determine the PTC Server folder location for burst objects from content in the XML document being burst. Locations specified in the expr attribute have precedence over locations specified in the location attribute. If an error occurs when evaluating an XPath expression, document objects are stored in the default location indicated in the atidefaults.bcf file. Errors are either displayed in a dialog box or written to the burst activity log, if logging is enabled.
See XPath examples below for examples of using the expr attribute.
For either mapping, setting location to nothing (that is, "") will place the objects in the home folder of the product and context associated with the active workspace.
One of the things you can do with the expr attribute is to assign locations based on element attributes in the document being burst by setting an appropriate XPath expression. Alternatively, you can assign locations based on element attributes using an AOM customization. See the sample files in the Arbortext-path\adapters\com.ptc.prowt.arbortext\samples directory for more information.
If the dmslocation content does not include a locnrule element for one or both source types, the PTC 伺服器連線 will use the location rules for the unspecified source type from the system-wide burst configuration (that is, the atidefaults.bcf file). Document objects will use the dmslocation element. Graphic objects will use the dmsgraphiclocn element.
* 
The dmslocation element's default attribute, used in the atidefaults.bcf file, cannot be used in this file.
XPath Examples
The following examples demonstrate how you can use XPath expressions in the expr attribute on the locnrule element to control the bursting location on the PTC Server.
This example specifies that for all text objects, the attribute loc contains the folder path, or folder Logical ID. This requires that the attribute loc appears on all non-graphic burst boundaries. As is true for location attribute values, setting the loc attribute to nothing (that is, "") will place the objects in the home folder of the product and context associated with the active workspace.
<dmslocation>
<locnrule sourcetype="text" expr="@loc"/>
</dmslocation>
This example results in research elements being stored in the subfolder specified by the loc attribute. This is because the expr attribute takes precedence over the location attribute.
<dmslocation>
<locnrule elementname="research"
location="/Products/Acme Product/Research" expr="@loc"/>
</dmslocation>
This example demonstrates building a folder path exclusively from dynamic XML content. The path is relative to the home folder of the product or library and context associated with the active workspace.
<dmslocation>
<locnrule elementname="acme_concept"
expr="concat(@id, '/', //title, '/', //subtitle)"/>
</dmslocation>
This example illustrates bursting into a Windchill Service Information Manager Information Structure. It assumes that an Information Structure exists for the product Steering Assembly, and that the document type for the document being burst has a component attribute on the topic element. The attribute’s value must represent an existing Information Group or a nested Information Structure.
<dmslocation>
<locnrule elementname="topic"
expr="concat('/Product/Steering Assembly/ASPS/', @component)"/>
</dmslocation>
This example illustrates bursting into a Windchill Service Information Manager Publication Structure. It assumes that a Publication Structure called Repair Manual exists for the product Steering Assembly. The document type for the document being burst has a component attribute on the topic element. The value of the attribute must represent an existing Publication Section or a nested Publication Structure.
<dmslocation>
<locnrule elementname="topic"
expr="concat('/Product/Steering Assembly/PUBS/Repair Manual/', @component)"/>
</dmslocation>
This only applies to a PTC Server running release 11.1 M020 or later.