pmd/docs/_includes/custom/xpath_fun_doc.html

121 lines
3.6 KiB
HTML
Raw Normal View History

2019-03-06 01:29:53 +01:00
{% for lang in site.data.xpath_funs.langs %}
2019-04-05 11:43:07 +02:00
<!-- Generates the documentation of XPath functions. -->
2019-03-06 01:29:53 +01:00
### {{ lang.name }}
{{ lang.name }} functions are in the namespace `{{ lang.ns }}`.
2019-04-05 14:13:39 +02:00
<div class="table-responsive">
<table width="100%">
2019-03-06 02:22:36 +01:00
<thead>
<tr>
<th>Function name</th>
<th>Description</th>
2019-04-05 14:13:39 +02:00
<th></th>
2019-03-06 02:22:36 +01:00
</tr>
</thead>
{% for fun in lang.funs %}
2019-04-05 14:13:39 +02:00
{% capture fun_id %}{{ lang.ns | append: '-' | append: fun.name }}{% endcapture %}
2019-04-05 11:43:07 +02:00
2019-04-05 14:13:39 +02:00
<tr data-toggle="collapse" id="{{ fun_id }}" data-target="{{ fun_id | prepend: '#' | append: '-expand' }}" class="accordion-toggle">
2019-03-06 02:22:36 +01:00
<td>{{ fun.name }}</td>
2019-04-05 14:13:39 +02:00
<td>{{ fun.shortDescription }}</td>
2019-03-06 02:22:36 +01:00
<td>
2019-04-05 14:13:39 +02:00
<button type="button" class="btn btn-link"><i
class="fa fa-ellipsis-h"></i></button>
2019-03-06 02:22:36 +01:00
</td>
</tr>
2019-04-05 11:43:07 +02:00
<tr>
<td colspan="4" class="hiddenRow">
2019-04-05 14:13:39 +02:00
<div class="accordion-body collapse" id="{{ fun_id | append: '-expand' }}">
<div style="margin-left: 15px" class="xpath-fun-doc">
<h4 class="fun-details-header">
<span class="fun-ns">{{ lang.ns | append: ':' }}</span><span
class="fun-name">{{ fun.name }}</span><span
class="fun-ns">{{ fun | xpath_fun_type }}</span>
</h4>
<div style="margin-left: 30px">
<dl>
<dd>{{ fun.description }}</dd>
<dt>Remarks</dt>
<dd>{{ fun.notes }}</dd>
{% unless fun.parameters.size == 0 %}
<dt>Parameters</dt>
<dd>
<div style="margin-left: 20px">
<dl>
{% for param in fun.parameters %}
<dt>
<span class="param-name">{{ param.name }}</span>
<span class="param-type"> as {{ param.type }}</span>
</dt>
<dd>{{ param.description }}</dd>
{% endfor %}
</dl>
</div>
</dd>
{% endunless %}
{% unless fun.examples.size == 0 %}
</dl>
<h5>Examples</h5>
<table>
{% for example in fun.examples %}
<tr>
<td><code>{{ example.code }}</code></td>
<td>{{ example.description }}</td>
</tr>
{% endfor %}
</table>
{% endunless %}
</div>
</div>
2019-04-05 11:43:07 +02:00
</div>
</td>
</tr>
2019-03-06 02:22:36 +01:00
{% endfor %}
</table>
</div>
{% unless lang.examples.size == 0 %}
#### Examples
{% for example in lang.examples %}
* `{{ example.code }}`<br/>&nbsp;&nbsp;&nbsp;&nbsp;{{example.outcome }}
{% endfor %}
2019-03-06 01:29:53 +01:00
{% endunless %}
{% endfor %}