On Apr 30, 2008, at 6:10 PM, Hans Hagen wrote:
Wolfgang Schuster wrote:
The DTD is a problem with the ConTeXts XML parser and has nothing to do with LuaTeX (hope this is right).
i need a test file then (can look into it next week; i'm at bachotek now)
OK, I hope this is a minimal test: I have this xml file (which, I think, is valid xml): <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE context [ <!ELEMENT document (section)> <!ELEMENT section (title,content)> <!ELEMENT title (#PCDATA)> <!ELEMENT content (#PCDATA)> <!ENTITY ndash "–"> ]> <document> <section> <title>The Title</title> <content> <p>A line of text – with a dash.</p> </content> </section> </document> and this environment myenv.tex: \startxmlsetups xml:mysetups \xmlsetsetup{\xmldocument}{document|section|}{xml:*} \stopxmlsetups \xmlregistersetup{xml:mysetups} \startxmlsetups xml:document \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:section \section{\xmlfirst{#1}{title}} \xmlfirst{#1}{content}\par \stopxmlsetups \enableregime[utf] \defineXMLentity[ndash]{--} \starttext \xmlprocess{main}{\inputfilename}{} \stoptext If I process this with texexec --lua --env=myenv test.xml, the typeset output I get is "invalid xml file." If I remove the entire DTD (so the first line is <document>), it is typeset normally. Have fun in Poland! Best Thomas