Embedding Scripts In Xslt
Posted 19 October 2011 - 03:15 PM
I have to call an external function in my xslt/xsl-fo stylesheet. I know that I can use <xsl:script> according to the recommendation (http://www.w3.org/TR...nsion-functions) The question is how to actually use it ? I'm using AHFormatter to transform my stylesheets and I have to add an external function written in a different language than xslt, preferably C++ or C#. Is that possible ? I mean I don't really understand the way that it works. Actually will it work just fine if I use a java code inside the <script> tags ? I don't understand how the code is interpreted or something like that. Can anyone lighten it up a but for me ? In the specification it's stated that my processor must support the language of the script. In AHFormatter the msxml is integrated and I'm not supposed to use any other. What languages are supported by him ? I looked through the internet and found some microsoft references(http://msdn.microsof...xsx(vs.71).aspx) but the problem is that I don't want to process the xml outside AHFormatter and If I understood that microsoft article clearly they tell me to write a program in C# that will do the transformation outside. It's not my goal 'cause I need something to be done in one step just using my formatter.
thanks in advance for any tips.
Posted 19 October 2011 - 03:27 PM
As for MSXML, it supports a proprietary ms: script extension element that allows you to implement functions in JScript or VBScript so if your tool uses MSXML you might be able to use that approach. http://msdn.microsof...y/ms256042.aspx has an example with sample code using JScript that should work with MSXML (as long as you ignore other parts of the documents like an assembly element that are specific to .NET).
Posted 19 October 2011 - 03:36 PM
Posted 19 October 2011 - 04:03 PM
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users