Re: p:directory step

/ Alex Milowski <alex@milowski.org> was heard to say:
| On 8/1/07, Norman Walsh <ndw@nwalsh.com> wrote:
|> Revised slightly:
|>
|> Vasil Rangelov proposes[1] an atomic step to read a directory listing
|> and return it as a document. Jeni and I chatted about it a bit and it
|> seems like a good idea. Here's my (slightly revised) proposal:
|>
|> <p:declare-step type="p:directory-list">
|>   <p:output port="result"/>
|>   <p:option name="path" value="."/>
|>   <p:option name="recursive" value="no"/>
|>   <p:option name="filter"/>
|> </p:declare-step>

So, for example,

<p:directory-list filter="*.xml"/>

might return:

<c:folder path="/home/ndw">
  <c:file path="/home/ndw/flickr.xml"/>
  <c:file path="/home/ndw/jungledisk-backup.xml"/>
</c:folder>

It could, alternatively, return:

<c:folder path="/home/ndw" xml:base="file:///home/ndw/">
  <c:file name="flickr.xml"/>
  <c:file name="jungledisk-backup.xml"/>
</c:folder>

But that just seems to put more burden on the step(s) that want to use
the listing. Seems simpler to just send back all the paths fully
qualified.

                                        Be seeing you,
                                          norm

-- 
Norman Walsh <ndw@nwalsh.com> | The belief in a supernatural source of
http://nwalsh.com/            | evil is not necessary; men alone are
                              | quite capable of every
                              | wickedness.--Joseph Conrad

Received on Wednesday, 1 August 2007 16:45:05 UTC