|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
Specifying an UnparsedTextURIResolveHi, All,
When I use Saxon in NetKernel (www.1060.org) resources need to be loaded using URI resolvers, which are set using net.sf.saxon.Configuration. Now I want to use the unparsed-text funtion in XSLT, but in this case the provided resolvers aren't used, but net.sf.saxon.trans.StandardUnparsedTextResolver is used: Id: java.net.MalformedURLException Message: unknown protocol: ffcpl Callstack: java.net.URL.<init>() java.net.URL.<init>() java.net.URL.<init>() java.net.URI.toURL() net.sf.saxon.trans.StandardUnparsedTextResolver.resolve() line:58 net.sf.saxon.functions.UnparsedText.readFile() line:128 net.sf.saxon.functions.UnparsedText.evaluateItem() line:78 net.sf.saxon.instruct.SimpleContentConstructor.evaluateItem() line:261 (the ffcpl protocol is an internal NK protocol, and one of the reasons a URI resolver is needed ...) I've looked at the code in the SVN browser, and the unparsed-text function gets this resolver via net.sf.saxon.expr.XPathContext.getController() from net.sf.saxon.Controller. And this class provides a method for setting the UnparsedTextResolver: http://www.saxonica.com/documentation/javadoc/net/sf/saxon/Controller.html#setUnparsedTextURIResolver(net.sf.saxon.trans.UnparsedTextURIResolver) The controller is instantiated using a net.sf.saxon.Configuration, however that class doesn't have a method to set this resolver and is also not used for that in the controller class. Am I right in concluding that at the moment there isn't a way to globally set the UnparsedTextUIIResolver? Thanks in advance, Menzo -- Menzo Windhouwer, Theoretische Taalwetenschap (UvA) kamer 306, Spuistraat 210 (Bungehuis) 1012 VT A'dam telefoon:020 525 3104, e-mail:M.A.Windhouwer@... ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ saxon-help mailing list archived at http://saxon.markmail.org/ saxon-help@... https://lists.sourceforge.net/lists/listinfo/saxon-help |
|
|
Re: Specifying an UnparsedTextURIResolveYes, correct, this can only be set at the level of a Controller.
I've generally been trying to move away from setting these things globally at the Configuration level - especially things like error listeners and URI resolvers that might often be stateful. Michael Kay http://www.saxonica.com/ > -----Original Message----- > From: saxon-help-bounces@... > [mailto:saxon-help-bounces@...] On Behalf > Of Menzo Windhouwer > Sent: 05 September 2008 13:19 > To: Mailing list for the SAXON XSLT and XQuery processor > Subject: [saxon] Specifying an UnparsedTextURIResolve > > Hi, All, > > When I use Saxon in NetKernel (www.1060.org) resources need > to be loaded using URI resolvers, which are set using > net.sf.saxon.Configuration. Now I want to use the > unparsed-text funtion in XSLT, but in this case the provided > resolvers aren't used, but > net.sf.saxon.trans.StandardUnparsedTextResolver is used: > > Id: java.net.MalformedURLException > Message: unknown protocol: ffcpl > Callstack: > java.net.URL.<init>() > java.net.URL.<init>() > java.net.URL.<init>() > java.net.URI.toURL() > net.sf.saxon.trans.StandardUnparsedTextResolver.resolve() line:58 > net.sf.saxon.functions.UnparsedText.readFile() line:128 > net.sf.saxon.functions.UnparsedText.evaluateItem() line:78 > net.sf.saxon.instruct.SimpleContentConstructor.evaluateItem() line:261 > > (the ffcpl protocol is an internal NK protocol, and one of > the reasons a URI resolver is needed ...) > > I've looked at the code in the SVN browser, and the > unparsed-text function gets this resolver via > net.sf.saxon.expr.XPathContext.getController() from > net.sf.saxon.Controller. And this class provides a method for > setting the UnparsedTextResolver: > > http://www.saxonica.com/documentation/javadoc/net/sf/saxon/Con > troller.html#setUnparsedTextURIResolver(net.sf.saxon.trans.Unp > arsedTextURIResolver) > > The controller is instantiated using a > net.sf.saxon.Configuration, however that class doesn't have a > method to set this resolver and is also not used for that in > the controller class. > > Am I right in concluding that at the moment there isn't a way > to globally set the UnparsedTextUIIResolver? > > Thanks in advance, > > Menzo > > -- > Menzo Windhouwer, Theoretische Taalwetenschap (UvA) kamer > 306, Spuistraat 210 (Bungehuis) 1012 VT A'dam telefoon:020 > 525 3104, e-mail:M.A.Windhouwer@... > > > -------------------------------------------------------------- > ----------- > This SF.Net email is sponsored by the Moblin Your Move > Developer's challenge > Build the coolest Linux based applications with Moblin SDK & > win great prizes > Grand prize is a trip for two to an Open Source event > anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > saxon-help mailing list archived at http://saxon.markmail.org/ > saxon-help@... > https://lists.sourceforge.net/lists/listinfo/saxon-help ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ saxon-help mailing list archived at http://saxon.markmail.org/ saxon-help@... https://lists.sourceforge.net/lists/listinfo/saxon-help |
|
|
Re: Specifying an UnparsedTextURIResolveThanks Michael,
So I can't set this resolver for a whole stylesheet? Or can I reach the controller somehow, and use the setUnparsedTextURIResolver method? Oh I see now, net.sf.saxon.Controller is a javax.xml.transform.Transformer, so I can just cast to it and set the resolver for a specific transform :-) Thanks, Menzo Michael Kay wrote: > Yes, correct, this can only be set at the level of a Controller. > > I've generally been trying to move away from setting these things globally > at the Configuration level - especially things like error listeners and URI > resolvers that might often be stateful. > > Michael Kay > http://www.saxonica.com/ > > > >> -----Original Message----- >> From: saxon-help-bounces@... >> [mailto:saxon-help-bounces@...] On Behalf >> Of Menzo Windhouwer >> Sent: 05 September 2008 13:19 >> To: Mailing list for the SAXON XSLT and XQuery processor >> Subject: [saxon] Specifying an UnparsedTextURIResolve >> >> Hi, All, >> >> When I use Saxon in NetKernel (www.1060.org) resources need >> to be loaded using URI resolvers, which are set using >> net.sf.saxon.Configuration. Now I want to use the >> unparsed-text funtion in XSLT, but in this case the provided >> resolvers aren't used, but >> net.sf.saxon.trans.StandardUnparsedTextResolver is used: >> >> Id: java.net.MalformedURLException >> Message: unknown protocol: ffcpl >> Callstack: >> java.net.URL.<init>() >> java.net.URL.<init>() >> java.net.URL.<init>() >> java.net.URI.toURL() >> net.sf.saxon.trans.StandardUnparsedTextResolver.resolve() line:58 >> net.sf.saxon.functions.UnparsedText.readFile() line:128 >> net.sf.saxon.functions.UnparsedText.evaluateItem() line:78 >> net.sf.saxon.instruct.SimpleContentConstructor.evaluateItem() line:261 >> >> (the ffcpl protocol is an internal NK protocol, and one of >> the reasons a URI resolver is needed ...) >> >> I've looked at the code in the SVN browser, and the >> unparsed-text function gets this resolver via >> net.sf.saxon.expr.XPathContext.getController() from >> net.sf.saxon.Controller. And this class provides a method for >> setting the UnparsedTextResolver: >> >> http://www.saxonica.com/documentation/javadoc/net/sf/saxon/Con >> troller.html#setUnparsedTextURIResolver(net.sf.saxon.trans.Unp >> arsedTextURIResolver) >> >> The controller is instantiated using a >> net.sf.saxon.Configuration, however that class doesn't have a >> method to set this resolver and is also not used for that in >> the controller class. >> >> Am I right in concluding that at the moment there isn't a way >> to globally set the UnparsedTextUIIResolver? >> >> Thanks in advance, >> >> Menzo >> >> -- >> Menzo Windhouwer, Theoretische Taalwetenschap (UvA) kamer >> 306, Spuistraat 210 (Bungehuis) 1012 VT A'dam telefoon:020 >> 525 3104, e-mail:M.A.Windhouwer@... >> >> >> -------------------------------------------------------------- >> ----------- >> This SF.Net email is sponsored by the Moblin Your Move >> Developer's challenge >> Build the coolest Linux based applications with Moblin SDK & >> win great prizes >> Grand prize is a trip for two to an Open Source event >> anywhere in the world >> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >> _______________________________________________ >> saxon-help mailing list archived at http://saxon.markmail.org/ >> saxon-help@... >> https://lists.sourceforge.net/lists/listinfo/saxon-help >> > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > saxon-help mailing list archived at http://saxon.markmail.org/ > saxon-help@... > https://lists.sourceforge.net/lists/listinfo/saxon-help > -- Menzo Windhouwer, Theoretische Taalwetenschap (UvA) kamer 306, Spuistraat 210 (Bungehuis) 1012 VT A'dam telefoon:020 525 3104, e-mail:M.A.Windhouwer@... ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ saxon-help mailing list archived at http://saxon.markmail.org/ saxon-help@... https://lists.sourceforge.net/lists/listinfo/saxon-help |
|
|
Re: Specifying an UnparsedTextURIResolve>
> Oh I see now, net.sf.saxon.Controller is a > javax.xml.transform.Transformer, so I can just cast to it and > set the resolver for a specific transform :-) > Yes, that's right. Michael Kay http://www.saxonica.com/ ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ saxon-help mailing list archived at http://saxon.markmail.org/ saxon-help@... https://lists.sourceforge.net/lists/listinfo/saxon-help |
| Free Forum Powered by Nabble | Forum Help |