Hello to everybody!

\setuphead[section][expansion=yes] expands xml reference to the actual content in TUC file:

\xmlatt {xml:name::4}{title} → First section

for titles & bookmarks. The same is not true for userdata (mkiv & mkxl). Do you know how to force expansion of userdata?

MWE attached.

Thank you,
Jano

\startbuffer[doc]
<?xml version "1.0"?>
<document>
    <section title="First section">
        text
    </section>
    <section title="Second section">
        text
    </section>
</document>
\stopbuffer

\setuphead[section][expansion=yes]
\setuplist[section][alternative=command,
                    command=\SectionListCommand]

\define[3]\SectionListCommand{%
   {\bf#1\par
   title: #2\par
   usertitle: \structurelistuservariable{usertitle}}\par
   \blank
   \endgraf}

\startxmlsetups xml:name
    \xmlsetsetup{\xmldocument}{document|section}{xml:name:*}
\stopxmlsetups
\xmlregistersetup{xml:name}

\startxmlsetups xml:name:document
    \xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:name:section
    \startsection[title=\xmlatt{#1}{title}]
                 [usertitle=\xmlatt{#1}{title}]
    \stopsection
\stopxmlsetups

\starttext
\placelist[section]
\xmlprocessbuffer{xml:name}{doc}{}
\stoptext