Hello!
A Markdown document resembles the following:
::: {.concurrent title="Berth 5" location="San Diego"}
Text Goes Here
:::
::: {.concurrent title="Road" location="Beale AFB"}
Different Text Goes Here
:::
The XHTML generated from that document resembles:
Text Goes Here
Different Text Goes Here
Environments for the DIV element gets translated using:
\startxmlsetups xml:div
\start[\xmlatt{#1}{class}]\xmlflush{#1}\stop
\stopxmlsetups
This creates "\startconcurrent" and "\stopconcurrent", which are later
defined using "\definestartstop[concurrent]".
I'd like to dynamically define all the data- attributes to make key/value
pairs accessible from the document. For example, I have this:
\definestartstop[concurrent][
before={%
\blank[big]%
\setMPtext{1}{Berth 5}%
\startTextConcurrentFrame},
after={\stopTextConcurrentFrame\blank[big]},
]
I'd like to replace \setMPText calls with a reference to a dynamically
created variable reference. For example:
\setMPtext{1}{\usermap[concurrent.title]}
\setMPtext{2}{\usermap[concurrent.location]}
I can verify the attribute values exist by exporting them to the document:
\startxmlsetups xml:div
title:\xmlatt{#1}{data-title} location:\xmlatt{#1}{data-location}
\start[\xmlatt{#1}{class}]\xmlflush{#1}\stop
\stopxmlsetups
How would you change the xml:div setup to create a map of its attributes as
key/value pairs?
Thank you!