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

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

From: Geert Josten <geert.josten@dayon.nl>
Date: Thu, 3 Nov 2011 12:09:58 +0100
Message-ID: <a85b415fed32006e0d16f01729b0c9ab@mail.gmail.com>
To: David Cramer <david@thingbag.net>
Cc: XProc Dev <xproc-dev@w3.org>
Hi David,

Sounds like you want to put a p:variable at the top of your
pipeline/declare-step, do the base-uri(/) or base-uri(/*) there. That
takes the base-uri of the input, instead of the generated output. Then use
resolve-uri('foo.xml', $input-base-uri) to get a path for foo.xml in the
input folder..

Kind regards,
Geert

-----Oorspronkelijk bericht-----
Van: David Cramer [mailto:david@thingbag.net]
Verzonden: donderdag 3 november 2011 3:06
Aan: Geert Josten
CC: XProc Dev
Onderwerp: 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 17:53:04 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 3 November 2011 17:53:05 GMT