W3C home > Mailing lists > Public > xproc-dev@w3.org > November 2011

RE: The file name for the output of an xsl:result-document

From: <vojtech.toman@emc.com>
Date: Thu, 3 Nov 2011 08:12:01 -0400
To: <david@thingbag.net>, <geert.josten@dayon.nl>
CC: <xproc-dev@w3.org>
Message-ID: <3799D0FD120AD940B731A37E36DAF3FE33E1FD3328@MX20A.corp.emc.com>
David,

Instead of concat(), you probably want to use the fn:resolve-uri() or p:resolve-uri() XPath function. If you get the base URI of the source document (using fn:base-uri() or p:base-uri()), you can then combine it using resolve-uri() with the base URIs of the secondary documents.

Regards,
Vojtech

________________________________________
From: David Cramer [david@thingbag.net]
Sent: Thursday, November 03, 2011 3:05 AM
To: Geert Josten
Cc: XProc Dev
Subject: Re: The file name for the output of an xsl:result-document

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Thanks Geert. That helped. Using p:log, I learned that base-uri(/*)
causes the files land in my home directory with their appropriate file
names.

Now I just need to figure out how to say in xproc "In the same
directory as the source document" (or in some dir passed in from
Oxygen anyway). E.g. here:

<p:store href="concat(???, '/', 'foo.xml')"/>

and here:

<p:with-option name="href" select="concat( ???, '/', p:base-uri(/*))"/>

Though I could be going about it all wrong.

Thanks,
David

On 11/01/2011 04:10 PM, Geert Josten wrote:
> Hi David,
>
> Bit of a guess here, but have you tried base-uri(/*) ?
>
> Kind regards, Geert
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJOsfb3AAoJEMHeSXG7afUh2t4H/i/WEeAhy1ZBbGc8wfiymwmt
HYGBM5/PzpJ22ubz7XAB4gkI6l7CJuA2gCTz22MwHsVsXXKEaoh9/kx6Bj0bCOzD
myisIfYF+OsUxEMVzKhyuZ7UniuAENb1sXeS/VEq9U421aBDwAbOECNKAR3lJV1t
wncD0d9+Aep9g2q11/VqskW52CY8AURPoc53JPL/K+AF9lACXlH15xJmje+0LT7H
e1hGegEhl3qRntbnhhfT3IwfX6hHSGj75Vi6WIfwScaxzOrHDanu/FVjWvTnVBXS
kfbfye016vlok1YEHVDqKABgmki3KkUw5LpzjgM0ITfNs5w65LCwTu/IQhWgXMw=
=daJ4
-----END PGP SIGNATURE-----
Received on Thursday, 3 November 2011 12:16:14 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 3 November 2011 12:16:15 GMT