in reply to Re^3: Conversion of Files Using XSLT
in thread Conversion of Files Using XSLT

Can you help me to get this done in using perl module XML::XSLT ?

I have compared and tested the xsl using XML::XSLT and various online tools. Both gave different output. For me Online tool gave me correct output. Hence I switched to xsltproc linux command over than XSLT CPAN module.

Replies are listed 'Best First'.
Re^5: Conversion of Files Using XSLT
by Corion (Patriarch) on Dec 14, 2016 at 10:24 UTC

    Looking at the SYNOPSIS section of XML::XSLT, I see the following code:

    use XML::XSLT; my $xslt = XML::XSLT->new ($xsl, warnings => 1); $xslt->transform ($xmlfile); print $xslt->toString; $xslt->dispose();

    How does that code fail for you or where do you have problems adapting it to your use case?

    Looking at the SYNOPSIS section of XML::LibXSLT, I see the following code:

    use XML::LibXSLT; use XML::LibXML; my $xslt = XML::LibXSLT->new(); my $source = XML::LibXML->load_xml(location => 'foo.xml'); my $style_doc = XML::LibXML->load_xml(location=>'bar.xsl', no_cdata= +>1); my $stylesheet = $xslt->parse_stylesheet($style_doc); my $results = $stylesheet->transform($source); print $stylesheet->output_as_bytes($results);

    How does that code fail for you or where do you have problems adapting it to your use case?