[oXygen-user] xsl:result-document and Saxon-SA gives "Cannot write to a URI that has already been read"

George Cristian Bina
Thu Jun 25 06:39:22 CDT 2009


Hi Andrew,

When you specify as XML input ${currentFileURL} for the transformation 
that will be resolved to the stylesheet location, as that is the current 
file when you run the transformation.

If there is no output specified oXygen sets on the output stream a 
system ID (to have eventual references to images for instance resolved 
correctly in the XHTML preview) and uses the stylesheet location for 
that. But as the stylesheet is set also as input Saxon complains that it 
cannot write to that location.

We get however the same behavior for both Saxon B and Saxon SA in oXygen.

If you do not need an input for the transformation then use the advanced 
processor options in the scenario to set initial template/initial mode 
for the transformation.

Best Regards,
George
-- 
George Cristian Bina
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

Andrew Welch wrote:
> Hi,
> 
> 
> 2009/6/25 Sorin Ristache <>:
>> I get the same error as you *only* when the output file is set to be the
>> same as the input XML file but:
>>
>> - I get the error with both Saxon B and Saxon SA,
>>
>> - it is an error reported correctly (not the bug that I mentioned) and
>>
>> - I get the same behavior in Oxygen as from a command line where I run
>> Saxon B/SA.
>>
>> You get the error only with Saxon SA so there is something different in
>> your transformation scenario. Please specify more details about your
>> scenario: the URL of the input XML, the URL of the input XSL, the value
>> of the field Save As, the full error message (including the URI that
>> cannot be written).
> 
> Its writing to standard out... I'm not setting any output file.
> 
> Its works as expected for me from the command line, and from Kernow,
> but not from oXygen.
> 
> To recreate the problem in oXygen:
> 
> - file -> new -> xsl
> - paste in the xslt
> - configure transformation scenario -> new -> choose Saxon SA
> - set XML and XSL to ${currentFileURL}
> - click ok, the click run transform
> 
> Do that and you get the exception.
> 
> You are probably resolving the href of xsl:result-document against the
> uri of the stylesheet, and because there is no href, the uri of the
> stylesheet is returned.
> 
> 
> 



More information about the oXygen-user mailing list