Gimantha
Gimantha

Reputation: 97

Using node_xslt for Transformations

I am trying to use node_xslt for transforming an XML file to another XML file. I have no clue what those parameters that should be passed into 'tranform' function... If someone knows how to use node_xslt, please explain what those parameters are. As mentioned in the ReadMe.md ,

transformedString = xslt.transform(stylesheet, document, parameters);
   // transform
   // Arguments:
   //  * stylesheet: stylesheet object
   //  * document: document object
   //  * parameters: an array of parameters to be passed to the stylesheet. length must be multiple of 2.
   //        Example: ['param1Name', 'param1Value', 'param2Name', 'param2Value']

what are these parameters, passed as the third one? Thanks

Upvotes: 1

Views: 815

Answers (1)

Andrei Karpuszonak
Andrei Karpuszonak

Reputation: 9034

Here is the documentation regarding PI Parameters:

https://developer.mozilla.org/en-US/docs/XSLT/PI_Parameters

It's basically allows you to pass parameters to a stylesheet when executing it

Upvotes: 2

Related Questions