How To Edit An XSL Stylesheet

Method to debug or edit an XSL stylesheet script if you are using IE6:

  1. Grab a xml call from Amazon using the &f=XML parameter:
    http://xml.amazon.com/onca/xml2?dev-t=
    developertoken&t=myassociateid&KeywordSearch=book&page=1
    &mode=books&type=heavy&sort=+salesrank&f=xml
  2. Save that XML sample file in a folder as any-name-you-want.xml using Save As in IE6.
  3. Copy your XSL stylesheet file to the same folder.
  4. Open the XML sample from Amazon locally using your favorite editor.
  5. Find the first line:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE ProductInfo PUBLIC "-//Amazon.com //DTD Amazon Product Info//EN" "http://xml.amazon.com/schemas/dev-heavy.dtd">
  6. Insert this in:

    <?xml-stylesheet type="text/xsl" href="insert the name of your stylesheet.xsl"?>

    So that it looks like:

    <?xml version="1.0" encoding="UTF-8"?>
    <?xml-stylesheet type="text/xsl" href="insert the name of your stylesheet.xsl"?>
    <!DOCTYPE ProductInfo PUBLIC "-//Amazon.com //DTD Amazon Product Info//EN" "http://xml.amazon.com/schemas/dev-heavy.dtd">
  7. Save the edited file.
  8. Go online and use IE6 to open the sample XML file.