Product Advisor XML search space creation file DTD

The following list of element definitions apply to both the separate and base search spaces. Where appropriate, the examples show where the elements require different data.

Directives

attribute

Description

The attribute element describes product attributes for the search space.

Syntax

<attribute>
...attribute content...
</attribute>

Context

Example for base search spaces

<attribute>
   <columnName>PRICE</columnName>
   <length>16</length>
   <include>1</include>
   <type>com.ibm.commerce.pa.datatype.DsCurrency</type>
   <NLVdesc>
      <language>-1</language>
      <attrName>PRICE</attrName>
      <description>MSRP</description>
      <scale>2</scale>
      <precision>15</precision>
      <unitOfMeasure></unitOfMeasure>
   </NLVdesc>
</attribute>

Example for separate search spaces

<attribute>
   <columnName>PPPRC</columnName>
   ;<length>16</length>
   <include>1</include>
   <type>com.ibm.commerce.pa.datatype.DsCurrency</type>
   <NLVdesc>
      <language>-1</language>
      <attrName>PRICE</attrName>
      <description>MSRP</description>
      <scale>2</scale>
      <precision>15</precision>
      <unitOfMeasure></unitOfMeasure>
   </NLVdesc>
</attribute>

attrName

Description

This element defines the name of the attribute. For base search spaces, this name should match the column name to which it corresponds to in the base tables. For separate search spaces, which use attribute values in the ATTRVALUE table, this name should match the value in the NAME column of the ATTRIBUTE table. If you want to make products searchable according to price, you have two options. You can either set the <attrName> value to LISTPRICE, or to PRICE, depending on which price you want to base the search on, but it is recommended that you use is PRICE, which gets the Standard Price from the OFFERPRICE table. You must be consistent in your usage across search spaces that have common catalog entries. For more information, refer to price behavior in Product Advisor.

Syntax

<attrName>
attribute_name
</attrName>

Context

Example

<attrName>PRICE</attrName>

catalogBuilder

Description

A required element. This element defines the start of the XML search space creation file.

Syntax

<catalogBuilder>
...XML search space creation file content...
</catalogBuilder>

Context

Example for base search spaces

<catalogBuilder>
   <delete_catalogBuilder CID="6001">
   <category CID="6001">
      <attribute>
         <columnName>Color</columnName>
         <length>254</length>
         <include>1</include>
         <type>com.ibm.commerce.pa.datatype.DsString</type>
         <NLVdesc>
            <language>-1</language>
            <attrName>Color</attrName>
            <description>Color</description>
            <scale>0</scale>
            <precision>0</precision>
            <unitOfMeasure></unitOfMeasure>
         </NLVdesc>
         <NLVdesc>
            <language>-2</language>
            <attrName>Color_fr</attrName>
            <description>Color2</description>
            <scale>0</scale>
            <precision>0</precision>
            <unitOfMeasure></unitOfMeasure>
         </NLVdesc>
      </attribute>
      <attribute>
         <columnName>Size</columnName>
         <length>254</length>
         <include>1</include>
         <type>com.ibm.commerce.pa.datatype.DsString</type>
         <NLVdesc>
            <language>-1</language>
            <attrName>Size</attrName>
            <description>Size</description>
            <scale>0</scale>
            <precision>0</precision>
            <unitOfMeasure></unitOfMeasure>
         </NLVdesc>
      </attribute>
   </category>
   <category CID="6000">
      <attribute>
         <columnName>Color</columnName>
         <length>254</length>
         <include>1</include>
         <type>com.ibm.commerce.pa.datatype.DsString</type>
         <NLVdesc>
            <language>-1</language>
            <attrName>Color</attrName>
            <description>Color</description>
            <scale>0</scale>
            <precision>0</precision>
            <unitOfMeasure></unitOfMeasure>
         </NLVdesc>
         <NLVdesc>
            <language>-2</language>
            <attrName>Color_fr</attrName>
            <description>Color2</description>
            <scale>0</scale>
            <precision>0</precision>
            <unitOfMeasure></unitOfMeasure>
         </NLVdesc>
      </attribute>
   </category>
</catalogBuilder>

Example for separate search spaces

<catalogBuilder>
   <delete_catalogBuilder CID="6001">
   <category CID="6001">
      <attribute>
         <columnName>F_Color</columnName>
         <length>254</length>
         <include>1</include>
         <type>com.ibm.commerce.pa.datatype.DsString</type>
         <NLVdesc>
            <language>-1</language>
            <attrName>Color</attrName>
            <description>Color</description>
            <scale>0</scale>
            <precision>0</precision>
            <unitOfMeasure></unitOfMeasure>
         </NLVdesc>
         <NLVdesc>
            <language>-2</language>
            <attrName>fr_Color_fr</attrName>
            <description>Color2</description>
            <scale>0</scale>
            <precision>0</precision>
            <unitOfMeasure></unitOfMeasure>
         </NLVdesc>
      </attribute>
      <attribute>
         <columnName>F_Size</columnName>
         <length>254</length>
         <include>1</include>
         <type>com.ibm.commerce.pa.datatype.DsString</type>
         <NLVdesc>
            <language>-1</language>
            <attrName>Size</attrName>
            <description>Size</description>
            <scale>0</scale>
            <precision>0</precision>
            <unitOfMeasure></unitOfMeasure>
         </NLVdesc>
      </attribute>
   </category>
   <category CID="6000">
      <attribute>
         <columnName>F_Color</columnName>
         <length>254</length>
         <include>1</include>
         <type>com.ibm.commerce.pa.datatype.DsString</type>
         <NLVdesc>
            <language>-1</language>
            <attrName>Color</attrName>
            <description>Color</description>
            <scale>0</scale>
            <precision>0</precision>
            <unitOfMeasure></unitOfMeasure>
         </NLVdesc>
         <NLVdesc>
            <language>-2</language>
            <attrName>fr_Color_fr</attrName>
            <description>Color2</description>
            <scale>0</scale>
            <precision>0</precision>
            <unitOfMeasure></unitOfMeasure>
         </NLVdesc>
      </attribute>
   </category>
