On Thu, May 1, 2008 at 11:00 AM, Thomas A. Schmitz
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):
\startbuffer[test]
<?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> \stopbuffer
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}{} \xmlprocessbuffer{main}{est}{} \stoptext
Easier for test because you need only one file.
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!
It's fathers day :-) Wolfgang