Params when using Ant
Added by Anonymous over 16 years ago
Legacy ID: #5019135 Legacy Poster: Michael Hare (mphare)
I'm using the ability for Saxon to accept and transfer commandline parameters to the XSLT script. I'm also using Ant. So, I got the <param name="pname1" expression="pvalue1"/> part working, but can I do XML parsing on the parameters using Ant? I've tried <param name="+pname1" expression="pvalue1"/> but I'm getting blank results. Is there a better way?
Replies (2)
RE: Params when using Ant - Added by Anonymous over 16 years ago
Legacy ID: #5019186 Legacy Poster: Michael Kay (mhkay)
The syntax +pname1 is available only on the command line interface to Saxon, it's not supported on any other APIs. In other APIs you can either (a) supply a document node as the value of the parameter (try calling the doc() function within the expression), or (b) supply a URI as the value of the parameter, and fetch the corresponding document node from within the stylesheet by calling doc() or document().
RE: Params when using Ant - Added by Anonymous over 16 years ago
Legacy ID: #5021150 Legacy Poster: Michael Hare (mphare)
That's what I was beginning to wonder.. but I wanted to ask. Using doc() is trivial, so that will work just fine. Thanks! - m
Please register to reply