Menu

Tempory Trees

Help
Anonymous
2004-08-12
2012-10-08
  • Anonymous

    Anonymous - 2004-08-12

    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.

     
    • Michael Kay

      Michael Kay - 2004-08-12

      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