- From: Tony R. <tony@gonk.net>
- Date: Wed, 25 May 2011 10:27:51 -0400
- To: XProc Dev <xproc-dev@w3.org>
- Message-Id: <40F97F60-CF40-4F01-ADB3-B656A3432E04@gonk.net>
XProc pipeline snippet: <p:variable name ="cwd" select ="'/path/to/my/project'" /> <p:variable name ="dir-lib" select ="concat($cwd,'/lib')" /> <p:variable name ="dir-mylib" select ="concat($cwd,'/mylib')" /> <p:variable name ="dir-src" select ="concat($cwd,'/src')" /> <p:variable name ="dir-tests" select ="concat($cwd,'/tests')" /> <p:variable name ="dir-build" select ="concat($cwd,'/build')" /> <p:variable name ="dir-logs" select ="concat($cwd,'/logs')" /> Motivation: Basically, I’ve been hardcoding all these paths, and I’m trying to make things more maintainable. Note: I usually prefer to always put a trailing slash on directories wherever possible. My pipeline is still be tweaked all the time, and I don’t remember why I departed from the trailing slashes, but it bugs me. I just wanted that on record. ☺ Looking for: Feedback, alternatives, best practices.
Received on Wednesday, 25 May 2011 14:28:19 UTC