two small questions about the mkiv roadmap
Hi all, esp. Hans and Taco, just two simple questions about some minor imperfections in mkiv/ luatex. I'm not impatient, just wondering if these are things that you're working on right now or if they will have to wait: 1. processing xml files with a DTD. This is something we discussed a couple of weeks ago: when I process a valid xml file which begins with a DTD, the output I get in mkiv is "invalid xml file"; the same file processes fine when I remove the DTD. Back then (on 08-03-17), Taco wrote: "It is a bug in luatex, but not an easy one to fix." So I'm wondering if there's any progress on this one, or if it has to wait. 2. error reports in luatex. This is something that comes up time and again on the mailing list and which I experienced myself yesterday. I had inadvertently deleted my luatex-cache and tried to run mkiv on a file. The report I got was "attempt to call field 'error' (a nil value)". Now I'm aware that TeX error reporting could be cryptic at times, but at least it was a kind of cryptic to which we had gotten used. With luatex, I'm constantly baffled - in a 100 years, I wouldn't have guessed that this error message meant "I can't find the cache and the format." So I was wondering if this is something that you're working on: making error messages more informative/comprehensible for users. Again, I'm not impatient, just curious. All best Thomas
Hi Thomas,
On Wed, Apr 30, 2008 at 9:54 AM, Thomas A. Schmitz
Hi all, esp. Hans and Taco,
just two simple questions about some minor imperfections in mkiv/ luatex. I'm not impatient, just wondering if these are things that you're working on right now or if they will have to wait:
1. processing xml files with a DTD. This is something we discussed a couple of weeks ago: when I process a valid xml file which begins with a DTD, the output I get in mkiv is "invalid xml file"; the same file processes fine when I remove the DTD. Back then (on 08-03-17), Taco wrote: "It is a bug in luatex, but not an easy one to fix." So I'm wondering if there's any progress on this one, or if it has to wait.
What Taco meant was the problem with the XML declaration in the first line which was printed verbatim in your document instead of being ignored and Hans fixed it with Lua code. The DTD is a problem with the ConTeXts XML parser and has nothing to do with LuaTeX (hope this is right).
2. error reports in luatex. This is something that comes up time and again on the mailing list and which I experienced myself yesterday. I had inadvertently deleted my luatex-cache and tried to run mkiv on a file. The report I got was "attempt to call field 'error' (a nil value)". Now I'm aware that TeX error reporting could be cryptic at times, but at least it was a kind of cryptic to which we had gotten used. With luatex, I'm constantly baffled - in a 100 years, I wouldn't have guessed that this error message meant "I can't find the cache and the format." So I was wondering if this is something that you're working on: making error messages more informative/comprehensible for users.
Hadn't there plans to give more detailed error messages for ConTeXt as html page. Wolfgang
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)
2. error reports in luatex. This is something that comes up time and again on the mailing list and which I experienced myself yesterday. I had inadvertently deleted my luatex-cache and tried to run mkiv on a file. The report I got was "attempt to call field 'error' (a nil value)". Now I'm aware that TeX error reporting could be cryptic at times, but at least it was a kind of cryptic to which we had gotten used. With luatex, I'm constantly baffled - in a 100 years, I wouldn't have guessed that this error message meant "I can't find the cache and the format." So I was wondering if this is something that you're working on: making error messages more informative/comprehensible for users.
Hadn't there plans to give more detailed error messages for ConTeXt as html page.
indeed, but i need someone to write me a xul application that will reuse the already opened window Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
indeed, but i need someone to write me a xul application that will reuse the already opened window firefox ? Not IE ? -- luigi it's new . it's powerful . it's luatex . http://www.luatex.org
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
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
Wolfgang Schuster wrote:
On Thu, May 1, 2008 at 11:00 AM, Thomas A. Schmitz
wrote: 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.
or just (for testing) mtxrun --script blabla.lua : str = [[ <?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> ]] x = xml.convert(str) xml.merge_entities(x) xml.resolve_entities(x) print(table.serialize(x)) i fixed the bug but no upload yet; also, i'm still not sure about merging entities defined in the document ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
participants (4)
-
Hans Hagen
-
luigi scarso
-
Thomas A. Schmitz
-
Wolfgang Schuster