Nestable Data Paths in Generic XML and Performance

This online help step-by-step example demonstrates how data paths can affect Generic XML export performance. Data exported as Generic XML first uses the STEPXML format (in an intermediate process) to handle the data before converting it to the final Generic XML format.

Using the data paths option adds additional STEPXML intermediate processing. This additional intermediate processing can result in reduced performance based on the data being processed. The biggest performance impacts come when processing overridden products, large numbers of children under overridden products, and multiple data path mappings in the same export.

Intermediate STEPXML processing and output is not visible to the user in STEP but is included in this online help topic to illustrate the reduced performance when using the data path mapping option.

Mapping without any data path

The following Generic XML template will export 'Product A' by mapping to the target inside the 'ID' element (shown in the bold text below):

Copy
<?xml version='1.0'?>
<STEP-ProductInformation>
<Products>
<?Record?>
  <Product>
    <ID><?Target?></ID>
    <SomeLinkID><?MultiTarget?><?Target?></SomeLinkID>
  </Product>
</Products>
</STEP-ProductInformation>    

The initial processing results in the following intermediate STEPXML output.

The first section of the STEPXML — starting with the '<!-- Configuration:' row through the '-->' row — is the 'recorder file'. The recorder file is a specification of what is included in the export.

For clarity, the STEPXML target data output is in the bold text below.

Note: The intermediate STEPXML is generated by STEP during processing, but is not visible to or accessible by the user.

Copy
<?xml version="1.0" encoding="utf-8"?>
<!-- Configuration:
<STEP-ProductInformation ExportDerivedAttrs="false" ResolveInlineRefs="true">
  <Products ExportSize="Selected">
    <Product>
      <Name/>
      <Product/>
    </Product>
  </Products>
</STEP-ProductInformation>
-->
<STEP-ProductInformation ExportTime="2018-11-30 10:58:39" ExportContext="EN All All" ContextID="EN All All" WorkspaceID="Main" UseContextLocale="false">
  <Products>
    <Product ID="Product A" UserTypeID="Product" ParentID="Product Folder">
    </Product>
  </Products>
</STEP-ProductInformation>    

Finally, the STEPXML is converted to the Generic XML format, as shown below. For clarity, the target data output is in the bold text below.

Copy
<?xml version="1.0" encoding="utf-8"?>
<STEP-ProductInformation>
  <Products>
    <Product>
      <ID>Product A</ID>
    </Product>
  </Products>
</STEP-ProductInformation>    

Mapping with a data path to the target of a reference

Using the same Generic XML template as before, notice that the 'SomeLinkID' element (in the bold text below) is mapped using 'MultiTarget' and 'Target'.

Copy
<?xml version='1.0'?>
<STEP-ProductInformation>
<Products>
<?Record?>
  <Product>
    <ID><?Target?></ID>
    <SomeLinkID><?MultiTarget?><?Target?></SomeLinkID>
  </Product>
</Products>
</STEP-ProductInformation>    

Using a data path, the 'MultiTarget' follows references of type 'Product2Product' to the target node and 'Target' will be the ID of the referenced target node.

The initial processing results in the following intermediate STEPXML output, before the embedded data is expanded.

For clarity, the MultiTarget and Target data output is in the bold text below.

Note: The intermediate STEPXML is generated by STEP during processing, but is not visible to or accessible by the user.

Copy
<?xml version="1.0" encoding="utf-8"?>
<!-- Configuration:
<STEP-ProductInformation ExportDerivedAttrs="false" ResolveInlineRefs="true">
  <Products ExportSize="Referenced">
    <Product>
      <Name/>
      <ProductCrossReference IncludeInheritedReferences="*" Type="Product2Product">
        <Product Referenced="true" Embedded="true">
          <notEmpty/>
          <KeyValue/>
        </Product>
      </ProductCrossReference>
      <Product/>
    </Product>
  </Products>
