| Amazon Web Services using HTML and XSLT |
![]()
|
Step by Step InstructionsStep 1. Become an AssociateApply to become an Associate and obtain an Associate ID Step 2. Web ServicesVisit From this page
Step 3. Using XSLTBecause some of my hosts do not allow access to the cgi bin and don't allow PHP etc. I have used the XSLT stylesheet method. This tutorial is about using this method of : HTML and XSLT3a. Open you Amazon kit and index.htmlKit > AmazonWebServices > API Guide > index.html Make a shortcut to this index.htm file which links to all the reference files. Rename this short cut to ReferenceIndex +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3b. Exercise 1. Obtain a result from Amazon using an ASIN search
Step 4 Using a XSLT Style sheet.In order to transform the data that is returned by Amazon into some thing tat looks like a web page, you must use a XSLT Style sheet. You can prepare a style sheets from scratch or use one or more of the style sheets already prepared. In the next step you will use the smallest of the files the lite version Step 5 Copy lite-data-to-html.xsl from the Kit
Step 6. Amend the file
Step 7. Amend your HTML to use the style sheet
The following uses a different style sheet Click here to see the above code working example Note you may have a variety of XSLT stylesheets that you can use to provide a variety of outputs. You can see this how this works by using the Developer Scratch Pad and clicking the bottom radio button and seeing the different results produced by selecting different stylesheets in the drop down box. You can then download the Stylesheet to see the coding.
|
|
|
|
|
This tutorial will be continued shortly, with the followingStep 8. Insert a £ currency signStep 9. Insert a CSS style sheetStep 10. Alter the designWhen altering the HTML that is embed with the XSLT style sheet you must remember that it is dynamic HTML, which has a few extra rules to standard HTML.
Method to debug or edit an XSL stylesheet scriptThe following link describes a method of how to test your stylesheet. The advantage is that you obtain more information than the error messages returned by Amazon. Method to debug or edit an XSL stylesheet script if you are using IE6: A more advanced Stylesheet, Amazon XSL Explorer v109, is also obtainable from this site and how to convert it for the UK market is described in the next tutorial .
For UK sitesReplacing $ sign to £ sign Find the line Do the same for the line Preventing weird results in % calculations Alter Converting the Amazon explorer 109 Stylesheet to use in the UK :
|
|
|
Leisure Time - book your holiday or flights with our UK sponsorsMore Tutorials by John McGuinn
Leeds my home town Relax in the sun.
Copyright © John McGuinn 2001-03 . |