sarinfo.xml 範例

每一個商店紀錄必須皆有一個 sarinfo.xml 檔。此檔案(亦稱為描述子)含有當公佈商店紀錄時所用的商店紀錄資訊, 包括:檔案資產 ZIP 檔名稱、商店資料庫 XML 檔名稱以及所公佈之商店紀錄的訂單。如果商店紀錄中含有採用多國語言的檔案,則 sarinfo.xml 檔中亦包含該資訊,並會判斷所公佈之每一種語言檔的訂單。

附註:如果您新增、移除或變更商店紀錄中的檔案次序,您必須以這些變更來更新 sarinfo.xml 檔。

以下是時尚館的 sarinfo.xml 檔。 有關元素、屬性與屬性值的詳細資訊,請在下列選取對應的超鏈結。如果需要有關商店紀錄的 XML 規格資訊,請參閱位於下列目錄中的 sarinfo.dtd


drive:\Program Files\WebSphere\CommerceServer\xml\sar
drive:\WebSphere\CommerceServer\xml\sar
/usr/WebSphere/CommerceServer/xml/sar
/opt/WebSphere/CommerceServer/xml/sar
/QIBM/ProdData/WebCommerce/xml/sar

<?xml version="1.0"?>
<!DOCTYPE sarinfo SYSTEM "sarinfo.dtd"><sarinfo complete-store="yes" multi-language="yes" version="1.0">
<store-info asset-name="store"/>
<asset fragmented="no" name="webapp">
<file name="webapp.zip" type="zip">
<display-name>My Web App Display Name</display-name>
<description>My Web App</description>
</file>
</asset>
<asset fragmented="no" name="properties">
<file name="properties.zip" type="zip" />
</asset>
<asset fragmented="no" name="dbloadmacros">
<file name="data/DBLoadMacros.dtd" type="dtd"/>
</asset>
<asset fragmented="no" name="fulfillment">
<file name="data/fulfillment.dtd" type="dtd"/>
<file name="data/fulfillment.xml" priority="1"
    type="db-load"/></asset>
<asset fragmented="yes" name="store">
<file name="data/store.dtd" type="dtd"/>
<file name="data/store.xml" priority="2" type="db-load"/>
<file name="data/en_US/store.xml" priority="3" type="db-load">
<locale>en_US</locale>
</file>
<file name="data/de_DE/store.xml" priority="3" type="db-load">
<locale>de_DE</locale>
</file>
</asset>
<asset fragmented="yes" name="catalog">
<file name="data/catalog.dtd" type="dtd"/>
<file name="data/catalog.xml" priority="4" type="db-load"/>

<file name="data/en_US/catalog.xml" priority="5" type="db-load">
<locale>en_US</locale>
</file>
<file name="data/de_DE/catalog.xml" priority="5" type="db-load">
<locale>de_DE</locale>
</file>
</asset>
<asset fragmented="yes" name="tax">
<file name="data/tax.dtd" type="dtd"/>
<file name="data/tax.xml" priority="6" type="db-load"/>
<file name="data/en_US/tax.xml" priority="7" type="db-load">
<locale>en_US</locale>
</file>
<file name="data/de_DE/tax.xml" priority="7" type="db-load">
<locale>de_DE</locale>
</file>
</asset>
<asset fragmented="no" name="taxfulfill">
<file name="data/taxfulfill.dtd" type="dtd"/>
<file name="data/taxfulfill.xml" priority="8" type="db-load"/>
</asset>
<asset fragmented="yes" name="shipping">
<file name="data/shipping.dtd" type="dtd"/>
<file name="data/shipping.xml" priority="9" type="db-load"/>
<file name="data/en_US/shipping.xml" priority="10" type="db-load">
<locale>en_US</locale>
</file>
<file name="data/de_DE/shipping.xml" priority="10" type="db-load">
<locale>de_DE</locale>
</file>
</asset>
<asset fragmented="no" name="shippingfulfill">
<file name="data/shipfulfill.dtd" type="dtd"/>
<file name="data/shipfulfill.xml" priority="11" type="db-load"/>
</asset>
<asset fragmented="no" name="store-catalog">
<file name="data/store-catalog.dtd" type="dtd"/>
<file name="data/store-catalog.xml" priority="12" type="db-load"/>
</asset>
<asset fragmented="no" name="storefulfill">
<file name="data/storefulfill.dtd" type="dtd"/>
<file name="data/storefulfill.xml" priority="13" type="db-load"/>
</asset>
<asset fragmented="yes" name="offering">
<file name="data/offering.dtd" type="dtd"/>
<file name="data/offering.xml" priority="14" type="db-load"/>
<!--
<file name="data/en_US/offering.xml" priority="15" type="db-load">
<locale>en_US</locale>
</file>

