Skip to content

Commit

Permalink
Update to recursive directory listing
Browse files Browse the repository at this point in the history
Added code to support URL resolution to match that in the non recursive version.
  • Loading branch information
nic-gibson committed Nov 10, 2014
1 parent 8144277 commit 72a9e29
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
Binary file added dist/xproc-tools-0.2.4.xar
Binary file not shown.
16 changes: 15 additions & 1 deletion src/recursive-directory-list.xpl
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,19 @@
never stop. At least one directory listing level will always be generated</p>
</p:documentation>
</p:option>

<p:option name="resolve" select="'false'">
<p:documentation xmlns="http://www.w3.org/1999/xhtml">
<p>The <code>resolve</code> options sets whether or not the <code>uri</code>
attribute is created for a directory or file. If set to <strong>true</strong> then
an additional attribute — <code>uri</code> — is set. This attribute contains
the resolved uri for any file or directory</p>
</p:documentation>
</p:option>


<p:import href="http://xmlcalabash.com/extension/steps/library-1.0.xpl"/>
<p:import href="directory-list.xpl"/>
<p:import href="http://www.corbas.co.uk/xproc-tools/directory-list"/>

<!-- find out the directory separator -->
<pos:info name="get-os-info"/>
Expand All @@ -97,6 +107,7 @@
<p:with-option name="include-filter" select="$include-filter"/>
<p:with-option name="exclude-filter" select="$exclude-filter"/>
<p:with-option name="match-path" select="$match-path"/>
<p:with-option name="resolve" select="$resolve"/>
</ccproc:directory-list>

<p:viewport match="/c:directory/c:directory" name="recurse-directory">
Expand All @@ -107,6 +118,7 @@


<p:choose>

<p:when test="$depth != 0">

<ccproc:recursive-directory-list>
Expand All @@ -115,7 +127,9 @@
<p:with-option name="exclude-filter" select="$exclude-filter"/>
<p:with-option name="match-path" select="$match-path"/>
<p:with-option name="depth" select="$depth - 1"/>
<p:with-option name="resolve" select="$resolve"/>
</ccproc:recursive-directory-list>

</p:when>

<p:otherwise>
Expand Down
2 changes: 1 addition & 1 deletion xproject/project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<project xmlns="http://expath.org/ns/project"
name="http://www.corbas.co.uk/xproc-tools"
abbrev="xproc-tools"
version="0.2.3">
version="0.2.4">

<title>XProc Tools</title>

Expand Down

0 comments on commit 72a9e29

Please sign in to comment.