Hi all,
I was curious if it is possible to pass global parameter to a stylesheet (which is a well formed XML string) and convert it to a tempory tree.
My intensions are to invoke Transformations via java and to pass as a parameter to the stylesheet an XML string.
Any suggestions ? Thanks Trev.
Yes, you can pass a string containing well-formed XML as a string parameter to Saxon, and convert it into a tree within the stylesheet using the saxon:parse() extension function. See http://www.saxonica.com/documentation/extensions/functions/parse.html
Alternatively (and with more control over error handling) you can build the tree in your Java application (the easiest way is the setSource() method of XPathEvaluator) and pass the resulting document node as a parameter.
Michael Kay
Please see http://sourceforge.net/project/project_donations.php?group_id=29872
Hi all,
I was curious if it is possible to pass global parameter to a stylesheet (which is a well formed XML string) and convert it to a tempory tree.
My intensions are to invoke Transformations via java and to pass as a parameter to the stylesheet an XML string.
Any suggestions ?
Thanks
Trev.
Yes, you can pass a string containing well-formed XML as a string parameter to Saxon, and convert it into a tree within the stylesheet using the saxon:parse() extension function. See http://www.saxonica.com/documentation/extensions/functions/parse.html
Alternatively (and with more control over error handling) you can build the tree in your Java application (the easiest way is the setSource() method of XPathEvaluator) and pass the resulting document node as a parameter.
Michael Kay
Please see http://sourceforge.net/project/project_donations.php?group_id=29872