I am thinking in creating a package to manage some metadata of books (like author, title, ...). This metadata will be defined in an external file and retrieved in the document. (This has nothing to do with the PDF metadata concept!).
It would be easy if the metadata will consist only of values of a variable (a solution like What is the recommended way to assign a value to a variable and retrieve it for later use? using l3prop will work).
But in my case I want to specify some behaviour, for example, when the value of the metadata is empty. I will like to assign a macro to be executed when the value is retrieved but empty.
The syntax of the metadata file will be something like this:
\setmetadata{author}{The name of the author}
\setmetadata[ifempty=\throwerror]{title}{The title}
And the values will be retrieved in the document
\getmetadata{author}
To implement this, I was wondering that the latex3 data table l3dt module was going to be useful. But it seems it has been removed from the code tree. My next approach will be to use a l3prop inside a l3prop. But before going deep on this, is it possible to nest property lists?
\getmetadatado, precisely? – egreg Aug 19 '16 at 10:39biblatex. – TeXtnik Aug 19 '16 at 11:00l3dt? I have never heard of it. – Henri Menke Aug 19 '16 at 16:17