</STEP-ProductInformation>
-->
<STEP-ProductInformation ExportTime="2018-11-30 11:17:33" ExportContext="EN All All" ContextID="EN All All" WorkspaceID="Main" UseContextLocale="false">

  <Products>
    <Product ID="Product B" UserTypeID="Product" ParentID="Product Folder" Selected="false" Referenced="true" stbEmbedded="true">
    </Product>
    <Product ID="Product A" UserTypeID="Product" ParentID="Product Folder">
        <ProductCrossReference ProductID="Product B" Type="Product2Product" stbEmbed="true"/>
    </Product>
  </Products>
</STEP-ProductInformation>    

Comparing this output recorder file with the example in the previous 'Mapping without any data path' section reveals the following new rows:

Copy
<ProductCrossReference IncludeInheritedReferences="*" Type="Product2Product">
        <Product Referenced="true" Embedded="true">    
  • The first row shows that the export will include the data path mapping target of 'Product2Product' product cross reference type.
  • The second row shows the 'Embedded' attribute on the product element, which specifies that the target of the references should be embedded under the cross references. The intermediate STEPXML format marks the cross reference with: stbEmbed="true"

After the initial intermediate processing is complete, the intermediate STEPXML is processed again, and the elements marked for embedding are expanded. In the STEPXML below, the target 'Product B' (in the bold text) is now inserted into the cross reference element:

Copy
<STEP-ProductInformation ExportTime="2018-11-30 10:31:02" ExportContext="EN All All" ContextID="EN All All" WorkspaceID="Main" UseContextLocale="false">
  <Products>
    <Product ID="Product B" UserTypeID="Product" ParentID="Product Folder" Selected="false" Referenced="true">
    </Product>
    <Product ID="Product A" UserTypeID="Product" ParentID="Product Folder">
        <ProductCrossReference ProductID="Product B" Type="Product2Product">
<Product ID="Product B" UserTypeID="Product" ParentID="Product Folder">
     </Product>
</ProductCrossReference>
    </Product>
  </Products>
</STEP-ProductInformation><Product ID="Product B" UserTypeID="Product" ParentID="Product Folder" Selected="false" Referenced="true">/Product>    

The final processing is the conversion to the Generic XML format shown below, where the target 'Product B' (in the bold text) is in the cross reference element.

Copy
<?xml version="1.0" encoding="utf-8"?>
<STEP-ProductInformation>
  <Products>
    <Product>
      <ID>Product A</ID>
      <SomeLinkID>Product B</SomeLinkID>
    </Product>
  </Products>
</STEP-ProductInformation>    

Using a data path with 'Override Sub Product'

The same Generic XML template as used again, but in this data, 'Product A' is a product-override with five (5) children. The 'ID' element is mapped to Target and 'SomeLinkID' is mapped via the 'MultiTarget' using a data path of type 'Override Sub Product'.

Copy
<?xml version='1.0'?>
<STEP-ProductInformation>
<Products>
<?Record?>
  <Product>
    <ID><?Target?></ID>
    <SomeLinkID><?MultiTarget?><?Target?></SomeLinkID>
  </Product>
</Products>
</STEP-ProductInformation>    

The initial processing results in the following intermediate STEPXML output.

Note: The intermediate STEPXML is generated by STEP during processing, but is not visible to or accessible by the user.

Copy
<STEP-ProductInformation ExportTime="2018-11-30 14:11:11" ExportContext="EN All All" ContextID="EN All All" WorkspaceID="Main" UseContextLocale="false">
  <Products>
    <Product ID="Product A" UserTypeID="std.AdaptorType" OverridesProductID="Product Folder X" ParentID="122246">
      <OverrideSubProduct ProductID="Product 1"/>
      <OverrideSubProduct ProductID="Product 2"/>
      <OverrideSubProduct ProductID="Product 3"/>
      <OverrideSubProduct ProductID="Product 4"/>
      <OverrideSubProduct ProductID="Product 5"/>
    </Product>
    <Product ID="Product 1" UserTypeID="Product" ParentID="Product Folder" Selected="false" Referenced="true" stbEmbedded="true">
    </Product>
    <Product ID="Product 2" UserTypeID="Product" ParentID="Product Folder" Selected="false" Referenced="true" stbEmbedded="true">
    </Product>
    <Product ID="Product 3" UserTypeID="Product" ParentID="Product Folder" Selected="false" Referenced="true" stbEmbedded="true">
    </Product>
    <Product ID="Product 4" UserTypeID="Product" ParentID="Product Folder" Selected="false" Referenced="true" stbEmbedded="true">
    </Product>
    <Product ID="Product 5" UserTypeID="Product" ParentID="Product Folder" Selected="false" Referenced="true" stbEmbedded="true">
    </Product>
  </Products>
</STEP-ProductInformation>    

The 'stbEmbedded' is marked for each of the child products.

After the initial intermediate processing is complete, the intermediate STEPXML is processed again, and the elements marked for embedding are expanded, as shown below.

Copy
<STEP-ProductInformation ExportTime="2018-11-30 14:11:11" ExportContext="EN All All" ContextID="EN All All" WorkspaceID="Main" UseContextLocale="false">
  <Products>
    <Product ID="Product A" UserTypeID="std.AdaptorType" OverridesProductID="Product Folder X" ParentID="122246">
      <OverrideSubProduct ProductID="Product 1">
         <Product ID="Product 1" UserTypeID="Product" ParentID="Product Folder">
       </Product>
    </OverrideSubProduct>
      <OverrideSubProduct ProductID="Product 2">
         <Product ID="Product 2" UserTypeID="Product" ParentID="Product Folder">
       </Product>
    </OverrideSubProduct>
      <OverrideSubProduct ProductID="Product 3">
         <Product ID="Product 3" UserTypeID="Product" ParentID="Product Folder">
       </Product>
    </OverrideSubProduct>
      <OverrideSubProduct ProductID="Product 4">
         <Product ID="Product 4" UserTypeID="Product" ParentID="Product Folder">
       </Product>
    </OverrideSubProduct>
      <OverrideSubProduct ProductID="Product 5">
         <Product ID="Product 5" UserTypeID="Product" ParentID="Product Folder">
       </Product>
    </OverrideSubProduct>
    <Product ID="Product 1" UserTypeID="Product" ParentID="Product Folder X" Selected="false" Referenced="true">
    </Product>
    <Product ID="Product 2" UserTypeID="Product" ParentID="Product Folder X" Selected="false" Referenced="true">
    </Product>
    <Product ID="Product 3" UserTypeID="Product" ParentID="Product Folder X" Selected="false" Referenced="true">
    </Product>
    <Product ID="Product 4" UserTypeID="Product" ParentID="Product Folder X" Selected="false" Referenced="true">
    </Product>
    <Product ID="Product 5" UserTypeID="Product" ParentID="Product Folder X" Selected="false" Referenced="true">
    </Product>
  </Products>
</STEP-ProductInformation>    

The final processing is the conversion to the Generic XML format shown below. Notice that using a data path with 'Override Sub Product' causes the substitutions for each child in the override.

Copy
<?xml version="1.0" encoding="utf-8"?>
<STEP-ProductInformation>
  <Products>
    <Product>
      <ID>122251</ID>
      <SomeLinkID>Product B</SomeLinkID>
      <SomeLinkID>Product 1554</SomeLinkID>
      <SomeLinkID>Product 1317</SomeLinkID>
      <SomeLinkID>1106</SomeLinkID>
      <SomeLinkID>1109</SomeLinkID>
      <SomeLinkID>1018</SomeLinkID>
      <SomeLinkID>1055</SomeLinkID>
      <SomeLinkID>Product 1347</SomeLinkID>
    </Product>
  </Products>
</STEP-ProductInformation>