eBay SDK for .NET
Attributes & Catalogs > Retrieving Attribute and Product Meta-Data > Retrieving the Product Finder XSL Stylesheet 
 



< Back Next >

Retrieving the Product Finder XSL Stylesheet

The information in this section is only applicable for applications that support listing with Pre-filled Item Information.

The eBay Platform provides the Product Finder XSL stylesheet to give developers a dynamic and scalable way to render product finder meta-data in an application. The stylesheet is updated as necessary when the product finder meta-data changes.

Use GetProductFinderXSLCall to retrieve the latest version of the stylesheet. You should not hard-code the stylesheet in your application.

This section describes the following process:

Prerequisites

Step 1:  Indicate the Stylesheet to Return

Step 2:  Make the API Call

Step 3:  Decode the Product Finder XSL Stylesheet

Step 4:  Store the Stylesheet for Future Use

Step 5:  Maintain the Product Finder XSL Stylesheet

Step 6:  Next Steps

Prerequisites

There are no special steps to perform before executing GetProductFinderXSLCall. Of course, in order for the data to be useful, you need to also execute GetProductFinderCallto retrieve the XML that you will transform.

Step 1: Indicate the Stylesheet to Return

The first time you execute GetProductFinderXSLCall, you should retrieve the latest Product Finder XSL stylesheet, and determine the current version of the file.

In subsequent calls, you can use the DetailLevel property to retrieve only the version of the file to check whether the version has changed. If it has, get the latest stylesheet. To retrieve a particular version of the file, specify values in the XSLFileName and XSLFileVersion fields. To retrieve the latest version, leave the XSLFileVersion field blank.

Currently, only XSL file is returned from this call. Whether or not you need to specify XSLFileName depends on your application's design. In the future, this call might return more XSL files. If you design your application with the assumption that only one file will be returned, you may need to update your code immediately if the call starts retrieving other XSL files. If you specify XSLFileName, your application will continue to only retrieve the desired file, and you can update your code at your convenience to handle other kinds of XSL files.

See GetProductFinderXSL for information on the best ways to use data filters like XSLFileName, XSLFileVersion, and DetailLevel.

You can expect the Product Finder XSL to be updated at least once or twice a month, but it may sometimes be updated more frequently than this interval. Use GetProductFinderXSLCall to retrieve the XSL whenever it changes.

These fields are also summarized in GetProductFinderXSL.

Step 2: Make the API Call

Making the API call entails calling the GetProductFinderXSL( ) method defined on the GetProductFinderXSLCall class to download the data and then use the XSLFileList property to access the XSL file(s) locally without retrieving the same data from eBay again.

GetProductFinderXSLCall returns a string that specifies the product finder XSL stylesheet for the site to which you sent the request.

See GetProductFinderXSL for a list of the fields that are returned.

Step 3: Decode the Product Finder XSL Stylesheet

An XSL stylesheet that is returned in the XSLFile.FileContent property is initially formatted as a MIME base-64-encoded ASCII string. You need to decode the string before you can use the XSL stylesheet. When you use the GetProductFinderXSL() method on GetProductFindersXSLCall, it decodes the string for you.

Step 4: Store the Stylesheet for Future Use

Store the XSL stylesheet (e.g., as a string in a database or as a flat file) for future use.

For information about how to work with the Product Finder XSL stylesheet and how to parse the post data, see Working with the Product Finder XSL Stylesheet.

Step 5: Maintain the Product Finder XSL Stylesheet

At the beginning of each day that you will render the GetProductFinder XML, retrieve the latest Product Finder XSL stylesheet. Use the XSL in combination with the XSLFileName property to retrieve a particular version of an XSL stylesheet.

Step 6: Next Steps

When a user chooses to list in a category that supports a product finder search, apply the stylesheet to render a product finder returned from GetProductFinderCall in your application's user interface. Once the user selects the attributes to search on and submits the page, the JavaScript that is included in the stylesheet will generate post data that you can use to determine the attributes and values that the user has selected. See Working with the Product Finder XSL Stylesheet.


< Back Next >


 
Attributes & Catalogs > Retrieving Attribute and Product Meta-Data > Retrieving the Product Finder XSL Stylesheet 
© 2005–2007 eBay Inc. All rights reserved.