On 09/09/2011 19:47, Kate Tang wrote:

It works now.   I change output path in XSLT file from output/{$filename} to {$filename}.


There is the other question about exception.

When I tried to create MyOutputResolver as you mentioned bellows. The system shows net.sf.saxon.lib.StandardOutputURIResolver is not resolved as a type.

Sorry, I got the name wrong. It is net.sf.saxon.lib.StandardOutputResolver.

Michael Kay


Do you have more idea about it?


From: Michael Kay [mailto:mike@saxonica.com]
Sent: September-09-11 1:42 PM
To: Kate Tang
Cc: Saxon Help List
Subject: Re: [saxon] Help about saxon9he.jar


I don't have enough information to debug this for you - I can only make suggestions.

For diagnostics you could try setting an OutputURIResolver. Something like this:

class MyOutputResolver extends net.sf.saxon.lib.StandardOutputURIResolver {

  public Result resolve(String href, String base) throws XPathException {
    System.out.println(href + "; " + base);
    return super.resolve(href, base);

and then

((net.sf.saxon.Controller)transformer).setOutputURIResolver(new MyOutputResolver());

Michael Kay

On 09/09/2011 18:18, Kate Tang wrote:

The file name are set by the node name.
It works if I only use java saxon9he.jar ... to produce the code.

From: Michael Kay
To: Kate Tang
Cc: saxon-help@lists.sourceforge.net
Sent: Fri Sep 09 13:08:13 2011
Subject: Re: [saxon] Help about saxon9he.jar
It looks to me as if you are now setting the base URI successfully, but the value of the href attribute produced by xsl:result-document is an empty string.

Michael Kay

On 09/09/2011 17:42, Kate Tang wrote:

This is the folder I want to write to.
The first output file output correctly. However, the others didn't. I am think if I should do more setting for the URI.

From: Michael Kay
To: Kate Tang
Cc: saxon-help@lists.sourceforge.net
Sent: Fri Sep 09 12:22:52 2011
Subject: Re: [saxon] Help about saxon9he.jar
On 09/09/2011 16:14, Kate Tang wrote:

The following is what I got.



11:10:47,456 ERROR [STDERR] Error at xsl:value-of on line 33


  C:\messagepoint\reports\operationsReports\1\2\operationsReport_1_111031\output (Access is denied)

11:10:47,456 ERROR [STDERR]   at xsl:for-each (#29)

11:10:47,456 ERROR [STDERR]      processing /Report/Jobs[1]/Job[6]

11:10:47,458 INFO  [STDOUT] A1FC7D4E66DE26153DD37E623A47DF89 superuser@prinova.com: 2011-09-09 11:10:47,456 ERROR com.prinova.messagepoint.platform.services.export.ExportOperationsReportToXMLService,Thread-36:71 -  unexpected exception when invoking ExportOperationsReportToXMLService execute method

; SystemID: ; Line#: 33; Column#: -1

net.sf.saxon.trans.XPathException: java.io.FileNotFoundException: C:\messagepoint\reports\operationsReports\1\2\operationsReport_1_111031\output (Access is denied)


Is C:\messagepoint\reports\operationsReports\1\2\operationsReport_1_111031\output

the file you were
intending to write to?

Do you have any idea why access to this file is denied?

It looks suspiciously to me as if this is the name of a directory rather than a "real" file, which would probably account for the error.

Michael Kay