Develop > Persistence layer > Data assets
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 a particular instance of the database. Instead they 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.
It is not necessary to use these conventions when creating store data for the store in the form of XML files, unless you plan to create a starter store archive that will be used to generate several stores, or unless to create a store archive that is portable, that is a store archive that can be published 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 idresgen utility uses is internal-alias resolution. When using 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 eliminates the need to know the unique indexes necessary to build the XML file. During publish using the Publish wizard, PublishStore utility, or using 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
<catalog catalog_id="10001" member_id="-2000" identifer="Consumer Direct" description="Consumer Direct Catalog" tpclevel="0"/>
where 10001 is the unique ID assigned by the idresgen utility and -2000 is the member ID selected by the user. The resulting XML file then gets loaded using the loading utilities. Running the files through the idresgen utility ensures that numerous stores can be created from a single set of XML files.
Related concepts