It is possible to put seq
in prop
, but due to the nature of expl3
containers, if one takes the sequence out from the property list and modify it, the changes will not reflect on the original sequence stored in the property list. It is still possible, however, to overwrite the entire sequence in the property list with an updated version. But one can imagine that there is huge overhead.
A clever design is to use command names as a "property list", where LaTeX does the key-val association for you. An example is shown below:
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{expl3}
\begin{document}
\ExplSyntaxOn
\cs_set:Npn \__get_seq_name:n #1 {
g__meta_#1_seq
}
\newcommand{\pushmetadata}[2]{
\seq_if_exist:cF {\__get_seq_name:n {#1}} {
\seq_new:c {\__get_seq_name:n {#1}}
}
\seq_gput_right:cn {\__get_seq_name:n {#1}} {#2}
}
\newcommand{\getmetadata}[2]{
\seq_item:cn {\__get_seq_name:n {#1}} {#2}
}
\ExplSyntaxOff
\pushmetadata{author}{John Doe}
\pushmetadata{author}{Doe Jane}
\pushmetadata{title}{title1}
\pushmetadata{title}{title2}
\par\getmetadata{author}{1}
\par\getmetadata{author}{2}
\par\getmetadata{title}{1}
\par\getmetadata{title}{2}
\end{document}