Script: pathfragment-element
The purpose of a pathfragment is to define a path that can be used in other parts of the script, and in most processing instructions that has a location as attribute. This is helpfull if we want to rearrange our filestructure. A pathfragment may be any part of a path. The definition-element may contain any number of pathfragments.
<pathfragmet id="" value=""/>
id(mandatory) | Any string that will identify the pathfragment. |
value(mandatory) | Any string that is a legal part of an URI or a filepath. |
alternative(optional) | Any string that is a legal part of an URI or a filepath. If your script is used both on windows and an operating system with unix-like filepaths, you may use value and alternative to describe both alternatives. WXT will select the one that is most likely to be matching the current operating system. (looking for cases like 'n:\' or '\' or '/'). When alternative is not used, WXT does not discriminate between \ and /. |
The pathfragment _scriptcatalog is predefined as the filepath to the catalog containing the script
The pathfragment _scripturi is predefined as the URI defining the script, as string
A pathfragment is treated "as is".
Pathfragments are used like this: ${fragmentid}, see for instance Command
Examples:
<pathfragment id="myroot" value="/mydir" /> <pathfragment id="antpath" value="c:/fixed/apache-ant/bin" /> <pathfragment id="princepath" value="c:/fixed/prince/Engine/bin" /> <pathfragment id="mydata" value="c:\fixed\data\ " alternative="/home/fixed/data/" />