We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
This is the snippet:
<macrodef name="dita-cmd"> <attribute name="input"/> <attribute name="format"/> <attribute name="propertyfile"/> <sequential> <exec executable="${dita.dir}/bin/dita"> <arg line="-i @{input} -f @{format} -propertyfile @{propertyfile}"/> </exec> </sequential> </macrodef>
Unfortunately the Ant <macrodef> is not handy for using optional attributes. So, if you'd like to create a macro that also supports --filter, like so:
<macrodef>
--filter
<macrodef name="dita-cmd"> <attribute name="input"/> <attribute name="format"/> <attribute name="filter"/> <attribute name="propertyfile"/> <sequential> <exec executable="${dita.dir}/bin/dita"> <arg line="-i @{input} -f @{format} --filter=@{filter} --propertyfile=@{propertyfile}"/> </exec> </sequential> </macrodef>
... it would break, if you'd like to call the macro without a filter attribute.
I recommend to add a note that recommends to pass filter files by using the args.filter property in the propertyfile.
args.filter
The text was updated successfully, but these errors were encountered:
This behavior is not peculiar to the filter parameter, so I'm not sure it's worth mentioning that by name. As the Ant MacroDef task docs explain:
The values of the attributes get substituted into the templated task. The attributes will be required attributes unless a default value has been set.
I'll add a note to clarify that any optional parameters should be defined in .properties files.
.properties
Sorry, something went wrong.
52d04e0
infotexture
No branches or pull requests
This is the snippet:
Unfortunately the Ant
<macrodef>
is not handy for using optional attributes. So, if you'd like to create a macro that also supports--filter
, like so:... it would break, if you'd like to call the macro without a filter attribute.
I recommend to add a note that recommends to pass filter files by using the
args.filter
property in the propertyfile.The text was updated successfully, but these errors were encountered: