XML conventions used in starter store archives

Data in starter store archives takes the form of well-formed, XML files valid for the loading utilities. The store archive XML files are intended to be portable and should not contain generated primary keys that are specific to an instance of the database. Instead, the files use internal-aliases, which are resolved by the idresgen utility at the time of publish. The use of these conventions allows the starter store archives to be copied and published multiple times.

Typically, it is not necessary to use these conventions when you are creating store data for your store in the form of XML files. Use these conventions when you plan to create a starter store archive to use to generate several stores, or when you want to create a store archive that is portable, such as for publishing a store to another WebSphere Commerce instance.

As a result, the starter store archives use the following conventions:

  • @ as in ffmcenter_id="@ffmcenter_id_1". The use of the @ symbol is known as internal-alias resolution. The idresgen utility, which is a loading utility, generates identifiers for XML elements that require them. One of the techniques that the idresgen utility uses is internal-alias resolution. When the utility uses internal-alias resolution, an alias is substituted in place of the primary key (identifier) in the XML document. This alias is then used elsewhere in the XML file to refer to that element. This resolution eliminates the need to know the unique indexes necessary to build the XML file. When you publish a store with the Publish wizard or the PublishStore utility, or when you use the loading utilities, the idresgen utility replaces the @ symbol with a unique value. See the following examples from an XML file:
    • Pre-idresgen utility
      
      <catalog
      catalog_id="@catalog_id"
      identifier="&STORE_IDENTIFIER;"
      member_id="&MEMBER_ID;"
      />
      
    • Post idresgen utility and post XML entity substitution, which replaces the & symbol with the appropriate value from the ForeignKeys.dtd file:
      
      <catalog
      catalog_id="10001"
      member_id="-2000"
      identifer="store_identifier"
      description="store_catalog"
      tpclevel="0"/>
      
    Where
    • 10001 is the unique ID assigned by the idresgen utility.
    • -2000 is the member ID selected by the user.
    • store_identifier is the identifier value, such as Aurora, which is replaced during the XML entity substitution to be the identifier that is defined in the ForeignKeys.dtd file.
    • store_catalog is the description of the catalog for the published store, such as Aurora Catalog.
    The resulting XML file then gets loaded with the loading utilities. Running the files through the idresgen utility ensures that numerous stores can be created from a single set of XML files.