%D \module %D [ file=x-pending, %D version=2008.04.04, %D title=\CONTEXT\ Style File, %D subtitle=Track \MKII\ \XML\ usage in \MKIV, %D author=Hans Hagen, %D date=\currentdate, %D copyright={PRAGMA / Hans Hagen \& Ton Otten}] %C %C This module is part of the \CONTEXT\ macro||package and is %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. %D Including this module will result in the production of %D a file \type {jobname-pending-xml.log} which has a %D \LUA\ table with \XML\ elements that are still catched by %D \MKII\ code, when enabled. \startluacode dofile(resolvers.find_file("lxml-inf.lua")) local list = { } function document.check_pending_xml_element(str) list[str] = (list[str] and (list[str]+1)) or 1 end function document.show_pending_xml_elements() io.savedata("\jobname-pending-xml-mkii.log", table.serialize(list)) io.savedata("\jobname-pending-xml-mkiv.log", table.serialize(lxml.get_command_status())) end \stopluacode \defineXMLcommand [default] {\ctxlua{document.check_pending_xml_element("\currentXMLelement")}} \appendtoks \ctxlua{document.show_pending_xml_elements()}% \to \everystoptext \endinput