Deprecated featureDeprecated feature

Product Advisor XML search space creation file DTD

The list of element definitions in this section 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

  • Attribute elements can be included in a category elements.
  • Attribute elements can contain only the following elements:
    1. A columnName element
    2. A length elements
    3. An include element
    4. A type element
    5. Any number of NLVdesc elements

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

  • The attrName element can be included in the attribute element
  • The attrName element does not contain other elements

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

  • The catalogBuilder is the primary element in the XML search space creation file. It is not contained in any other elements.
  • The catalogBuilder element can contain the following elements:
    • One or more deleteCatalogBuilder elements
    • One or more category elements

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>

category

Description

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

Syntax


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

Context

  • The category element can only be included in a catalogBuilder element.
  • The category element can contain one or more attribute elements.

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> 

columnName

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

  • The columnName element can only be included in a attribute element.
  • The columnName element does not contain other elements.

delete_CatalogBuilder

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

  • The deleteCatalogBuilder element can only be included in a catalogBuilder element.
  • The deleteCatalogBuilder element does not contain other elements

Example


<delete_catalogBuilder CID="6001">

description

Description

This element defines a description for an attribute.

Syntax


<description>
description</description>

Context

  • The description element can be included in NLVDesc elements.
  • The description element does not contain other elements.

Example


<description>Color2</description>

include

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

Syntax


<include>
include</include>

Context

  • The include element can be included in attribute elements.
  • The include element does not contain other elements.
  • Accepts a number between 0-1. These values have the corresponding meaning:
    0
    The attribute should not be included.
    1
    The attribute should be included.

Example


<include>1</include>

language

Description

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

Syntax


<language>
language_ID</language>

Context

  • The language element can be included in the NLVDesc element.
  • The language element does not contain other elements.

Example


<language>-2</language>

length

Description

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

Syntax


<length>
length</length>

Context

  • The length element can be included in attribute elements.
  • The length element does not contain other elements.

Example


<length>254</length>

NLVdesc

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

  • The NLVDesc element can be included in attribute elements.
  • The NLVDesc element can contain the following elements:
    • A language element
    • An attrName element
    • A description element
    • A precision element
    • A scale element
    • A unitOfMeasure element

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>

precision

Description

This element defines the precision for the attribute.

Syntax


<precision>
precision</precision>

Context

  • The precision element can be included in NLVDesc elements.
  • The precision element does not contain other elements.

Example

<precision>0</precision>

scale

Description

This element defines the scale for the attribute.

Syntax


<scale>
scale</scale>

Context

  • The scale element can be included in NLVDesc elements.
  • The scale element does not contain other elements.

Example

<scale>0</scale>

type

Description

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

Syntax


<type>
type</type>

Context

  • The type element can be included in attribute elements.
  • The type element does not contain other elements.

Example


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

unitOfMeasure

Description

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

Syntax


<unitOfMeasure>
unit type</unitOfMeasure>

Context

  • The unitOfMeasure element can be included in attribute elements.
  • The unitOfMeasure element does not contain other elements.

Example


<unitOfMeasure></unitOfMeasure>