How To Edit An XSL Stylesheet
Method to debug or edit an XSL stylesheet script if you are using IE6:
- 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
- Save that XML sample file in a folder as any-name-you-want.xml using Save As
in IE6.
- Copy your XSL stylesheet file to the same folder.
- Open the XML sample from Amazon locally using your favorite editor.
- 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">
- 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">
- Save the edited file.
- Go online and use IE6 to open the sample XML file.
|