Re: [NTG-context] two small questions about the mkiv roadmap

2008-05-02 Thread Hans Hagen
Wolfgang Schuster wrote:
 On Thu, May 1, 2008 at 11:00 AM, Thomas A. Schmitz
 [EMAIL PROTECTED] 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
  titleThe Title/title
  content
pA 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
  titleThe Title/title
  content
pA 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
___


Re: [NTG-context] two small questions about the mkiv roadmap

2008-05-01 Thread 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):

?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
 titleThe Title/title
 content
   pA 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
___


Re: [NTG-context] two small questions about the mkiv roadmap

2008-05-01 Thread Wolfgang Schuster
On Thu, May 1, 2008 at 11:00 AM, Thomas A. Schmitz
[EMAIL PROTECTED] 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
  titleThe Title/title
  content
pA 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
___


Re: [NTG-context] two small questions about the mkiv roadmap

2008-05-01 Thread Thomas A. Schmitz

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
___


Re: [NTG-context] two small questions about the mkiv roadmap

2008-04-30 Thread Hans Hagen
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
___


Re: [NTG-context] two small questions about the mkiv roadmap

2008-04-30 Thread luigi scarso
  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
___