I didn't know that you could pass arguments to XSL, but this article has a really good example: http://projects.ischool.washington.edu/tabrooks/545/ContentManagement/PassingParameters.htm . This could be useful to us, because often during a transformation we have to inject stuff into the XML (like today's date) in order for it to contain the data that we want. In reality, that's not very clean since in a real environment, the XML might be furnished by a third party. Better to pass such arguments to the stylesheet.
UPDATE - I put this to use in the Gas Customer Report. The XSL stylesheet now accepts a parameter for the number of customers. This was probably do-able in some other way (e.g. counting the Customer nodes), but it works and it is actually pretty easy. See the Telvent.SE.ReportTools.GasCustomerReport for details.
No comments:
Post a Comment