What Are Common Problems Using "XML WEB SERVICES WITH XSLT"? It is most probable you are looking at this page from a link on my main page on this topic, "XML Web Services With XSLT"... If you haven't already read that page do so now.

My comments throughout these pages relate entirely to Amazon's Web Services V2.0 and my platform is a PC, Win98 SE, IE6 and using as tools, Microsoft's XML/XSL Viewer Tools [217 kB] and the Microsoft XML Parser SDK [1.49 mB] - see the main page mentioned in the paragraph above.

The FAQ and answers below appear in no particular order, just as they have arisen or as I've thought of them. . Please read on...


electronics tutorials for ham radio




Please visit VK2TIP's Book Shelf. My personal recommendations, thanks.

LAST MODIFIED:
Sunday, 23-Jun-2013 12:55:38 PDT

XML WEB SERVICES - FAQ

WHAT ARE COMMON PROBLEMS USING "XML WEB SERVICES WITH XSLT"?

NOTE: It is most probable you are looking at this page from a link on my main page on this topic, "XML Web Services With XSLT"... If you haven't already read that page do so now.

My comments throughout these pages relate entirely to Amazon's Web Services V2.0 and my platform is a PC, Win98 SE, IE6 and using as tools, Microsoft's XML/XSL Viewer Tools [217 kB] and the Microsoft XML Parser SDK [1.49 mB] - see the main page mentioned in the paragraph above.

The FAQ and answers below appear in no particular order, just as they have arisen or as I've thought of them.

QUESTIONS:

Q: Why does my XSL viewer some times present this error: "A semi colon character was expected."?

ANSWER: Sometimes but not always, this occurs when using external links on the XSLT sheet. Most often the answer is to simply replace every instance of & in the link with &

Simple!

BACK TO FAQ LIST.

Q: Why do I sometimes get error messages back from Amazon?

ANSWER: Sometimes but again not always, this occurs because of problems in the Amazon feed. In my experience and that of many others, if it works OK in your browser then it should work fine online. As with everything there are exceptions.

Unfortunately many, many hours have been totally wasted by developers trying to locate non-existent coding problems in their XSLT sheets only to find the Amazon feed was defective. Amazon Web Services work promptly to rectify known errors as they occur.

I've developed this rule of thumb on this: if it works in my browser, then it's probably OK. Leave it an hour and try again. If it's still not working scan the existing current threads on the AWS Discussion Board or post a new message *AND* always include the URL of the affected link otherwise no one has a clue on what you're on about. There is one very important caveat to all this though.

We have determined that if you are working your site through a slow server then you *WILL* invite problems for yourself. Don't even consider running Web Services through a free hosted site. If you can't afford to find a decent host of your own, with your own domain name, give it away - don't waste your time. Being an Amazon Affiliate requires in my mind a modest initial financial investment plus many, many hours of your time.

Free hosted sites with pop ups, headers, footers or whatever [nothing is ever really free] flags to the world "hey look at me, I'm an amateur newbie, can't you see?".

Would you buy through someone who appears to be a hopeless rank amateur? In business, appearance and confidence are inter-related. Never forget that.

BACK TO FAQ LIST.

Q: How do I tell if my XSLT sheet is working?

ANSWER: Again, a rule of thumb. I use NoteTab Pro - whenever I hit F8 whatever page I'm working on is displayed in my browser. If it's an XSL sheet with errors then I get an error message, Sometimes Microsoft's XSL Parser gives obscure messages but mostly it will point out the specific error.

Next I'll load in an XML test file in which I've inserted as it's second line:

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="asin-data-to-html.xsl"?>

Note I always keep all these files in the same directory on my HD, I use TEMP

Now, if I hit F8, that XML file is rendered off line in my browser just as if I were online and had clicked an Amazon link on my site. [OK sometimes the images won't show because I'm actually off line]

BACK TO FAQ LIST.

Q: How do I overcome Amazon caching my XSLT sheet?

In my experience permanent changes I make to my sheets are never reflected for many hours because Amazon caches my style sheet.

Now assumimg you've read the preceding sections and aren't stupid enough to have put "untested" files online - In Australia we have an expression for people who do those weird things - "You can't educate a mug!"

Sometimes changes need to be reflected in "real time". O.K. anything you are presently working on should be in a "temp" directory, both on your HD and online. Name your files something like this:

