Dear list,

I have the following sample:

  \startbuffer[demo]
  <doc>
    <section id="section-i1">
      <text>first</text>
    </section>
    <section id="section-i2">
      <text>second</text>
    </section>

  </doc>
  \stopbuffer

  \startxmlsetups xml:initialize
     \xmlsetsetup{#1}{doc|section}{xml:*}
  \stopxmlsetups

  \xmlregistersetup{xml:initialize}

  \startxmlsetups xml:doc
     \xmlflush{#1}
  \stopxmlsetups

  \startxmlsetups xml:section
     \startsection[title={\xmlatt{#1}{id}},
        beforesection={\doif{\xmlatt{#1}{id}}{\selectedtopic}
            {conditional}}]
        \xmlflush{#1}
        \doif{\xmlatt{#1}{id}}{\selectedtopic}{conditional}
     \stopsection
  \stopxmlsetups

  \def\selectedtopic{section-i1}

  \starttext
     \xmlprocessbuffer{main}{demo}{}
  \stoptext

How can I make the conditional in the beforesection option work?

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to