in reply to Re^3: Push + variable argument
in thread Push + variable argument
Do the separating in Perl (for example with the split statement) and pass the individual arguments/parameters to the XSLT. So something like:
In the xslt:
<xsl:param name="param_1"/> <xsl:param name="param_2"/>
In the Perl script:
my ($par1, $par2) = split (/ /,$str); my $results = $stylesheet->transform($source, XML::LibXSLT::xpath_to_string(param_1 => $par1), XML::LibXSLT::xpath_to_string(param_2 => $par2) );
NB The utility function xpath_to_string takes care of the quoting. This is probably the better/easier way of doing things. See the documentation for details. See playing with XSLT for a bigger example.
|
|---|