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

Re: Problem with Collections -- Getting a Failed to lo

Subject: Re: Problem with Collections -- Getting a Failed to load colleaction catalogue error
From: Jeff Sese <jsese@xxxxxxxxxxxx>
Date: Wed, 27 Jun 2007 09:30:13 +0800
Re:  Problem with Collections -- Getting a Failed to lo
Thanks, i figured this out later in the day but forgot to tell the list about it... but thanks anyway!


Abel Braaksma wrote:
Hi Jeff (2),

Sorry about my prev. post. If you use it on Windows, you should not have a problem with caps. Looking at your code again, I notice that you omitted the 'file:///' or 'file:/' on your commandline. The result is that you give a relative path, most likely relative to your current XSLT document, which is (again most likely) not what you want.

Change your path to file:///d:/your/path/here
And if you have spaces in your path, change them to %20 (it must be a correct URI).

I tried and tested the following, which works:

<xsl:for-each select="for $x in

        return saxon:discard-document($x)">
           <file-loaded href="{base-uri()}" />

When you run it with your paths, it should display all documents it could find on that location (note that on-error=ignore only ignores non-xml docs, it does not ignore illegal path errors)

-- Abel Braaksma

Abel Braaksma wrote:
Hi Jeff,

I am guessing here: I note that the absolute path that you use differs in matters of caps compared to the reported path for the XSLT file, i.e. d:/rnd vs. D:/RND. May this be part of the problem (though I'd guess that a non-existing path should return an empty sequence or a different error)?

-- Abel

Jeff Sese wrote:

I have this instruction in my xsl:

<xsl:param name="path" as="xs:string" required="yes"/>
<xsl:variable name="docs" as="node()*" select="collection(concat($path, '?select=*.xml'))"/>

and trying to run it in the command line using:

java net.sf.saxon.Transform -it main xslt\Merge_Sort.xsl mode=body path=d:/rnd/Berichtigungsliste/sample/input/body > xslt\BL5-7_body_test.xml

but i get an error of:

Error on line 1 column 1 of file:///d:/rnd/Berichtigungsliste/sample/input/body:
SXXP0003: Error reported by XML parser: Content is not allowed in prolog.
Error FODC0005: org.xml.sax.SAXParseException: Content is not allowed in prolog.
Error on line 6 of file:/D:/RND/Berichtigungsliste/xslt/Merge_Sort.xsl:
FODC0004: Failed to load collection catalogue d:/rnd/Berichtigungsliste/sample/input/body
Transformation failed: Run-time errors were reported

But when i use a relative path as the value for $path like:

java net.sf.saxon.Transform -it main xslt\Merge_Sort.xsl mode=body path=../sample/input/body > xslt\BL5-7_body_test.xml

it works... what am i doing wrong here?


Current Thread


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.
First Name
Last Name
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.