W3C home > Mailing lists > Public > xproc-dev@w3.org > September 2008

Re: 2 questions about p:store

From: mozer <xmlizer@gmail.com>
Date: Mon, 29 Sep 2008 22:09:06 +0200
Message-ID: <21d9ade60809291309l310bd0e2i8b0513b4b0bd0e41@mail.gmail.com>
To: "James Garriss" <james@garriss.org>
Cc: "XProc Dev" <xproc-dev@w3.org>

On Mon, Sep 29, 2008 at 9:27 PM, James Garriss <james@garriss.org> wrote:
> A pipeline that contains this:
>
>    <p:for-each name="step1">
>        <p:iteration-source select="//Book"/>
>        <p:store href="books.xml"/>
>    </p:for-each>
>
>
> might overwrite the file "books.xml" many times.
>
> 1) Does the the XProc spec give guidance to XProc processors on how to
> handle overwrites?  Should it?

Don't think so
>
> 2) How would you prevent an overwrite?  Is there a way to give a unique
> filename for each book when p:store writes it?

Yes
Try

     <p:store>
       <p:with-option name="href" select="concat('books-',
p:iteration-position(), '.xml')">
          <p:empty/>
       </p:with-option>
     </p:store>


Xmlizer
Received on Monday, 29 September 2008 20:09:48 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 29 September 2008 20:09:49 GMT