[xquery-talk] Use Saxon Proccessor to Process XQuery
Alice Wei
ajwei at indiana.edu
Fri Dec 28 12:14:48 PST 2007
Quoting "James A. Robinson" <jim.robinson at stanford.edu>:
>
>> I wonder if there are any of you on this list use Saxon (Java) to
>> process XQuery files. I currently process my XQuery files with a XML
>
> Sure it's possible to do that.
>
>> declare variable $text external;
>
> I'm having a hard time understanding how this parameter relates to the
> firstName parameter you pass below in your example.
I am using that example to illustrate what I intend to do, since
that query according to Dr. Kay does not generate errors in his case.
>
>> The query works, without a terminal prompt, that is. What I want to do
>> is to call it with a command prompt so I can change my variable from
>> case to case. According to Dr. Kay's article in Learn XQuery in 10
>> minutes, the prompt is as follows:
>>
>> java net.sf.saxon.Query sample.xquery firstName=Lisa
>
> On a Linux/Unix/MacOS X machine, assuming java is in your
> execution path, you should be able to run:
>
> java -classpath /path/to/your/saxon8.jar net.sf.saxon.Query
> sample.xquery firstName=Lisa
This is my query now:
java -classpath ./saxon8.jar net.sf.saxon.Query quesery text=SLIS
Thanks, and now it is working beautifully.
>
> though I would have expected a parameter 'text=Lisa', given your
> declaration of a $text external variable.
>
> On a Windows machine I'd imagine the classpath argument would be
> something more like C:\some\path\to\your\saxon8.jar
>
>
> Jim
>
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> James A. Robinson jim.robinson at stanford.edu
> Stanford University HighWire Press http://highwire.stanford.edu/
> +1 650 7237294 (Work) +1 650 7259335 (Fax)
>
Alice Wei
MIS 2008
School of Library and Information Science
Indiana University Bloomington
ajwei at indiana.edu
812-856-2659
More information about the talk
mailing list