pmd/docs/_includes/custom/xpath_fun_doc.html
2020-02-05 20:46:17 +01:00

71 lines
1.6 KiB
HTML

{% for lang in site.data.xpath_funs.langs %}
### {{ lang.name }}
{{ lang.name }} functions are in the namespace `{{ lang.ns }}`.
<div class="table-responsive">
<table>
<thead>
<tr>
<th>Function name</th>
<th>Parameters</th>
<th>Description</th>
<th>Notes</th>
</tr>
</thead>
{% for fun in lang.funs %}
<tr>
<td>{{ fun.name }}</td>
<td>
{% if fun.parameters.size == 0 %}
None
{% elsif fun.params_are_same_as %}
(Same as for `{{ fun.params_are_same_as }}`)
{% elsif fun.parameters.size == 1 %}
1: {{ fun.parameters[0].description }}
{% else %}
<ul>
{% for i in 0..fun.parameters.size %}
{{ assign param = fun.parameters[i] }}
<li>{{ i + 1 }} : {{ param.description }}</li>
{% endfor %}
</ul>
{% endif %}
</td>
<td>{{ fun.description }}</td>
<td>
{% if fun.notes_are_same_as %}
(Same as for `{{ fun.notes_are_same_as }}`)
{% else %}
{{ fun.notes }}
{% endif %}
</td>
</tr>
{% endfor %}
</table>
</div>
{% unless lang.examples.size == 0 %}
#### Examples
{% for example in lang.examples %}
* `{{ example.code }}`<br/>&nbsp;&nbsp;&nbsp;&nbsp;{{example.outcome }}
{% endfor %}
{% endunless %}
{% endfor %}