xsl-list
[Top] [All Lists]

Re: RE: Saxon servlet and xsl:result-document (multiple documents) problem

2004-04-09 09:42:01

Many thanks, it already helped me somewhat further.

So I did the following in my stylesheet:

<xsl:variable name="pos_as_string" select="string(position())" /> 
<xsl:variable name="file"
select="concat('http://localhost:8080/servlets-examples/file',$pos_as_string,'.html')"
/> 
<xsl:result-document href="{$file}">
<!-- do everything needed -->
</xsl:result-document>

I also use <xsl:message> to check the value of $file
and see in the Tomcat logs:
"Creating file http://localhost:8080/servlets-examples/file1.html";
(generated by the xsl:message), and
"Writing to http://localhost:8080/servlets-examples/file1.html";
(generated by the SaxonServlet after adding FeatureKeys.TIMING 
according to your suggestion). 

However, nothing seems to be written.

I also deployed everything to my public Linux webserver (of course
adapting the localhost to the real URL) and did 'chmod 777
servlets-examples' to ensure that everything has write access to the
directory.

In the Tomcat loggings I see the same things ("writing to ...
messages"), but also there I see nothing created.

Any idea what I am doing wrong ?

Jozef

P.S. I did not change anything in the "new StreamResult(out)" of the
SaxonServlet as I did not entirely understand your suggestion.

--------------------------------



Michael Kay <mhk(_at_)mhk(_dot_)me(_dot_)uk> schrieb am 08.04.2004, 22:54:41:
Firstly, I think you will need to use absolute URIs in the href attribute.
If you use relative URIs, there's nothing really for them to be resolved
against.

Secondly, the sample servlet uses "new StreamResult(out)" as the transform
destination. I think you may have to change this so the systemId on the
result object is set.

Finally, for diagnostics, try setting the FeatureKeys.TIMING feature on the
TransformerFactory. This causes Saxon to trace the names of secondary output
files to System.err, which will probably end up in the servlet container's
log file.

Michael Kay

-----Original Message-----
From: xml4pharma(_at_)compchemcons(_dot_)com 
[mailto:xml4pharma(_at_)compchemcons(_dot_)com] 
Sent: 08 April 2004 19:16
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] Saxon servlet and xsl:result-document 
(multiple documents) problem


I have a stylesheet that creates several output documents (using
multiple xsl:result-document). It works fine with Saxon from line
command.

Now I want to use the SaxonServlet to have it generated on 
the server. 
I tried several things for defining the URI, but I can't see any
documents being written on the server (at the moment I am still using
http://localhost:8080/test on my Windows 2000 computer).
Can anyone tell me how I have to define the output path so that the
files are really created on the server ?
Or do I have to change anything in the SaxonServlet ?

Many thanks in advance

Jozef Aerts
xml4pharma(_at_)compchemcons(_dot_)com

--+------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
--+--




--+------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
--+--


<Prev in Thread] Current Thread [Next in Thread>