[NTG-context] xml-processing: missing or ungrouped '='

Achim Jander achim at jander.de
Fri Jan 7 19:04:15 CET 2011


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


More information about the ntg-context mailing list