 |
Displaying Amazon.com Product Information on Your Web Site
Data Views in Microsoft Office FrontPage 2003 allow you to present database
or XML-based data on your Web site in familiar list or library views. Just like
normal list and library views in Windows SharePoint Services, you can sort,
filter, or group the data, or present it in an XSLT view that allows you to
free-form edit the formatting of the data. As more and more companies make key
information available to developers to access and then display on their Web
sites, the options for bringing XML data to site visitors are growing every day.
In a corporate setting, Data Views can be used to display information
contained in a totally separate system, such as a contact management program or
inventory system. Data Views can be used to display database information, data
contained in XML files, or even data from live XML data feeds. In a corporate or
Internet setting, data from XML files or live XML data feeds can be displayed in
Data Views to give users the most current information possible.
For example, Amazon.com allows developers to tap into a continually updated
XML data feed that contains the entire list of products offered on Amazon.com,
along with images, pricing, and product information. This information can be
displayed in Data Views on sites created with Windows SharePoint Services. The
remainder of this article discusses how you can use the
Amazon Web Service and FrontPage
2003 to display Amazon.com product information on your Web site created with
Windows SharePoint Services.
This
example shows a list of books sold on Amazon.com that you could include on your
Web site. This list is created by connecting to the
Amazon.com Web Service and pulling down
a list of the top 10 books that meet a key word search on the words
"FrontPage 2003." Because the list is generated on-the-fly from Amazon.com's
continually updated XML data source, the list is kept current without making any
updates to the Web page.
Here are the steps we took to create the Data View shown in the
example section. The first area to work on is to add the
Amazon Web Service to the data sources you can choose from.
- Open FrontPage 2003 and the page you want to insert the Data View into.
Click the page where you want the Data View to appear.
- Click Insert Data View on the Data menu. The Data Source
Catalog task pane opens.

- Click the plus sign next to XML Web Services, and then click the
Add to Catalog link. The Data Source Properties dialog box opens.

- Type http://soap.amazon.com/schemas3/AmazonWebServices.wsdl in the
Service description location box on the Source tab.
Tip: The URL for the service description location is case sensitive.
- Click the Connect Now button. Connection information from the
Amazon Web Service is automatically inserted into the Connection Info
section of the Data Source Properties dialog box.
- Click the Details button. The Parameter Details dialog box opens.

- Click * keyword and then click the Modify button. The
Parameter dialog box opens.

- Type the key word or key words you would like to use in the Value
box, such as "FrontPage 2003," and then click OK.
- Repeat steps 7 and 8 for each of the following parameters:
| Parameter |
Setting to Use |
| page |
1 (displays 1 page of items, which for books displays
information about 10 books) |
| mode |
books (other choices include: Apparel, Baby, Classical
Music, DVD, Electronics, Outdoor Living, Kitchen & Housewares, Magazines,
Popular Music, Computers, Camera & Photo, Software, Toys & Games, Tools &
Hardware, Video, and Computer & Video Games) |
| tag |
[optional] type your Amazon Associates Program number
here if you want to earn revenue for your referrals. |
| type |
lite (displays a limited set of data about the
products; use heavy if you want to choose from more detailed data
about the products) |
| devtag |
type your Amazon Web Services developer's token here |
- Click OK on the Data Source Properties dialog box. AmazonSearchService has been added to the
XML Web Services list in the Data Source
Catalog task pane.

Now that the Amazon Web Service has been added to the list of available Web
Services, the next step is to insert a Data View that displays the data.
- Click where you want to insert the Data View of the Amazon Web Service key
word search.
- Click AmazonSearchServices on the Data Source Catalog task
pane, and then click Insert Data View. The Data View is inserted into
our page as an XSLT presentation of a bulleted list of details.

The Data View has been inserted onto the page, but the list style, the fields
displayed, and the format of the list need work. Here are the steps we took to
format the data in the example.
- Click the Style link on the Data View Details task pane. The
View Styles dialog box opens.

- Click the basic table style, and then click OK. The table format
changes to look like this:

- Click one of the "amazon:Details" links, then click Insert on the
Table menu, and then click Rows or Columns. The Insert Rows
or Columns dialog box opens.
- Make sure that the Columns and Left of selection radio
buttons are on, and then click OK. A column is inserted.

- Click in one of the cells to the left of "amazon:Details" and then scroll
down to the ImageURLsmall field in the Data View Details task pane.
- Right-click ImageURLsmall and then click the Insert as Picture
link. Images of books are automatically inserted into the left column.
- Click one of the book images, then click Select on the Table
menu, and then click Column.
- Right-click on the cells in the first column that are now highlighted, and
then click Cell Properties. The Cell Properties dialog box
opens.
- Make sure that there is a check mark next to the Specify width
option, and then type 48 into the Specify width box. Make sure
that the In pixels radio button is on, and then click OK. The
width of the first column fits the size of the book images.

- Click one of the fields that says "amazon:Details" in the Data View.
- Right-click the ProductName field in the Data View Details
task pane, and then click Insert as Text. Book titles are added.
- Type End to position your cursor after the book titles and then
type " by ".
- Right-click the Author field in the Data View Details task
pane, and then click Insert as Text. Author names are inserted.
- Type End to position your cursor after the author, and then type ",
published by ". Right-click the Manufacturer field and then click
Insert as Text. The book publisher name is inserted.
- Type End to position your cursor after the publisher and then type
" ".
- Right-click the ReleaseDate field and then click Insert as Date
& Time. The Format Date and Time dialog box opens.
- Make sure that there is a check mark next to the Show Date option,
and then click the date format you want to use in the Date Format
drop-down box.
- Make sure that the Show Time check box is empty, and then click
OK.

- Type End to position your cursor after the date you just inserted,
and then type Enter to insert space.
- Right-click the Url field, and then click Insert as Hyperlink.
The link to more information about the book is added.
- Click the text that says "xsi:type" at the top of the list.
- Click Select on the Table menu, and then click Row.
- Click Delete Rows on the Table menu. The row is deleted.
- Save the page by clicking Save on the File menu. Be sure to
save the page with a .aspx file extension.
The
finance
and human resources
sample sites have recommended reading lists that are
actually Data Views of XML-based data coming from the Amazon Web Service.
Here are links to more articles about lists.
|