Sign In/My Account | View Cart  
advertisement

Article:
 XML and Modern CGI Applications
Subject: xml file here (kind of)
Date: 2001-12-21 18:03:51
From: M Hunter

The xml file camelids.xml can be found in the source for an eariler article by Kip, (Perl XML Quickstart: The Perl XML Interfaces)


http://www.xml.com/2001/04/18/files/perl-xml-quickstart.zip


NOTE: The xml file camelids does not 'jive' with default.xsl in that the XSL file is looking for elements that don't exist in camelids.xml


I've put together a simple XSL file that works with the stylechooser cgi script and camelids.xml. It's available at:


http://missoula.org/xsl/default.xsl


- hunter




Previous Message Previous Message   Next Message No Next Message


Titles Only Titles Only Newest First
  • 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.


Sponsored By: