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

Hi David,

Bit of a guess here, but have you tried base-uri(/*) ?

Kind regards,
Geert

-----Oorspronkelijk bericht-----
Van: David Cramer [mailto:david@thingbag.net]
Verzonden: dinsdag 1 november 2011 21:42
Aan: XProc Dev
Onderwerp: The file name for the output of an xsl:result-document

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

Hi there,
I've created the following pipeline (to be used as part of a
Transformation Scenario
in Oxygen) that creates one result document the normal way and
several others using xsl:result-document. I'm puzzled by the need to
use p:store
to output the content from the secondary pipeline and to define an
output file.
The problem is that the output file name is in the xslt generated
based on
information in the source document.

What is the context used by the select in <p:with-option name="href"
select="????"/>

Thanks,
David

<?xml version="1.0" encoding="UTF-8"?>
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc"
xmlns:c="http://www.w3.org/ns/xproc-step"
    version="1.0">
    <p:input port="source"/>
   <!-- <p:output port="result" primary="true" sequence="false"/>-->
    <p:output port="secondary" primary="false" sequence="true"/>

    <p:validate-with-xml-schema assert-valid="true" mode="strict"
name="validate">
        <p:input port="schema">
            <p:document  href="xsd/wadl.xsd"/>
        </p:input>
    </p:validate-with-xml-schema>
    <p:xslt name="style" version="2.0">
        <p:input port="source">
            <p:pipe step="validate" port="result"/>
        </p:input>
        <p:input port="stylesheet">
            <p:document href="xsl/normalizeWadl.xsl"/>
        </p:input>
        <p:input port="parameters">
            <p:empty/>
        </p:input>
    </p:xslt>
    <p:validate-with-xml-schema assert-valid="true" mode="strict"
name="post-validate">
        <p:input port="schema">
            <p:document  href="xsd/wadl.xsd"/>
        </p:input>
    </p:validate-with-xml-schema>
    <!-- TODO: Figure out how to define the output file in the
transformation scenario -->
    <p:store href="foo.xml"/>
    <p:for-each>
        <p:iteration-source>
            <p:pipe step="style" port="secondary"/>
        </p:iteration-source>
        <p:store encoding="utf-8" indent="true"
omit-xml-declaration="false">
            <!--
                Why do I have to specify the output file here? I have
already
                specified it in the xslt based on information in the
source document.
            -->
            <p:with-option name="href" select="????"/>
        </p:store>
    </p:for-each>

</p:declare-step>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJOsFmYAAoJEMHeSXG7afUh2LEIAJ0lPmQLcfMPsGRY57vXj3/k
5Li+wwT3Y6VW7DvhCQnOcu12DVkI1r2oNCijL9BFFmX2RcxzT0gomyif1Qctt6+e
1Pw4fKKjbVE8ur8QGZcI8UsVAqpjAW6j3uUMfcS8LTAxy1wwknmWuFDjRYrn7W5+
3Bvfp13MkphwoU5G8rSiYUc6jrpbwN1odvrjpdCHX3xff+vN+aQLPCZgvXWRLZAd
/KUYM6Jb6sVTkj6b4tFbOCAf+X4hvMsKv5YWQpDhMB37uq6TOBEDfbEEu4DYmYJY
CFSaoQIeojt2zWMOaGW5GspU+GHm1T3MgiH4u9ae45+O0mVmROE8rSH/3uBH/9o=
=ETvU
-----END PGP SIGNATURE-----

Received on Thursday, 3 November 2011 17:53:00 UTC