<file name="data/de_DE/offering.xml" priority="15" type="db-load">
<locale>Ja_JP</locale>
</file>
-->
</asset>
<asset fragmented="no" name="command">
<file name="data/command.dtd" type="dtd"/>
<file name="data/command.xml" priority="16" type="db-load"/>
</asset>
<asset fragmented="yes" name="currency">
<file name="data/currency.dtd" type="dtd"/>
<file name="data/currency.xml" priority="17" type="db-load"/>
<file name="data/en_US/currency.xml" priority="18" type="db-load">
<locale>en_US</locale>
</file>
<file name="data/de_DE/currency.xml" priority="18" type="db-load">
<locale>de_DE</locale>
</file>
</asset>
<asset fragmented="yes" name="campaign">
<file name="data/campaign.dtd" type="db-load">
<file name="data/campaign.xml" priority="20" type="db-load"/>
<file name="data/en_US/campaign.xml" priority="24" type="db-load">
<locale>en_US</locale>
</file>
<file name="data/de_DE/campaign.xml" priority="24" type="db-load">
<locale>de_DE</locale>
</file>
</asset>
<asset fragmented="no" name="store-catalog-tax">
<file name="data/store-catalog-tax.dtd" type="dtd"/>
<file name="data/store-catalog-tax.xml" priority="21" type="db-load"/>
</asset>
<asset fragmented="no" name="store-catalog-shipping">
<file name="data/store-catalog-shipping.dtd" type="dtd"/>
<file name="data/store-catalog-shipping.xml" priority="22" type="db-load"/>
</asset>
<asset fragmented="no" name="store-defaults">
<file name="data/store-defaults.dtd" type="dtd"/>
<file name="data/store-defaults.xml" priority="22" type="db-load"/>


<asset fragmented="no" name="consistency_check">
<file name="data/sarrule.dtd" type="dtd"/>
<file name="data/sarrule.xml" priority="21" type="config"/>
</asset>
<asset fragmented="no" name="payment">
<file name="data/de_DE/paymentinfo.xml" type="config"/>
<file name="data/paymentinfo.dtd" type="dtd"/>
</asset>
<asset fragmented="yes" name="policy">
<file name="data/businesspolicy.dtd" type="dtd"/>
<file name="data/businesspolicy.xml" priority="26" type="db-load"/>
<file name="data/en_US/businesspolicy.xml" priority="27" type="db-load">
<locale>en_US</locale>
</file>
<file name="data/de_DE/businesspolicy.xml" priority="27" type="db-load">
<locale>de_DE</locale>
</file>
</asset>
<asset fragmented="no" name="contract">
	<file name="data/contract.xml" type="xml"/>
</asset>
<asset fragmented="yes" name="accesscontrol">
<file name="data/accesscontrol.dtd" type="dtd"/>
<file name="data/accesscontrol.xml" priority="28" type="db-load"/>
<file name="data/en_US/accesscontrol.xml" priority="29" type="db-load">
<locale>en_US</locale>
</file>
<file name="data/de_DE/accesscontrol.xml" priority="29" type="db-load">
<locale>de_DE</locale>
</file>
</asset>
<!-- next priority should be 30 -->
</sarinfo>

sarinfo 

sarinfo.xml 檔中的所有資訊都包含在 sarinfo 區段中。 下圖中的屬性含有商店紀錄的一般資訊。
屬性名稱 屬性值
multi language(必要) 判斷此商店紀錄中是否支援多語言:
yes
no
complete-store(必要) 判斷商店紀錄是否含有完整商店所需的資產:
yes
no
version 商店紀錄的版本。比方說:
1.0
1.1
display-name 商店紀錄的名稱
description 商店紀錄的簡短說明
WCS-info version(必要) 商店紀錄所用的 WCS 版本。例如 5.1
standard-schema(必要) 商店紀錄是否遵循標準 WCS 資料庫綱目:
yes
no
store-info asset-name(必要) 作為商店紀錄之錨點的資產。商店的所有資訊可在隸屬於此資產的檔案中找到。 比方說:
商店
locale 商店紀錄所支援的語言環境。語言環境變數(如下文所列)由語言和國家/地區組成。

de_DE
en_US
es_ES
fr_FR
it_IT
ja_JP
ko_KR
pt_BR
zh_CN
zh_TW

asset(必要)

資產為相關檔案的邏輯集合。 比方說,稅金是商店稅金相關檔案群組的名稱。

屬性名稱 屬性值
name(必要) 資產類型的名稱。比方說:
Web 資產
商店
型錄
付款
稅金 
fragmented(必要) 決定要不要依照語言來將資產資訊分成多個檔案:
yes
no

file 

屬性名稱 屬性值
name(必要) 檔案名稱
type(必要) 檔案格式的類型。比方說:
.xml - 要載入到資料庫中的檔案
.dtd - 文件類型定義檔
.zip - 檔案資產的 ZIP 檔,例如 webapp.zip
priority 商店紀錄中之檔案的公佈順序。

1,2,3,4 . . .

display-name 檔案名稱
description 參考說明
locale 語言環境。語言環境變數(如下文所列)由語言和國家/地區組成。

de_DE
en_US
es_ES
fr_FR
it_IT
ja_JP
ko_KR
pt_BR
zh_CN
zh_TW

 
相關概念

相關作業

相關參照

IBM copyright