Re: [xsl] OutputURIResolver Cause: net.sf.saxon.trans

Subject: Re: [xsl] OutputURIResolver Cause: net.sf.saxon.trans
From: Michael Kay <mike@xxxxxxxxxxxx>
Date: Tue, 21 Feb 2012 12:15:58 +0000
To save people wasting their time, you might like to read my responses here:

https://sourceforge.net/projects/saxon/forums/forum/94027/topic/5050903/index/page/1

before adding your own. Of course, if you can find a better answer than I have been able to provide, I would not want to discourage you!

Michael Kay
Saxonica

On 21/02/2012 12:03, team wise wrote:
Hi the list members,
Can anyone give me some insights to troubleshoot the problem as indicated below?

When compiling a set of XSLT version 1.0/1.1 style sheets using SAXON
9, I encountered with error as follows :
Exception thrown by OutputURIResolver Cause:: Resolved URL is malformed

Before which a number of other errors had been surpressed and one of
which in question is explained below:

Below reveals an extracted version of a full log of the latest Ant
Build failure:
Processing started...
Initialize log directory and file name...
Validate and init input arguments...
[echo] *********************************************************
[echo] * basedir = D:\InfoShare\App\Utilities\DITA-OT\SEMC_InfoShare
[echo] * dita.dir = D:\InfoShare\App\Utilities\DITA-OT\SEMC_InfoShare
[echo] * input =
D:\InfoShare\Data\PublishingService\Data\DataExports\GUID-75CD4383-F94E-49AA-8182-9776535F8522.20120214202004701\1\en\workset/GUID-C9CA7357-CBA3-43B3-A4B2-B977AD1B7D1E.ditamap
[echo] * transtype = mobilewebguidenxt
[echo] * tempdir =
D:\InfoShare\Data\PublishingService\Data\DataExports\GUID-75CD4383-F94E-49AA-8182-9776535F8522.20120214202004701\1\en\workset/temp
[echo] * outputdir =
D:\InfoShare\Data\PublishingService\Data\DataExports\GUID-75CD4383-F94E-49AA-8182-9776535F8522.20120214202004701\1\en\out
[echo] * extname = .xml
[echo] * clean.temp = no
[echo] * xslt.parser = SAXON
[echo] * HTMLHelpCompiler = ${HTMLHelpCompiler}
[echo] * pdf.formatter = ah
[echo] *********************************************************
Preprocessing started...
Clean temp directory...
GenMapAndTopicListModule.execute(): Starting...
[pipeline] Using XERCES.
[pipeline] Using Xerces grammar pool for DTD and schema caching.
GenMapAndTopicListModule.execute(): Execution time: 2.61 seconds
Generate file list...
Copy necessary files needed for the computer web output...
DebugAndFilterModule.execute(): Starting...
[pipeline] Using Xerces grammar pool for DTD and schema caching.
[pipeline] Using Xerces grammar pool for DTD and schema caching.
DebugAndFilterModule.execute(): Handling file
GUID-54F20824-43B5-4CE1-8EA2-400F1CB13716.xml...
Execution time: 1.188 seconds
Debug and filter input files...
Move metadata entries...
Resolve conref push...
Resolve conref in input files...
[xslt] Loading stylesheet
D:\InfoShare\App\Utilities\DITA-OT\SEMC_InfoShare\xsl\preprocess\conref.xsl
[xslt] D:\InfoShare\App\Utilities\DITA-OT\SEMC_InfoShare\xsl\InfoShare\xslhtml\ditamap-transformation.xsl:36:
Error! java.io.FileNotFoundException:
D:\InfoShare\Data\PublishingService\Data\DataExports\GUID-75CD4383-F94E-49AA-8182-9776535F8522.20120214202004701\1\en\workset\temp\GUID-30956BCB-576E-4180-9CE4-044B7E9474A3.ditamap
(The system cannot find the file specified) Cause:
java.io.FileNotFoundException:
D:\InfoShare\Data\PublishingService\Data\DataExports\GUID-75CD4383-F94E-49AA-8182-9776535F8522.20120214202004701\1\en\workset\temp\GUID-30956BCB-576E-4180-9CE4-044B7E9474A3.ditamap
(The system cannot find the file specified)
[xslt] Loading stylesheet
D:\InfoShare\App\Utilities\DITA-OT\SEMC_InfoShare\xsl\InfoShare\xslhtml\clean-up.xsl
h3. [xslt] : Fatal Error! Exception thrown by OutputURIResolver Cause:
net.sf.saxon.trans.XPathException: Resolved URL is malformed [xslt]
Failed to process
D:\InfoShare\Data\PublishingService\Data\DataExports\GUID-75CD4383-F94E-49AA-8182-9776535F8522.20120214202004701\1\en\workset\temp\toc.ditamap
Processing ended.

BUILD FAILED

To help you get more background information, the other errors
suppressed and resolutions are described as follows:

First problem:
Fatal error [xslt]
D:\InfoShare\App\Utilities\DITA-OT\SEMC_InfoShare\xsl\InfoShare\common\infoshare.filesystem.xsl:133:
Fatal Error! There is more than one method matching the function call
file:new, and there is insufficient type information to determine
which one should be used
Solutions:
I attempted the following in line with your post entitled Test if an
(image) file exists at
http://www.oxygenxml.com/archives/xsl-list/200506/msg00400.html

modified the problematic XSL either by
From:<xsl:value-of select="file:exists(file:new($filename))"/>

To:<xsl:value-of select="file:exists(file:new($filename as xs:string))"/>

Or change the line 132
From:
<xsl:param name="filename"/>
To:
<xsl:param name=" filename as xs:string "/>

But the above solutions did not come through, which led me to disable
all calls to the named template file-exists. This affects a number of
different XSLs.

The second problem and its solution:
@herf attribute is not allowed in Document() ; Changed all occurrence
of document (@href, ) to result-document(@href, ).
In case the switch from document() to result-document() is
problematic, please could you advise how to fix the error that @href
is not allowed in Document()? in the XSL where the exact problem was
complained about, its version reads '<xsl:stylesheet version="1.1"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>'.

The Third problem and its solution:
XHTML namespace is not declared in transform.title.xsl Solution : Declared it.

Current Thread