More Errors
2001-12-23 13:13:51 M Hunter
I felt it worth mentioning more errors with Kip's article:
1) This month's source code link is broken.
2) The code in the cgi script 'stylechooser' has an error concerning the CGI method 'url' based on the regex he used. It should read:
$context{REQUEST} = $q->url(-path=>1,-relative=>1);
The addition of -relative=>1 gets the relative path. Otherwise one gets the absolute URL in which case the regex s/^$gateway_name\/?// doesn't work.
Another option is to not add -relative=>1, but rather change the regex to:
s/^.*$gateway_name\/?//
I really like the article, but the quality control on the code and links is lacking. In part I'm grateful for the mistakes because it forced me to deepen my understanding of the situation, but I feel the pain of the frustrated reader.
Further, I could find no email to contact the author and address these issues. Too bad!
- hunter
- Script Errors and No XSLT
2002-01-07 08:38:36 Kip Hampton
Hunter,
Thanks for the note.
Yes, indeed, i apparently blew the cut-and-paste from the working 'stylechooser' script here and truncated the call to CGI.pm's url method. Good catch.
As for the lack of XSLT stylesheets, I chose not to include sample XSLT stylesheets or XML documents for the 'stylechooser' under the presumption that, if someone were interested in this type of script, they would already have some of each available. My apologies if this caused confusion.
Thanks for reading and taking the time out to post.
-kip
Note: I'll ask the kind folks here at XML.com to include my email address on the author bio page. In the interim, I can always be reached at khampton@totalcinema.com.