</catalogBuilder>

Description

This element indicates a category for which a search space should be built.

Syntax

<category>
...category content...
</category>

Context

Example for base search spaces

<category CID="6000">
   <attribute>
      <columnName>Color</columnName>
      <length>254</length>
      <include>1</include>
      <type>com.ibm.commerce.pa.datatype.DsString</type>
      <NLVdesc>
         <language>-1</language>
         <attrName>Color</attrName>
         <description>Color</description>
         <scale>0</scale>
         <precision>0</precision>
         <unitOfMeasure></unitOfMeasure>
      </NLVdesc>
      <NLVdesc>
         <language>-2</language>
         <attrName>Color_fr</attrName>
         <description>Color2</description>
         <scale>0</scale>
         <precision>0</precision>
         <unitOfMeasure></unitOfMeasure>
      </NLVdesc>
   </attribute>
</category>

Example for separate search spaces

<category CID="6000">
   <attribute>
      <columnName>F_Color</columnName>
      <length>254</length>
      <include>1</include>
      <type>com.ibm.commerce.pa.datatype.DsString</type>
      <NLVdesc>
         <language>-1</language>
         <attrName>Color</attrName>
         <description>Color</description>
         <scale>0</scale>
         <precision>0</precision>
         <unitOfMeasure></unitOfMeasure>
      </NLVdesc>
      <NLVdesc>
         <language>-2</language>
         <attrName>fr_Color_fr</attrName>
         <description>Color2</description>
         <scale>0</scale>
         <precision>0</precision>
         <unitOfMeasure></unitOfMeasure>
      </NLVdesc>
   </attribute>
</category>

Description

This element specifies the name to use to identify the attribute in the metaphors. For the separate search space it corresponds to the column name used in the separate tables. For the base search space it should match the column name used in the base tables for those attributes represented in columns. Attributes from the ATTRVALUE table can use any unique name, as long as the attrName is correct. Product Advisor expects some attributes to have specific columnNames. For example:

For the separate search space
  • prrfnbr for catentry IDs
  • ppprc for price
  • setccurr for currency
  • prnbr for partnumber
For the base search space:
  • catentry_id for catentry IDs
  • partnumber for partnumber
  • currency for currency

Refer to Attribute definitions in the metaphor creation XML file for more information.

Syntax

<columnName>column_name</columnName>

Context

Description

An optional element. This element deletes the search space for the indicated category.

Syntax

<delete_CatalogBuilder CID="category_ID">

The category_ID value identifies the search space to be deleted. This must match the category ID number found in the WebSphere Commerce database.

Context

Example

<delete_catalogBuilder CID="6001">

Description

This element defines a description for an attribute.

Syntax

<description>description</description>

Context

Example

<description>Color2</description>

The include element specifies whether the attribute is availabe for display.

Syntax

<include>include</include>

Context

Example

<include>1</include>

Description

This element defines the target language code of the NLVDesc element.

Syntax

<language>language_ID</language>

Context

Example

<language>-2</language>

Description

This element defines the length of the data permitted in the database table.

Syntax

<length>length</length>

Context

Example

<length>254</length>

Description

This element describes the attribute for a particular language. Each element should have an NLVDesc element for each supported language.

Syntax

<NLVDesc>
...NLVDesc content...
</NLVDesc>

Context

Example for base search spaces

<NLVdesc>
   <language>-2</language>
   <attrName>Color_fr</attrName>
   <description>Color2</description>
   <scale>0</scale>
   <precision>0</precision>
   <unitOfMeasure></unitOfMeasure>
</NLVdesc>

Example for separate search spaces

<NLVdesc>
   <language>-2</language>
   <attrName>fr_Color_fr</attrName>
   <description>Color2</description>
   <scale>0</scale>
   <precision>0</precision>
   <unitOfMeasure></unitOfMeasure>
</NLVdesc>

Description

This element defines the precision for the attribute.

Syntax

<precision>precision</precision>

Context

Example

<precision>0</precision>

Description

This element defines the scale for the attribute.

Syntax

<scale>scale</scale>

Context

Example

<scale>0</scale>

Description

This element defines the type of the data for the attribute.

Syntax

<type>type</type>

Context

Example

<type>com.ibm.commerce.pa.datatype.DsString</type>

Description

This optional element defines the attribute's unit of measure.

Syntax

<unitOfMeasure>unit type</unitOfMeasure>

Context

Example

<unitOfMeasure></unitOfMeasure>