Pass Parameter to XSLT Using PERL

From: Neal (nealcabage_at_yahoo.com)
Date: 10/19/03

  • Next message: Kiwi: "Perl6.NET?"
    Date: 19 Oct 2003 00:18:22 -0700
    
    

    I need to know how to pass a parameter from PERL to an XSLT when using
    that XSLT to transform XML. For instance, I'd like to pass a paramter
    that I retrieve from the queryString and pass it into XSLT which will
    create my HTML.

    Here's what I have for the basic transformation:

       #!/usr/local/bin/perl
       use XML::XSLT;/
     
       $xmlfile = "resume.xml";
       $xslfile = "resume.xsl";

       $parser = XML::XSLT->new ($xslfile);
       $parser->transform($xmlfile);
       $parser->print_result();

    Does anyone know what I would need to pass the paramter?

    Thanks.
    Neal


  • Next message: Kiwi: "Perl6.NET?"

    Relevant Pages

    • XSLT in VB.Net
      ... AS I was browsing msdn.com for XSLT I found a an example for this. ... I tried to transform XML is DOM in VB.Net. ... The stylesheet does not contain a document element. ... or it may not be a well-formed XML document. ...
      (microsoft.public.dotnet.xml)
    • Reverse Transform XML with XSLT
      ... i transform xml A to xml B with an xslt. ... Is it possible to use that xslt to tranform xml B to xml A? ...
      (microsoft.public.dotnet.xml)
    • Re: Test Driven Development
      ... > expressions on the inside and the language on the outside. ... XSLT is a member ... I like Perl, and used it alot when I was doing ... I've forgotten all the SNOBOL I once knew. ...
      (comp.object)
    • Re: xslt ?
      ... Tad seem to imply perl is less suited for XML due to being optimized ... XSLT is optimized for machines rather than for humans. ...
      (comp.lang.perl.misc)
    • Re: xslt ?
      ... There has not been allot of response from perl users here, ... sure if perl programmers have much interest in xml ... ... of interest in your post and the use of xml by perl programmers. ... If you just want an explanation of the merits of xslt you're ...
      (comp.lang.perl.misc)