[Date Index][Thread Index]
[Date Prev][Date Next][Thread Prev][Thread Next]

Re: Including multiple files while retaining order



On Wednesday 18 April 2001 15:13, you wrote:
> Is there a way to include all the files in a directory, like
> #include 'blah/*'
> that will include the files in alphabetic order?
>
> If not, do you have a suggestion on how to do this? Macro expansion
> is done in pass 2 while perl is done in pass 3 so using perl
> doesn't cut it.

You can do it in mp4h (pass 2) with its <directory-contents ... /> tag. I'd 
suggest something like this:

<set-var l=<directory-contents "blah" matching=".*\\.wml$" /> />
<while <get-var l />
  <include <array-pop l /> />
</while>

(have'nt tested it though)

- Anders

______________________________________________________________________
Website META Language (WML)                www.engelschall.com/sw/wml/
Official Support Mailing List                   sw-wml@engelschall.com
Automated List Manager                       majordomo@engelschall.com