Hi Martin,

Saxon likes the stylesheet just fine if I just run it from the command line.

I think the error falsely hints at a stylesheet error, and I also went down that path. But I'm nearly 100% sure it is not a stylesheet error. In fact, when I first started getting this error, I replaced my fancy stylesheet with one that does nothing more than an identity transform. And I still got the error. So here's the exact template that the error message calls out (don't laugh):

<xsl:template match="node()|@*">
 <xsl:copy> <!-- and this is line 10 -->
  <xsl:apply-templates select="@*|node()"/>

I thought maybe the answer was along the lines of changing:

File x_i = new File(InputFile.toURI());


File x_i = new File(InputFile.toURI().toURL());

(in hopes that this would solve what I perceive to be Saxon's dislike the the windows-y synax - fixing it to the correct file: and forward slash syntax) - But the .toURL() is not cool with Java, I think. I suppose I could do some manual string fixes, but I hoped for a more universal solution (i.e., OS agnostic), if this is even the problem.



On Wed, Nov 11, 2009 at 10:58 AM, Martin Honnen <Martin.Honnen@arcor.de> wrote:
Bryan Schnabel wrote:

> I ran it in verbose mode, and got some telling errors (I'm just not
> experienced enough to know exactly what they are telling me). It clearly
> finds the files (making reference to actual elements in the source,
> "processing /rooty/p[1]" and actual code in the XSLT, "  at
> xsl:apply-templates
> (file:/C:/presentations/D-Europe-2009/presentation-and-demo/newD-XF-rt/xml2xf.xsl#11)"):
> --snip --
> Error at xsl:copy on line 10 of xml2xf.xsl:
>   java.net.URISyntaxException: Illegal character in opaque part at index
> 2: C:\D
> ocuments and
>   Settings\JG\Desktop\try\my.xml.xf

URIs use the slash '/' and not the backslash '\'. So instead of e.g.
C:\Documents and Settings
you need e.g.

How exactly do the lines of the stylesheet look that cause the error
(i.e. line 10 and some lines before and after that)?


       Martin Honnen

Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
saxon-help mailing list archived at http://saxon.markmail.org/