« Return to Thread: -u option behaves differently for net.sf.saxon.Query than net.sf.saxon.Transform

Re: -u option behaves differently for net.sf.saxon.Query thannet.sf.saxon.Transform

by Michael Kay :: Rate this Message:

Reply to Author | View in Thread

Thanks for reporting the NPE problem with the -u option. This is present in
both 9.0 and 9.1 and I've patched both - see

https://sourceforge.net/tracker/index.php?func=detail&aid=2013712&group_id=2
9872&atid=397617

To force the URIResolver to be used to resolve the filename used in the -s:
option, try using a filename that starts "http:" or "file:", which should
have the same effect as the -u flag, but don't affect the query filename,
which is where the NPE is occurring. Alternatively, supply a
ModuleURIResolver using the -mr option - you can use the standard one which
is net.sf.saxon.query.StandardModuleURIResolver.

Michael Kay
http://www.saxonica.com/

> -----Original Message-----
> From: saxon-help-bounces@...
> [mailto:saxon-help-bounces@...] On Behalf
> Of Peter Rushforth
> Sent: 08 July 2008 10:55
> To: Mailing list for the SAXON XSLT and XQuery processor
> Subject: [saxon] -u option behaves differently for
> net.sf.saxon.Query thannet.sf.saxon.Transform
>
> Hi,
>
> With saxon 9.1.0.1, I am trying to use a custom URIResolver
> with a custom parser for net.sf.saxon.Transform.
>
> The logic to resolve particular filename extensions was
> pretty tricky to get right under net.sf.saxon.Transform, and
> perhaps its related to that.
>
> But when I use the -u option with net.sf.saxon.Query, I get a
> NPE when used with -s:filename on the command line.  If I
> leave off -u, doc('fname') call inside the query works, but
> the resolver is not used by the command line (SXXP0003: Error
> reported by XML parser: Content is not allowed in prolog.)
>
> I've just started to play around with net.sf.saxon.Query, so
> I can't say that this is new behaviour or anything like that,
> just different from net.sf.saxon.Transform.
>
> Cheers,
> Peter
>
> --------------------------------------------------------------
> -----------
> Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
> Studies have shown that voting for your favorite open source
> project, along with a healthy diet, reduces your potential
> for chronic lameness and boredom. Vote Now at
> http://www.sourceforge.net/community/cca08
> _______________________________________________
> saxon-help mailing list archived at
> http://saxon.markmail.org/ saxon-help@...
> https://lists.sourceforge.net/lists/listinfo/saxon-help 


-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
saxon-help@...
https://lists.sourceforge.net/lists/listinfo/saxon-help 

 « Return to Thread: -u option behaves differently for net.sf.saxon.Query than net.sf.saxon.Transform

LightInTheBox - Buy quality products at wholesale price!