Hi all,
I've been working on performance issues, and in the process I got looking at XSLTs. I just wanted to share that it's possible to pass strings to the XSLT's transform() method: - return $engine->transform($xmlrecord, $xslfilename ); #file or URL + return $engine->transform({ + xml => $xmlrecord, + file => $xslfilename, + parameters => { + test => "'$test_str'", + }, + }); #file or URL It's somewhat limited in that you can only pass strings and I think there's a small limit on the number of parameters you can pass (not sure if it's 32 or 255), but I thought it was interesting. It would allow you to pass some data that you have at hand on a per-XML record basis without having to mangle the XML record (like we do with items and system preferences). In the end, I didn't end up using it though. Instead, I use XML::LibXSLT->register_function() to provide access to Koha functions from the XSLT, and in this case that meets my needs. Anyway, back to it.. David Cook Senior Software Engineer Prosentient Systems Suite 7.03 6a Glen St Milsons Point NSW 2061 Australia Office: 02 9212 0899 Online: 02 8005 0595
_______________________________________________ Koha-devel mailing list Koha-devel@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : https://www.koha-community.org/ git : https://git.koha-community.org/ bugs : https://bugs.koha-community.org/