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

Re: Can't get expath-file functions to work in Saxon 9

Subject: Re: Can't get expath-file functions to work in Saxon 9.5 PE
From: Martin Holmes <mholmes@xxxxxxx>
Date: Mon, 24 Feb 2014 05:30:54 -0800
 Re: Can't get expath-file functions to work in Saxon 9
Thanks Michael. I was trying to follow the documentation:

<http://www.saxonica.com/documentation/#!functions/expath-zip>

which mentions that it's unstable but doesn't say anything about its having been withdrawn. It might be a good idea to remove that section, or put a note there to say that it's no longer included.

I'll see if I can reproduce the problem I had with the namespace before, and if so I'll report it with a test case on Saxonica.

Cheers,
Martin

On 14-02-24 01:12 AM, Michael Kay wrote:

The ZIP module is not supported in 9.5.1.4.


We shipped a version in earlier releases of the 9.5 series, but we
found it was very buggy, and when we started writing tests we found
the spec wasn't really stable enough to write tests against. So we
decided to pull it. We're working with others on getting a stable
specification that can be properly implemented.

(I don't understand the problems with namespace prefix reported
earlier on this thread; if someone wants to report an issue to
Saxonica then I'm happy to investigate it, but we don't regard a
message on this list as something to put on our TODO list unless we
happen to know the answer.)

Michael Kay Saxonica

On 24 Feb 2014, at 00:58, Martin Holmes <mholmes@xxxxxxx> wrote:

That does work for expath file functions, but I can't get the zip
functions to work. I wonder if anyone can suggest what I'm doing
wrong here. You have to pass a <zip:file> element to the
expath-zip:zip:file() function, and the simplest way I can see to
do that is to create the zip:file element inside a variable and
then pass the variable to the function:

<xsl:variable name="zipFile"> <zip:file href="{$outputFilePath}">
<zip:dir name="META-INF"> <zip:entry name="manifest.xml"
src="{concat($tempDir, '/META-INF/manifest.xml')}" method="xml"/>
</zip:dir> </zip:file> </xsl:variable>

<xsl:sequence select="zip:zip-file($zipFile/zip:file)"/>

I've also tried with

<xsl:sequence select="zip:zip-file($zipFile)"/>

I've tried using both "zip" and "expath-zip" as the namespace
prefix; in all cases I get this error:

Cannot find a matching 1-argument function named
{http://expath.org/ns/zip}zip-file().

I know this isn't yet intended to be stable, but I would have
thought the function would be accessible even if it fails somehow.

cheers, Martin

On 14-02-23 01:48 PM, Graydon wrote:
On Sun, Feb 23, 2014 at 01:37:00PM -0800, Martin Holmes
scripsit:
Hi there,

I'm using Saxon 9.5.1.3 PE in Oxygen 15.2 with XSLT 2.0. I'm
trying to use the expath-file functions, which the
documentation says are available. This is a simple version of
what I'm trying:


...xmlns:expath-file="http://expath.org/ns/file"...
[snip]

xmlns:file="http://expath.org/ns/file"

is currently not giving me that error.

Disturbingly, file:exists() is returning true about a file that
isn't showing up in a directory that isn't there on the file
system, so I've clearly got a ways to go with this, but I think
that's the correct namespace so far as Oxygen is concerned.
(Though I am using XSLT 3.0).

-- Graydon

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.