xml-processing: missing or ungrouped '='
Hi all a problem with processing XML data (maybe a lack of knowledge). If in the example below I set the chapter-attributes directly in \startxmlsetups xml:title (commented out) everything is like I expected. Because I have headings to be treated equally in multiple hierarchies I tried to delegate the processing to splitHeader. But then the processing always complains about a missing or ungrouped '=' in line ... (activated in the examle given). \startbuffer[test] <a> <title>some text</title> <b>more text </b> <b>more text </b> <title><num>333</num>some text</title> <b>more text </b> <b>more text </b> </a> \stopbuffer \startxmlsetups xml:testsetups \xmlsetsetup{\xmldocument}{a|b|title}{xml:*} \xmlsetsetup{\xmldocument}{num}{-} \stopxmlsetups \xmlregistersetup{xml:testsetups} \startxmlsetups xml:a \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:b \startparagraph \xmlflush{#1} \stopparagraph \stopxmlsetups \startxmlsetups xml:ueberForceFlush \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:splitHeader %works not number=\xmldoifelse{#1}{/num}{yes}{no}, ownnumber=\xmldoifelse{#1}{/num}{\xmlcommand{#1}{/num}{xml:ueberForceFlush}}{}, title={\xmlflush{#1}}, \stopxmlsetups \startxmlsetups xml:title \startchapter[ \xmlcommand{#1}{.}{xml:splitHeader} %number=\xmldoifelse{#1}{/num}{yes}{no}, %works %ownnumber=\xmldoifelse{#1}{/num}{\xmlcommand{#1}{/num}{xml:ueberForceFlush}}{},%works %title={\xmlflush{#1}},%works ] \xmlflush{#1} \stopchapter \stopxmlsetups \setupheader[chapter][ownnumber=yes] \starttext \xmlprocessbuffer{main}{test}{} \stoptext Thanks, Achim
On 7-1-2011 7:04, Achim Jander wrote:
\startxmlsetups xml:title \startchapter[ \xmlcommand{#1}{.}{xml:splitHeader}
title=...
%number=\xmldoifelse{#1}{/num}{yes}{no}, %works %ownnumber=\xmldoifelse{#1}{/num}{\xmlcommand{#1}{/num}{xml:ueberForceFlush}}{},%works
%title={\xmlflush{#1}},%works
there's also \xmlraw{#1}{spec} which works nice with tables of content as it passes the node id Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
participants (2)
-
Achim Jander
-
Hans Hagen