Re: how to get the name of a document?

you could also indirectly get generated filenames using p:directory-list step

hth, Jim Fuller

2009/4/6 James Fuller <james.fuller.2007@gmail.com>:
> You could redesign your process to facilitate things in xproc e.g.
>
> * pass in a parameter into the xslt, from xproc so you 'know about it'
> ... a p:variable maybe the way to go
>
> or if you can't change things you could define a p:variable that
> stores the result document @href by looking at the stylesheet itself
>
> <p:variable name="document-href">
> <p:input port="stylesheet" select="somepath..../xsl:result-document/@href">
>      <p:pipe step="main" port="style"/>
> </p:input>
> </p:variable>
>
> hth, Jim Fuller
>
>
> 2009/4/1 Maxime Bégnis <maxime@neodoc.biz>:
>> Hi,
>>
>> Considering this pipeline:
>>
>> ||<p:declare-step name="main" xmlns:p="http://www.w3.org/ns/xproc">
>>
>>  <p:input port="source" primary="true"/>
>>
>>  <p:input port="style" primary="false"/>
>>
>>  <p:xinclude name="included">
>>    <p:input port="source">
>>      <p:pipe step="main" port="source"/>
>>    </p:input>
>>  </p:xinclude>
>>
>>  <p:xslt name="xslt">
>>    <p:input port="parameters">
>>      <p:empty/>
>>    </p:input>
>>    <p:input port="source">
>>      <p:pipe step="included" port="result"/>
>>    </p:input>
>>    <p:input port="stylesheet">
>>      <p:pipe step="main" port="style"/>
>>    </p:input>
>>  </p:xslt>
>>
>>  <p:for-each>
>>    <p:iteration-source>
>>      <p:pipe step="xslt" port="secondary"/>
>>    </p:iteration-source>
>>    <p:store>
>>      <p:with-option name="href" select="?"/>
>>    </p:store>
>>  </p:for-each>
>>
>> </p:declare-step>
>>
>> the stylesheet outputs several documents using 'xsl:result-document' and
>> I would like to store them with the name given in the "href" attribute
>> of 'xsl:result-document'. Does anyone knows if there is a way to get
>> back this attribute?
>>
>>
>> Thanks.
>>
>> Maxime Bégnis
>>
>>
>>
>

Received on Monday, 6 April 2009 09:50:07 UTC