asin-data-to-html[1].xsl
asin-data-to-html[2].xsl
asin-data-to-html[3].xsl
asin-data-to-html[4].xsl

It's not rocket science, after each modification for testing purposes just increment your version number. Amazon thinks this is a whole new file to cache - which it is.

When you're happy with the end result re-name the file something appropriate and insert it in your links or whatever. Again caching may keep the old or original file in use for awhile e.g. asin-data-to-html.xsl, so what who cares? I don't slash my wrists over a cuppla hours delay of my latest version coming on line so why should you?

STOP PRESS:

Amazon Developers have offered a sneaky little known solution [28th November, 2002] - http://forums.prospero.com/am-assocdevxml/messages?msg=1171.2

"I'd like to see a parameter you could pass on the URL line that would cause the Amazon XSLT processor to reload the specified XSL document, given in the XML Web Services query URL (e.g. "&flush=1"). That way, when you are experimenting with an XML web sheet, you don't have to worry about the Amazon's XSLT processor caching the XSL document from the last query for 5 minutes. Right now I just keep renaming the XSL document but that's a bit of a hassle."

"Here's a trick -- Use a consistent name for your XSLT document, but append '#' and a unique name to the reference in the XML call."

The first time, use:

http://xml-na.amznxslt.com/onca/xml3?dev-t=YOUR_TOKEN&t=YOUR_ASSOCIATE_ID&AuthorSearch=Grisham&mode=books&type=lite&page=1&f=http://YOUR_XSLT_URL#a

Then:

http://xml-na.amznxslt.com/onca/xml3?dev-t=YOUR_TOKEN&t=YOUR_ASSOCIATE_ID&AuthorSearch=Grisham&mode=books&type=lite&page=1&f=http://YOUR_XSLT_URL#b

The XSLT processor will see the URLs as distinct, but in fact they all reference the same document on your server.

etc.

Hope this helps!

Jeff at Amazon.com

BACK TO FAQ LIST.

Q: Can I use external sheets as Includes?

ANSWER: If you are learning XSL (eXtensible Stylesheet Language), you'll want to understand how to build modular and reusable components as you would in any other language. The XSL include and import elements provide an excellent capability in this regard.....

From http://www.developer.com/xml/ - Building Modular Stylesheet Components - tricks of the trade in XML and XSLT for use in Web Services.

BACK TO FAQ LIST.

Q: What about when no Amazon images are available?

Well our friend Thomas Sakoulas came up with an excellent suggestion on the AWS discussion list.

"Here is a potential solution that I have not tested yet but is low-tech and it should work:

If you use a table cell to house the image, make the background of the cell an image with the same color as your page except in the middle where a "no image available" graphic (small enough to be hidden behind the returned amazon item image) exists. If the 1 transparent pixel is returned, the "no image available" background would be visible.

It really would have been simpler if AWS returned a nice "image not available" graphic."

BACK TO FAQ LIST.

Q: What additional help is available?

Well AWS have put together a fairly good resource page on Web Services Resources.

Q: What else on XSLT?

More later as I think of them:

BACK TO FAQ LIST.

LINK TO THIS PAGE

How to link directly to this page

Want to create a page link to me from your site? It couldn't be easier. All you need to do is copy and paste, the following code. All links are greatly appreciated; I sincerely thank you for your support.

Copy and paste the following code for a text link:

<a href="http://www.electronics-tutorials.com/web-services/web-services-faq.htm" target="_top">Visit Ian Purdie's "XML Web Services FAQ" Page</a>

and it should appear like this:
Visit Ian Purdie's "XML Web Services FAQ" Page

 

 

Copyright Ian C. Purdie © 2000 - 2001 - 2002, all rights reserved. URL - http://www.electronics-tutorials.com/web-services/web-services-faq.htm

All material at this site may be used by private individuals for their own non-commercial purposes. Single copies of my pages or files may be distributed to other private individuals at no charge, unless other requirements are noted on the relevant page. However, all material remains the intellectual property of Ian C. Purdie, individual contributors, or other sources who gave permission for use of their material at this site. All copyrights and trade marks are reserved by myself or the respective owners. Material may not be republished without prior written permission, nor may it be mirrored on another server without my prior written permission. Other than as provided in these pages or permissions given, translation into another language other than english and hosting pages in another country is stricly prohibited.
Commercial use prohibited without the prior written permission of www.electronics-tutorials.com

Created 24th November, 2002

Updated 2nd December, 2002

Contact VK2TIP