Re: [NTG-context] XML and ConTeXt - no XML text showing up in output
On 12/27/2013 1:15 AM, Steve Anderson wrote: I'm following the instructions in http://pragma-ade.com/general/manuals/xml-mkiv.pdf for using XML in ConTeXt. When I run the first example, I get a PDF, but only the hard-coded text string Contents is in the PDF; none of the strings from the XML file are in the PDF. Any ideas? - Steve Mac OSX 10.7.5, MacTEX-2013 I've created the following two files: == demo.xml == ?xml version='1.0' standalone='yes? !-- From http://pragma-ade.com/general/manuals/xml-mkiv..pdf http://pragma-ade.com/general/manuals/xml-mkiv.pdf -- document section titleSome title/title content pa paragraph of text/p panother paragraph of text/p /content /section /document == demo-converter.tex == \startxmlsetups xml:demo:base \xmlsetsetup{demo}{*}{-} ^^ That is a pretty strong one \xmlsetsetup{demo}{document|section|p}{xml:demo:*} add content|title \stopxmlsetups \xmlregisterdocumentsetup{demo}{xml:demo:base} \startxmlsetups xml:demo:document \title{Contents} \placelist[chapter] \page \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:demo:section \chapter{\xmlfirst{#1}{/title}} \xmlfirst{#1}{/content} \stopxmlsetups \startxmlsetups xml:demo:p \xmlflush{#1}\endgraf \stopxmlsetups \startxmlsetups xml:demo:content \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:demo:title \xmlflush{#1} \stopxmlsetups \xmlprocessfile{demo}{demo.xml}{} == and the command I'm running is context demo-converter.tex Standard out is: == ConTeXt ver: 2013.04.20 01:15 MKIV current fmt: 2013.12.26 int: english/english system 'cont-new.mkiv' loaded (/usr/local/texlive/2013/texmf-dist/tex/context/base/cont-new.mkiv) system files jobname 'demo-converter', input './demo-converter', result 'demo-converter' fontslatin modern fonts are not preloaded languageslanguage 'en' is active (/Users/sanderson/dev/doc/main/feature/texml/content/demo-converter.tex structuresectioning title @ level 2 : 0.0 - Contents fontsbeware: no fonts are loaded yet, using 'lm mono' in box backend xmp using file '/usr/local/texlive/2013/texmf-dist/tex/context/base/lpdf-pdx.xml' pagesflushing realpage 1, userpage 1 structuresectioning chapter @ level 2 : 0.1 - \xmlfirst {demo::5}{/title} ) system invalid \starttext ... \stoptext structure pagesflushing realpage 2, userpage 2 )/usr/local/texlive/2013/texmf-dist/fonts/opentype/public/lm/lmmono10-regular.otf mkiv lua stats used config file: selfautoparent:/texmfcnf.lua;selfautoparent:/texmf-dist/web2c/texmfcnf.lua mkiv lua stats used cache path: readable: '/usr/local/texlive/2013/texmf-var/luatex-cache/context/a86c089b384a3076dc514ba966a1fac9' | readable+writable: '/Users/sanderson/Library/texlive/2013/texmf-var/luatex-cache/context/a86c089b384a3076dc514ba966a1fac9' mkiv lua stats resource resolver: loadtime 0.415 seconds, 0 scans with scantime 0.000 seconds, 0 shared scans, 7 found files, scanned paths: none mkiv lua stats stored bytecode data: 326 modules (0.207 sec), 69 tables (0.003 sec), 395 chunks (0.210 sec) mkiv lua stats cleaned up reserved nodes: 41 nodes, 9 lists of 441 mkiv lua stats node memory usage: 2 glue, 3 penalty, 12 attribute, 36 glue_spec, 3 attribute_list mkiv lua stats node list callback tasks: 6 unique task lists, 5 instances (re)created, 103 calls mkiv lua stats used backend: pdf (backend for directly generating pdf output) mkiv lua stats loaded patterns: en::2 mkiv lua stats jobdata time: 0.005 seconds saving, 0.001 seconds loading mkiv lua stats callbacks: 290 direct, 197 indirect, 487 total mkiv lua stats randomizer: resumed with value 0.88342237327407 mkiv lua stats xml load time: 0.002 seconds, 1 files, 1 converted mkiv lua stats lxml preparation time: 0.000 seconds, 9 nodes, 20 lpath calls, 1 cached calls mkiv lua stats result saved in file: demo-converter.pdf, compresslevel 3, objectcompreslevel 3 mkiv lua stats loaded fonts: 1 files: lmmono10-regular.otf mkiv lua stats fonts load time: 0.042 seconds mkiv lua stats luatex banner: this is luatex, version beta-0.76.0-2013052718 (tex live 2013) (rev 4627) mkiv lua stats control sequences: 35558 of 65536 + 10 mkiv lua stats current memory usage: 47 MB (ctx: 47 MB) mkiv lua stats runtime: 0.676 seconds, 2 processed pages, 2 shipped pages, 2.959 pages/second system | total runtime: 1.382 == and here's the log file == (/usr/local/texlive/2013/texmf-dist/tex/context/base/cont-yes.mkiv ConTeXt ver: 2013.04.20 01:15 MKIV current fmt: 2013.12.26 int: english/english system 'cont-new.mkiv' loaded (/usr/local/texlive/2013/texmf-dist/tex/context/base/cont-new.mkiv) system files jobname 'demo-converter', input './demo-converter', result
[NTG-context] XML and ConTeXt - no XML text showing up in output
I'm following the instructions in http://pragma-ade.com/general/manuals/xml-mkiv.pdf for using XML in ConTeXt. When I run the first example, I get a PDF, but only the hard-coded text string Contents is in the PDF; none of the strings from the XML file are in the PDF. Any ideas? - Steve Mac OSX 10.7.5, MacTEX-2013 I've created the following two files: == demo.xml == ?xml version='1.0' standalone='yes? !-- From http://pragma-ade.com/general/manuals/xml-mkiv.pdf -- document section titleSome title/title content pa paragraph of text/p panother paragraph of text/p /content /section /document == demo-converter.tex == \startxmlsetups xml:demo:base \xmlsetsetup{demo}{*}{-} \xmlsetsetup{demo}{document|section|p}{xml:demo:*} \stopxmlsetups \xmlregisterdocumentsetup{demo}{xml:demo:base} \startxmlsetups xml:demo:document \title{Contents} \placelist[chapter] \page \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:demo:section \chapter{\xmlfirst{#1}{/title}} \xmlfirst{#1}{/content} \stopxmlsetups \startxmlsetups xml:demo:p \xmlflush{#1}\endgraf \stopxmlsetups \xmlprocessfile{demo}{demo.xml}{} == and the command I'm running is context demo-converter.tex Standard out is: == ConTeXt ver: 2013.04.20 01:15 MKIV current fmt: 2013.12.26 int: english/english system 'cont-new.mkiv' loaded (/usr/local/texlive/2013/texmf-dist/tex/context/base/cont-new.mkiv) system files jobname 'demo-converter', input './demo-converter', result 'demo-converter' fontslatin modern fonts are not preloaded languageslanguage 'en' is active (/Users/sanderson/dev/doc/main/feature/texml/content/demo-converter.tex structuresectioning title @ level 2 : 0.0 - Contents fontsbeware: no fonts are loaded yet, using 'lm mono' in box backend xmp using file '/usr/local/texlive/2013/texmf-dist/tex/context/base/lpdf-pdx.xml' pagesflushing realpage 1, userpage 1 structuresectioning chapter @ level 2 : 0.1 - \xmlfirst {demo::5}{/title} ) system invalid \starttext ... \stoptext structure pagesflushing realpage 2, userpage 2 )/usr/local/texlive/2013/texmf-dist/fonts/opentype/public/lm/lmmono10-regular.otf mkiv lua stats used config file: selfautoparent:/texmfcnf.lua;selfautoparent:/texmf-dist/web2c/texmfcnf.lua mkiv lua stats used cache path: readable: '/usr/local/texlive/2013/texmf-var/luatex-cache/context/a86c089b384a3076dc514ba966a1fac9' | readable+writable: '/Users/sanderson/Library/texlive/2013/texmf-var/luatex-cache/context/a86c089b384a3076dc514ba966a1fac9' mkiv lua stats resource resolver: loadtime 0.415 seconds, 0 scans with scantime 0.000 seconds, 0 shared scans, 7 found files, scanned paths: none mkiv lua stats stored bytecode data: 326 modules (0.207 sec), 69 tables (0.003 sec), 395 chunks (0.210 sec) mkiv lua stats cleaned up reserved nodes: 41 nodes, 9 lists of 441 mkiv lua stats node memory usage: 2 glue, 3 penalty, 12 attribute, 36 glue_spec, 3 attribute_list mkiv lua stats node list callback tasks: 6 unique task lists, 5 instances (re)created, 103 calls mkiv lua stats used backend: pdf (backend for directly generating pdf output) mkiv lua stats loaded patterns: en::2 mkiv lua stats jobdata time: 0.005 seconds saving, 0.001 seconds loading mkiv lua stats callbacks: 290 direct, 197 indirect, 487 total mkiv lua stats randomizer: resumed with value 0.88342237327407 mkiv lua stats xml load time: 0.002 seconds, 1 files, 1 converted mkiv lua stats lxml preparation time: 0.000 seconds, 9 nodes, 20 lpath calls, 1 cached calls mkiv lua stats result saved in file: demo-converter.pdf, compresslevel 3, objectcompreslevel 3 mkiv lua stats loaded fonts: 1 files: lmmono10-regular.otf mkiv lua stats fonts load time: 0.042 seconds mkiv lua stats luatex banner: this is luatex, version beta-0.76.0-2013052718 (tex live 2013) (rev 4627) mkiv lua stats control sequences: 35558 of 65536 + 10 mkiv lua stats current memory usage: 47 MB (ctx: 47 MB) mkiv lua stats runtime: 0.676 seconds, 2 processed pages, 2 shipped pages, 2.959 pages/second system | total runtime: 1.382 == and here's the log file == (/usr/local/texlive/2013/texmf-dist/tex/context/base/cont-yes.mkiv ConTeXt ver: 2013.04.20 01:15 MKIV current fmt: 2013.12.26 int: english/english system 'cont-new.mkiv' loaded (/usr/local/texlive/2013/texmf-dist/tex/context/base/cont-new.mkiv) system files jobname 'demo-converter', input './demo-converter', result 'demo-converter' fontslatin modern fonts are not preloaded languageslanguage 'en' is active (/Users/sanderson/dev/doc/main/feature/texml/content/demo-converter.tex structuresectioning title @ level 2 : 0.0 - Contents fontsbeware: no fonts are loaded yet, using 'lm mono'