{# Here we render only what should appear as the entry text, but try to
avoid any additional HTML formatting.
NB: you probably need tag filters `text`.
#}
{%- import "lexicon.macros" as macros with context -%}
{%- set first_l = lexicon_entry|xpath('lg/l')|first %}
{%- set pos = first_l|xpath('@pos')|first %}
{%- if pos == 'Pron' %}
{% set pos_type = first_l|xpath('@type')|tagfilter(_from, _to) %}
{# set pos_text = pos|tagfilter(_from, _to) + " " + pos_type #}
{% set pos_text = pos|tagfilter(_from, _to) %}
{% elif pos == 'N' and first_l.attrib.get('type') %}
{% if first_l.attrib.get('type') == 'Prop' %}
{% set pos_type = first_l.attrib.get('type')|tagfilter(_from, _to) %}
{% else %}
{% set pos_type = '' %}
{% endif %}
{% set pos_text = pos|tagfilter(_from, _to) + " " + pos_type %}
{% else %}
{% set pos_text = pos|tagfilter(_from, _to) %}
{%- endif %}
{{ first_l|text }} ({{ pos_text }})
{# vim: set ts=4 sw=4 tw=72 syntax=htmljinja : #}