ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* two small questions about the mkiv roadmap
@ 2008-04-30  7:54 Thomas A. Schmitz
  2008-04-30  8:19 ` Wolfgang Schuster
  0 siblings, 1 reply; 8+ messages in thread
From: Thomas A. Schmitz @ 2008-04-30  7:54 UTC (permalink / raw)
  To: mailing ConTeXt users list for

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
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: two small questions about the mkiv roadmap
  2008-04-30  7:54 two small questions about the mkiv roadmap Thomas A. Schmitz
@ 2008-04-30  8:19 ` Wolfgang Schuster
  2008-04-30 16:10   ` Hans Hagen
  0 siblings, 1 reply; 8+ messages in thread
From: Wolfgang Schuster @ 2008-04-30  8:19 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi Thomas,

On Wed, Apr 30, 2008 at 9:54 AM, Thomas A. Schmitz
<thomas.schmitz@uni-bonn.de> wrote:
> 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
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: two small questions about the mkiv roadmap
  2008-04-30  8:19 ` Wolfgang Schuster
@ 2008-04-30 16:10   ` Hans Hagen
  2008-04-30 19:28     ` luigi scarso
  2008-05-01  9:00     ` Thomas A. Schmitz
  0 siblings, 2 replies; 8+ messages in thread
From: Hans Hagen @ 2008-04-30 16:10 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: two small questions about the mkiv roadmap
  2008-04-30 16:10   ` Hans Hagen
@ 2008-04-30 19:28     ` luigi scarso
  2008-05-01  9:00     ` Thomas A. Schmitz
  1 sibling, 0 replies; 8+ messages in thread
From: luigi scarso @ 2008-04-30 19:28 UTC (permalink / raw)
  To: mailing list for ConTeXt users

>  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
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: two small questions about the mkiv roadmap
  2008-04-30 16:10   ` Hans Hagen
  2008-04-30 19:28     ` luigi scarso
@ 2008-05-01  9:00     ` Thomas A. Schmitz
  2008-05-01  9:12       ` Wolfgang Schuster
  1 sibling, 1 reply; 8+ messages in thread
From: Thomas A. Schmitz @ 2008-05-01  9:00 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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 "&#x02013;">
]>

<document>
   <section>
     <title>The Title</title>
     <content>
       <p>A line of text &ndash; 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
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: two small questions about the mkiv roadmap
  2008-05-01  9:00     ` Thomas A. Schmitz
@ 2008-05-01  9:12       ` Wolfgang Schuster
  2008-05-01  9:58         ` Thomas A. Schmitz
  2008-05-02  6:50         ` Hans Hagen
  0 siblings, 2 replies; 8+ messages in thread
From: Wolfgang Schuster @ 2008-05-01  9:12 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Thu, May 1, 2008 at 11:00 AM, Thomas A. Schmitz
<thomas.schmitz@uni-bonn.de> 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 "&#x02013;">
>  ]>
>
>  <document>
>    <section>
>      <title>The Title</title>
>      <content>
>        <p>A line of text &ndash; 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
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: two small questions about the mkiv roadmap
  2008-05-01  9:12       ` Wolfgang Schuster
@ 2008-05-01  9:58         ` Thomas A. Schmitz
  2008-05-02  6:50         ` Hans Hagen
  1 sibling, 0 replies; 8+ messages in thread
From: Thomas A. Schmitz @ 2008-05-01  9:58 UTC (permalink / raw)
  To: mailing list for ConTeXt users


On May 1, 2008, at 11:12 AM, Wolfgang Schuster wrote:

> Easier for test because you need only one file.
>
Thanks Wolfgang!

>>
>> Have fun in Poland!
>
> It's fathers day :-)


I know. My two sons insisted on bringing me breakfast at 6.45. And  
they wanted to charge for it too :-)

Thomas

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: two small questions about the mkiv roadmap
  2008-05-01  9:12       ` Wolfgang Schuster
  2008-05-01  9:58         ` Thomas A. Schmitz
@ 2008-05-02  6:50         ` Hans Hagen
  1 sibling, 0 replies; 8+ messages in thread
From: Hans Hagen @ 2008-05-02  6:50 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Wolfgang Schuster wrote:
> On Thu, May 1, 2008 at 11:00 AM, Thomas A. Schmitz
> <thomas.schmitz@uni-bonn.de> 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 "&#x02013;">
>>  ]>
>>
>>  <document>
>>    <section>
>>      <title>The Title</title>
>>      <content>
>>        <p>A line of text &ndash; 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 "&#x02013;">
]>

<document>
    <section>
      <title>The Title</title>
      <content>
        <p>A line of text &ndash; 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
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2008-05-02  6:50 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-30  7:54 two small questions about the mkiv roadmap Thomas A. Schmitz
2008-04-30  8:19 ` Wolfgang Schuster
2008-04-30 16:10   ` Hans Hagen
2008-04-30 19:28     ` luigi scarso
2008-05-01  9:00     ` Thomas A. Schmitz
2008-05-01  9:12       ` Wolfgang Schuster
2008-05-01  9:58         ` Thomas A. Schmitz
2008-05-02  6:50         ` Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).