Loading the attribute dictionary
To use any attribute dictionary data you have created, first load the data into WebSphere Commerce.Before you beginBefore you begin, ensure that Feature Pack 4 is successfully enabled.
About this taskTo load the attribute dictionary:
- Make a backup copy of the existing wcs.dtd file under the following directory:
WCDE_installdir\xml\schema\dtd
- WC_installdir\AppServer\profiles\demo\installedApps\WC_demo_cell\WC_demo.ear\xml\schema\dtd
- Open the wcs.dtd in a text editor.
- Locate component-services.dtd under the following directory; then open it in a text editor:
WCDE_installdir\components\component-services\xml
- WC_installdir\components\component-services\xml
- Copy the following content (in bold) from component-services.xml:
<!ELEMENT import ((attrtype | attr | attrdesc | attrval | attrvaldesc | catentryattr | attrdict | attrdictgrp | attrdictgrpdesc | attrdictgrpattrrel | attrdictgrprel | dmcampaign | dmtemplatetype | dmacttype | dmactivity | dmelementtype | dmeletemplate | dmelement | dmtriglstn | dmelementnvp | dmpage | dmemspotpage | dmemspotord | dmemspotcmd | dmemspotdef | dmexptype | px_promocd | px_promoaudit | px_promoauth | px_description | px_element | px_elementnvp)*)>and merge it with the import element in wcs.dtd:You must add the “|” .
tfalgtypds | tfalregdsc | tfdomain | tfdomdsc | tfexteng | tfsbdomain | tfsbdomdsc | tftradeng | tftrengdsc | tickler | tklacthist | tklractdsc | tklraction | tklrreason | tklrrsndsc | tmpbolist | tmpcmplist | tmpffclist | tmpprocid | tmpradtl | tmprctlist | torcpmap | tradeposcn | trading | transport | trdattach | trddepamt | trddesc | trdpscnxml | trdpuramt | trdrefamt | trdtype | trdtypedsc | txcdclass | txcdscheme | userdemo | userprof | userpvcdev | userpwdhst | userreg | users | usrtraffic | utmerinfo | utregip | vendor | vendordesc | versionspc | wcsdictnry | wcsdtnryds | wcsgbldata | wmmmap | wsalesvw | wtaxinfo | wusrtrvw | attrtype | attr | attrdesc | attrval | attrvaldesc | catentryattr | attrdict | attrdictgrp | attrdictgrpdesc | attrdictgrpattrrel | attrdictgrprel | dmcampaign | dmtemplatetype | dmacttype | dmactivity | dmelementtype | dmeletemplate | dmelement | dmtriglstn | dmelementnvp | dmpage | dmemspotpage | dmemspotord | dmemspotcmd | dmemspotdef | dmexptype | px_promocd | px_promoaudit | px_promoauth | px_description | px_element | px_elementnv)*)>- Copy all the element definitions of the new tables from component-services.xml and paste the element definitions at the end of wcs.dtd:
<!ELEMENT attr EMPTY> <!ATTLIST attr attr_id CDATA #REQUIRED identifier CDATA #REQUIRED attrtype_id CDATA #REQUIRED attrdict_id CDATA #IMPLIED storeent_id CDATA #REQUIRED optcounter CDATA "0" > … <!ELEMENT px_elementnvp EMPTY> <!ATTLIST px_elementnvp px_elementnvp_id CDATA #REQUIRED px_element_id CDATA #REQUIRED name CDATA #REQUIRED value CDATA #REQUIRED optcounter CDATA "0" >- Prepare the massload data in an XML file; then place the file in the following directory:
WCDE_installdir\xml\schema\
- WC_installdir\AppServer\profiles\demo\installedApps\WC_demo_cell\WC_demo.ear\xml\schema\
If you place this file in different directory, you need to modify the relative path to the wcs.dtd file.
- If using a Cloudscape database, make sure sever is not running.
- Open a command window, navigate to the directory where you put the mass load XML file and run the following command:
WCDE_installdir or WC_installdir\bin\idresgen.bat CreateAttributeDictionaryAttributeData.catentry.xml outputxml dbname user password schemanameCloudscape does not need the dbname, user, password and schemaname.
- Run massload using the outputxml from the previous step as input:
WCDE_installdir or WC_installdir\bin\massload.bat outputxml dbname user password schemaname- Check the database to make sure the data is loaded.
What to do nextNow, you can enable the attribute dictionary for your site.