Can I pass a variable to an XSLT
Can I pass a variable to an XSLT, without having to dynamically create the transformer.
You see I have a java class that takes the path to an xml document, path to the xslt, and returns the resultant string:
String result = xmlTransformer.transform( "menu.xml","menu.xsl")
But there are a few cases where I would love to have all the information in a single xml document, and a single xslt, so I could have something like:
String result = xmlTransformer.transform( "menu.xml","menu.xsl?entries=5" )
or something like that. the idea is that I can get away with having to have an excessive amount of xslt files.
I think you need to look at PARAM ? This will allow you to pass in variables, via PHP to the XSL-T processor it's self.
Although I also need to look at this some more myself, so cannot post any script
OK no probs, I'm not actually using php, its all done in java. But I'll have a look into passing parameters into it.