[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Exception thrown by OutputURIResolver: Invalid syn

Subject: Re: Exception thrown by OutputURIResolver: Invalid syntax for base URI: Illegal character
From: Lighton Phiri <lighton.phiri@xxxxxxxxx>
Date: Sun, 29 Jul 2012 19:48:21 +0200
Re:  Exception thrown by OutputURIResolver: Invalid syn
Thank you Michael. I was trying to explore the possibility of
preserving the directory names I am working with on disk, but seeing
that the only way out is to write another OutputURIResolver, then I'll
just rename all files with apprropriate URIs.

Just to give you a bit more context, I have a collection of digital
objects on disks with associated metadata in a database. I am moving
the metadata from the database to XML files and was basically trying
to preserve the original direct

Lighton Phiri
http://lightonphiri.org


On 29 July 2012 18:39, Michael Kay <mike@xxxxxxxxxxxx> wrote:
>
> I think that if you want to use filenames that aren't valid as URIs you will
> probably need to write your own OutputURIResolver. You might be able to get
> around the problem by %HH-escaping the special characters, but I suspect it
> will then write a filename containing the %HH escape sequence.
>
> Michael Kay
> Saxonica
>
>
> On 29/07/2012 16:30, Lighton Phiri wrote:
>>
>> 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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.