[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] Exception thrown by OutputURIResolver: Invalid syntax for base URI: Illegal character


Subject: [xsl] Exception thrown by OutputURIResolver: Invalid syntax for base URI: Illegal character
From: Lighton Phiri <lighton.phiri@xxxxxxxxx>
Date: Sun, 29 Jul 2012 17:30:05 +0200

I am working with XSLT 2.0 using Saxon 9.1.0.8J, and attempting to
write child elements by dynamically creating file paths, however, at
some point during processing, I run into the error below.

    <source node="/sitesdata/site[272]" line="56663"
file="chunkXMLExportNormalised.xml">
     <xsl:template match="site" line="23" column="31"
module="splitPreprocessor.xsl">
      <xsl:variable name="tmp-normalised-localName" line="26"
module="splitPreprocessor.xsl">
       <xsl:variable name="tmp-filename" line="52"
module="splitPreprocessor.xsl">
        <xsl:variable name="filename" line="54" module="splitPreprocessor.xsl">
         <xsl:result-document href="{$filename}" line="59" column="46"
module="splitPreprocessor.xsl">
Error on line 59 of splitPreprocessor.xsl:
  Exception thrown by OutputURIResolver: Invalid syntax for base URI:
Illegal character in
  path at index 60:
../data/Sites/3218AD%5C%20Eland%5C's%5C%20Bay/Koppie/K740%5C[1%5C]/273.metadata
Transformation failed: Run-time errors were reported

A quick check online [1] seems to suggest that its something to do
with square brackets in file paths, and true to that, some of my file
paths have '[' and ']' characters in them. How do I resolve this?

[1] http://www.velocityreviews.com/forums/t598542-square-bracket-possible-in-href-of-xsl-result-document.html

Lighton Phiri
http://lightonphiri.org


Current Thread
Keywords