latest beta doesn't process my xml files
Hi Hans, more serious: today's beta doesn't process my xml files. Too late today for a minimal example; maybe the error can give a clue: systems : end file vorlesung-mkiv at line 1 systems : begin file historiker at line 1 ! LuaTeX error no string to print stack traceback: [C]: in function 'texsprint' ...text/tex/texmf-context/tex/context/base/lxml-ent.lua:47: in function <...text/tex/texmf-context/tex/context/base/lxml-ent.lua:37> [C]: in function 'match' ...text/tex/texmf-context/tex/context/base/lxml-tex.lua:498: in function '@tx@' ...text/tex/texmf-context/tex/context/base/lxml-tab.lua:751: in function '@dc@' ...text/tex/texmf-context/tex/context/base/lxml-tab.lua:774: in function 'xmlserialize' ...text/tex/texmf-context/tex/context/base/lxml-tex.lua:545: in function 'xmlsprint' ...text/tex/texmf-context/tex/context/base/lxml-tex.lua:1207: in function 'flush' <main ctx instance>:1: in main chunk. \xmlflush #1->\ctxlua {lxml.flush("#1")} \dostructurecomponent ...uctureparameter \c!title }\xdef \currentstructurebo... \doregisterstructurehead ... \c!command =, #2][#3] \reportcurrentstructure \dohandlestructurehead ...ructurehead {#1}{#2}{#3} \let \getstructureheadsync... l.8 } \xmlflush #1->\ctxlua {lxml.flush("#1")} ... l.2 \xmlprocess{\xmldocument}{./historiker.xml}{} ? ^\/Users/tas/context/tex/texmf-osx-intel/bin/context: line 2: 3064 Same file with same environment processed without problems by version: 2009.10.02 13:14 Thank goodness I still have an older version around... All best Thomas
Thomas A. Schmitz wrote:
Hi Hans,
more serious: today's beta doesn't process my xml files. Too late today for a minimal example; maybe the error can give a clue:
systems : end file vorlesung-mkiv at line 1 systems : begin file historiker at line 1 ! LuaTeX error no string to print stack traceback: [C]: in function 'texsprint' ...text/tex/texmf-context/tex/context/base/lxml-ent.lua:47: in function <...text/tex/texmf-context/tex/context/base/lxml-ent.lua:37> [C]: in function 'match' ...text/tex/texmf-context/tex/context/base/lxml-tex.lua:498: in function '@tx@' ...text/tex/texmf-context/tex/context/base/lxml-tab.lua:751: in function '@dc@' ...text/tex/texmf-context/tex/context/base/lxml-tab.lua:774: in function 'xmlserialize' ...text/tex/texmf-context/tex/context/base/lxml-tex.lua:545: in function 'xmlsprint' ...text/tex/texmf-context/tex/context/base/lxml-tex.lua:1207: in function 'flush' <main ctx instance>:1: in main chunk. \xmlflush #1->\ctxlua {lxml.flush("#1")}
\dostructurecomponent ...uctureparameter \c!title }\xdef \currentstructurebo... \doregisterstructurehead ... \c!command =, #2][#3] \reportcurrentstructure \dohandlestructurehead ...ructurehead {#1}{#2}{#3} \let \getstructureheadsync... l.8 }
\xmlflush #1->\ctxlua {lxml.flush("#1")}
.... l.2 \xmlprocess{\xmldocument}{./historiker.xml}{}
? ^\/Users/tas/context/tex/texmf-osx-intel/bin/context: line 2: 3064
Same file with same environment processed without problems by version: 2009.10.02 13:14
Thank goodness I still have an older version around...
in lxml-ent.lua ... function xml.resolved_entity(str) local e = xml.entities[str] if e then local te = type(e) if te == "function" then e(str) elseif e then texsprint(ctxcatcodes,e) end else texsprint(ctxcatcodes,"\\xmle{",str,"}{",utfupper(str),"}") -- we need to use our own upper end end there has been quite some changes in the xml machinery; what exactly do you do with entities? 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 -----------------------------------------------------------------
On Oct 20, 2009, at 3:52 PM, Hans Hagen wrote:
in lxml-ent.lua ...
function xml.resolved_entity(str) local e = xml.entities[str] if e then local te = type(e) if te == "function" then e(str) elseif e then texsprint(ctxcatcodes,e) end else texsprint(ctxcatcodes,"\\xmle{",str,"}{",utfupper(str),"}") -- we need to use our own upper end end
Thank you Hans, but that's not yet the solution. I still get the same error. I thought it might be related to the fact that I had the entity &hfill; in my titles, but even after removing it, I still get the error.
there has been quite some changes in the xml machinery; what exactly do you do with entities?
Well, I just map a few special characters and commands to entities. In my environment, I have \setupxml[entities=mkii] and then stuff like this: \defineXMLentity[smallspace]{\,} \defineXMLentity[percent]{\percent} \defineXMLentity[onequarter]{\onequarter} \defineXMLentity[threequarter]{\threequarter} \defineXMLentity[onehalf]{\onehalf} \defineXMLentity[textellipsis]{\textellipsis} \defineXMLentity[nbsp]{~} \defineXMLentity[hfill]{\hfill} Is there a different way for doing this now? All best Thomas
Thomas A. Schmitz wrote:
On Oct 20, 2009, at 3:52 PM, Hans Hagen wrote:
in lxml-ent.lua ...
function xml.resolved_entity(str) local e = xml.entities[str] if e then local te = type(e) if te == "function" then e(str) elseif e then texsprint(ctxcatcodes,e) end else texsprint(ctxcatcodes,"\\xmle{",str,"}{",utfupper(str),"}") -- we need to use our own upper end end
Thank you Hans, but that's not yet the solution. I still get the same error. I thought it might be related to the fact that I had the entity &hfill; in my titles, but even after removing it, I still get the error.
there has been quite some changes in the xml machinery; what exactly do you do with entities?
Well, I just map a few special characters and commands to entities. In my environment, I have
\setupxml[entities=mkii]
and then stuff like this:
\defineXMLentity[smallspace]{\,} \defineXMLentity[percent]{\percent} \defineXMLentity[onequarter]{\onequarter} \defineXMLentity[threequarter]{\threequarter} \defineXMLentity[onehalf]{\onehalf} \defineXMLentity[textellipsis]{\textellipsis} \defineXMLentity[nbsp]{~} \defineXMLentity[hfill]{\hfill}
Is there a different way for doing this now?
mkii xml is no longer enabled by default in mkiv ... can you try the low level newby \xmlsetentity{smallspace}{\,} (otherwise, send me a test file) 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 -----------------------------------------------------------------
participants (2)
-
Hans Hagen
-
Thomas A. Schmitz