|
[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message] Use Saxon Proccessor to Process XQueryMichael Kay mike at saxonica.comFri Dec 28 18:47:56 PST 2007
The default entry point in saxon8.jar (and indeed saxon9.jar) is the XSLT processor, so if you use the -jar option then you need to supply parameters for XSLT processing. For XQuery processing, use java net.sf.saxon.Query sample.xquery text=SLIS This is documented at http://www.saxonica.com/documentation/using-xquery/commandline.html Michael Kay http://www.saxonica.com/ > -----Original Message----- > From: http://x-query.com/mailman/listinfo/talk > [mailto:http://x-query.com/mailman/listinfo/talk] On Behalf Of Alice Wei > Sent: 28 December 2007 16:38 > To: http://x-query.com/mailman/listinfo/talk > Subject: Use Saxon Proccessor to Process XQuery > > Hi, > > 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 editor to parse the XQuery. Since I have > external variables in my files, I wonder if it is possible to > generated it using the command prompt. > > For my XQuery file, it calls the external file instead of a > database, as shown in the following: > > declare boundary-space preserve; > declare variable $text external; > > <project> > { > for $project in doc("resume_2.xml")//projection, $content in > $project/descrip, $title in $project/project_title, $url in > $project/link_2/extras_1/@url > where contains($content, $text) > return > <projection> > <project_title>{data($title)}</project_title> > <descrip>{data($content)}</descrip> > <link_2> > <extras_1 url="{data($url)}"/> > </link_2> > </projection> > } > </project> > > 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 > > I tried implementing it on my server, which my saxon8.jar > file is on the same path as my to be parsed files, but the > prompt result is as > follows: > > java saxon8.jar question_8.xquery text=SLIS Exception in > thread "main" java.lang.NoClassDefFoundError: saxon8/jar > > I then added -jar to make the prompt look like: > > java -jar saxon8.jar question_8.xquery text=SLIS Stylesheet > file text=SLIS does not exist > > Is there something I did wrong? > > Thanks for your help. > > Alice Wei > MIS 2008 > School of Library and Information Science Indiana University > Bloomington http://x-query.com/mailman/listinfo/talk > 812-856-2659 > > _______________________________________________ > http://x-query.com/mailman/listinfo/talk > http://x-query.com/mailman/listinfo/talk
|
Purchase Stylus Studio Online Today!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|






