Il giorno mar, 12/12/2017 alle 22.36 +0100, Pablo Rodriguez ha scritto:
On 12/11/2017 11:51 PM, mf wrote:
I think it's the "#header" without the name of an element before. Try specifying an element you find in your document (i.e. "{{header, tag#header}}"), just to see if it compiles.
If it compiles, it's likely you found a bug.
No, it doesn’t compile.
But {header, #header} shouldn’t be a problem, accorrding to http://pragma-ade.com/general/manuals/xml-mkiv.pdf#page=34.
If this isn’t a bug, I wonder what I’m doing wrong.
Could you send a minimal (not) working example?
I have the following code:
\xmlsetsetup{\xmldocument} {{header, #header}} {xml:titlepage}
The error you get says that #header is read as a macro parameter, but the "#" is not followed by a number, so the error. Why "#header" is interpreted as a parameter? It smells like the "#" is being parsed in a context with the wrong catcodes. I would investigate the first (\xmldocument) and the third argument (your xml:titlepage setup). For the first one, I've always used the form: \xmlsetsetup{#1}{{header, #header}}{xml:titlepage} I'm reading from xml-mkiv.pdf, at page 19, that "The macro \xmldocument expands to the current document id. There is also \xmlself which expands to the current node number (#1 in setups)." Could you modify your setup to use that form ("#1" i mean) and see if it works? Best wishes, Massi