From paul at polvo.ca Tue Oct 17 14:58:39 2023 From: paul at polvo.ca (Paul Kelly) Date: Tue, 17 Oct 2023 17:58:39 -0400 Subject: [xquery-talk] saxon expath http-client not recognized? Message-ID: <8C81E043-CCEF-403A-AF07-72EE1137F104@polvo.ca> Hi, first time posting (or maybe last time was like 10 years ago). I?m trying to make a simple get request with the expath http-client but keep getting the following error: Using Saxon (from command line and all three versions in oXygen): xquery version "1.0"; declare namespace http = "http://expath.org/ns/http-client"; let $path := "/file.xml" let $host := "http://polvo.ca" let $url := concat($host,$path) let $request := return http:send-request($request) Static error on line 11 column 20 of apa-test.xq: XPST0017 Cannot find a 1-argument function named Q{http://expath.org/ns/http-client}send-request() Static error(s) in query Hope I?m just just being dumb and the answer is obvious? Thanks, Paul From mike at saxonica.com Tue Oct 17 15:11:31 2023 From: mike at saxonica.com (Michael Kay) Date: Tue, 17 Oct 2023 23:11:31 +0100 Subject: [xquery-talk] saxon expath http-client not recognized? In-Reply-To: <8C81E043-CCEF-403A-AF07-72EE1137F104@polvo.ca> References: <8C81E043-CCEF-403A-AF07-72EE1137F104@polvo.ca> Message-ID: Saxon (out of the box) has no support for the EXPath HTTP client module. There's a third party implementation, but I have no idea of its current status, or of its dependencies. The error suggests either that the library doesn't work, or that you haven't installed it (correctly or at all), or that it doesn't work with this version of Saxon. Michael Kay Saxonica > On 17 Oct 2023, at 22:58, Paul Kelly wrote: > > Hi, first time posting (or maybe last time was like 10 years ago). I?m trying to make a simple get request with the expath http-client but keep getting the following error: > > Using Saxon (from command line and all three versions in oXygen): > > xquery version "1.0"; > declare namespace http = "http://expath.org/ns/http-client"; > let $path := "/file.xml" > let $host := "http://polvo.ca" > let $url := concat($host,$path) > let $request := > return > http:send-request($request) > > Static error on line 11 column 20 of apa-test.xq: > XPST0017 Cannot find a 1-argument function named Q{http://expath.org/ns/http-client}send-request() > Static error(s) in query > > > Hope I?m just just being dumb and the answer is obvious? > > Thanks, > > Paul > _______________________________________________ > talk at x-query.com > http://x-query.com/mailman/listinfo/talk From mike at saxonica.com Tue Oct 17 15:18:52 2023 From: mike at saxonica.com (Michael Kay) Date: Tue, 17 Oct 2023 23:18:52 +0100 Subject: [xquery-talk] saxon expath http-client not recognized? In-Reply-To: References: <8C81E043-CCEF-403A-AF07-72EE1137F104@polvo.ca> Message-ID: <039D8473-C220-4CB2-83B3-B48BDC34F2AA@saxonica.com> I would suggest tackling this a different way. Make the request using the doc() function, and write a Java URIResolver to service the request, using the Java HTTP API if you need full control over the request and response handling. Michael Kay Saxonica > On 17 Oct 2023, at 23:11, Michael Kay wrote: > > Saxon (out of the box) has no support for the EXPath HTTP client module. There's a third party implementation, but I have no idea of its current status, or of its dependencies. > > The error suggests either that the library doesn't work, or that you haven't installed it (correctly or at all), or that it doesn't work with this version of Saxon. > > Michael Kay > Saxonica > >> On 17 Oct 2023, at 22:58, Paul Kelly wrote: >> >> Hi, first time posting (or maybe last time was like 10 years ago). I?m trying to make a simple get request with the expath http-client but keep getting the following error: >> >> Using Saxon (from command line and all three versions in oXygen): >> >> xquery version "1.0"; >> declare namespace http = "http://expath.org/ns/http-client"; >> let $path := "/file.xml" >> let $host := "http://polvo.ca" >> let $url := concat($host,$path) >> let $request := >> return >> http:send-request($request) >> >> Static error on line 11 column 20 of apa-test.xq: >> XPST0017 Cannot find a 1-argument function named Q{http://expath.org/ns/http-client}send-request() >> Static error(s) in query >> >> >> Hope I?m just just being dumb and the answer is obvious? >> >> Thanks, >> >> Paul >> _______________________________________________ >> talk at x-query.com >> http://x-query.com/mailman/listinfo/talk > > > _______________________________________________ > talk at x-query.com > http://x-query.com/mailman/listinfo/talk